@@ -9,13 +9,13 @@ namespace m5avatar {
99DrawContext::DrawContext (Expression expression, float breath,
1010 ColorPalette* const palette, Gaze gaze,
1111 float eyeOpenRatio, float mouthOpenRatio,
12- const char * speechText, bool batteryIcon, const lgfx::IFont* speechFont)
13- : DrawContext(expression, breath, palette, gaze, eyeOpenRatio, mouthOpenRatio, speechText, 0 , 1 , 1 , false , speechFont){};
12+ const char * speechText, bool batteryIcon, int32_t batteryLevel, const lgfx::IFont* speechFont)
13+ : DrawContext(expression, breath, palette, gaze, eyeOpenRatio, mouthOpenRatio, speechText, 0 , 1 , 1 , false , 0 , speechFont){};
1414
1515DrawContext::DrawContext (Expression expression, float breath,
1616 ColorPalette* const palette, Gaze gaze,
1717 float eyeOpenRatio, float mouthOpenRatio,
18- const char * speechText, float rotation, float scale, int colorDepth, bool batteryIcon, const lgfx::IFont* speechFont)
18+ const char * speechText, float rotation, float scale, int colorDepth, bool batteryIcon, int32_t batteryLevel, const lgfx::IFont* speechFont)
1919 : expression{expression},
2020 breath{breath},
2121 eyeOpenRatio{eyeOpenRatio},
@@ -27,6 +27,7 @@ DrawContext::DrawContext(Expression expression, float breath,
2727 scale{scale},
2828 colorDepth{colorDepth},
2929 batteryIcon (batteryIcon),
30+ batteryLevel (batteryLevel),
3031 speechFont{speechFont}{}
3132
3233Expression DrawContext::getExpression () const { return expression; }
@@ -53,4 +54,6 @@ const lgfx::IFont* DrawContext::getSpeechFont() const { return speechFont; }
5354
5455bool DrawContext::getBatteryIcon () const { return batteryIcon; }
5556
57+ int32_t DrawContext::getBatteryLevel () const { return batteryLevel; }
58+
5659} // namespace m5avatar
0 commit comments