diff --git a/examples/companion_radio/ui-new/UITask.cpp b/examples/companion_radio/ui-new/UITask.cpp index 29cc59d33..2f2206308 100644 --- a/examples/companion_radio/ui-new/UITask.cpp +++ b/examples/companion_radio/ui-new/UITask.cpp @@ -63,7 +63,13 @@ class SplashScreen : public UIScreen { display.drawTextCentered(display.width()/2, 22, _version_info); display.setTextSize(1); +#ifdef OLED_RU + char filtered_date[sizeof(FIRMWARE_BUILD_DATE)]; + display.translateUTF8ToBlocks(filtered_date, FIRMWARE_BUILD_DATE, sizeof(filtered_date)); + display.drawTextCentered(display.width()/2, 42, filtered_date); +#else display.drawTextCentered(display.width()/2, 42, FIRMWARE_BUILD_DATE); +#endif return 1000; } diff --git a/src/helpers/ui/DisplayDriver.h b/src/helpers/ui/DisplayDriver.h index ec63c1912..c4fae9ad8 100644 --- a/src/helpers/ui/DisplayDriver.h +++ b/src/helpers/ui/DisplayDriver.h @@ -45,12 +45,75 @@ class DisplayDriver { // convert UTF-8 characters to displayable block characters for compatibility virtual void translateUTF8ToBlocks(char* dest, const char* src, size_t dest_size) { size_t j = 0; +#ifdef OLED_RU + char last_char = 0; + char cc = 0; +#endif for (size_t i = 0; src[i] != 0 && j < dest_size - 1; i++) { unsigned char c = (unsigned char)src[i]; if (c >= 32 && c <= 126) { +#ifdef OLED_RU + last_char = 0; + dest[j++] = c; // ASCII printable + } else if (c == 0xC2 || c == 0xC3 || c == 0xD0 || c == 0xD1 || c == 0xD2) { // Cyrillic UTF-8 convert + last_char = c; + c = src[++i]; // Get next char + + if (c != 0) { // Not end of a string + switch (last_char) { + case 0xC3: { + cc = (c | 0xC0); + break; + } + // map UTF-8 cyrillic cars to it Windows-1251 (CP-1251) ASCII codes + case 0xD0: { + if (c == 132) + cc = (170); // Є + if (c == 134) + cc = (178); // І + if (c == 135) + cc = (175); // Ї + if (c == 129) + cc = (168); // Ё + if (c > 143 && c < 192) + cc = (c + 48); + break; + } + case 0xD1: { + if (c == 148) + cc = (186); // є + if (c == 150) + cc = (179); // і + if (c == 151) + cc = (191); // ї + if (c == 145) + cc = (184); // ё + if (c > 127 && c < 144) + cc = (c + 112); + break; + } + case 0xD2: { + if (c == 144) + cc = (165); // Ґ + if (c == 145) + cc = (180); // ґ + break; + } + } + if (cc > 0) { + dest[j++] = cc; + } else { + dest[j++] = '\xAE'; // CP1251 smile emoji replace + } + } + } else if (c >= 0x80) { + last_char = 0; + dest[j++] = '\xAE'; // CP1251 smile emoji replace +#else dest[j++] = c; // ASCII printable } else if (c >= 0x80) { dest[j++] = '\xDB'; // CP437 full block █ +#endif while (src[i+1] && (src[i+1] & 0xC0) == 0x80) i++; // skip UTF-8 continuation bytes } diff --git a/src/helpers/ui/SSD1306Display.cpp b/src/helpers/ui/SSD1306Display.cpp index c9da0cf8d..516148945 100644 --- a/src/helpers/ui/SSD1306Display.cpp +++ b/src/helpers/ui/SSD1306Display.cpp @@ -1,4 +1,7 @@ #include "SSD1306Display.h" +#ifdef OLED_RU + #include "glcdfont6x8.h" +#endif bool SSD1306Display::i2c_probe(TwoWire& wire, uint8_t addr) { wire.beginTransmission(addr); @@ -31,13 +34,22 @@ void SSD1306Display::clear() { void SSD1306Display::startFrame(Color bkg) { display.clearDisplay(); // TODO: apply 'bkg' _color = SSD1306_WHITE; +#ifdef OLED_RU + display.setFont(&glcdfont6x8); +#endif display.setTextColor(_color); display.setTextSize(1); display.cp437(true); // Use full 256 char 'Code Page 437' font +#ifdef OLED_RU + display.setCursor(0, 7); +#endif } void SSD1306Display::setTextSize(int sz) { display.setTextSize(sz); +#ifdef OLED_RU + _size = sz; +#endif } void SSD1306Display::setColor(Color c) { @@ -46,7 +58,11 @@ void SSD1306Display::setColor(Color c) { } void SSD1306Display::setCursor(int x, int y) { +#ifdef OLED_RU + display.setCursor(x, y + (_size * 7)); +#else display.setCursor(x, y); +#endif } void SSD1306Display::print(const char* str) { diff --git a/src/helpers/ui/SSD1306Display.h b/src/helpers/ui/SSD1306Display.h index 1a3a9602b..e43e2fe09 100644 --- a/src/helpers/ui/SSD1306Display.h +++ b/src/helpers/ui/SSD1306Display.h @@ -18,6 +18,9 @@ class SSD1306Display : public DisplayDriver { Adafruit_SSD1306 display; bool _isOn; uint8_t _color; +#ifdef OLED_RU + uint8_t _size; +#endif bool i2c_probe(TwoWire& wire, uint8_t addr); public: diff --git a/src/helpers/ui/glcdfont6x8.h b/src/helpers/ui/glcdfont6x8.h new file mode 100644 index 000000000..63c1cd2c6 --- /dev/null +++ b/src/helpers/ui/glcdfont6x8.h @@ -0,0 +1,461 @@ +// Adafruit GFX font font size: 6x8 + +const uint8_t glcdfont6x8Bitmaps[] PROGMEM = { + 0x00,0x00,0x00,0x00,0x00,0x00, // 32 + 0x20,0x82,0x08,0x20,0x02,0x00, // 33 + 0x51,0x45,0x00,0x00,0x00,0x00, // 34 + 0x51,0x4F,0x94,0xF9,0x45,0x00, // 35 + 0x21,0xEA,0x1C,0x2B,0xC2,0x00, // 36 + 0xC3,0x21,0x08,0x42,0x61,0x80, // 37 + 0x42,0x8A,0x10,0xAA,0x46,0x80, // 38 + 0x20,0x82,0x00,0x00,0x00,0x00, // 39 + 0x10,0x84,0x10,0x40,0x81,0x00, // 40 + 0x40,0x81,0x04,0x10,0x84,0x00, // 41 + 0x00,0x8A,0x9C,0xA8,0x80,0x00, // 42 + 0x00,0x82,0x3E,0x20,0x80,0x00, // 43 + 0x00,0x00,0x00,0x01,0x82,0x10, // 44 + 0x00,0x00,0x3E,0x00,0x00,0x00, // 45 + 0x00,0x00,0x00,0x01,0x86,0x00, // 46 + 0x00,0x21,0x08,0x42,0x00,0x00, // 47 + 0x72,0x29,0xAA,0xCA,0x27,0x00, // 48 + 0x21,0x8A,0x08,0x20,0x8F,0x80, // 49 + 0x72,0x20,0x84,0x21,0x0F,0x80, // 50 + 0xF8,0x42,0x04,0x0A,0x27,0x00, // 51 + 0x10,0xC5,0x24,0xF8,0x41,0x00, // 52 + 0xFA,0x0F,0x02,0x0A,0x27,0x00, // 53 + 0x31,0x08,0x3C,0x8A,0x27,0x00, // 54 + 0xF8,0x21,0x08,0x41,0x04,0x00, // 55 + 0x72,0x28,0x9C,0x8A,0x27,0x00, // 56 + 0x72,0x28,0x9E,0x08,0x46,0x00, // 57 + 0x00,0x06,0x18,0x01,0x86,0x00, // 58 + 0x00,0x06,0x18,0x01,0x82,0x10, // 59 + 0x10,0x84,0x20,0x40,0x81,0x00, // 60 + 0x00,0x0F,0x80,0xF8,0x00,0x00, // 61 + 0x40,0x81,0x02,0x10,0x84,0x00, // 62 + 0x72,0x20,0x84,0x20,0x02,0x00, // 63 + 0x72,0x2B,0xAA,0xBA,0x07,0x80, // 64 + 0x21,0x48,0xA2,0xFA,0x28,0x80, // 65 + 0xF2,0x28,0xBC,0x8A,0x2F,0x00, // 66 + 0x72,0x28,0x20,0x82,0x27,0x00, // 67 + 0xE2,0x48,0xA2,0x8A,0x4E,0x00, // 68 + 0xFA,0x08,0x3C,0x82,0x0F,0x80, // 69 + 0xFA,0x08,0x3C,0x82,0x08,0x00, // 70 + 0x72,0x28,0x2E,0x8A,0x27,0x80, // 71 + 0x8A,0x28,0xBE,0x8A,0x28,0x80, // 72 + 0x70,0x82,0x08,0x20,0x87,0x00, // 73 + 0x38,0x41,0x04,0x12,0x46,0x00, // 74 + 0x8A,0x4A,0x30,0xA2,0x48,0x80, // 75 + 0x82,0x08,0x20,0x82,0x2F,0x80, // 76 + 0x8B,0x6A,0xAA,0x8A,0x28,0x80, // 77 + 0x8A,0x2C,0xAA,0x9A,0x28,0x80, // 78 + 0x72,0x28,0xA2,0x8A,0x27,0x00, // 79 + 0xF2,0x28,0xBC,0x82,0x08,0x00, // 80 + 0x72,0x28,0xA2,0xAA,0x46,0x80, // 81 + 0xF2,0x28,0xBC,0xA2,0x48,0x80, // 82 + 0x7A,0x08,0x1C,0x08,0x2F,0x00, // 83 + 0xFA,0xA2,0x08,0x20,0x82,0x00, // 84 + 0x8A,0x28,0xA2,0x8A,0x27,0x00, // 85 + 0x8A,0x28,0xA2,0x89,0x42,0x00, // 86 + 0x8A,0x2A,0xAA,0xAA,0xA5,0x00, // 87 + 0x8A,0x25,0x08,0x52,0x28,0x80, // 88 + 0x8A,0x28,0x94,0x20,0x82,0x00, // 89 + 0xF8,0x21,0x08,0x42,0x0F,0x80, // 90 + 0x71,0x04,0x10,0x41,0x07,0x00, // 91 + 0x02,0x04,0x08,0x10,0x20,0x00, // 92 + 0x70,0x41,0x04,0x10,0x47,0x00, // 93 + 0x21,0x48,0x80,0x00,0x00,0x00, // 94 + 0x00,0x00,0x00,0x00,0x0F,0x80, // 95 + 0x40,0x81,0x00,0x00,0x00,0x00, // 96 + 0x00,0x07,0x02,0x7A,0x27,0x80, // 97 + 0x82,0x0B,0x32,0x8A,0x2F,0x00, // 98 + 0x00,0x07,0x22,0x82,0x07,0x80, // 99 + 0x08,0x26,0xA6,0x8A,0x27,0x80, // 100 + 0x00,0x07,0x22,0xFA,0x07,0x00, // 101 + 0x31,0x24,0x38,0x41,0x04,0x00, // 102 + 0x00,0x06,0xA6,0x78,0x27,0x00, // 103 + 0x82,0x0B,0x32,0x8A,0x28,0x80, // 104 + 0x20,0x06,0x08,0x20,0x87,0x00, // 105 + 0x10,0x03,0x04,0x12,0x46,0x00, // 106 + 0x82,0x08,0xA4,0xE2,0x48,0x80, // 107 + 0x60,0x82,0x08,0x20,0x87,0x00, // 108 + 0x00,0x0D,0x2A,0xAA,0xAA,0x80, // 109 + 0x00,0x0B,0x32,0x8A,0x28,0x80, // 110 + 0x00,0x07,0x22,0x8A,0x27,0x00, // 111 + 0x00,0x0F,0x22,0xF2,0x08,0x00, // 112 + 0x00,0x07,0xA6,0x68,0x20,0x80, // 113 + 0x00,0x0B,0x32,0x82,0x08,0x00, // 114 + 0x00,0x07,0xA0,0x70,0x2F,0x00, // 115 + 0x41,0x0E,0x10,0x41,0x23,0x00, // 116 + 0x00,0x08,0xA2,0x8A,0x66,0x80, // 117 + 0x00,0x08,0xA2,0x89,0x42,0x00, // 118 + 0x00,0x08,0xAA,0xAA,0xA5,0x00, // 119 + 0x00,0x08,0x94,0x21,0x48,0x80, // 120 + 0x00,0x08,0xA2,0x78,0x27,0x00, // 121 + 0x00,0x0F,0x84,0x21,0x0F,0x80, // 122 + 0x10,0x82,0x10,0x20,0x81,0x00, // 123 + 0x20,0x82,0x08,0x20,0x82,0x00, // 124 + 0x40,0x82,0x04,0x20,0x84,0x00, // 125 + 0x42,0xA1,0x00,0x00,0x00,0x00, // 126 + 0x00,0x02,0x14,0x8A,0x2F,0x80, // 127 + 0x21,0x45,0x14,0x20,0x00,0x00, // 128 + 0x21,0x82,0x08,0x70,0x00,0x00, // 129 + 0x21,0x41,0x08,0x70,0x00,0x00, // 130 + 0x70,0x42,0x04,0x60,0x00,0x00, // 131 + 0x51,0x47,0x04,0x10,0x00,0x00, // 132 + 0x71,0x06,0x04,0x60,0x00,0x00, // 133 + 0x31,0x06,0x14,0x20,0x00,0x00, // 134 + 0x70,0x42,0x08,0x20,0x00,0x00, // 135 + 0x21,0x42,0x14,0x20,0x00,0x00, // 136 + 0x21,0x43,0x04,0x60,0x00,0x00, // 137 + 0x00,0x07,0x00,0x00,0x00,0x00, // 138 + 0xFB,0xEF,0xBE,0xFB,0xEF,0xBE, // 139 + 0x02,0x08,0x20,0x82,0x00,0x00, // 140 + 0x03,0x0C,0x30,0xC3,0x00,0x00, // 141 + 0x03,0x4D,0x34,0xD3,0x40,0x00, // 142 + 0x03,0x6D,0xB6,0xDB,0x60,0x00, // 143 + 0x00,0x00,0x00,0x00,0x00,0x3E, // 144 + 0x00,0x00,0x00,0x00,0x0F,0xBE, // 145 + 0x00,0x00,0x00,0xF8,0x0F,0xBE, // 146 + 0x00,0x00,0x3E,0xF8,0x0F,0xBE, // 147 + 0x03,0xE0,0x3E,0xF8,0x0F,0xBE, // 148 + 0xFB,0xE0,0x3E,0xF8,0x0F,0xBE, // 149 + 0x00,0x00,0x00,0x00,0x0A,0x80, // 150 + 0x00,0x00,0x00,0x02,0x0A,0x80, // 151 + 0x00,0x00,0x00,0x22,0x8A,0x80, // 152 + 0x00,0x00,0x02,0x2A,0xAA,0x80, // 153 + 0x00,0x08,0x20,0x82,0x0A,0x80, // 154 + 0x00,0x8A,0x28,0xA2,0x8A,0x80, // 155 + 0x08,0xAA,0xAA,0xAA,0xAA,0x80, // 156 + 0x79,0x0C,0x20,0xC1,0x07,0x80, // 157 + 0xF8,0x00,0x00,0x00,0x0F,0x80, // 158 + 0xF0,0x41,0x04,0x10,0x4F,0x00, // 159 + 0x79,0x0D,0xA6,0xD9,0x07,0x80, // 160 + 0xF8,0x01,0x86,0x18,0x0F,0x80, // 161 + 0xF8,0x0D,0xB6,0xD8,0x0F,0x80, // 162 + 0xF0,0x4D,0x34,0xD0,0x4F,0x00, // 163 + 0x02,0x27,0x14,0x72,0x20,0x00, // 164 + 0x13,0xE8,0x20,0x82,0x08,0x00, // 165 + 0x20,0x82,0x00,0x20,0x82,0x00, // 166 + 0x7A,0x0F,0x14,0x78,0x2F,0x00, // 167 + 0x50,0x0F,0xA0,0xF2,0x0F,0x80, // 168 + 0x00,0x80,0x3E,0x00,0x80,0x00, // 169 + 0x72,0x28,0x38,0x82,0x27,0x00, // 170 + 0x00,0x84,0xA4,0x48,0x80,0x00, // 171 + 0xFA,0x28,0xA2,0xBA,0xCE,0x00, // 172 + 0xFA,0xA7,0x08,0x20,0x82,0x00, // 173 + 0x01,0xCA,0xBE,0x8B,0x67,0x00, // 174 + 0x50,0x07,0x08,0x20,0x87,0x00, // 175 + 0x62,0x49,0x18,0x00,0x00,0x00, // 176 + 0x20,0x8F,0x88,0x20,0x0F,0x80, // 177 + 0x70,0x82,0x08,0x20,0x87,0x00, // 178 + 0x20,0x06,0x08,0x20,0x87,0x00, // 179 + 0x00,0x01,0x3E,0x8A,0x08,0x00, // 180 + 0x00,0x05,0x14,0x51,0xC4,0xA0, // 181 + 0x00,0x0F,0x94,0x51,0x49,0x80, // 182 + 0x00,0x00,0x08,0x00,0x00,0x00, // 183 + 0x50,0x07,0x22,0xFA,0x07,0x00, // 184 + 0x1A,0x49,0x34,0xB2,0x49,0x00, // 185 + 0x00,0x07,0x22,0x3A,0x27,0x00, // 186 + 0x00,0x89,0x12,0x90,0x80,0x00, // 187 + 0x03,0x8C,0x28,0x10,0x20,0x00, // 188 + 0x00,0xE1,0x8A,0x42,0x00,0x00, // 189 + 0x00,0x21,0x28,0xC3,0x80,0x00, // 190 + 0x50,0x06,0x08,0x20,0x87,0x00, // 191 + 0x72,0x28,0xA2,0xFA,0x28,0x80, // 192 + 0xFA,0x08,0x3C,0x8A,0x2F,0x00, // 193 + 0xF2,0x28,0xBC,0x8A,0x2F,0x00, // 194 + 0xFA,0x28,0x20,0x82,0x08,0x00, // 195 + 0x71,0x45,0x14,0x51,0x4F,0xA2, // 196 + 0xFA,0x08,0x3C,0x82,0x0F,0x80, // 197 + 0xAA,0xAA,0x9C,0xAA,0xAA,0x80, // 198 + 0xF0,0x20,0x9C,0x08,0x2F,0x00, // 199 + 0x8A,0x29,0xAA,0xCA,0x28,0x80, // 200 + 0x50,0x88,0xA6,0xAB,0x28,0x80, // 201 + 0x8A,0x4A,0x30,0xA2,0x48,0x80, // 202 + 0x39,0x24,0x92,0x49,0x28,0x80, // 203 + 0x8B,0x6A,0xAA,0x8A,0x28,0x80, // 204 + 0x8A,0x28,0xBE,0x8A,0x28,0x80, // 205 + 0x72,0x28,0xA2,0x8A,0x27,0x00, // 206 + 0xFA,0x28,0xA2,0x8A,0x28,0x80, // 207 + 0xF2,0x28,0xBC,0x82,0x08,0x00, // 208 + 0x72,0x28,0x20,0x82,0x27,0x00, // 209 + 0xF8,0x82,0x08,0x20,0x82,0x00, // 210 + 0x8A,0x28,0x9E,0x08,0x27,0x00, // 211 + 0x72,0xAA,0xAA,0x70,0x82,0x00, // 212 + 0x8A,0x25,0x08,0x52,0x28,0x80, // 213 + 0x92,0x49,0x24,0x92,0x4F,0x82, // 214 + 0x8A,0x28,0x9E,0x08,0x20,0x80, // 215 + 0xAA,0xAA,0xAA,0xAA,0xAF,0x80, // 216 + 0xAA,0xAA,0xAA,0xAA,0xAF,0x82, // 217 + 0xC1,0x04,0x1C,0x49,0x27,0x00, // 218 + 0x8A,0x28,0xBA,0x9A,0x6E,0x80, // 219 + 0x82,0x08,0x3C,0x8A,0x2F,0x00, // 220 + 0x72,0x20,0x8E,0x0A,0x27,0x00, // 221 + 0x92,0xAA,0xBA,0xAA,0xA9,0x00, // 222 + 0x7A,0x28,0x9E,0x29,0x28,0x80, // 223 + 0x00,0x07,0x02,0x7A,0x27,0x80, // 224 + 0x19,0x88,0x3C,0x8A,0x27,0x00, // 225 + 0x00,0x0F,0x22,0xF2,0x2F,0x00, // 226 + 0x00,0x0F,0xA2,0x82,0x08,0x00, // 227 + 0x00,0x03,0x14,0x51,0x4F,0xA2, // 228 + 0x00,0x07,0x22,0xFA,0x07,0x00, // 229 + 0x00,0x0A,0xAA,0x72,0xAA,0x80, // 230 + 0x00,0x0F,0x02,0x70,0x2F,0x00, // 231 + 0x00,0x08,0xA6,0xAB,0x28,0x80, // 232 + 0x00,0x8A,0xA2,0x9A,0xAC,0x80, // 233 + 0x00,0x08,0xA4,0xE2,0x48,0x80, // 234 + 0x00,0x03,0x92,0x49,0x28,0x80, // 235 + 0x00,0x08,0xB6,0xAA,0x28,0x80, // 236 + 0x00,0x08,0xA2,0xFA,0x28,0x80, // 237 + 0x00,0x07,0x22,0x8A,0x27,0x00, // 238 + 0x00,0x0F,0xA2,0x8A,0x28,0x80, // 239 + 0x00,0x0F,0x22,0xF2,0x08,0x00, // 240 + 0x00,0x07,0x22,0x82,0x07,0x80, // 241 + 0x00,0x0F,0x88,0x20,0x82,0x00, // 242 + 0x00,0x08,0xA2,0x78,0x27,0x00, // 243 + 0x00,0x07,0x2A,0xA9,0xC2,0x08, // 244 + 0x00,0x08,0x94,0x21,0x48,0x80, // 245 + 0x00,0x09,0x24,0x92,0x4F,0x82, // 246 + 0x00,0x08,0xA2,0x78,0x20,0x80, // 247 + 0x00,0x0A,0xAA,0xAA,0xAF,0x80, // 248 + 0x00,0x0A,0xAA,0xAA,0xAF,0x82, // 249 + 0x00,0x0C,0x10,0x71,0x27,0x00, // 250 + 0x00,0x08,0xA2,0xEA,0x6E,0x80, // 251 + 0x00,0x08,0x20,0xF2,0x2F,0x00, // 252 + 0x00,0x07,0x22,0x3A,0x27,0x00, // 253 + 0x00,0x09,0x2A,0xEA,0xA9,0x00, // 254 + 0x00,0x07,0xA2,0x79,0x28,0x80 // 255 +}; + +const GFXglyph glcdfont6x8Glyphs[] PROGMEM = { + { 0, 6, 8, 6, 0, -7 }, + { 6, 6, 8, 6, 0, -7 }, + { 12, 6, 8, 6, 0, -7 }, + { 18, 6, 8, 6, 0, -7 }, + { 24, 6, 8, 6, 0, -7 }, + { 30, 6, 8, 6, 0, -7 }, + { 36, 6, 8, 6, 0, -7 }, + { 42, 6, 8, 6, 0, -7 }, + { 48, 6, 8, 6, 0, -7 }, + { 54, 6, 8, 6, 0, -7 }, + { 60, 6, 8, 6, 0, -7 }, + { 66, 6, 8, 6, 0, -7 }, + { 72, 6, 8, 6, 0, -7 }, + { 78, 6, 8, 6, 0, -7 }, + { 84, 6, 8, 6, 0, -7 }, + { 90, 6, 8, 6, 0, -7 }, + { 96, 6, 8, 6, 0, -7 }, + { 102, 6, 8, 6, 0, -7 }, + { 108, 6, 8, 6, 0, -7 }, + { 114, 6, 8, 6, 0, -7 }, + { 120, 6, 8, 6, 0, -7 }, + { 126, 6, 8, 6, 0, -7 }, + { 132, 6, 8, 6, 0, -7 }, + { 138, 6, 8, 6, 0, -7 }, + { 144, 6, 8, 6, 0, -7 }, + { 150, 6, 8, 6, 0, -7 }, + { 156, 6, 8, 6, 0, -7 }, + { 162, 6, 8, 6, 0, -7 }, + { 168, 6, 8, 6, 0, -7 }, + { 174, 6, 8, 6, 0, -7 }, + { 180, 6, 8, 6, 0, -7 }, + { 186, 6, 8, 6, 0, -7 }, + { 192, 6, 8, 6, 0, -7 }, + { 198, 6, 8, 6, 0, -7 }, + { 204, 6, 8, 6, 0, -7 }, + { 210, 6, 8, 6, 0, -7 }, + { 216, 6, 8, 6, 0, -7 }, + { 222, 6, 8, 6, 0, -7 }, + { 228, 6, 8, 6, 0, -7 }, + { 234, 6, 8, 6, 0, -7 }, + { 240, 6, 8, 6, 0, -7 }, + { 246, 6, 8, 6, 0, -7 }, + { 252, 6, 8, 6, 0, -7 }, + { 258, 6, 8, 6, 0, -7 }, + { 264, 6, 8, 6, 0, -7 }, + { 270, 6, 8, 6, 0, -7 }, + { 276, 6, 8, 6, 0, -7 }, + { 282, 6, 8, 6, 0, -7 }, + { 288, 6, 8, 6, 0, -7 }, + { 294, 6, 8, 6, 0, -7 }, + { 300, 6, 8, 6, 0, -7 }, + { 306, 6, 8, 6, 0, -7 }, + { 312, 6, 8, 6, 0, -7 }, + { 318, 6, 8, 6, 0, -7 }, + { 324, 6, 8, 6, 0, -7 }, + { 330, 6, 8, 6, 0, -7 }, + { 336, 6, 8, 6, 0, -7 }, + { 342, 6, 8, 6, 0, -7 }, + { 348, 6, 8, 6, 0, -7 }, + { 354, 6, 8, 6, 0, -7 }, + { 360, 6, 8, 6, 0, -7 }, + { 366, 6, 8, 6, 0, -7 }, + { 372, 6, 8, 6, 0, -7 }, + { 378, 6, 8, 6, 0, -7 }, + { 384, 6, 8, 6, 0, -7 }, + { 390, 6, 8, 6, 0, -7 }, + { 396, 6, 8, 6, 0, -7 }, + { 402, 6, 8, 6, 0, -7 }, + { 408, 6, 8, 6, 0, -7 }, + { 414, 6, 8, 6, 0, -7 }, + { 420, 6, 8, 6, 0, -7 }, + { 426, 6, 8, 6, 0, -7 }, + { 432, 6, 8, 6, 0, -7 }, + { 438, 6, 8, 6, 0, -7 }, + { 444, 6, 8, 6, 0, -7 }, + { 450, 6, 8, 6, 0, -7 }, + { 456, 6, 8, 6, 0, -7 }, + { 462, 6, 8, 6, 0, -7 }, + { 468, 6, 8, 6, 0, -7 }, + { 474, 6, 8, 6, 0, -7 }, + { 480, 6, 8, 6, 0, -7 }, + { 486, 6, 8, 6, 0, -7 }, + { 492, 6, 8, 6, 0, -7 }, + { 498, 6, 8, 6, 0, -7 }, + { 504, 6, 8, 6, 0, -7 }, + { 510, 6, 8, 6, 0, -7 }, + { 516, 6, 8, 6, 0, -7 }, + { 522, 6, 8, 6, 0, -7 }, + { 528, 6, 8, 6, 0, -7 }, + { 534, 6, 8, 6, 0, -7 }, + { 540, 6, 8, 6, 0, -7 }, + { 546, 6, 8, 6, 0, -7 }, + { 552, 6, 8, 6, 0, -7 }, + { 558, 6, 8, 6, 0, -7 }, + { 564, 6, 8, 6, 0, -7 }, + { 570, 6, 8, 6, 0, -7 }, + { 576, 6, 8, 6, 0, -7 }, + { 582, 6, 8, 6, 0, -7 }, + { 588, 6, 8, 6, 0, -7 }, + { 594, 6, 8, 6, 0, -7 }, + { 600, 6, 8, 6, 0, -7 }, + { 606, 6, 8, 6, 0, -7 }, + { 612, 6, 8, 6, 0, -7 }, + { 618, 6, 8, 6, 0, -7 }, + { 624, 6, 8, 6, 0, -7 }, + { 630, 6, 8, 6, 0, -7 }, + { 636, 6, 8, 6, 0, -7 }, + { 642, 6, 8, 6, 0, -7 }, + { 648, 6, 8, 6, 0, -7 }, + { 654, 6, 8, 6, 0, -7 }, + { 660, 6, 8, 6, 0, -7 }, + { 666, 6, 8, 6, 0, -7 }, + { 672, 6, 8, 6, 0, -7 }, + { 678, 6, 8, 6, 0, -7 }, + { 684, 6, 8, 6, 0, -7 }, + { 690, 6, 8, 6, 0, -7 }, + { 696, 6, 8, 6, 0, -7 }, + { 702, 6, 8, 6, 0, -7 }, + { 708, 6, 8, 6, 0, -7 }, + { 714, 6, 8, 6, 0, -7 }, + { 720, 6, 8, 6, 0, -7 }, + { 726, 6, 8, 6, 0, -7 }, + { 732, 6, 8, 6, 0, -7 }, + { 738, 6, 8, 6, 0, -7 }, + { 744, 6, 8, 6, 0, -7 }, + { 750, 6, 8, 6, 0, -7 }, + { 756, 6, 8, 6, 0, -7 }, + { 762, 6, 8, 6, 0, -7 }, + { 768, 6, 8, 6, 0, -7 }, + { 774, 6, 8, 6, 0, -7 }, + { 780, 6, 8, 6, 0, -7 }, + { 786, 6, 8, 6, 0, -7 }, + { 792, 6, 8, 6, 0, -7 }, + { 798, 6, 8, 6, 0, -7 }, + { 804, 6, 8, 6, 0, -7 }, + { 810, 6, 8, 6, 0, -7 }, + { 816, 6, 8, 6, 0, -7 }, + { 822, 6, 8, 6, 0, -7 }, + { 828, 6, 8, 6, 0, -7 }, + { 834, 6, 8, 6, 0, -7 }, + { 840, 6, 8, 6, 0, -7 }, + { 846, 6, 8, 6, 0, -7 }, + { 852, 6, 8, 6, 0, -7 }, + { 858, 6, 8, 6, 0, -7 }, + { 864, 6, 8, 6, 0, -7 }, + { 870, 6, 8, 6, 0, -7 }, + { 876, 6, 8, 6, 0, -7 }, + { 882, 6, 8, 6, 0, -7 }, + { 888, 6, 8, 6, 0, -7 }, + { 894, 6, 8, 6, 0, -7 }, + { 900, 6, 8, 6, 0, -7 }, + { 906, 6, 8, 6, 0, -7 }, + { 912, 6, 8, 6, 0, -7 }, + { 918, 6, 8, 6, 0, -7 }, + { 924, 6, 8, 6, 0, -7 }, + { 930, 6, 8, 6, 0, -7 }, + { 936, 6, 8, 6, 0, -7 }, + { 942, 6, 8, 6, 0, -7 }, + { 948, 6, 8, 6, 0, -7 }, + { 954, 6, 8, 6, 0, -7 }, + { 960, 6, 8, 6, 0, -7 }, + { 966, 6, 8, 6, 0, -7 }, + { 972, 6, 8, 6, 0, -7 }, + { 978, 6, 8, 6, 0, -7 }, + { 984, 6, 8, 6, 0, -7 }, + { 990, 6, 8, 6, 0, -7 }, + { 996, 6, 8, 6, 0, -7 }, + { 1002, 6, 8, 6, 0, -7 }, + { 1008, 6, 8, 6, 0, -7 }, + { 1014, 6, 8, 6, 0, -7 }, + { 1020, 6, 8, 6, 0, -7 }, + { 1026, 6, 8, 6, 0, -7 }, + { 1032, 6, 8, 6, 0, -7 }, + { 1038, 6, 8, 6, 0, -7 }, + { 1044, 6, 8, 6, 0, -7 }, + { 1050, 6, 8, 6, 0, -7 }, + { 1056, 6, 8, 6, 0, -7 }, + { 1062, 6, 8, 6, 0, -7 }, + { 1068, 6, 8, 6, 0, -7 }, + { 1074, 6, 8, 6, 0, -7 }, + { 1080, 6, 8, 6, 0, -7 }, + { 1086, 6, 8, 6, 0, -7 }, + { 1092, 6, 8, 6, 0, -7 }, + { 1098, 6, 8, 6, 0, -7 }, + { 1104, 6, 8, 6, 0, -7 }, + { 1110, 6, 8, 6, 0, -7 }, + { 1116, 6, 8, 6, 0, -7 }, + { 1122, 6, 8, 6, 0, -7 }, + { 1128, 6, 8, 6, 0, -7 }, + { 1134, 6, 8, 6, 0, -7 }, + { 1140, 6, 8, 6, 0, -7 }, + { 1146, 6, 8, 6, 0, -7 }, + { 1152, 6, 8, 6, 0, -7 }, + { 1158, 6, 8, 6, 0, -7 }, + { 1164, 6, 8, 6, 0, -7 }, + { 1170, 6, 8, 6, 0, -7 }, + { 1176, 6, 8, 6, 0, -7 }, + { 1182, 6, 8, 6, 0, -7 }, + { 1188, 6, 8, 6, 0, -7 }, + { 1194, 6, 8, 6, 0, -7 }, + { 1200, 6, 8, 6, 0, -7 }, + { 1206, 6, 8, 6, 0, -7 }, + { 1212, 6, 8, 6, 0, -7 }, + { 1218, 6, 8, 6, 0, -7 }, + { 1224, 6, 8, 6, 0, -7 }, + { 1230, 6, 8, 6, 0, -7 }, + { 1236, 6, 8, 6, 0, -7 }, + { 1242, 6, 8, 6, 0, -7 }, + { 1248, 6, 8, 6, 0, -7 }, + { 1254, 6, 8, 6, 0, -7 }, + { 1260, 6, 8, 6, 0, -7 }, + { 1266, 6, 8, 6, 0, -7 }, + { 1272, 6, 8, 6, 0, -7 }, + { 1278, 6, 8, 6, 0, -7 }, + { 1284, 6, 8, 6, 0, -7 }, + { 1290, 6, 8, 6, 0, -7 }, + { 1296, 6, 8, 6, 0, -7 }, + { 1302, 6, 8, 6, 0, -7 }, + { 1308, 6, 8, 6, 0, -7 }, + { 1314, 6, 8, 6, 0, -7 }, + { 1320, 6, 8, 6, 0, -7 }, + { 1326, 6, 8, 6, 0, -7 }, + { 1332, 6, 8, 6, 0, -7 }, + { 1338, 6, 8, 6, 0, -7 } +}; + +const GFXfont glcdfont6x8 PROGMEM = { + (uint8_t *)glcdfont6x8Bitmaps, + (GFXglyph *)glcdfont6x8Glyphs, + 32, 255, 8}; + diff --git a/variants/heltec_v3/platformio.ini b/variants/heltec_v3/platformio.ini index 36c6386f6..8c4b53e77 100644 --- a/variants/heltec_v3/platformio.ini +++ b/variants/heltec_v3/platformio.ini @@ -143,6 +143,7 @@ build_flags = -D MAX_CONTACTS=350 -D MAX_GROUP_CHANNELS=40 -D DISPLAY_CLASS=SSD1306Display + -D OLED_RU=1 ; NOTE: DO NOT ENABLE --> -D MESH_PACKET_LOGGING=1 ; NOTE: DO NOT ENABLE --> -D MESH_DEBUG=1 build_src_filter = ${Heltec_lora32_v3.build_src_filter} @@ -166,6 +167,7 @@ build_flags = -D AUTO_SHUTDOWN_MILLIVOLTS=3400 -D BLE_DEBUG_LOGGING=1 -D OFFLINE_QUEUE_SIZE=256 + -D OLED_RU=1 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${Heltec_lora32_v3.build_src_filter} @@ -189,6 +191,7 @@ build_flags = -D WIFI_DEBUG_LOGGING=1 -D WIFI_SSID='"myssid"' -D WIFI_PWD='"mypwd"' + -D OLED_RU=1 ; -D MESH_PACKET_LOGGING=1 ; -D MESH_DEBUG=1 build_src_filter = ${Heltec_lora32_v3.build_src_filter}