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

Do not automatically persist the gyro calibration #8216

Merged
merged 1 commit into from
Jul 13, 2022

Conversation

DzikuVx
Copy link
Member

@DzikuVx DzikuVx commented Jul 12, 2022

Connected to #7128
Gyro calibration would be persisted only on "save" command, not after each gyro calibration. Ultimate effect is the same as before but lower the number of config writes

@DzikuVx DzikuVx added this to the 5.1 milestone Jul 12, 2022
@b14ckyy
Copy link
Collaborator

b14ckyy commented Jul 12, 2022

@JulioCesarMatias wanted to make a different change here. He wants to check if the calibration values are 0 and only then save the calibration. If they are not 0 then it won't save again. This would store the gyro calibration one time on a fresh setup and to recalibrate they have to be set to 0 by the user. He just has not made a PR yet before it is properly tested.

@DzikuVx
Copy link
Member Author

DzikuVx commented Jul 12, 2022 via email

@0crap
Copy link
Contributor

0crap commented Jul 13, 2022

Please consider to remove the auto save from the continous servo trim as well.
Because of the same issue #7128
Thx.

@DzikuVx DzikuVx merged commit 721da09 into release_5.1.0 Jul 13, 2022
@DzikuVx DzikuVx deleted the dzikuvx-do-not-auto-persist-gyro-calibration branch July 13, 2022 17:52
@0crap
Copy link
Contributor

0crap commented Jul 13, 2022

@DzikuVx I compiled a 5.1.0 locally to try things out and still see the below gets changed in my diff all after every plug in.
Sure that is as intended?

set gyro_zero_x = -7
set gyro_zero_y = 21
set gyro_zero_z = -22
set ins_gravity_cmss = 989.691

@b14ckyy
Copy link
Collaborator

b14ckyy commented Jul 14, 2022

@0crap yes the values are set in RAM only and that's what you read. But they are not stored to eeprom anymore. If you set init_gyro_cal = OFF then they won't change anymore and use the EEPROM stored values after boot.

@0crap
Copy link
Contributor

0crap commented Jul 14, 2022

@b14ckyy Thx! I made the wrong assumption that if my diff all changed, it also changed my EEPROM.
Glad that is not the case.
I prefer to let my plane calibrate the gyro on every battery. (The way it always has been in iNav.)
So that means I should not set init_gyro_cal = OFF then.
(And live with the fact that if you do a compare of diff all files, the mentioned lines will always show as different.)

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