Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compass_orientation #515

Merged
merged 5 commits into from
Jun 11, 2024
Merged

Add compass_orientation #515

merged 5 commits into from
Jun 11, 2024

Conversation

jp-bennett
Copy link
Contributor

@jp-bennett jp-bennett commented Jun 11, 2024

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.

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.
@jp-bennett jp-bennett requested a review from thebentern June 11, 2024 04:08
@thebentern
Copy link
Contributor

Should this property specify a unit? Degrees I assume

@jp-bennett
Copy link
Contributor Author

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
Copy link
Contributor

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
Copy link
Contributor Author

jp-bennett commented Jun 11, 2024

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.

@jp-bennett jp-bennett merged commit 8c80487 into master Jun 11, 2024
2 checks passed
@jp-bennett jp-bennett deleted the jp-bennett-patch-1 branch June 11, 2024 17:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants