Add readback for the current font
This commit is contained in:
@@ -69,6 +69,7 @@ public:
|
|||||||
cursor_y = y * fontHeight;
|
cursor_y = y * fontHeight;
|
||||||
}
|
}
|
||||||
static void setFont(uint8_t fontNumber); // (Future) Set the font that is being used
|
static void setFont(uint8_t fontNumber); // (Future) Set the font that is being used
|
||||||
|
static uint8_t getFont();
|
||||||
static void drawImage(const uint8_t* buffer, uint8_t x, uint8_t width) {
|
static void drawImage(const uint8_t* buffer, uint8_t x, uint8_t width) {
|
||||||
drawArea(x, 0, width, 16, buffer);
|
drawArea(x, 0, width, 16, buffer);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -155,6 +155,14 @@ void OLED::setFont(uint8_t fontNumber) {
|
|||||||
fontWidth = 12;
|
fontWidth = 12;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
uint8_t OLED::getFont() {
|
||||||
|
if (currentFont == USER_FONT_6x8)
|
||||||
|
return 1;
|
||||||
|
else if (currentFont == ExtraFontChars)
|
||||||
|
return 2;
|
||||||
|
else
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
inline void stripLeaderZeros(char *buffer) {
|
inline void stripLeaderZeros(char *buffer) {
|
||||||
//Removing the leading zero's by swapping them to SymbolSpace
|
//Removing the leading zero's by swapping them to SymbolSpace
|
||||||
// Stop 1 short so that we dont blank entire number if its zero
|
// Stop 1 short so that we dont blank entire number if its zero
|
||||||
|
|||||||
Reference in New Issue
Block a user