Commit 9a5db5fb authored by Mariano Lizarraga's avatar Mariano Lizarraga

Added support for scaled and raw pressure messages

parent 0e6dceb0
...@@ -77,8 +77,6 @@ signals: ...@@ -77,8 +77,6 @@ signals:
void slugsGPSDateTime(int systemId, const mavlink_gps_date_time_t& gpsDateTime); void slugsGPSDateTime(int systemId, const mavlink_gps_date_time_t& gpsDateTime);
void slugsActionAck(int systemId, const mavlink_action_ack_t& actionAck); 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 slugsBootMsg(int uasId, mavlink_boot_t& boot);
void slugsAttitude(int uasId, mavlink_attitude_t& attitude); void slugsAttitude(int uasId, mavlink_attitude_t& attitude);
......
...@@ -727,12 +727,24 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) ...@@ -727,12 +727,24 @@ void UAS::receiveMessage(LinkInterface* link, mavlink_message_t message)
mavlink_raw_pressure_t pressure; mavlink_raw_pressure_t pressure;
mavlink_msg_raw_pressure_decode(&message, &pressure); mavlink_msg_raw_pressure_decode(&message, &pressure);
quint64 time = this->getUnixTime(pressure.usec); 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, "abs pressure", "hPa", pressure.press_abs, time);
emit valueChanged(uasId, "diff pressure 1", "hPa", pressure.press_diff1, time); emit valueChanged(uasId, "diff pressure", "hPa", pressure.press_diff, time);
emit valueChanged(uasId, "diff pressure 2", "hPa", pressure.press_diff2, time); emit valueChanged(uasId, "temperature", "C", pressure.temperature/100.0, time);
emit valueChanged(uasId, "temperature", "deg C", pressure.temperature/100.0f, time);
} }
break; break;
case MAVLINK_MSG_ID_RC_CHANNELS_RAW: case MAVLINK_MSG_ID_RC_CHANNELS_RAW:
{ {
mavlink_rc_channels_raw_t channels; mavlink_rc_channels_raw_t channels;
......
...@@ -323,10 +323,10 @@ void SlugsHilSim::commandDatagramToSimulink() ...@@ -323,10 +323,10 @@ void SlugsHilSim::commandDatagramToSimulink()
#ifdef MAVLINK_ENABLED_SLUGS #ifdef MAVLINK_ENABLED_SLUGS
//mavlink_pwm_commands_t* pwdC = (static_cast<SlugsMAV*>(activeUas))->getPwmCommands(); //mavlink_pwm_commands_t* pwdC = (static_cast<SlugsMAV*>(activeUas))->getPwmCommands();
mavlink_pwm_commands_t* pwdC; //mavlink_pwm_commands_t* pwdC;
if(pwdC != NULL){ // if(pwdC != NULL){
} // }
QByteArray data; QByteArray data;
data.resize(22); data.resize(22);
......
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