1 #include <MutilaDebug.h> 2 #include "GfxSignalStrength.h" 3 #include "CbOledDisplay.h" 5 GfxSignalStrength::GfxSignalStrength() :
12 _DBF(
"GfxSignalStrength draw@%d,%d : signal=%d\n", xOffset, yOffset, _signal);
13 uint8_t fullBar = height() - 4;
14 uint8_t h = fullBar * _signal / 100;
16 CbOledDisplay.drawVLine(xOffset+3, yOffset+fullBar+2-h, h);
17 CbOledDisplay.drawVLine(xOffset+4, yOffset+fullBar+2-h, h);
27 return CBOLED_MESSAGE_FONT_HEIGHT + (2*CBOLED_MESSAGE_FONT_VSEP);
30 void GfxSignalStrength::setSignal(uint8_t percent)
void draw(uint16_t xOffset=0, uint16_t yOffset=0)