mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-03 11:24:10 +01:00
GCS: Zero data structures, since this is not Java ;)
I was getting some weird initial random values from the sim. This fixes that. git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@1667 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
parent
303d2c19e1
commit
3d43f1cff1
@ -201,13 +201,15 @@ void FGSimulator::processUpdate(QString& data)
|
||||
|
||||
// Update AltitudeActual object
|
||||
BaroAltitude::DataFields altActualData;
|
||||
altActualData.Altitude = altitudeAGL;
|
||||
memset(&altActualData, 0, sizeof(BaroAltitude::DataFields));
|
||||
altActualData.Altitude = altitudeAGL;
|
||||
altActualData.Temperature = temperature;
|
||||
altActualData.Pressure = pressure;
|
||||
altActual->setData(altActualData);
|
||||
|
||||
// Update attActual object
|
||||
AttitudeActual::DataFields attActualData;
|
||||
memset(&attActualData, 0, sizeof(AttitudeActual::DataFields));
|
||||
attActualData.Roll = roll;
|
||||
attActualData.Pitch = pitch;
|
||||
attActualData.Yaw = yaw;
|
||||
@ -219,7 +221,8 @@ void FGSimulator::processUpdate(QString& data)
|
||||
|
||||
// Update gps objects
|
||||
PositionActual::DataFields gpsData;
|
||||
gpsData.Altitude = altitude;
|
||||
memset(&gpsData, 0, sizeof(PositionActual::DataFields));
|
||||
gpsData.Altitude = altitude;
|
||||
gpsData.Heading = heading;
|
||||
gpsData.Groundspeed = groundspeed;
|
||||
gpsData.Latitude = latitude;
|
||||
|
Loading…
Reference in New Issue
Block a user