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;
|
break;
|
||||||
case InternalState::GET_RW_SATUS:
|
case InternalState::GET_RW_SATUS:
|
||||||
*id = RwDefinitions::GET_RW_STATUS;
|
*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;
|
break;
|
||||||
case InternalState::CLEAR_RESET_STATUS:
|
case InternalState::CLEAR_RESET_STATUS:
|
||||||
*id = RwDefinitions::CLEAR_LAST_RESET_STATUS;
|
*id = RwDefinitions::CLEAR_LAST_RESET_STATUS;
|
||||||
@ -98,6 +102,7 @@ ReturnValue_t RwHandler::buildCommandFromCommand(DeviceCommandId_t deviceCommand
|
|||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
case (RwDefinitions::SET_SPEED): {
|
case (RwDefinitions::SET_SPEED): {
|
||||||
|
sif::debug << "hello" << std::endl;
|
||||||
if (commandData != nullptr && commandDataLen != 6) {
|
if (commandData != nullptr && commandDataLen != 6) {
|
||||||
sif::error << "RwHandler::buildCommandFromCommand: Received set speed command with"
|
sif::error << "RwHandler::buildCommandFromCommand: Received set speed command with"
|
||||||
<< " invalid length" << std::endl;
|
<< " invalid length" << std::endl;
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
#include "events/subsystemIdRanges.h"
|
#include "events/subsystemIdRanges.h"
|
||||||
#include "returnvalues/classIds.h"
|
#include "returnvalues/classIds.h"
|
||||||
|
|
||||||
static constexpr bool ACTUATION_WIRETAPPING = false;
|
static constexpr bool ACTUATION_WIRETAPPING = true;
|
||||||
|
|
||||||
class GpioIF;
|
class GpioIF;
|
||||||
|
|
||||||
@ -102,7 +102,13 @@ class RwHandler : public DeviceHandlerBase {
|
|||||||
PoolEntry<int32_t> rwSpeed = PoolEntry<int32_t>(0, false);
|
PoolEntry<int32_t> rwSpeed = PoolEntry<int32_t>(0, false);
|
||||||
PoolEntry<uint16_t> rampTime = PoolEntry<uint16_t>(10, 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;
|
InternalState internalState = InternalState::GET_RESET_STATUS;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user