Major update for power handling
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
and various smaller updates
This commit is contained in:
@ -1,5 +1,9 @@
|
||||
#include <mission/devices/GomspaceDeviceHandler.h>
|
||||
#include <mission/devices/devicedefinitions/GomSpacePackets.h>
|
||||
#include "GomspaceDeviceHandler.h"
|
||||
|
||||
#include <common/config/commonObjects.h>
|
||||
|
||||
#include "devicedefinitions/GomSpacePackets.h"
|
||||
#include "devicedefinitions/powerDefinitions.h"
|
||||
|
||||
GomspaceDeviceHandler::GomspaceDeviceHandler(object_id_t objectId, object_id_t comIF,
|
||||
CookieIF* comCookie, uint16_t maxConfigTableAddress,
|
||||
@ -70,7 +74,8 @@ ReturnValue_t GomspaceDeviceHandler::buildCommandFromCommand(DeviceCommandId_t d
|
||||
}
|
||||
break;
|
||||
}
|
||||
case (GOMSPACE::PRINT_SWITCH_V_I): {
|
||||
case (GOMSPACE::PRINT_SWITCH_V_I):
|
||||
case (GOMSPACE::PRINT_LATCHUPS): {
|
||||
result = printStatus(deviceCommand);
|
||||
break;
|
||||
}
|
||||
@ -95,6 +100,7 @@ void GomspaceDeviceHandler::fillCommandAndReplyMap() {
|
||||
this->insertInCommandAndReplyMap(GOMSPACE::REQUEST_HK_TABLE, 3);
|
||||
this->insertInCommandMap(GOMSPACE::GNDWDT_RESET);
|
||||
this->insertInCommandMap(GOMSPACE::PRINT_SWITCH_V_I);
|
||||
this->insertInCommandMap(GOMSPACE::PRINT_LATCHUPS);
|
||||
}
|
||||
|
||||
ReturnValue_t GomspaceDeviceHandler::scanForReply(const uint8_t* start, size_t remainingSize,
|
||||
@ -189,6 +195,12 @@ ReturnValue_t GomspaceDeviceHandler::generateSetParamCommand(const uint8_t* comm
|
||||
size_t commandDataLen) {
|
||||
ReturnValue_t result =
|
||||
setParamCacher.deSerialize(&commandData, &commandDataLen, SerializeIF::Endianness::BIG);
|
||||
// This breaks layering but I really don't want to accept this command..
|
||||
if (setParamCacher.getAddress() == PDU2::CONFIG_ADDRESS_OUT_EN_Q7S and
|
||||
this->getObjectId() == objects::PDU2_HANDLER) {
|
||||
triggerEvent(power::SWITCHING_Q7S_DENIED, 0, 0);
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
}
|
||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||
sif::error << "GomspaceDeviceHandler: Failed to deserialize set parameter "
|
||||
"message"
|
||||
|
Reference in New Issue
Block a user