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 support for default orientation output #258

Merged
merged 2 commits into from
Aug 15, 2024
Merged

Conversation

MichaelElmore1
Copy link

Currently, there is a getOrientation() method that can be overriden, but doing so does nothing. This change makes it so overriding the getOrientation() method in a sensor config will automatically create an orientation output, similar to how it works when overriding getLocation().

Usage:

public PositionConfig.EulerOrientation orientation = new PositionConfig.EulerOrientation();

@Override
public PositionConfig.EulerOrientation getOrientation() {
    return orientation;
}

Or, if using both location and orientation:

public PositionConfig positionConfig = new PositionConfig();

@Override
public PositionConfig.LLALocation getLocation() {
    return positionConfig.location;
}

@Override
public PositionConfig.EulerOrientation getOrientation() {
    return positionConfig.orientation;
}

@alexrobin
Copy link
Member

Can you try to fix the failing test so I can merge this?

@MichaelElmore1
Copy link
Author

I removed the FOI for orientation, which fixes the failing test. If orientation needs an FOI, I can add it back in and adjust the tests accordingly, but I don't know that it makes sense for orientation to have an FOI.

@alexrobin alexrobin merged commit c369b62 into v2 Aug 15, 2024
1 check passed
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.

2 participants