Add support for custom display in the simulator (#26)

* Initial custom display SVG and display selection

* clean up SVG and add data-com and data-seg

* Fix signal's data-com and data-seg

* Revert "Fix signal's data-com and data-seg"

This reverts commit 82f8dc6a91973fb3b9e25e8e073a26d8996977ae.

* Update indicators mapping for custom display

* Align #ifs to the left
This commit is contained in:
Ruben Nic
2025-06-30 19:34:16 -04:00
committed by GitHub
parent 3ade4f766b
commit 99b02ee0b5
2 changed files with 781 additions and 125 deletions

View File

@@ -38,10 +38,26 @@ static bool tick_state;
static long tick_interval_id = -1;
watch_lcd_type_t watch_get_lcd_type(void) {
#if defined(FORCE_CUSTOM_LCD_TYPE)
return WATCH_LCD_TYPE_CUSTOM;
#else
return WATCH_LCD_TYPE_CLASSIC;
#endif
}
void watch_enable_display(void) {
#if defined(FORCE_CUSTOM_LCD_TYPE)
_watch_update_indicator_segments();
#endif
EM_ASM({
#if defined(FORCE_CUSTOM_LCD_TYPE)
document.getElementById("classic").style.display = "none";
#else
document.getElementById("custom").style.display = "none";
#endif
});
watch_clear_display();
}