Commit 2021535f authored by lm's avatar lm

Fixed all SLUGS issues, fixed 2D map

parent fe00cbb2
...@@ -86,7 +86,7 @@ void SlugsDataSensorView::slugRawDataChanged(int uasId, const mavlink_raw_imu_t ...@@ -86,7 +86,7 @@ void SlugsDataSensorView::slugRawDataChanged(int uasId, const mavlink_raw_imu_t
} }
#ifdef MAVLINK_ENABLED_SLUGS
void SlugsDataSensorView::slugsRCRawChannels(int systemId, const mavlink_rc_channels_raw_t &gpsDateTime) void SlugsDataSensorView::slugsRCRawChannels(int systemId, const mavlink_rc_channels_raw_t &gpsDateTime)
{Q_UNUSED(systemId); {Q_UNUSED(systemId);
...@@ -109,6 +109,7 @@ void SlugsDataSensorView::slugsRCServo(int systemId, const mavlink_servo_output_ ...@@ -109,6 +109,7 @@ void SlugsDataSensorView::slugsRCServo(int systemId, const mavlink_servo_output_
ui->m_pwmRuddTrim->setText(QString::number(gpsDateTime.servo7_raw)); ui->m_pwmRuddTrim->setText(QString::number(gpsDateTime.servo7_raw));
ui->m_pwmElevTrim->setText(QString::number(gpsDateTime.servo8_raw)); ui->m_pwmElevTrim->setText(QString::number(gpsDateTime.servo8_raw));
} }
#endif
void SlugsDataSensorView::setActiveUAS(UASInterface* uas){ void SlugsDataSensorView::setActiveUAS(UASInterface* uas){
activeUAS = uas; activeUAS = uas;
......
...@@ -75,17 +75,17 @@ void UASControlParameters::changedMode(int mode) ...@@ -75,17 +75,17 @@ void UASControlParameters::changedMode(int mode)
break; break;
#else #else
case (uint8_t)MAV_MODE_AUTO: case (uint8_t)MAV_MODE_AUTO:
mode = "AUTO MODE"; modeTemp = "AUTO MODE";
break; break;
case (uint8_t)MAV_MODE_GUIDED: case (uint8_t)MAV_MODE_GUIDED:
mode = "GUIDED MODE"; modeTemp = "GUIDED MODE";
break; break;
case (uint8_t)MAV_MODE_TEST1: case (uint8_t)MAV_MODE_TEST1:
mode = "TEST1 MODE"; modeTemp = "TEST1 MODE";
break; break;
case (uint8_t)MAV_MODE_TEST2: case (uint8_t)MAV_MODE_TEST2:
mode = "TEST2 MODE"; modeTemp = "TEST2 MODE";
break; break;
#endif #endif
case (uint8_t)MAV_MODE_READY: case (uint8_t)MAV_MODE_READY:
...@@ -157,6 +157,7 @@ void UASControlParameters::updateAttitude(UASInterface *uas, double roll, double ...@@ -157,6 +157,7 @@ void UASControlParameters::updateAttitude(UASInterface *uas, double roll, double
void UASControlParameters::setCommands() void UASControlParameters::setCommands()
{ {
#ifdef MAVLINK_ENABLED_SLUGS
if(this->activeUAS) if(this->activeUAS)
{ {
UAS* myUas= static_cast<UAS*>(this->activeUAS); UAS* myUas= static_cast<UAS*>(this->activeUAS);
...@@ -170,6 +171,7 @@ void UASControlParameters::setCommands() ...@@ -170,6 +171,7 @@ void UASControlParameters::setCommands()
mavlink_msg_mid_lvl_cmds_encode(MG::SYSTEM::ID, MG::SYSTEM::COMPID, &msg, &this->tempCmds); mavlink_msg_mid_lvl_cmds_encode(MG::SYSTEM::ID, MG::SYSTEM::COMPID, &msg, &this->tempCmds);
myUas->sendMessage(msg); myUas->sendMessage(msg);
} }
#endif
} }
void UASControlParameters::getCommands() void UASControlParameters::getCommands()
...@@ -181,6 +183,7 @@ void UASControlParameters::getCommands() ...@@ -181,6 +183,7 @@ void UASControlParameters::getCommands()
void UASControlParameters::setPassthrough() void UASControlParameters::setPassthrough()
{ {
#ifdef MAVLINK_ENABLED_SLUGS
if(this->activeUAS) if(this->activeUAS)
{ {
UAS* myUas= static_cast<UAS*>(this->activeUAS); UAS* myUas= static_cast<UAS*>(this->activeUAS);
...@@ -218,6 +221,7 @@ void UASControlParameters::setPassthrough() ...@@ -218,6 +221,7 @@ void UASControlParameters::setPassthrough()
myUas->sendMessage(msg); myUas->sendMessage(msg);
//qDebug()<<tempCtrl.bitfieldPt; //qDebug()<<tempCtrl.bitfieldPt;
} }
#endif
} }
void UASControlParameters::updateMode(int uas,QString mode,QString description) void UASControlParameters::updateMode(int uas,QString mode,QString description)
......
...@@ -44,8 +44,10 @@ private: ...@@ -44,8 +44,10 @@ private:
QString REDcolorStyle; QString REDcolorStyle;
QPointer<RadioCalibrationData> radio; QPointer<RadioCalibrationData> radio;
LinkInterface* hilLink; LinkInterface* hilLink;
#ifdef MAVLINK_ENABLED_SLUGS
mavlink_mid_lvl_cmds_t tempCmds; mavlink_mid_lvl_cmds_t tempCmds;
mavlink_ctrl_srfc_pt_t tempCtrl; mavlink_ctrl_srfc_pt_t tempCtrl;
#endif
}; };
#endif // UASCONTROLPARAMETERS_H #endif // UASCONTROLPARAMETERS_H
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment