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

Accelerometer calibration #375

Merged
merged 1 commit into from
Dec 19, 2020

Conversation

klutvott123
Copy link
Member

@klutvott123 klutvott123 commented Dec 18, 2020

Adds a special page to calibrate the accelerometer. The page can be accessed from the menu like this:
screenshot_x7_20-12-19_11-46-19
selecting "acc cal" brings up this:
screenshot_x7_20-12-19_11-46-24
where [ENTER] is the enter key and [EXIT] is the exit key on the radio. Pressing the enter key will send MSP_ACC_CALIBRATION to the flight controller. The flight controller will calibrate the accelerometer and send the command back. The page will exit automatically when the response is received.

Fixes #290

@klutvott123 klutvott123 added this to the 1.6 milestone Dec 18, 2020
@@ -85,6 +90,7 @@ local function createPopupMenu()
{ t = "save page", f = saveSettings },
{ t = "reload", f = invalidatePages },
{ t = "reboot", f = rebootFc },
{ t = "acc cal", f = accCal },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we want to make this a bit more verbose, like pop up a dialog saying something like 'Make sure the craft is level and stable, then press [Enter] to continue, or [Cancel]'?
Otherwise I suspect unsuspecting newbie pilots will 'test' this function and then end up un-calibrating their craft when they 'try' this.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point! I'll see what I can do. I think the best approach would be to just make it a special page that can only be entered from the popup menu. I looked into the built in popup dialogue in opentx but it's very limited and behaves differently on different radios

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mikeller It's done. I updated the first post with a description of how this works with pictures

Adds a function to the menu that sends MSP_ACC_CALIBRATION to the FC.
@klutvott123 klutvott123 force-pushed the accelerometer-calibration branch from 4f923e8 to 2c570a9 Compare December 19, 2020 10:45
@mikeller mikeller merged commit de16adc into betaflight:master Dec 19, 2020
@klutvott123 klutvott123 deleted the accelerometer-calibration branch October 24, 2021 19:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add calibration
2 participants