added InternalState SET_SPEED to enable setting RW Speed from ACS Ctrl

This commit is contained in:
2023-02-13 10:33:08 +01:00
parent ac22a00e09
commit f4f6d1ed81
2 changed files with 14 additions and 3 deletions

View File

@ -53,7 +53,11 @@ ReturnValue_t RwHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
break;
case InternalState::GET_RW_SATUS:
*id = RwDefinitions::GET_RW_STATUS;
internalState = InternalState::GET_RESET_STATUS;
internalState = InternalState::SET_SPEED;
break;
case InternalState::SET_SPEED:
*id = RwDefinitions::SET_SPEED;
internalState = InternalState::CLEAR_RESET_STATUS;
break;
case InternalState::CLEAR_RESET_STATUS:
*id = RwDefinitions::CLEAR_LAST_RESET_STATUS;
@ -98,6 +102,7 @@ ReturnValue_t RwHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand
return returnvalue::OK;
}
case (RwDefinitions::SET_SPEED): {
sif::debug << "hello" << std::endl;
if (commandData != nullptr && commandDataLen != 6) {
sif::error << "RwHandler::buildCommandFromCommand: Received set speed command with"
<< " invalid length" << std::endl;