this is better
This commit is contained in:
parent
82a645deba
commit
84f95e8d76
@ -196,7 +196,7 @@ ReturnValue_t AssemblyBase::checkModeCommand(Mode_t mode, Submode_t submode,
|
||||
}
|
||||
|
||||
if ((mode != MODE_ON) && (mode != DeviceHandlerIF::MODE_NORMAL)) {
|
||||
return MOVE_IS_INVALID;
|
||||
return INVALID_MODE;
|
||||
}
|
||||
|
||||
if (internalState != STATE_NONE) {
|
||||
|
@ -403,7 +403,7 @@ ReturnValue_t DeviceHandlerBase::isModeCombinationValid(Mode_t mode, Submode_t s
|
||||
return INVALID_SUBMODE;
|
||||
}
|
||||
default:
|
||||
return HasModesIF::MOVE_IS_INVALID;
|
||||
return HasModesIF::INVALID_MODE;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -13,7 +13,7 @@ class HasModesIF {
|
||||
|
||||
public:
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::HAS_MODES_IF;
|
||||
static const ReturnValue_t MOVE_IS_INVALID = MAKE_RETURN_CODE(0x01);
|
||||
static const ReturnValue_t INVALID_MODE = MAKE_RETURN_CODE(0x01);
|
||||
static const ReturnValue_t TRANS_NOT_ALLOWED = MAKE_RETURN_CODE(0x02);
|
||||
static const ReturnValue_t IN_TRANSITION = MAKE_RETURN_CODE(0x03);
|
||||
static const ReturnValue_t INVALID_SUBMODE = MAKE_RETURN_CODE(0x04);
|
||||
@ -41,8 +41,8 @@ class HasModesIF {
|
||||
//! The device is powered off. The only command accepted in this mode is a mode change to on.
|
||||
static constexpr Mode_t MODE_OFF = 0;
|
||||
|
||||
static constexpr Mode_t INVALID_MODE = -1;
|
||||
static constexpr Mode_t UNDEFINED_MODE = -2;
|
||||
static constexpr Mode_t MODE_INVALID = -1;
|
||||
static constexpr Mode_t MODE_UNDEFINED = -2;
|
||||
|
||||
//! To avoid checks against magic number "0".
|
||||
static const Submode_t SUBMODE_NONE = 0;
|
||||
|
@ -35,7 +35,7 @@ ReturnValue_t SubsystemBase::registerChild(object_id_t objectId) {
|
||||
} else {
|
||||
// intentional to force an initial command during system startup
|
||||
info.commandQueue = child->getCommandQueue();
|
||||
info.mode = HasModesIF::UNDEFINED_MODE;
|
||||
info.mode = HasModesIF::MODE_UNDEFINED;
|
||||
}
|
||||
|
||||
info.submode = SUBMODE_NONE;
|
||||
|
@ -125,7 +125,7 @@ ReturnValue_t TestAssembly::isModeCombinationValid(Mode_t mode, Submode_t submod
|
||||
return INVALID_SUBMODE;
|
||||
}
|
||||
}
|
||||
return MOVE_IS_INVALID;
|
||||
return INVALID_MODE;
|
||||
}
|
||||
|
||||
ReturnValue_t TestAssembly::initialize() {
|
||||
|
Loading…
Reference in New Issue
Block a user