|
|
@ -732,22 +732,12 @@ MAV_RESULT GCS_MAVLINK_Rover::handle_command_int_do_reposition(const mavlink_com |
|
|
|
return MAV_RESULT_ACCEPTED; |
|
|
|
return MAV_RESULT_ACCEPTED; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// a RC override message is considered to be a 'heartbeat' from the ground station for failsafe purposes
|
|
|
|
|
|
|
|
void GCS_MAVLINK_Rover::handle_rc_channels_override(const mavlink_message_t &msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
rover.failsafe.last_heartbeat_ms = AP_HAL::millis(); |
|
|
|
|
|
|
|
GCS_MAVLINK::handle_rc_channels_override(msg); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void GCS_MAVLINK_Rover::handleMessage(const mavlink_message_t &msg) |
|
|
|
void GCS_MAVLINK_Rover::handleMessage(const mavlink_message_t &msg) |
|
|
|
{ |
|
|
|
{ |
|
|
|
switch (msg.msgid) { |
|
|
|
switch (msg.msgid) { |
|
|
|
case MAVLINK_MSG_ID_MANUAL_CONTROL: |
|
|
|
case MAVLINK_MSG_ID_MANUAL_CONTROL: |
|
|
|
handle_manual_control(msg); |
|
|
|
handle_manual_control(msg); |
|
|
|
break; |
|
|
|
break; |
|
|
|
case MAVLINK_MSG_ID_HEARTBEAT: |
|
|
|
|
|
|
|
handle_heartbeat(msg); |
|
|
|
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
case MAVLINK_MSG_ID_SET_ATTITUDE_TARGET: |
|
|
|
case MAVLINK_MSG_ID_SET_ATTITUDE_TARGET: |
|
|
|
handle_set_attitude_target(msg); |
|
|
|
handle_set_attitude_target(msg); |
|
|
@ -796,17 +786,9 @@ void GCS_MAVLINK_Rover::handle_manual_control(const mavlink_message_t &msg) |
|
|
|
manual_override(rover.channel_steer, packet.y, 1000, 2000, tnow); |
|
|
|
manual_override(rover.channel_steer, packet.y, 1000, 2000, tnow); |
|
|
|
manual_override(rover.channel_throttle, packet.z, 1000, 2000, tnow); |
|
|
|
manual_override(rover.channel_throttle, packet.z, 1000, 2000, tnow); |
|
|
|
|
|
|
|
|
|
|
|
// a manual control message is considered to be a 'heartbeat' from the ground station for failsafe purposes
|
|
|
|
// a manual control message is considered to be a 'heartbeat' from
|
|
|
|
rover.failsafe.last_heartbeat_ms = tnow; |
|
|
|
// the ground station for failsafe purposes
|
|
|
|
} |
|
|
|
gcs().sysid_myggcs_seen(tnow); |
|
|
|
|
|
|
|
|
|
|
|
void GCS_MAVLINK_Rover::handle_heartbeat(const mavlink_message_t &msg) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
// we keep track of the last time we received a heartbeat from our GCS for failsafe purposes
|
|
|
|
|
|
|
|
if (msg.sysid != rover.g.sysid_my_gcs) { |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
rover.failsafe.last_heartbeat_ms = AP_HAL::millis(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void GCS_MAVLINK_Rover::handle_set_attitude_target(const mavlink_message_t &msg) |
|
|
|
void GCS_MAVLINK_Rover::handle_set_attitude_target(const mavlink_message_t &msg) |
|
|
|