Skip to content

Avoid floating point precision when reading values from the sensor #36

Description

@huntc

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions