diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index 3ea964c1bb0fe60eb8e5af61511dbc69723f7cea..e5efdea199a3693dba8e9d7673dcd764ba356335 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -374,7 +374,28 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) case MAVLINK_MSG_ID_DEBUG: emit valueChanged(uasId, QString("debug ") + QString::number(mavlink_msg_debug_get_ind(&message)), mavlink_msg_debug_get_value(&message), MG::TIME::getGroundTimeNow()); break; - + case MAVLINK_MSG_ID_ATTITUDE_CONTROLLER_OUTPUT: + { + mavlink_attitude_controller_output_t out; + mavlink_msg_attitude_controller_output_decode(&message, &out); + quint64 time = MG::TIME::getGroundTimeNowUsecs(); + emit attitudeThrustSetPointChanged(this, out.roll, out.pitch, out.yaw, out.thrust, time); + emit valueChanged(uasId, "att control roll", out.roll, time/1000.0f); + emit valueChanged(uasId, "att control pitch", out.pitch, time/1000.0f); + emit valueChanged(uasId, "att control yaw", out.yaw, time/1000.0f); + } + break; + case MAVLINK_MSG_ID_POSITION_CONTROLLER_OUTPUT: + { + mavlink_position_controller_output_t out; + mavlink_msg_position_controller_output_decode(&message, &out); + quint64 time = MG::TIME::getGroundTimeNowUsecs(); + emit attitudeThrustSetPointChanged(this, out.x, out.y, out.z, out.yaw, time); + emit valueChanged(uasId, "pos control x", out.x, time/1000.0f); + emit valueChanged(uasId, "pos control y", out.y, time/1000.0f); + emit valueChanged(uasId, "pos control z", out.z, time/1000.0f); + } + break; case MAVLINK_MSG_ID_WAYPOINT_COUNT: { mavlink_waypoint_count_t wpc; diff --git a/src/ui/WaypointList.cc b/src/ui/WaypointList.cc index d151ecf38dda3523bbc35ce006ca8abe9983bf29..dc39bd9dd36770f7353782b604026ded420ae36c 100644 --- a/src/ui/WaypointList.cc +++ b/src/ui/WaypointList.cc @@ -64,6 +64,9 @@ WaypointList::WaypointList(QWidget *parent, UASInterface* uas) : // SEND WAYPOINTS connect(m_ui->transmitButton, SIGNAL(clicked()), this, SLOT(transmit())); + // REQUEST WAYPOINTS + connect(m_ui->readButton, SIGNAL(clicked()), this, SIGNAL(requestWaypoints())); + // SAVE/LOAD WAYPOINTS connect(m_ui->saveButton, SIGNAL(clicked()), this, SLOT(saveWaypoints())); connect(m_ui->loadButton, SIGNAL(clicked()), this, SLOT(loadWaypoints())); diff --git a/src/ui/WaypointList.ui b/src/ui/WaypointList.ui index 66548d9ba6db39b4f1165d74b922f958c1263041..1b37aaa47d995814848698984b8b4528f336bcc0 100644 --- a/src/ui/WaypointList.ui +++ b/src/ui/WaypointList.ui @@ -26,7 +26,7 @@ 4 - + true @@ -36,8 +36,8 @@ 0 0 - 405 - 160 + 409 + 158 @@ -78,17 +78,6 @@ - - - - Transmit - - - - :/images/devices/network-wireless.svg:/images/devices/network-wireless.svg - - - @@ -103,6 +92,28 @@ + + + + Read + + + + :/images/status/software-update-available.svg:/images/status/software-update-available.svg + + + + + + + Write + + + + :/images/devices/network-wireless.svg:/images/devices/network-wireless.svg + + + @@ -128,6 +139,15 @@ Transmit waypoints to unmanned system + + + + :/images/status/software-update-available.svg:/images/status/software-update-available.svg + + + Read + +