Sub: Implement reset all params via MAV_CMD_PREFLIGHT_STORAGE

This commit is contained in:
Jacob Walser 2017-03-01 22:03:33 -05:00
parent ce978595cd
commit e2a41c0a6c

View File

@ -1157,6 +1157,13 @@ void GCS_MAVLINK_Sub::handleMessage(mavlink_message_t* msg)
mavlink_msg_command_long_decode(msg, &packet);
switch (packet.command) {
case MAV_CMD_PREFLIGHT_STORAGE:
if (is_equal(packet.param1, 2.0f)) {
AP_Param::erase_all();
sub.gcs_send_text(MAV_SEVERITY_WARNING, "All parameters reset, reboot board");
result= MAV_RESULT_ACCEPTED;
}
break;
case MAV_CMD_START_RX_PAIR:
// initiate bind procedure