Implement battery low mode rendering and update logic
This commit is contained in:
@@ -22,6 +22,7 @@ private:
|
||||
Mood _mood = HAPPY;
|
||||
|
||||
bool _deadMode = false;
|
||||
bool _batteryLowMode = false;
|
||||
unsigned long _dryStartMs = 0;
|
||||
static constexpr unsigned long DRY_DEADLINE_MS = 72UL * 60UL * 60UL * 1000UL;
|
||||
unsigned long _nextDeadToggleMs = 0;
|
||||
@@ -52,20 +53,24 @@ private:
|
||||
|
||||
void updateMood(int moisturePct);
|
||||
void updateDeathMode(unsigned long now);
|
||||
void updateBatteryLowMode(int batteryPercent);
|
||||
void updateHappy(unsigned long now);
|
||||
void updateDry(unsigned long now);
|
||||
void updateTooWet(unsigned long now);
|
||||
|
||||
void renderDead(unsigned long now, const BatterySensor& battery);
|
||||
void renderBatteryLow(unsigned long now, const BatterySensor& battery);
|
||||
void renderNormal(unsigned long now, const BatterySensor& battery);
|
||||
|
||||
void drawEyesOpen(int pupilDx, int pupilDy);
|
||||
void drawEyesClosed();
|
||||
void drawEyesSmallPupils(int pupilDy, int sx, int sy);
|
||||
void drawBrowsVerySad();
|
||||
void drawBrowsWorried();
|
||||
void drawMouthHappy();
|
||||
void drawMouthFrown();
|
||||
void drawMouthFlat();
|
||||
void drawMouthNervous();
|
||||
void drawDroplet(int x, int y, bool pulse);
|
||||
void drawBubbles(int off);
|
||||
void drawSparkles(unsigned long now);
|
||||
|
||||
Reference in New Issue
Block a user