mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 13:53:34 +08:00
param save: Add a blocking API for param saves to be used from shell.
This commit is contained in:
committed by
Beat Küng
parent
18f0311161
commit
fd267fb9a5
@@ -180,7 +180,7 @@ int do_airspeed_calibration(orb_advert_t *mavlink_log_pub)
|
||||
|
||||
/* save */
|
||||
calibration_log_info(mavlink_log_pub, CAL_QGC_PROGRESS_MSG, 0);
|
||||
param_save_default();
|
||||
param_save_default(true);
|
||||
|
||||
feedback_calibration_failed(mavlink_log_pub);
|
||||
return PX4_ERROR;
|
||||
|
||||
@@ -158,7 +158,7 @@ void WorkerThread::threadEntry()
|
||||
break;
|
||||
|
||||
case Request::ParamSaveDefault:
|
||||
_ret_value = param_save_default();
|
||||
_ret_value = param_save_default(true);
|
||||
|
||||
if (_ret_value != 0) {
|
||||
mavlink_log_critical(&_mavlink_log_pub, "Error saving settings\t");
|
||||
@@ -175,7 +175,7 @@ void WorkerThread::threadEntry()
|
||||
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();
|
||||
_ret_value = param_save_default(true);
|
||||
#if defined(CONFIG_BOARDCTL_RESET)
|
||||
px4_reboot_request(false, 400_ms);
|
||||
#endif // CONFIG_BOARDCTL_RESET
|
||||
|
||||
@@ -284,7 +284,7 @@ void TemperatureCalibration::task_main()
|
||||
}
|
||||
|
||||
param_notify_changes();
|
||||
int ret = param_save_default();
|
||||
int ret = param_save_default(true);
|
||||
|
||||
if (ret != 0) {
|
||||
PX4_ERR("Failed to save params (%i)", ret);
|
||||
|
||||
Reference in New Issue
Block a user