Skip to content

Add calibration #290

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

Closed
mikeller opened this issue Dec 1, 2019 · 8 comments · Fixed by #375
Closed

Add calibration #290

mikeller opened this issue Dec 1, 2019 · 8 comments · Fixed by #375

Comments

@mikeller
Copy link
Member

mikeller commented Dec 1, 2019

With the requirement to have a valid ACC calibration if ACC is enabled introduced in betaflight/betafligh#9031, some users will be caught out, finding themselves in the field without a calibrated ACC, CMS not available (LoS pilots), and not able to figure out the required stick commands.
betaflight/betaflight#9179 addressed some of this by adding calibration to CMS. To cover all bases we should add a similar menu to the lua scripts, or add the calibration to the main menu.

@klutvott123: Any suggestions as to where to best put this? Separate page / add to a page / menu / ...

@klutvott123
Copy link
Member

Since this https://github.com/betaflight/betaflight/blob/9425831756015a81fe82b9c5a768c264c8603da1/src/main/msp/msp.c#L2543-L2548 is what's available through MSP I think the simplest solution is to do it as a menu function. Unless you're going to make some MSP changes. Would be nice to have a page like the one in your .gif where we could calibrate and see the status.

@mikeller
Copy link
Member Author

mikeller commented Dec 1, 2019

@klutvott123: Yes, the idea is definitely to extend MSP to at least allow calibration of gyro / ACC / baro to be performed. Not sure about the status feedback, this would require more MSP changes, and probably a new MSP command. Combined with the fact that we cannot poll MSP over SmartPort too often this will probably mean that a 'live' display like in CMS will not be feasible.

@klutvott123
Copy link
Member

In that case I think we should put it in the menu just like the reboot function. Maybe we can do a reboot to let the user know something actually happened.

@RipperDrone
Copy link
Contributor

Isn't calibration in the field easily done via RC commands...?:
image

@mikeller
Copy link
Member Author

@RipperDrone: Yes it can be done, but the user needs to know the right stick combination (I carry a print out of the stick commands in my field kit). We want to make it as easy as possible to calibrate, to avoid users getting stuck in the field without being able to calibrate.

@KAJE1977
Copy link

KAJE1977 commented May 9, 2020

Is it possible to make a script that shows the stick combinations on your radio screen? Possibly part of the tools menu?

@kafie1980
Copy link

kafie1980 commented Sep 10, 2020

For full size Taranis transmitters, there is an old lua script by the name Cleanflight Commands that allows running Mode 2 stick functions. Should still work with Betaflight as the stick combinations are the same.

It was initially posted by Nek on RCGroups : https://www.rcgroups.com/forums/showpost.php?p=30993861&postcount=4366

The same script is also posted on: https://rcsettings.com/index.php/viewdownload/13-lua-scripts/204-cleanflight-commands

I ran it via the OpenTX Companion Simulator on an X9d model and it still works. I do not own one and have never seen one in real life :)

To get it to work, I had to comment lines 136 & 146 as the lcd.lock() function that had been made redundant since OpenTX 2.1.

You will also need to updated the Channel numbers for your Throttle, Yaw, Pitch and Roll axis on lines 3 to 6 based on your transmitter setup.

After editing the lua script, copy it to the \SCRIPTS\TOOLS\ folder on your sdcard and execute it via the Tools menu on your transmitter.

I only have an X-Lite S transmitter and the script does appear to run but does not display anything properly on screen due to the differences in screen dimensions. (At least this is what my Geologist brain could assume :) ).

@kafie1980
Copy link

I managed to modify the above Cleanflight Commands lua scipt (originally posted by Nek on RCGroups) and tested it to work perfectly on my X-Lite S.

Attached the lua script here as a .txt file extension but you need to change it to .lua and copy it to the \SCRIPTS\TOOLS\ folder on your sdcard and execute it via the Tools menu.

Calibrate Model.txt

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

Successfully merging a pull request may close this issue.

5 participants