mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-16 03:43:33 +08:00
sensors: Do not change parameter if it already has the right default
This commit is contained in:
@@ -1503,8 +1503,12 @@ Sensors::parameter_update_poll(bool forced)
|
||||
/* mag is internal */
|
||||
_mag_rotation[s] = _board_rotation;
|
||||
/* reset param to -1 to indicate internal mag */
|
||||
int32_t minus_one = MAG_ROT_VAL_INTERNAL;
|
||||
param_set_no_notification(param_find(str), &minus_one);
|
||||
int32_t minus_one;
|
||||
param_get(param_find(str), &minus_one);
|
||||
if (minus_one != MAG_ROT_VAL_INTERNAL) {
|
||||
minus_one = MAG_ROT_VAL_INTERNAL;
|
||||
param_set_no_notification(param_find(str), &minus_one);
|
||||
}
|
||||
|
||||
} else {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user