diff --git a/SSD1306Ascii.cpp b/SSD1306Ascii.cpp index bc13270..342ec75 100644 --- a/SSD1306Ascii.cpp +++ b/SSD1306Ascii.cpp @@ -73,8 +73,8 @@ void SSD1306Ascii::setCursor(uint8_t col, uint8_t row) { //------------------------------------------------------------------------------ void SSD1306Ascii::setFont(const uint8_t* font) { m_font = font; - fontFirstChar = readFontByte(m_font + FONT_FIRST_CHAR); - fontCharCount = readFontByte(m_font + FONT_CHAR_COUNT); + m_fontFirstChar = readFontByte(m_font + FONT_FIRST_CHAR); + m_fontCharCount = readFontByte(m_font + FONT_CHAR_COUNT); } //------------------------------------------------------------------------------ void SSD1306Ascii::setRow(uint8_t row) { @@ -104,8 +104,8 @@ size_t SSD1306Ascii::write(uint8_t ch) { } const uint8_t* base = m_font + FONT_WIDTH_TABLE; - if (ch < fontFirstChar || ch >= (fontFirstChar + fontCharCount)) return 0; - ch -= fontFirstChar; + if (ch < m_fontFirstChar || ch >= (m_fontFirstChar + m_fontCharCount)) return 0; + ch -= m_fontFirstChar; base += fontWidth * ch; for (uint8_t c = 0; c < fontWidth; c++) { uint8_t b = readFontByte(base + c); diff --git a/SSD1306Ascii.h b/SSD1306Ascii.h index 84dc390..60bf1b7 100644 --- a/SSD1306Ascii.h +++ b/SSD1306Ascii.h @@ -200,8 +200,8 @@ class SSD1306Ascii : public Print { const int fontWidth = 5; const int fontHeight = 7; const uint8_t letterSpacing = 1; - uint8_t fontFirstChar; - uint8_t fontCharCount; + uint8_t m_fontFirstChar; + uint8_t m_fontCharCount; };