diff --git a/src/uas/SlugsMAV.h b/src/uas/SlugsMAV.h index 1fbe145169c5f94f02b5c00e89a5ab38f33d3e29..db2259e8960002b83801c61260de15edc6f443c8 100644 --- a/src/uas/SlugsMAV.h +++ b/src/uas/SlugsMAV.h @@ -77,8 +77,6 @@ signals: void slugsGPSDateTime(int systemId, const mavlink_gps_date_time_t& gpsDateTime); void slugsActionAck(int systemId, const mavlink_action_ack_t& actionAck); - void slugsPidValues(int systemId, const mavlink_pid_t& pidValues); - void slugsBootMsg(int uasId, mavlink_boot_t& boot); void slugsAttitude(int uasId, mavlink_attitude_t& attitude); diff --git a/src/uas/UAS.cc b/src/uas/UAS.cc index dd0eaaeca5c77685fc988d20c800ace3fee0e4c1..3e2e7a59636b7d5f8d593b88ecc9a0678fe8c801 100644 --- a/src/uas/UAS.cc +++ b/src/uas/UAS.cc @@ -727,12 +727,24 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) mavlink_raw_pressure_t pressure; mavlink_msg_raw_pressure_decode(&message, &pressure); quint64 time = this->getUnixTime(pressure.usec); + emit valueChanged(uasId, "abs pressure", "raw", pressure.press_abs, time); + emit valueChanged(uasId, "diff pressure 1", "raw", pressure.press_diff1, time); + emit valueChanged(uasId, "diff pressure 2", "raw", pressure.press_diff2, time); + emit valueChanged(uasId, "temperature", "raw", pressure.temperature, time); + } + break; + + case MAVLINK_MSG_ID_SCALED_PRESSURE: + { + mavlink_scaled_pressure_t pressure; + mavlink_msg_scaled_pressure_decode(&message, &pressure); + quint64 time = this->getUnixTime(pressure.usec); emit valueChanged(uasId, "abs pressure", "hPa", pressure.press_abs, time); - emit valueChanged(uasId, "diff pressure 1", "hPa", pressure.press_diff1, time); - emit valueChanged(uasId, "diff pressure 2", "hPa", pressure.press_diff2, time); - emit valueChanged(uasId, "temperature", "deg C", pressure.temperature/100.0f, time); + emit valueChanged(uasId, "diff pressure", "hPa", pressure.press_diff, time); + emit valueChanged(uasId, "temperature", "C", pressure.temperature/100.0, time); } break; + case MAVLINK_MSG_ID_RC_CHANNELS_RAW: { mavlink_rc_channels_raw_t channels; diff --git a/src/ui/SlugsHilSim.cc b/src/ui/SlugsHilSim.cc index 22d86668e61daece4d60e62837810a343bab0fd0..11f390b20a737f184b96da7c304ce7c625d67851 100644 --- a/src/ui/SlugsHilSim.cc +++ b/src/ui/SlugsHilSim.cc @@ -323,10 +323,10 @@ void SlugsHilSim::commandDatagramToSimulink() #ifdef MAVLINK_ENABLED_SLUGS //mavlink_pwm_commands_t* pwdC = (static_cast(activeUas))->getPwmCommands(); - mavlink_pwm_commands_t* pwdC; + //mavlink_pwm_commands_t* pwdC; - if(pwdC != NULL){ - } +// if(pwdC != NULL){ +// } QByteArray data; data.resize(22);