protobufs icon indicating copy to clipboard operation
protobufs copied to clipboard

refactor: use repeated fields in `EnvironmentMetrics`

Open andrekir opened this issue 2 years ago • 2 comments

suggestion for handling multiple sensors or sensors with multiple channels from: https://github.com/meshtastic/protobufs/pull/399

opted not to add a separate oneOf since using all fields, including 8 repeated WeatherSensor and PowerSensor each, takes 110 bytes (out of max 237), so there is plenty of room to expand before needing to split into a separate packet.

andrekir avatar Oct 26 '23 13:10 andrekir

Good one, but needs changes on the firmware side and all apps too.

caveman99 avatar Dec 17 '23 13:12 caveman99

Just as a note for when we get back to this for 3.0, we should make sure that the optional stuff added by https://github.com/meshtastic/protobufs/pull/545 gets kept for these, assuming that all holds up. That should, hopefully, make it possible to distinguish between missing values and values truly set to 0, which is especially useful for things like temperature that can be actually-0!

ianmcorvidae avatar Aug 09 '24 16:08 ianmcorvidae