Meshtastic-Android
Meshtastic-Android copied to clipboard
[Feature Request]: UV environment metrics.
Contact Details
No response
What happened?
With this PR https://github.com/meshtastic/firmware/pull/6872 now nodes can send UV index information to the clients. Currently, this value is not shown on the environment metrics section of the app when sent by a node.
The UV metric is set in the firmware in measurement->variant.environment_metrics.uv_lux as a float.
UV is normally represented as an integer value from 0 to 11. I think the card shouldn't disappear when uv_lux is 0, because 0 is a relevant measurement. https://en.wikipedia.org/wiki/Ultraviolet_index
App Version
2.5.16
Phone
Xiaomi Mi 9
Device
Heltec v3 with LTR390UV sensor installed.
Firmware
Current master build.
Relevant log output
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Hi @dmarman i recommend checking out the latest alpha release: https://github.com/meshtastic/Meshtastic-Android/releases - there have been quite a few updates.
#1627 was merged in 2.5.18-alpha which solves at least your lux = 0 ux issue.
Replacing bug label with feature request, this isn't a bug, it's a request to support new functionality.
Please add UV display, support is already in the firmware. So far, only the illumination value in lux is displayed.
@dmarman #2366 should add a card with floats if you have the hardware to test it.
I need to figure out how to map the float to a 0-11 int, as I'm assuming it'll be non-linear, but for the moment raw values will at least make sure it's working
@DaneEvans Yes, I have the UV sensor and Android phone to test. Let me know if it's already possible to install the app with your pull.
The sensor already sends a float value from 0 to 11. I guess the number should be rounded? or is it something that cannot be done in the client and should be implemented in the firmware?
@dmarman
Ahh, rounding a float will be easy.
It didn't make 2.6.30, but is on main now if you know how to build it, otherwise I'll get an APK for you.
@DaneEvans I don't have the tooling setup for Android builds. If you can send me an APK it will be great. I can also wait for the next release.
It'll be in 2.6.31, which will be soon.