-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
sensors: prefix mag config param SENS instead of CAL #20723
Conversation
Somewhat unfortunately QGC accesses https://github.com/search?q=repo%3Amavlink%2Fqgroundcontrol%20CAL_MAG_SIDES&type=code |
if it reads it only, I can leave it but mark it as deprecated and force it to be following the value of |
@bresch something else to consider: this parameter was also stored in the EEPROM, by changing the name we now resolving the problem for future EEPROM parameter save, but previous vehicles that had this CAL_MAG_SIDES parameter saved on the EEPROM will keep loading it. |
I re-added the |
Why not change the logic for param filtering? I understand this is very concise and visually pleasing, but we could easily add a black list of parameters in addition to the CAL_* pattern matching. Then you aren't relying on parameter names, which could easily break in the future if someone unknowingly adds a new CAL_BLAH parameter. Just my 2 cents. Also seems like we might want to rename CAL_MAG_COMP_TYP as well. |
Yes, that was the first idea, but since we anyway wanted to rename it for quite some time, I think it's a good opportunity. That said, I should maybe still add it to the filter now that I had to put it back for QGC |
704227d
to
ea706d5
Compare
@@ -53,6 +53,15 @@ | |||
* @value 63 Six side calibration | |||
* @group Sensors | |||
*/ | |||
PARAM_DEFINE_INT32(SENS_MAG_SIDES, 63); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be bits now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The user would then need to select manually which side he wants and I already see ppl not selecting the right ones and having calibration issues...
* | ||
* Use SENS_MAG_SIDES instead | ||
* | ||
* @group Sensors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could hide it in a different category?
* @group Sensors | |
* @group Sensors | |
* @category Developer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good idea. #20919
Solved Problem
CAL_MAG_SIDES
andCAL_MAG_ROT_AUTO
are not calibration calibrations values of the mag sensor, they are config parameters and shouldn't be saved as part of a factory calibration.Solution
Change the prefix to
SENS_