meshtastic / protobufs

Protobuf definitions for the Meshtastic project
https://meshtastic.org
GNU General Public License v3.0
77 stars 115 forks source link

refactor: use repeated fields in `EnvironmentMetrics` #400

Open andrekir opened 10 months ago

andrekir commented 10 months ago

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.

caveman99 commented 8 months ago

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

ianmcorvidae commented 2 weeks ago

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!