Skip to content

Commit

Permalink
Using proper method to send command message
Browse files Browse the repository at this point in the history
Using SendCommandLong(..) instead of SendCommandLongTarget(..) to send MAV_CMD_PAYLOAD_CONTROL message.
Now CompId is not defined explicitly anymore.
  • Loading branch information
mantelt committed Jun 9, 2016
1 parent c109238 commit f5689d7
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ui/sensorpodstatus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,10 @@ void SensorpodStatus::PowerCycleSensorpodCmd()

if (reply == QMessageBox::Yes) {
//Send the message via the currently active UAS
ASLUAV *tempUAS = (ASLUAV*) UASManager::instance()->getActiveUAS();;
if (tempUAS) tempUAS->SendCommandLongTarget(MAV_CMD_PAYLOAD_CONTROL, (uint8_t) 50, 1.0f);
ASLUAV *tempUAS = (ASLUAV*) UASManager::instance()->getActiveUAS();
if (tempUAS) {
tempUAS->SendCommandLong(MAV_CMD_PAYLOAD_CONTROL, 1.0f);
}
}

}
Expand Down

0 comments on commit f5689d7

Please sign in to comment.