form improvements
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
This commit is contained in:
parent
f7c6f16777
commit
e837532b22
@ -54,13 +54,13 @@ ReturnValue_t GPSHyperionHandler::buildCommandFromCommand(
|
|||||||
size_t commandDataLen) {
|
size_t commandDataLen) {
|
||||||
switch(deviceCommand) {
|
switch(deviceCommand) {
|
||||||
case(GpsHyperion::TRIGGER_RESET_PIN): {
|
case(GpsHyperion::TRIGGER_RESET_PIN): {
|
||||||
if(resetPinTrigger != nullptr) {
|
if(resetCallback != nullptr) {
|
||||||
PoolReadGuard pg(&gpsSet);
|
PoolReadGuard pg(&gpsSet);
|
||||||
// Set HK entries invalid
|
// Set HK entries invalid
|
||||||
gpsSet.setValidity(false, true);
|
gpsSet.setValidity(false, true);
|
||||||
// The user needs to implement this. Don't touch states for now, the device should
|
// The user needs to implement this. Don't touch states for now, the device should
|
||||||
// quickly reboot and send valid strings again.
|
// quickly reboot and send valid strings again.
|
||||||
return resetPinTrigger(resetPinTriggerArgs);
|
return resetCallback(resetCallbackArgs);
|
||||||
}
|
}
|
||||||
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
||||||
}
|
}
|
||||||
@ -180,10 +180,10 @@ void GPSHyperionHandler::modeChanged() {
|
|||||||
internalState = InternalStates::NONE;
|
internalState = InternalStates::NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPSHyperionHandler::setResetPinTriggerFunction(ReturnValue_t (*function)(void *args),
|
void GPSHyperionHandler::setResetPinTriggerFunction(gpioResetFunction_t resetCallback,
|
||||||
void *args) {
|
void *args) {
|
||||||
resetPinTrigger = function;
|
this->resetCallback = resetCallback;
|
||||||
resetPinTriggerArgs = args;
|
resetCallbackArgs = args;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPSHyperionHandler::debugInterface(uint8_t positionTracker, object_id_t objectId,
|
void GPSHyperionHandler::debugInterface(uint8_t positionTracker, object_id_t objectId,
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "devicedefinitions/GPSDefinitions.h"
|
#include "devicedefinitions/GPSDefinitions.h"
|
||||||
#include "lwgps/lwgps.h"
|
#include "lwgps/lwgps.h"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Device handler for the Hyperion HT-GPS200 device
|
* @brief Device handler for the Hyperion HT-GPS200 device
|
||||||
* @details
|
* @details
|
||||||
@ -15,15 +14,16 @@
|
|||||||
*/
|
*/
|
||||||
class GPSHyperionHandler: public DeviceHandlerBase {
|
class GPSHyperionHandler: public DeviceHandlerBase {
|
||||||
public:
|
public:
|
||||||
|
using gpioResetFunction_t = ReturnValue_t (*) (void* args);
|
||||||
GPSHyperionHandler(object_id_t objectId, object_id_t deviceCommunication,
|
GPSHyperionHandler(object_id_t objectId, object_id_t deviceCommunication,
|
||||||
CookieIF* comCookie, bool debugHyperionGps = false);
|
CookieIF* comCookie, bool debugHyperionGps = false);
|
||||||
virtual ~GPSHyperionHandler();
|
virtual ~GPSHyperionHandler();
|
||||||
|
|
||||||
void setResetPinTriggerFunction(ReturnValue_t (*function) (void*args), void*args);
|
void setResetPinTriggerFunction(gpioResetFunction_t resetCallback, void*args);
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
ReturnValue_t (*resetPinTrigger) (void* args) = nullptr;
|
gpioResetFunction_t resetCallback = nullptr;
|
||||||
void* resetPinTriggerArgs = nullptr;
|
void* resetCallbackArgs = nullptr;
|
||||||
|
|
||||||
enum class InternalStates {
|
enum class InternalStates {
|
||||||
NONE,
|
NONE,
|
||||||
|
Loading…
Reference in New Issue
Block a user