small fix
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2022-01-17 15:41:22 +01:00
parent ce6c9d4613
commit c657264832
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -4,8 +4,11 @@
#include "fsfw/datapool/PoolReadGuard.h"
#include "fsfw/timemanager/Clock.h"
#ifdef FSFW_OSAL_LINUX
#include <gps.h>
#include <libgpsmm.h>
#endif
#include <cmath>
#if FSFW_DEV_HYPERION_GPS_CREATE_NMEA_CSV == 1
@ -22,7 +25,9 @@ GPSHyperionHandler::GPSHyperionHandler(object_id_t objectId, object_id_t parentI
GPSHyperionHandler::~GPSHyperionHandler() {}
void GPSHyperionHandler::performControlOperation() {
#ifdef FSFW_OSAL_LINUX
readGpsDataFromGpsd();
#endif
}
LocalPoolDataSetBase* GPSHyperionHandler::getDataSetHandle(sid_t sid) {
@ -88,6 +93,7 @@ ReturnValue_t GPSHyperionHandler::handleCommandMessage(CommandMessage *message)
return ExtendedControllerBase::handleCommandMessage(message);
}
#ifdef FSFW_OSAL_LINUX
void GPSHyperionHandler::readGpsDataFromGpsd() {
// The data from the device will generally be read all at once. Therefore, we
// can set all field here
@ -172,3 +178,4 @@ void GPSHyperionHandler::readGpsDataFromGpsd() {
std::cout << "Speed(m/s): " << gps->fix.speed << std::endl;
}
}
#endif