meshtastic / protobufs

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

Add compass_orientation #515

Closed jp-bennett closed 3 months ago

jp-bennett commented 3 months ago

We have rudimentary compass support in a branch. This would add a setting to correct the output when the sensor is oriented differently than the screen.

thebentern commented 3 months ago

Should this property specify a unit? Degrees I assume

jp-bennett commented 3 months ago

Should this property specify a unit? Degrees I assume

I wasn't planning to specify a unit. I can't imagine anything other than 90 degree offsets. So my initial thought is 0 for unchanged, 1 for 90 offset, 2 for 180, 3 for 270, and then 4 would be no offset, but inverted, 5 inverted with a 90 degree offset, etc.

But that needs tested on some real world devices, as we might need to describe even more about the arrangement to get the measurement right.

thebentern commented 3 months ago

I wasn't planning to specify a unit. I can't imagine anything other than 90 degree offsets. So my initial thought is 0 for unchanged, 1 for 90 offset, 2 for 180, 3 for 270, and then 4 would be no offset, but inverted, 5 inverted with a 90 degree offset, etc.

If that's the case, let's make a uint8 sized enum. Otherwise client developers will be confused what to send

jp-bennett commented 3 months ago

If that's the case, let's make a uint8 sized enum. Otherwise client developers will be confused what to send

Yeah, good call. Done. Working on it.