|
|
@ -565,6 +565,17 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) |
|
|
|
emit textMessageReceived(uasId, message.compid, severity, text); |
|
|
|
emit textMessageReceived(uasId, message.compid, severity, text); |
|
|
|
} |
|
|
|
} |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
case MAVLINK_MSG_ID_DEBUG_VECT: |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
mavlink_debug_vect_t vect; |
|
|
|
|
|
|
|
mavlink_msg_debug_vect_decode(&message, &vect); |
|
|
|
|
|
|
|
QString str((const char*)vect.name); |
|
|
|
|
|
|
|
quint64 time = getUnixTime(vect.usec); |
|
|
|
|
|
|
|
emit valueChanged(uasId, str+".x", vect.x, time); |
|
|
|
|
|
|
|
emit valueChanged(uasId, str+".y", vect.y, time); |
|
|
|
|
|
|
|
emit valueChanged(uasId, str+".z", vect.z, time); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
break; |
|
|
|
//#ifdef MAVLINK_ENABLED_PIXHAWK
|
|
|
|
//#ifdef MAVLINK_ENABLED_PIXHAWK
|
|
|
|
// case MAVLINK_MSG_ID_POINT_OF_INTEREST:
|
|
|
|
// case MAVLINK_MSG_ID_POINT_OF_INTEREST:
|
|
|
|
// {
|
|
|
|
// {
|
|
|
@ -1213,14 +1224,12 @@ void UAS::setManualControlCommands(double roll, double pitch, double yaw, double |
|
|
|
|
|
|
|
|
|
|
|
// if(mode == (int)MAV_MODE_MANUAL)
|
|
|
|
// if(mode == (int)MAV_MODE_MANUAL)
|
|
|
|
// {
|
|
|
|
// {
|
|
|
|
#ifdef MAVLINK_ENABLED_PIXHAWK |
|
|
|
|
|
|
|
mavlink_message_t message; |
|
|
|
mavlink_message_t message; |
|
|
|
mavlink_msg_manual_control_pack(MG::SYSTEM::ID, MG::SYSTEM::COMPID, &message, this->uasId, (float)manualRollAngle, (float)manualPitchAngle, (float)manualYawAngle, (float)manualThrust, controlRollManual, controlPitchManual, controlYawManual, controlThrustManual); |
|
|
|
mavlink_msg_manual_control_pack(MG::SYSTEM::ID, MG::SYSTEM::COMPID, &message, this->uasId, (float)manualRollAngle, (float)manualPitchAngle, (float)manualYawAngle, (float)manualThrust, controlRollManual, controlPitchManual, controlYawManual, controlThrustManual); |
|
|
|
sendMessage(message); |
|
|
|
sendMessage(message); |
|
|
|
qDebug() << __FILE__ << __LINE__ << ": SENT MANUAL CONTROL MESSAGE: roll" << manualRollAngle << " pitch: " << manualPitchAngle << " yaw: " << manualYawAngle << " thrust: " << manualThrust; |
|
|
|
qDebug() << __FILE__ << __LINE__ << ": SENT MANUAL CONTROL MESSAGE: roll" << manualRollAngle << " pitch: " << manualPitchAngle << " yaw: " << manualYawAngle << " thrust: " << manualThrust; |
|
|
|
|
|
|
|
|
|
|
|
emit attitudeThrustSetPointChanged(this, roll, pitch, yaw, thrust, MG::TIME::getGroundTimeNow()); |
|
|
|
emit attitudeThrustSetPointChanged(this, roll, pitch, yaw, thrust, MG::TIME::getGroundTimeNow()); |
|
|
|
#endif |
|
|
|
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|