mirror of
https://github.com/MarekZegare4/MeshCore-Solo.git
synced 2026-07-31 17:26:12 +00:00
feat(oled): misc-fixed 6x9 font on SSD1306 too, for GAT562 30S solo
The misc-fixed font (full Latin/Greek/Cyrillic) had only ever reached SH1106Display and the e-ink driver. GAT562 30S -- like 24 other variants -- uses SSD1306Display, which stayed on the built-in 5x7 font, so every keyboard alphabet beyond ASCII and every accented contact name was transliterated (Łódź -> Lodz) or drawn as a filled block. Extract the renderer into MiscFixedRenderer.h rather than copying it: Adafruit_SH110X and Adafruit_SSD1306 both derive from Adafruit_GFX and glyph drawing is pure pixel plotting, so one implementation serves both drivers (-79 lines from SH1106Display.cpp, same flash usage as before). The header is .cpp-only by contract -- the font tables are static const, so including it from a driver header would land a copy in every translation unit. On SSD1306 the path is opt-in behind OLED_MISC_FIXED_FONT, set only in the two GAT562 30S solo envs: the font costs ~14 KB of flash and the other 24 variants' repeater/companion builds have no keyboard to type those alphabets on. Without the flag that driver is unchanged, verified by building GAT562_30S_Mesh_Kit_repeater. Drive-by consistency fix from the extraction: a newline in print() now advances the cursor by yAdvance * text_size instead of a single yAdvance, which was half a row short at setTextSize(2). The e-ink driver always scaled it. No effect at size 1, which is everywhere the UI prints '\n'. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -135,6 +135,10 @@ build_flags =
|
||||
-D UI_HAS_JOYSTICK_UPDOWN=1
|
||||
-D ADVERT_NAME='"@@MAC"'
|
||||
-D ENV_INCLUDE_GPS=1
|
||||
; misc-fixed 6x9 OLED font (full Latin/Greek/Cyrillic), same as the Wio L1
|
||||
; builds. Solo only: it costs ~14 KB of flash and the repeater/companion
|
||||
; builds have no keyboard to type those alphabets on.
|
||||
-D OLED_MISC_FIXED_FONT=1
|
||||
-Os
|
||||
; QSPIFLASH disabled: QSPI IO0/IO2 pins (P0.30/P0.28) conflict with joystick LEFT/UP
|
||||
; -D MESH_PACKET_LOGGING=1
|
||||
@@ -173,6 +177,10 @@ build_flags =
|
||||
-D UI_HAS_JOYSTICK_UPDOWN=1
|
||||
-D ADVERT_NAME='"@@MAC"'
|
||||
-D ENV_INCLUDE_GPS=1
|
||||
; misc-fixed 6x9 OLED font (full Latin/Greek/Cyrillic), same as the Wio L1
|
||||
; builds. Solo only: it costs ~14 KB of flash and the repeater/companion
|
||||
; builds have no keyboard to type those alphabets on.
|
||||
-D OLED_MISC_FIXED_FONT=1
|
||||
-D DUAL_SERIAL=1
|
||||
-D ENABLE_SCREENSHOT
|
||||
-Os
|
||||
|
||||
Reference in New Issue
Block a user