1
0
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:
cranphin 2010-09-16 22:32:49 +00:00 committed by cranphin
parent 303d2c19e1
commit 3d43f1cff1

View File

@ -201,13 +201,15 @@ void FGSimulator::processUpdate(QString& data)
// Update AltitudeActual object // Update AltitudeActual object
BaroAltitude::DataFields altActualData; BaroAltitude::DataFields altActualData;
altActualData.Altitude = altitudeAGL; memset(&altActualData, 0, sizeof(BaroAltitude::DataFields));
altActualData.Altitude = altitudeAGL;
altActualData.Temperature = temperature; altActualData.Temperature = temperature;
altActualData.Pressure = pressure; altActualData.Pressure = pressure;
altActual->setData(altActualData); altActual->setData(altActualData);
// Update attActual object // Update attActual object
AttitudeActual::DataFields attActualData; AttitudeActual::DataFields attActualData;
memset(&attActualData, 0, sizeof(AttitudeActual::DataFields));
attActualData.Roll = roll; attActualData.Roll = roll;
attActualData.Pitch = pitch; attActualData.Pitch = pitch;
attActualData.Yaw = yaw; attActualData.Yaw = yaw;
@ -219,7 +221,8 @@ void FGSimulator::processUpdate(QString& data)
// Update gps objects // Update gps objects
PositionActual::DataFields gpsData; PositionActual::DataFields gpsData;
gpsData.Altitude = altitude; memset(&gpsData, 0, sizeof(PositionActual::DataFields));
gpsData.Altitude = altitude;
gpsData.Heading = heading; gpsData.Heading = heading;
gpsData.Groundspeed = groundspeed; gpsData.Groundspeed = groundspeed;
gpsData.Latitude = latitude; gpsData.Latitude = latitude;