Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

device-ui: proto version control, new languages, lock and alert parameters #609

Merged
merged 2 commits into from
Oct 28, 2024

Conversation

mverch67
Copy link
Contributor

@mverch67 mverch67 commented Oct 26, 2024

  • add version control to invalidate incompatible changes with proto old files
  • add more language options + experimental Chinese language enums
  • add persistence parameters for screen/settings lock and message alert

@mverch67
Copy link
Contributor Author

FYI: device-ui now has implemented code that handles version incompatibilities in future:

void TFTView_320x240::setupUIConfig(const meshtastic_DeviceUIConfig& uiconfig)
{
    if (uiconfig.version == 1) {
        ILOG_INFO("setupUIConfig version %d", uiconfig.version);
        db.uiConfig = uiconfig;
    }
    else {
        ILOG_WARN("invalid uiconfig version %d, reset UI settings to default", uiconfig.version);
        db.uiConfig.version = 1;
        db.uiConfig.screen_brightness = 153; // 60%
        db.uiConfig.screen_timeout = 30;
        controller->storeUIConfig(db.uiConfig);
    }

Code has been tested and works well with the changes in this PR.

@thebentern thebentern merged commit 8072368 into master Oct 28, 2024
2 checks passed
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.

2 participants