Should we make the following fields of the FieldData struct public?
temperature: i16,
pressure: u32,
humidity: u32,
gas_resistance: u32,
My first requirement is to encode these fields into a packet for wireless communication. I'd prefer to avoid the floating point functions such as temperature_celsius given the additionally complexity with decoding floating point precision (I'm thinking about a JS API for transforming data that is in my world).
Related: should I be concerned with just 20 bits of the u32s? I'm looking for the most compact representation of the above data.
Should we make the following fields of the
FieldDatastruct public?My first requirement is to encode these fields into a packet for wireless communication. I'd prefer to avoid the floating point functions such as
temperature_celsiusgiven the additionally complexity with decoding floating point precision (I'm thinking about a JS API for transforming data that is in my world).Related: should I be concerned with just 20 bits of the u32s? I'm looking for the most compact representation of the above data.