obsw config, gps update
This commit is contained in:
@ -23,7 +23,6 @@ GPSHyperionHandler::~GPSHyperionHandler() {}
|
||||
void GPSHyperionHandler::doStartUp() {
|
||||
if(internalState == InternalStates::NONE) {
|
||||
commandExecuted = false;
|
||||
updatePeriodicReply(true, GpsHyperion::GPS_REPLY);
|
||||
internalState = InternalStates::WAIT_FIRST_MESSAGE;
|
||||
}
|
||||
|
||||
@ -76,7 +75,7 @@ ReturnValue_t GPSHyperionHandler::scanForReply(const uint8_t *start, size_t len,
|
||||
DeviceCommandId_t *foundId, size_t *foundLen) {
|
||||
// Pass data to GPS library
|
||||
if(len > 0) {
|
||||
sif::debug << "GPSHandler::scanForReply: Received " << len << " bytes" << std::endl;
|
||||
// sif::debug << "GPSHandler::scanForReply: Received " << len << " bytes" << std::endl;
|
||||
if (internalState == InternalStates::WAIT_FIRST_MESSAGE) {
|
||||
// TODO: Check whether data is valid by checking whether NMEA start string is valid?
|
||||
commandExecuted = true;
|
||||
@ -202,3 +201,12 @@ void GPSHyperionHandler::setResetPinTriggerFunction(gpioResetFunction_t resetCal
|
||||
void GPSHyperionHandler::debugInterface(uint8_t positionTracker, object_id_t objectId,
|
||||
uint32_t parameter) {
|
||||
}
|
||||
|
||||
ReturnValue_t GPSHyperionHandler::initialize() {
|
||||
ReturnValue_t result = DeviceHandlerBase::initialize();
|
||||
if(result != HasReturnvaluesIF::RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
// Enable reply immediately for now
|
||||
return updatePeriodicReply(true, GpsHyperion::GPS_REPLY);
|
||||
}
|
||||
|
@ -14,12 +14,16 @@
|
||||
*/
|
||||
class GPSHyperionHandler: public DeviceHandlerBase {
|
||||
public:
|
||||
using gpioResetFunction_t = ReturnValue_t (*) (void* args);
|
||||
|
||||
GPSHyperionHandler(object_id_t objectId, object_id_t deviceCommunication,
|
||||
CookieIF* comCookie, bool debugHyperionGps = false);
|
||||
virtual ~GPSHyperionHandler();
|
||||
|
||||
using gpioResetFunction_t = ReturnValue_t (*) (void* args);
|
||||
|
||||
void setResetPinTriggerFunction(gpioResetFunction_t resetCallback, void*args);
|
||||
|
||||
ReturnValue_t initialize() override;
|
||||
protected:
|
||||
|
||||
gpioResetFunction_t resetCallback = nullptr;
|
||||
|
Reference in New Issue
Block a user