Browse Source

Add Vehicle::sendMessageOnPriorityLink

QGC4.4
Don Gagne 9 years ago
parent
commit
a254ee7598
  1. 4
      src/Vehicle/Vehicle.h
  2. 8
      src/uas/UAS.cc

4
src/Vehicle/Vehicle.h

@ -406,6 +406,10 @@ public:
/// @return true: message sent, false: Link no longer connected /// @return true: message sent, false: Link no longer connected
bool sendMessageOnLink(LinkInterface* link, mavlink_message_t message); bool sendMessageOnLink(LinkInterface* link, mavlink_message_t message);
/// Sends a message to the priority link
/// @return true: message sent, false: Link no longer connected
bool sendMessageOnPriorityLink(mavlink_message_t message) { return sendMessageOnLink(priorityLink(), message); }
/// Sends the specified messages multiple times to the vehicle in order to attempt to /// Sends the specified messages multiple times to the vehicle in order to attempt to
/// guarantee that it makes it to the vehicle. /// guarantee that it makes it to the vehicle.
void sendMessageMultiple(mavlink_message_t message); void sendMessageMultiple(mavlink_message_t message);

8
src/uas/UAS.cc

@ -846,7 +846,7 @@ void UAS::startCalibration(UASInterface::StartCalibrationType calType)
accelCal, // accel cal accelCal, // accel cal
airspeedCal, // airspeed cal airspeedCal, // airspeed cal
escCal); // esc cal escCal); // esc cal
_vehicle->sendMessage(msg); _vehicle->sendMessageOnPriorityLink(msg);
} }
void UAS::stopCalibration(void) void UAS::stopCalibration(void)
@ -870,7 +870,7 @@ void UAS::stopCalibration(void)
0, // accel cal 0, // accel cal
0, // airspeed cal 0, // airspeed cal
0); // unused 0); // unused
_vehicle->sendMessage(msg); _vehicle->sendMessageOnPriorityLink(msg);
} }
void UAS::startBusConfig(UASInterface::StartBusConfigType calType) void UAS::startBusConfig(UASInterface::StartBusConfigType calType)
@ -905,7 +905,7 @@ void UAS::startBusConfig(UASInterface::StartBusConfigType calType)
0, 0,
0, 0,
0); 0);
_vehicle->sendMessage(msg); _vehicle->sendMessageOnPriorityLink(msg);
} }
void UAS::stopBusConfig(void) void UAS::stopBusConfig(void)
@ -929,7 +929,7 @@ void UAS::stopBusConfig(void)
0, 0,
0, 0,
0); 0);
_vehicle->sendMessage(msg); _vehicle->sendMessageOnPriorityLink(msg);
} }
/** /**

Loading…
Cancel
Save