From 1c260f94a050bf9d91d58ce341d7bcb291b18c5b Mon Sep 17 00:00:00 2001 From: Alex Voinea Date: Fri, 22 Sep 2023 10:51:40 +0200 Subject: [PATCH] Expand list of custom characters --- Firmware/lcd.h | 1 + lang/lib/charset.py | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/Firmware/lcd.h b/Firmware/lcd.h index f8a1811ad..3d0d22b63 100644 --- a/Firmware/lcd.h +++ b/Firmware/lcd.h @@ -172,6 +172,7 @@ private: //Custom characters defined in the first 8 characters of the LCD #define LCD_STR_ARROW_RIGHT "\x7E" //from the default character set +#define LCD_STR_ARROW_LEFT "\x7F" //from the default character set #define LCD_STR_BEDTEMP "\x80" #define LCD_STR_DEGREE "\x81" #define LCD_STR_THERMOMETER "\x82" diff --git a/lang/lib/charset.py b/lang/lib/charset.py index 91ec25df4..01472ff41 100644 --- a/lang/lib/charset.py +++ b/lang/lib/charset.py @@ -1,12 +1,25 @@ # Mapping from LCD source encoding to unicode characters CUSTOM_CHARS = { - '\x06': '⏬', - '\x04': 'πŸ”ƒ', - '\xdf': 'Β°', + # Dynamic characters + '\x80': 'πŸ„·', + '\x81': 'Β°', + '\x82': '🌑', + '\x83': '⬏', + '\x84': 'πŸ”ƒ', + '\x85': 'πŸ—€', + '\x86': 'Β»', + '\x87': 'πŸ•‘', + '\x88': '⏬', + '\x89': 'βœ”', + + # HD44780 A00 font: + '\x7e': 'β†’', + '\x7f': '←', '\xe1': 'Γ€', '\xe4': 'Β΅', #on keyboard AltGr+m it is \xC2\xB5 '\xef': 'ΓΆ', '\xf5': 'ΓΌ', + '\xff': 'β–ˆ', } # Charaters to be remapped prior to source-encoding transformation