Skip to content

Conversation

@jp-bennett
Copy link
Collaborator

@jp-bennett jp-bennett commented May 17, 2025

This is a WIP effort to unify the builds for MUI targets, so the use of the MUI can be a runtime config option, currently config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_COLOR. It's currently the native-tft target and the t-deck, but likely still contains crashes and potential bugs.

@jp-bennett jp-bennett closed this May 19, 2025
@jp-bennett jp-bennett reopened this May 19, 2025
@jp-bennett jp-bennett mentioned this pull request May 19, 2025
@jp-bennett jp-bennett marked this pull request as ready for review May 19, 2025 15:15

#if HAS_TFT
if (config.display.displaymode == meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
tftSetup();
Copy link
Collaborator

@mverch67 mverch67 May 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that you moved the tftSetup() further down from line 542 by 200 lines which delays the initialization and prolongs the boot process. I actually moved it up a while ago (after sorting out the SPI issues) so that just after switching the device on the screen turns on as well...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw that you moved the tftSetup() further down from line 542 by 200 lines which delays the initialization and prolongs the boot process. I actually moved it up a while ago (after sorting out the SPI issues) so that just after switching the device on the screen turn on as well...

Yeah, unfortunately it now must happen after nodeDB initialization, as that's where the config values get loaded.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we can store the setting also in NVRAM so that after a reboot the value is immediately available, e.g.

RTC_DATA_ATTR int rtc_displayMode = 0;

if (rtc_displayMode == meshtastic_Config_DisplayConfig_DisplayMode_COLOR)
    tftSetup();

@mverch67
Copy link
Collaborator

mverch67 commented May 24, 2025

I've adapted, built, and tested the other TFT targets:

  • Indicator
  • PICOmputer

Also, now MUI can revert to former UI.

#endif
#if !MESHTASTIC_EXCLUDE_SOCKETAPI
initApiServer();
if (config.display.displaymode != meshtastic_Config_DisplayConfig_DisplayMode_COLOR) {
Copy link
Collaborator

@mverch67 mverch67 May 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering about this line. Would it still be possible to
a) use MQTT with MUI
b) attach remote MUI to meshtasticd when set to COLOR, but no X11/FB Panel defined in config.yaml

Same above for webserver.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not 100% sure. I just followed the MESHTASTIC_EXCLUDE_SOCKETAPI=1 from the TFT targets.

I don't think webserver at the same time as MUI makes sense, as they would fight over the API connection. Would be willing to give MQTT a try.

It seems like a really weird state, to set the config to COLOR, and not have any display configured. But we could try to sort it out.

@mverch67
Copy link
Collaborator

mverch67 commented May 25, 2025

Reverting from oled style to MUI takes two steps and needs a phone or CLI:
-- set display.displaymode COLOR
-- set bluetooth.enabled false

Maybe for T-Deck it's more convenient to add a keyboard shortcut that does these steps to be able to revert without phone (or when phone battery is empty).

@thebentern thebentern merged commit 4feaec6 into master Jun 21, 2025
21 checks passed
@thebentern thebentern deleted the unify-tft branch June 21, 2025 15:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants