When restarting listing all parameters, skip sending hash on subsequent request

This change fixes a bug where hash-aware QGC using the old spec would continuously request the parameter list every time it received a mismatched hash.
This commit is contained in:
Nate Weibley
2016-02-17 10:35:49 -05:00
committed by Lorenz Meier
parent ae3838ff2e
commit a1c9dc1f68
+6 -2
View File
@@ -77,8 +77,12 @@ MavlinkParametersManager::handle_message(const mavlink_message_t *msg)
if (req_list.target_system == mavlink_system.sysid &&
(req_list.target_component == mavlink_system.compid || req_list.target_component == MAV_COMP_ID_ALL)) {
_send_all_index = PARAM_HASH;
if (_send_all_index < 0) {
_send_all_index = PARAM_HASH;
} else {
/* a restart should skip the hash check on the ground */
_send_all_index = 0;
}
}
if (req_list.target_system == mavlink_system.sysid && req_list.target_component < 127 &&