Commit 06c36b8b authored by Don Gagne's avatar Don Gagne
Browse files

ind_airspeed used uninitialized when _sensorHilEnabled == false

Fixing -Wuninitialized
parent e547004f
......@@ -281,12 +281,6 @@ void QGCFlightGearLink::readBytes()
temperature = values.at(19).toFloat();
abs_pressure = values.at(20).toFloat()*1e2; //convert to Pa from hPa
// Send updated state
//qDebug() << "sensorHilEnabled: " << sensorHilEnabled;
if (_sensorHilEnabled)
{
quint16 fields_changed = 0xFFF; //set all 12 used bits
//calculate differential pressure
const float air_gas_constant = 287.1f; // J/(kg * K)
const float absolute_null_celsius = -273.15f; // °C
......@@ -306,6 +300,12 @@ void QGCFlightGearLink::readBytes()
//qDebug() << "ind_airspeed: " << ind_airspeed << "true_airspeed: " << true_airspeed;
// Send updated state
//qDebug() << "sensorHilEnabled: " << sensorHilEnabled;
if (_sensorHilEnabled)
{
quint16 fields_changed = 0xFFF; //set all 12 used bits
float pressure_alt = alt;
xmag_ned = cosf(mag_variation);
......
Supports Markdown
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