all retval replacements
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:
@ -27,14 +27,14 @@ RwHandler::~RwHandler() {}
|
||||
void RwHandler::doStartUp() {
|
||||
internalState = InternalState::GET_RESET_STATUS;
|
||||
|
||||
if (gpioComIF->pullHigh(enableGpio) != RETURN_OK) {
|
||||
if (gpioComIF->pullHigh(enableGpio) != returnvalue::OK) {
|
||||
sif::debug << "RwHandler::doStartUp: Failed to pull enable gpio to high";
|
||||
}
|
||||
setMode(_MODE_TO_ON);
|
||||
}
|
||||
|
||||
void RwHandler::doShutDown() {
|
||||
if (gpioComIF->pullLow(enableGpio) != RETURN_OK) {
|
||||
if (gpioComIF->pullLow(enableGpio) != returnvalue::OK) {
|
||||
sif::debug << "RwHandler::doStartUp: Failed to pull enable gpio to low";
|
||||
}
|
||||
setMode(_MODE_POWER_DOWN);
|
||||
@ -73,28 +73,28 @@ ReturnValue_t RwHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
|
||||
ReturnValue_t RwHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand,
|
||||
const uint8_t* commandData,
|
||||
size_t commandDataLen) {
|
||||
ReturnValue_t result = RETURN_OK;
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
|
||||
switch (deviceCommand) {
|
||||
case (RwDefinitions::RESET_MCU): {
|
||||
prepareSimpleCommand(deviceCommand);
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
case (RwDefinitions::GET_LAST_RESET_STATUS): {
|
||||
prepareSimpleCommand(deviceCommand);
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
case (RwDefinitions::CLEAR_LAST_RESET_STATUS): {
|
||||
prepareSimpleCommand(deviceCommand);
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
case (RwDefinitions::GET_RW_STATUS): {
|
||||
prepareSimpleCommand(deviceCommand);
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
case (RwDefinitions::INIT_RW_CONTROLLER): {
|
||||
prepareSimpleCommand(deviceCommand);
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
case (RwDefinitions::SET_SPEED): {
|
||||
if (commandDataLen != 6) {
|
||||
@ -103,7 +103,7 @@ ReturnValue_t RwHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand
|
||||
return SET_SPEED_COMMAND_INVALID_LENGTH;
|
||||
}
|
||||
result = checkSpeedAndRampTime(commandData, commandDataLen);
|
||||
if (result != RETURN_OK) {
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
prepareSetSpeedCmd(commandData, commandDataLen);
|
||||
@ -111,16 +111,16 @@ ReturnValue_t RwHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand
|
||||
}
|
||||
case (RwDefinitions::GET_TEMPERATURE): {
|
||||
prepareSimpleCommand(deviceCommand);
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
case (RwDefinitions::GET_TM): {
|
||||
prepareSimpleCommand(deviceCommand);
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
default:
|
||||
return DeviceHandlerIF::COMMAND_NOT_IMPLEMENTED;
|
||||
}
|
||||
return HasReturnvaluesIF::RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
|
||||
void RwHandler::fillCommandAndReplyMap() {
|
||||
@ -183,13 +183,13 @@ ReturnValue_t RwHandler::scanForReply(const uint8_t* start, size_t remainingSize
|
||||
default: {
|
||||
sif::warning << "RwHandler::scanForReply: Reply contains invalid command code" << std::endl;
|
||||
*foundLen = remainingSize;
|
||||
return RETURN_FAILED;
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
sizeOfReply = *foundLen;
|
||||
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t RwHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_t* packet) {
|
||||
@ -236,7 +236,7 @@ ReturnValue_t RwHandler::interpretDeviceReply(DeviceCommandId_t id, const uint8_
|
||||
}
|
||||
}
|
||||
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
uint32_t RwHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 5000; }
|
||||
@ -283,7 +283,7 @@ ReturnValue_t RwHandler::initializeLocalDataPool(localpool::DataPool& localDataP
|
||||
subdp::RegularHkPeriodicParams(tmDataset.getSid(), false, 30.0));
|
||||
poolManager.subscribeForRegularPeriodicPacket(
|
||||
subdp::RegularHkPeriodicParams(lastResetStatusSet.getSid(), false, 30.0));
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void RwHandler::prepareSimpleCommand(DeviceCommandId_t id) {
|
||||
@ -311,7 +311,7 @@ ReturnValue_t RwHandler::checkSpeedAndRampTime(const uint8_t* commandData, size_
|
||||
return INVALID_RAMP_TIME;
|
||||
}
|
||||
|
||||
return RETURN_OK;
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
void RwHandler::prepareSetSpeedCmd(const uint8_t* commandData, size_t commandDataLen) {
|
||||
|
Reference in New Issue
Block a user