compiling again

This commit is contained in:
Robin Müller 2021-06-16 17:19:14 +02:00
parent 236244bbb4
commit 6d09006f1a
No known key found for this signature in database
GPG Key ID: 9C287E88FED11DF3
3 changed files with 17 additions and 6 deletions

View File

@ -29,7 +29,6 @@
#include <mission/devices/SyrlinksHkHandler.h> #include <mission/devices/SyrlinksHkHandler.h>
#include <mission/devices/MGMHandlerLIS3MDL.h> #include <mission/devices/MGMHandlerLIS3MDL.h>
#include <mission/devices/MGMHandlerRM3100.h> #include <mission/devices/MGMHandlerRM3100.h>
#include <mission/devices/GyroL3GD20Handler.h>
#include <mission/devices/PlocHandler.h> #include <mission/devices/PlocHandler.h>
#include <mission/devices/RadiationSensorHandler.h> #include <mission/devices/RadiationSensorHandler.h>
#include <mission/devices/devicedefinitions/GomspaceDefinitions.h> #include <mission/devices/devicedefinitions/GomspaceDefinitions.h>
@ -41,6 +40,7 @@
#include "fsfw_hal/linux/uart/UartComIF.h" #include "fsfw_hal/linux/uart/UartComIF.h"
#include "fsfw_hal/linux/uart/UartCookie.h" #include "fsfw_hal/linux/uart/UartCookie.h"
#include "fsfw_hal/devicehandlers/GyroL3GD20Handler.h"
#include <fsfw_hal/linux/i2c/I2cCookie.h> #include <fsfw_hal/linux/i2c/I2cCookie.h>
#include <fsfw_hal/linux/i2c/I2cComIF.h> #include <fsfw_hal/linux/i2c/I2cComIF.h>
#include <fsfw_hal/linux/spi/SpiCookie.h> #include <fsfw_hal/linux/spi/SpiCookie.h>
@ -390,8 +390,8 @@ void ObjectFactory::produce(void* args){
solarArrayDeplCookie, objects::PCDU_HANDLER, pcduSwitches::DEPLOYMENT_MECHANISM, solarArrayDeplCookie, objects::PCDU_HANDLER, pcduSwitches::DEPLOYMENT_MECHANISM,
gpioIds::DEPLSA1, gpioIds::DEPLSA2, 1000); gpioIds::DEPLSA1, gpioIds::DEPLSA2, 1000);
UartCookie* syrlinksUartCookie = new UartCookie( UartCookie* syrlinksUartCookie = new UartCookie(std::string("/dev/ttyUL0"),
std::string("/dev/ttyUL0"), 38400, SYRLINKS::MAX_REPLY_SIZE); UartModes::NON_CANONICAL, 38400, SYRLINKS::MAX_REPLY_SIZE);
syrlinksUartCookie->setParityEven(); syrlinksUartCookie->setParityEven();
SyrlinksHkHandler* syrlinksHkHandler = new SyrlinksHkHandler(objects::SYRLINKS_HK_HANDLER, SyrlinksHkHandler* syrlinksHkHandler = new SyrlinksHkHandler(objects::SYRLINKS_HK_HANDLER,
@ -546,8 +546,8 @@ void ObjectFactory::produce(void* args){
// imtqHandler->setStartUpImmediately(); // imtqHandler->setStartUpImmediately();
(void) imtqHandler; (void) imtqHandler;
UartCookie* plocUartCookie = new UartCookie(std::string("/dev/ttyUL3"), 115200, UartCookie* plocUartCookie = new UartCookie(std::string("/dev/ttyUL3"),
PLOC::MAX_REPLY_SIZE); UartModes::NON_CANONICAL, 115200, PLOC::MAX_REPLY_SIZE);
PlocHandler* plocHandler = new PlocHandler(objects::PLOC_HANDLER, objects::UART_COM_IF, PlocHandler* plocHandler = new PlocHandler(objects::PLOC_HANDLER, objects::UART_COM_IF,
plocUartCookie); plocUartCookie);
// plocHandler->setStartUpImmediately(); // plocHandler->setStartUpImmediately();

View File

@ -1,9 +1,12 @@
#include "GPSHandler.h" #include "GPSHandler.h"
#include "devicedefinitions/GPSDefinitions.h" #include "devicedefinitions/GPSDefinitions.h"
#include "lwgps/lwgps.h"
GPSHandler::GPSHandler(object_id_t objectId, object_id_t deviceCommunication, GPSHandler::GPSHandler(object_id_t objectId, object_id_t deviceCommunication,
CookieIF *comCookie): CookieIF *comCookie):
DeviceHandlerBase(objectId, deviceCommunication, comCookie) { DeviceHandlerBase(objectId, deviceCommunication, comCookie) {
lwgps_init(&gpsData);
} }
GPSHandler::~GPSHandler() {} GPSHandler::~GPSHandler() {}
@ -45,7 +48,14 @@ ReturnValue_t GPSHandler::buildCommandFromCommand(
ReturnValue_t GPSHandler::scanForReply(const uint8_t *start, size_t len, ReturnValue_t GPSHandler::scanForReply(const uint8_t *start, size_t len,
DeviceCommandId_t *foundId, size_t *foundLen) { DeviceCommandId_t *foundId, size_t *foundLen) {
// Pass data to GPS library
int result = lwgps_process(&gpsData, start, len);
if(result != 0) {
sif::warning << "GPSHandler::scanForReply: Issue processing GPS data with lwgps"
<< std::endl;
}
return HasReturnvaluesIF::RETURN_OK; return HasReturnvaluesIF::RETURN_OK;
} }
ReturnValue_t GPSHandler::interpretDeviceReply(DeviceCommandId_t id, ReturnValue_t GPSHandler::interpretDeviceReply(DeviceCommandId_t id,

View File

@ -2,6 +2,7 @@
#define MISSION_DEVICES_GPSHANDLER_H_ #define MISSION_DEVICES_GPSHANDLER_H_
#include <fsfw/devicehandlers/DeviceHandlerBase.h> #include <fsfw/devicehandlers/DeviceHandlerBase.h>
#include "lwgps/lwgps.h"
/** /**
* @brief Device handler for the Hyperion HT-GPS200 device * @brief Device handler for the Hyperion HT-GPS200 device
@ -46,7 +47,7 @@ protected:
LocalDataPoolManager &poolManager) override; LocalDataPoolManager &poolManager) override;
private: private:
lwgps_t gpsData = {};
}; };
#endif /* MISSION_DEVICES_GPSHANDLER_H_ */ #endif /* MISSION_DEVICES_GPSHANDLER_H_ */