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

Changes to Environmental Measurement App #705

Merged
merged 16 commits into from Feb 25, 2021

Conversation

crossan007
Copy link
Contributor

@crossan007 crossan007 commented Feb 21, 2021

Adds a custom UI Frame to display environment details.

image

mesh.mp4

Plugins may be allocated their own frame by overriding in their header:

 virtual bool wantUIFrame() { return true; }

When this is defined, the UI will call the plugin's drawFrame(OLEDDisplay *display, OLEDDisplayUiState *state, int16_t x, int16_t y); method

Known bugs:
Receiving a text message will drop you to the 0th UI Frame; which used to be the text message frame, but is now the environment frame

@crossan007 crossan007 changed the title updates Fixes for ENVIRONMENTAL_MEASUREMENT_APP Feb 21, 2021
@crossan007 crossan007 changed the title Fixes for ENVIRONMENTAL_MEASUREMENT_APP Changes to Environmental Measurement App Feb 21, 2021
@crossan007
Copy link
Contributor Author

@geeksville @mc-hamster I'd be curious to see what you think of the direction I've gone with allowing plugins access to create a UI frame.

If it's something you support, I have additional ideas to further develop this.

I'm also open to breaking out the UI thing into a separate PR, since there are fixes to the environmental plugin here as well

@geeksville
Copy link
Member

I like the plugin UI frame idea (and it would be great to eventually use this to move the text message drawing into the text message plugin and out of screen.cpp). And eventually I'd like to refactor these plugin enhancements (see also ProtobufPlugin) to not be single inheritance but more of a 'mixin' pattern.

…sitions to/from plugin screens better

It's still a bit janky, but should work

meshtastic/esp8266-oled-ssd1306#2
@crossan007
Copy link
Contributor Author

crossan007 commented Feb 23, 2021

This MR now has a dependency on meshtastic/esp8266-oled-ssd1306#2 (This is resolved as long as pio is pointing at 35d7962 of the esp8266-oled-ssd1306 library)

and on https://github.com/meshtastic/Meshtastic-protobufs/pull/14/files

@crossan007 crossan007 marked this pull request as ready for review February 25, 2021 01:54
@mc-hamster mc-hamster merged commit 4f40128 into meshtastic:master Feb 25, 2021
@mc-hamster
Copy link
Member

Thanks @crossan007

@geeksville
Copy link
Member

This pull request has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/temperature-sensing/2668/4

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.

None yet

3 participants