Disable Order Check PL PCDU #825
@ -590,6 +590,9 @@ ReturnValue_t PayloadPcduHandler::checkModeCommand(Mode_t commandedMode, Submode
|
||||
ReturnValue_t PayloadPcduHandler::isModeCombinationValid(Mode_t mode, Submode_t submode) {
|
||||
using namespace plpcdu;
|
||||
if (mode == MODE_NORMAL) {
|
||||
if (disableChannelOrderCheck) {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
uint8_t dhbSubmode = getSubmode();
|
||||
diffMask = submode ^ dhbSubmode;
|
||||
// Also deals with the case where the mode is MODE_ON, submode should be 0 here
|
||||
@ -637,56 +640,68 @@ ReturnValue_t PayloadPcduHandler::getParameter(uint8_t domainId, uint8_t uniqueI
|
||||
uint16_t startAtIndex) {
|
||||
using namespace plpcdu;
|
||||
switch (uniqueId) {
|
||||
case (PlPcduParamIds::NEG_V_LOWER_BOUND):
|
||||
case (PlPcduParamIds::NEG_V_UPPER_BOUND):
|
||||
case (PlPcduParamIds::DRO_U_LOWER_BOUND):
|
||||
case (PlPcduParamIds::DRO_U_UPPER_BOUND):
|
||||
case (PlPcduParamIds::DRO_I_UPPER_BOUND):
|
||||
case (PlPcduParamIds::X8_U_LOWER_BOUND):
|
||||
case (PlPcduParamIds::X8_U_UPPER_BOUND):
|
||||
case (PlPcduParamIds::X8_I_UPPER_BOUND):
|
||||
case (PlPcduParamIds::TX_U_LOWER_BOUND):
|
||||
case (PlPcduParamIds::TX_U_UPPER_BOUND):
|
||||
case (PlPcduParamIds::TX_I_UPPER_BOUND):
|
||||
case (PlPcduParamIds::MPA_U_LOWER_BOUND):
|
||||
case (PlPcduParamIds::MPA_U_UPPER_BOUND):
|
||||
case (PlPcduParamIds::MPA_I_UPPER_BOUND):
|
||||
case (PlPcduParamIds::HPA_U_LOWER_BOUND):
|
||||
case (PlPcduParamIds::HPA_U_UPPER_BOUND):
|
||||
case (PlPcduParamIds::HPA_I_UPPER_BOUND):
|
||||
case (PlPcduParamIds::SSR_TO_DRO_WAIT_TIME):
|
||||
case (PlPcduParamIds::DRO_TO_X8_WAIT_TIME):
|
||||
case (PlPcduParamIds::X8_TO_TX_WAIT_TIME):
|
||||
case (PlPcduParamIds::TX_TO_MPA_WAIT_TIME):
|
||||
case (PlPcduParamIds::MPA_TO_HPA_WAIT_TIME): {
|
||||
handleDoubleParamUpdate(PARAM_KEY_MAP[static_cast<PlPcduParamIds>(uniqueId)],
|
||||
parameterWrapper, newValues);
|
||||
case (PlPcduParamId::NEG_V_LOWER_BOUND):
|
||||
case (PlPcduParamId::NEG_V_UPPER_BOUND):
|
||||
case (PlPcduParamId::DRO_U_LOWER_BOUND):
|
||||
case (PlPcduParamId::DRO_U_UPPER_BOUND):
|
||||
case (PlPcduParamId::DRO_I_UPPER_BOUND):
|
||||
case (PlPcduParamId::X8_U_LOWER_BOUND):
|
||||
case (PlPcduParamId::X8_U_UPPER_BOUND):
|
||||
case (PlPcduParamId::X8_I_UPPER_BOUND):
|
||||
case (PlPcduParamId::TX_U_LOWER_BOUND):
|
||||
case (PlPcduParamId::TX_U_UPPER_BOUND):
|
||||
case (PlPcduParamId::TX_I_UPPER_BOUND):
|
||||
case (PlPcduParamId::MPA_U_LOWER_BOUND):
|
||||
case (PlPcduParamId::MPA_U_UPPER_BOUND):
|
||||
case (PlPcduParamId::MPA_I_UPPER_BOUND):
|
||||
case (PlPcduParamId::HPA_U_LOWER_BOUND):
|
||||
case (PlPcduParamId::HPA_U_UPPER_BOUND):
|
||||
case (PlPcduParamId::HPA_I_UPPER_BOUND):
|
||||
case (PlPcduParamId::SSR_TO_DRO_WAIT_TIME):
|
||||
case (PlPcduParamId::DRO_TO_X8_WAIT_TIME):
|
||||
case (PlPcduParamId::X8_TO_TX_WAIT_TIME):
|
||||
case (PlPcduParamId::TX_TO_MPA_WAIT_TIME):
|
||||
case (PlPcduParamId::MPA_TO_HPA_WAIT_TIME): {
|
||||
handleDoubleParamUpdate(PARAM_KEY_MAP[static_cast<PlPcduParamId>(uniqueId)], parameterWrapper,
|
||||
newValues);
|
||||
break;
|
||||
}
|
||||
case (PlPcduParamIds::INJECT_SSR_TO_DRO_FAILURE): {
|
||||
case (PlPcduParamId::INJECT_SSR_TO_DRO_FAILURE): {
|
||||
ssrToDroInjectionRequested = true;
|
||||
break;
|
||||
}
|
||||
case (PlPcduParamIds::INJECT_DRO_TO_X8_FAILURE): {
|
||||
case (PlPcduParamId::INJECT_DRO_TO_X8_FAILURE): {
|
||||
droToX8InjectionRequested = true;
|
||||
break;
|
||||
}
|
||||
case (PlPcduParamIds::INJECT_X8_TO_TX_FAILURE): {
|
||||
case (PlPcduParamId::INJECT_X8_TO_TX_FAILURE): {
|
||||
x8ToTxInjectionRequested = true;
|
||||
break;
|
||||
}
|
||||
case (PlPcduParamIds::INJECT_TX_TO_MPA_FAILURE): {
|
||||
case (PlPcduParamId::INJECT_TX_TO_MPA_FAILURE): {
|
||||
txToMpaInjectionRequested = true;
|
||||
break;
|
||||
}
|
||||
case (PlPcduParamIds::INJECT_MPA_TO_HPA_FAILURE): {
|
||||
case (PlPcduParamId::INJECT_MPA_TO_HPA_FAILURE): {
|
||||
mpaToHpaInjectionRequested = true;
|
||||
break;
|
||||
}
|
||||
case (PlPcduParamIds::INJECT_ALL_ON_FAILURE): {
|
||||
case (PlPcduParamId::INJECT_ALL_ON_FAILURE): {
|
||||
allOnInjectRequested = true;
|
||||
break;
|
||||
}
|
||||
case (PlPcduParamId::DISABLE_ORDER_CHECK_CHANNELS): {
|
||||
uint8_t newValue = 0;
|
||||
ReturnValue_t result = newValues->getElement(&newValue);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
if(newValue > 1) {
|
||||
return HasParametersIF::INVALID_VALUE;
|
||||
}
|
||||
parameterWrapper->set(&disableChannelOrderCheck);
|
||||
break;
|
||||
}
|
||||
default: {
|
||||
return DeviceHandlerBase::getParameter(domainId, uniqueId, parameterWrapper, newValues,
|
||||
startAtIndex);
|
||||
|
@ -137,6 +137,8 @@ class PayloadPcduHandler : public DeviceHandlerBase {
|
||||
PoolEntry<float>({0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0});
|
||||
PoolEntry<float> tempC = PoolEntry<float>({0.0});
|
||||
|
||||
uint8_t disableChannelOrderCheck = false;
|
||||
|
||||
void updateSwitchGpio(gpioId_t id, gpio::Levels level);
|
||||
|
||||
void doTransition(Mode_t modeFrom, Submode_t subModeFrom) override;
|
||||
|
@ -35,7 +35,7 @@ enum PlPcduAdcChannels : uint8_t {
|
||||
NUM_CHANNELS = 12
|
||||
};
|
||||
|
||||
enum PlPcduParamIds : uint8_t {
|
||||
enum PlPcduParamId : uint8_t {
|
||||
NEG_V_LOWER_BOUND = 0,
|
||||
NEG_V_UPPER_BOUND = 1,
|
||||
DRO_U_LOWER_BOUND = 2,
|
||||
@ -65,10 +65,12 @@ enum PlPcduParamIds : uint8_t {
|
||||
INJECT_X8_TO_TX_FAILURE = 32,
|
||||
INJECT_TX_TO_MPA_FAILURE = 33,
|
||||
INJECT_MPA_TO_HPA_FAILURE = 34,
|
||||
INJECT_ALL_ON_FAILURE = 35
|
||||
INJECT_ALL_ON_FAILURE = 35,
|
||||
|
||||
DISABLE_ORDER_CHECK_CHANNELS = 40
|
||||
};
|
||||
|
||||
static std::map<PlPcduParamIds, std::string> PARAM_KEY_MAP = {
|
||||
static std::map<PlPcduParamId, std::string> PARAM_KEY_MAP = {
|
||||
{NEG_V_LOWER_BOUND, "negVoltLowerBound"}, {NEG_V_UPPER_BOUND, "negVoltUpperBound"},
|
||||
{DRO_U_LOWER_BOUND, "droVoltLowerBound"}, {DRO_U_UPPER_BOUND, "droVoltUpperBound"},
|
||||
{DRO_I_UPPER_BOUND, "droCurrUpperBound"}, {X8_U_LOWER_BOUND, "x8VoltLowerBound"},
|
||||
|
Loading…
Reference in New Issue
Block a user