1
0
mirror of https://bitbucket.org/librepilot/librepilot.git synced 2025-01-18 03:52:11 +01:00

MkSerial: Adapt to GpsPosition => ActualPosition

git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@744 ebee16cc-31ac-478f-84a7-5cbb03baadba
This commit is contained in:
fredericg 2010-06-11 15:54:13 +00:00 committed by fredericg
parent 3f206be0bd
commit 39aaf0868a

View File

@ -27,7 +27,7 @@
#include "MkSerial.h"
#include "attitudeactual.h" // object that will be updated by the module
#include "gpsobject.h"
#include "positionactual.h"
//
@ -480,12 +480,12 @@ static void DoConnectedToNC(void)
MkMsg_t msg;
GpsPosition_t pos;
AttitudeActualData attitudeData;
GpsObjectData gpsData;
PositionActualData positionData;
DEBUG_MSG("NC\n\r");
memset(&attitudeData, 0, sizeof(attitudeData));
memset(&gpsData, 0, sizeof(gpsData));
memset(&positionData, 0, sizeof(positionData));
// Configure NC for fast reporting of the osd-message
SendMsgPar8(MK_ADDR_ALL, MSGCMD_GET_OSD, 10);
@ -506,12 +506,12 @@ static void DoConnectedToNC(void)
attitudeData.Roll = -Par2Int8(&msg,OSD_MSG_ROLL_IDX);
AttitudeActualSet(&attitudeData);
gpsData.Longitude = pos.longitute;
gpsData.Latitude = pos.latitude;
gpsData.Altitude = pos.altitude;
gpsData.Satellites = msg.pars[OSD_MSG_NB_SATS_IDX];
gpsData.Updates++;
GpsObjectSet(&gpsData);
positionData.Longitude = pos.longitute;
positionData.Latitude = pos.latitude;
positionData.Altitude = pos.altitude;
positionData.Satellites = msg.pars[OSD_MSG_NB_SATS_IDX];
positionData.Status = POSITIONACTUAL_STATUS_FIX3D; // FIXME
PositionActualSet(&positionData);
}
else
{