mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-06 03:10:35 +08:00
param-reset: Add option to reset all configurable params, but not the ones that store vehicle information
This commit is contained in:
committed by
Beat Küng
parent
3f13c70cae
commit
f6bdc42977
@@ -174,14 +174,26 @@ void WorkerThread::threadEntry()
|
||||
_ret_value = 0;
|
||||
break;
|
||||
|
||||
case Request::ParamResetSensorFactory:
|
||||
const char *reset_cal[] = { "CAL_ACC*", "CAL_GYRO*", "CAL_MAG*" };
|
||||
param_reset_specific(reset_cal, sizeof(reset_cal) / sizeof(reset_cal[0]));
|
||||
_ret_value = param_save_default();
|
||||
case Request::ParamResetSensorFactory: {
|
||||
const char *reset_cal[] = { "CAL_ACC*", "CAL_GYRO*", "CAL_MAG*" };
|
||||
param_reset_specific(reset_cal, sizeof(reset_cal) / sizeof(reset_cal[0]));
|
||||
_ret_value = param_save_default();
|
||||
#if defined(CONFIG_BOARDCTL_RESET)
|
||||
px4_reboot_request(false, 400_ms);
|
||||
px4_reboot_request(false, 400_ms);
|
||||
#endif // CONFIG_BOARDCTL_RESET
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
case Request::ParamResetAllConfig: {
|
||||
const char *exclude_list[] = {
|
||||
"LND_FLIGHT_T_HI",
|
||||
"LND_FLIGHT_T_LO",
|
||||
"COM_FLIGHT_UUID"
|
||||
};
|
||||
param_reset_excludes(exclude_list, sizeof(exclude_list) / sizeof(exclude_list[0]));
|
||||
_ret_value = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
_state.store((int)State::Finished); // set this last to signal the main thread we're done
|
||||
|
||||
Reference in New Issue
Block a user