param-reset: Add option to reset all configurable params, but not the ones that store vehicle information

This commit is contained in:
Thomas Debrunner
2022-04-14 07:57:48 +02:00
committed by Beat Küng
parent 3f13c70cae
commit f6bdc42977
3 changed files with 24 additions and 7 deletions
+5 -1
View File
@@ -1535,11 +1535,15 @@ Commander::handle_command(const vehicle_command_s &cmd)
} else if (((int)(cmd.param1)) == 2) {
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED);
_worker_thread.startTask(WorkerThread::Request::ParamResetAll);
_worker_thread.startTask(WorkerThread::Request::ParamResetAllConfig);
} else if (((int)(cmd.param1)) == 3) {
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED);
_worker_thread.startTask(WorkerThread::Request::ParamResetSensorFactory);
} else if (((int)(cmd.param1)) == 4) {
answer_command(cmd, vehicle_command_s::VEHICLE_CMD_RESULT_ACCEPTED);
_worker_thread.startTask(WorkerThread::Request::ParamResetAll);
}
}