hyperion handler: HK packet subscription
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
This commit is contained in:
parent
268cd33677
commit
cb330bcf29
@ -7,9 +7,9 @@
|
||||
#include "lwgps/lwgps.h"
|
||||
|
||||
GPSHyperionHandler::GPSHyperionHandler(object_id_t objectId, object_id_t deviceCommunication,
|
||||
CookieIF *comCookie, bool debugHyperionGps):
|
||||
DeviceHandlerBase(objectId, deviceCommunication, comCookie), gpsSet(this),
|
||||
debugHyperionGps(debugHyperionGps) {
|
||||
CookieIF *comCookie, bool debugHyperionGps):
|
||||
DeviceHandlerBase(objectId, deviceCommunication, comCookie), gpsSet(this),
|
||||
debugHyperionGps(debugHyperionGps) {
|
||||
lwgps_init(&gpsData);
|
||||
}
|
||||
|
||||
@ -37,21 +37,21 @@ void GPSHyperionHandler::doShutDown() {
|
||||
}
|
||||
|
||||
ReturnValue_t GPSHyperionHandler::buildTransitionDeviceCommand(DeviceCommandId_t *id) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t GPSHyperionHandler::buildNormalDeviceCommand(DeviceCommandId_t *id) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t GPSHyperionHandler::buildCommandFromCommand(
|
||||
DeviceCommandId_t deviceCommand, const uint8_t *commandData,
|
||||
size_t commandDataLen) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
DeviceCommandId_t deviceCommand, const uint8_t *commandData,
|
||||
size_t commandDataLen) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
ReturnValue_t GPSHyperionHandler::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
|
||||
if(len > 0) {
|
||||
sif::info << "GPSHandler::scanForReply: Received " << len << " bytes" << std::endl;
|
||||
@ -111,21 +111,21 @@ ReturnValue_t GPSHyperionHandler::scanForReply(const uint8_t *start, size_t len,
|
||||
}
|
||||
*foundLen = len;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
|
||||
}
|
||||
|
||||
ReturnValue_t GPSHyperionHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
const uint8_t *packet) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
const uint8_t *packet) {
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
uint32_t GPSHyperionHandler::getTransitionDelayMs(Mode_t from, Mode_t to) {
|
||||
return 5000;
|
||||
return 5000;
|
||||
}
|
||||
|
||||
ReturnValue_t GPSHyperionHandler::initializeLocalDataPool(
|
||||
localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) {
|
||||
localpool::DataPool &localDataPoolMap, LocalDataPoolManager &poolManager) {
|
||||
localDataPoolMap.emplace(GpsHyperion::ALTITUDE, new PoolEntry<double>({0.0}));
|
||||
localDataPoolMap.emplace(GpsHyperion::LONGITUDE, new PoolEntry<double>({0.0}));
|
||||
localDataPoolMap.emplace(GpsHyperion::LATITUDE, new PoolEntry<double>({0.0}));
|
||||
@ -138,7 +138,8 @@ ReturnValue_t GPSHyperionHandler::initializeLocalDataPool(
|
||||
localDataPoolMap.emplace(GpsHyperion::UNIX_SECONDS, new PoolEntry<uint32_t>());
|
||||
localDataPoolMap.emplace(GpsHyperion::SATS_IN_USE, new PoolEntry<uint8_t>());
|
||||
localDataPoolMap.emplace(GpsHyperion::FIX_MODE, new PoolEntry<uint8_t>());
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
poolManager.subscribeForPeriodicPacket(gpsSet.getSid(), true, 2.0, false);
|
||||
return HasReturnvaluesIF::RETURN_OK;
|
||||
}
|
||||
|
||||
void GPSHyperionHandler::fillCommandAndReplyMap() {
|
||||
|
@ -20,6 +20,7 @@ public:
|
||||
virtual ~GPSHyperionHandler();
|
||||
|
||||
protected:
|
||||
|
||||
enum class InternalStates {
|
||||
NONE,
|
||||
WAIT_FIRST_MESSAGE,
|
||||
|
Loading…
x
Reference in New Issue
Block a user