added InternalState SET_SPEED to enable setting RW Speed from ACS Ctrl
This commit is contained in:
parent
ac22a00e09
commit
f4f6d1ed81
@ -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;
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include "events/subsystemIdRanges.h"
|
||||
#include "returnvalues/classIds.h"
|
||||
|
||||
static constexpr bool ACTUATION_WIRETAPPING = false;
|
||||
static constexpr bool ACTUATION_WIRETAPPING = true;
|
||||
|
||||
class GpioIF;
|
||||
|
||||
@ -102,7 +102,13 @@ class RwHandler : public DeviceHandlerBase {
|
||||
PoolEntry<int32_t> rwSpeed = PoolEntry<int32_t>(0, false);
|
||||
PoolEntry<uint16_t> rampTime = PoolEntry<uint16_t>(10, false);
|
||||
|
||||
enum class InternalState { GET_RESET_STATUS, CLEAR_RESET_STATUS, READ_TEMPERATURE, GET_RW_SATUS };
|
||||
enum class InternalState {
|
||||
GET_RESET_STATUS,
|
||||
CLEAR_RESET_STATUS,
|
||||
READ_TEMPERATURE,
|
||||
SET_SPEED,
|
||||
GET_RW_SATUS
|
||||
};
|
||||
|
||||
InternalState internalState = InternalState::GET_RESET_STATUS;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user