Disable Order Check PL PCDU #825
@ -429,20 +429,20 @@ void PayloadPcduHandler::checkAdcValues() {
|
|||||||
params.getValue(PARAM_KEY_MAP[NEG_V_UPPER_BOUND], upperBound);
|
params.getValue(PARAM_KEY_MAP[NEG_V_UPPER_BOUND], upperBound);
|
||||||
if (not checkVoltage(adcSet.processed[U_NEG_V_FB], lowerBound, upperBound,
|
if (not checkVoltage(adcSet.processed[U_NEG_V_FB], lowerBound, upperBound,
|
||||||
NEG_V_OUT_OF_BOUNDS)) {
|
NEG_V_OUT_OF_BOUNDS)) {
|
||||||
|
sif::warning << "Negative voltage was out of bounds, went back to OFF" << std::endl;
|
||||||
meggert marked this conversation as resolved
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.getValue(PARAM_KEY_MAP[DRO_U_LOWER_BOUND], lowerBound);
|
params.getValue(PARAM_KEY_MAP[DRO_U_LOWER_BOUND], lowerBound);
|
||||||
params.getValue(PARAM_KEY_MAP[DRO_U_UPPER_BOUND], upperBound);
|
params.getValue(PARAM_KEY_MAP[DRO_U_UPPER_BOUND], upperBound);
|
||||||
if (not checkVoltage(adcSet.processed[U_DRO_DIV_6], lowerBound, upperBound,
|
if (not checkVoltage(adcSet.processed[U_DRO_DIV_6], lowerBound, upperBound,
|
||||||
U_DRO_OUT_OF_BOUNDS)) {
|
U_DRO_OUT_OF_BOUNDS)) {
|
||||||
|
sif::warning << "DRO voltage was out of bounds, went back to OFF" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.getValue(PARAM_KEY_MAP[DRO_I_UPPER_BOUND], upperBound);
|
params.getValue(PARAM_KEY_MAP[DRO_I_UPPER_BOUND], upperBound);
|
||||||
if (not checkCurrent(adcSet.processed[I_DRO], upperBound, I_DRO_OUT_OF_BOUNDS)) {
|
if (not checkCurrent(adcSet.processed[I_DRO], upperBound, I_DRO_OUT_OF_BOUNDS)) {
|
||||||
#if OBSW_VERBOSE_LEVEL >= 1
|
|
||||||
sif::warning << "Detected out of bounds current for DRO: " << adcSet.processed[I_DRO]
|
sif::warning << "Detected out of bounds current for DRO: " << adcSet.processed[I_DRO]
|
||||||
<< ", Raw: " << adcSet.channels[I_DRO] << std::endl;
|
<< ", Raw: " << adcSet.channels[I_DRO] << std::endl;
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -456,10 +456,12 @@ void PayloadPcduHandler::checkAdcValues() {
|
|||||||
params.getValue(PARAM_KEY_MAP[X8_U_UPPER_BOUND], upperBound);
|
params.getValue(PARAM_KEY_MAP[X8_U_UPPER_BOUND], upperBound);
|
||||||
if (not checkVoltage(adcSet.processed[U_X8_DIV_6], lowerBound, upperBound,
|
if (not checkVoltage(adcSet.processed[U_X8_DIV_6], lowerBound, upperBound,
|
||||||
U_X8_OUT_OF_BOUNDS)) {
|
U_X8_OUT_OF_BOUNDS)) {
|
||||||
|
sif::warning << "X8 voltage was out of bounds, went back to OFF" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.getValue(PARAM_KEY_MAP[X8_I_UPPER_BOUND], upperBound);
|
params.getValue(PARAM_KEY_MAP[X8_I_UPPER_BOUND], upperBound);
|
||||||
if (not checkCurrent(adcSet.processed[I_X8], upperBound, I_X8_OUT_OF_BOUNDS)) {
|
if (not checkCurrent(adcSet.processed[I_X8], upperBound, I_X8_OUT_OF_BOUNDS)) {
|
||||||
|
sif::warning << "X8 current was out of bounds, went back to OFF" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -473,10 +475,12 @@ void PayloadPcduHandler::checkAdcValues() {
|
|||||||
params.getValue(PARAM_KEY_MAP[TX_U_UPPER_BOUND], upperBound);
|
params.getValue(PARAM_KEY_MAP[TX_U_UPPER_BOUND], upperBound);
|
||||||
if (not checkVoltage(adcSet.processed[U_TX_DIV_6], lowerBound, upperBound,
|
if (not checkVoltage(adcSet.processed[U_TX_DIV_6], lowerBound, upperBound,
|
||||||
U_TX_OUT_OF_BOUNDS)) {
|
U_TX_OUT_OF_BOUNDS)) {
|
||||||
|
sif::warning << "TX voltage was out of bounds, went back to OFF" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.getValue(PARAM_KEY_MAP[TX_I_UPPER_BOUND], upperBound);
|
params.getValue(PARAM_KEY_MAP[TX_I_UPPER_BOUND], upperBound);
|
||||||
if (not checkCurrent(adcSet.processed[I_TX], upperBound, I_TX_OUT_OF_BOUNDS)) {
|
if (not checkCurrent(adcSet.processed[I_TX], upperBound, I_TX_OUT_OF_BOUNDS)) {
|
||||||
|
sif::warning << "TX current was out of bounds, went back to OFF" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -490,10 +494,12 @@ void PayloadPcduHandler::checkAdcValues() {
|
|||||||
params.getValue(PARAM_KEY_MAP[MPA_U_UPPER_BOUND], upperBound);
|
params.getValue(PARAM_KEY_MAP[MPA_U_UPPER_BOUND], upperBound);
|
||||||
if (not checkVoltage(adcSet.processed[U_MPA_DIV_6], lowerBound, upperBound,
|
if (not checkVoltage(adcSet.processed[U_MPA_DIV_6], lowerBound, upperBound,
|
||||||
U_MPA_OUT_OF_BOUNDS)) {
|
U_MPA_OUT_OF_BOUNDS)) {
|
||||||
|
sif::warning << "MPA voltage was out of bounds, went back to OFF" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.getValue(PARAM_KEY_MAP[MPA_I_UPPER_BOUND], upperBound);
|
params.getValue(PARAM_KEY_MAP[MPA_I_UPPER_BOUND], upperBound);
|
||||||
if (not checkCurrent(adcSet.processed[I_MPA], upperBound, I_MPA_OUT_OF_BOUNDS)) {
|
if (not checkCurrent(adcSet.processed[I_MPA], upperBound, I_MPA_OUT_OF_BOUNDS)) {
|
||||||
|
sif::warning << "MPA current was out of bounds, went back to OFF" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -507,6 +513,7 @@ void PayloadPcduHandler::checkAdcValues() {
|
|||||||
params.getValue(PARAM_KEY_MAP[HPA_U_UPPER_BOUND], upperBound);
|
params.getValue(PARAM_KEY_MAP[HPA_U_UPPER_BOUND], upperBound);
|
||||||
if (not checkVoltage(adcSet.processed[U_HPA_DIV_6], lowerBound, upperBound,
|
if (not checkVoltage(adcSet.processed[U_HPA_DIV_6], lowerBound, upperBound,
|
||||||
U_HPA_OUT_OF_BOUNDS)) {
|
U_HPA_OUT_OF_BOUNDS)) {
|
||||||
|
sif::warning << "HPA voltage was out of bounds, went back to OFF" << std::endl;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
params.getValue(PARAM_KEY_MAP[HPA_I_UPPER_BOUND], upperBound);
|
params.getValue(PARAM_KEY_MAP[HPA_I_UPPER_BOUND], upperBound);
|
||||||
@ -595,6 +602,7 @@ ReturnValue_t PayloadPcduHandler::checkModeCommand(Mode_t commandedMode, Submode
|
|||||||
txOnForSubmode(commandedSubmode) or mpaOnForSubmode(commandedSubmode) or
|
txOnForSubmode(commandedSubmode) or mpaOnForSubmode(commandedSubmode) or
|
||||||
hpaOnForSubmode(commandedSubmode)) and
|
hpaOnForSubmode(commandedSubmode)) and
|
||||||
not ssrOnForSubmode(dhbSubmode)) {
|
not ssrOnForSubmode(dhbSubmode)) {
|
||||||
|
return TRANS_NOT_ALLOWED;
|
||||||
}
|
}
|
||||||
if (disableChannelOrderCheck) {
|
if (disableChannelOrderCheck) {
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
@ -606,7 +614,7 @@ ReturnValue_t PayloadPcduHandler::checkModeCommand(Mode_t commandedMode, Submode
|
|||||||
(not droOnForSubmode(dhbSubmode) or not x8OnForSubmode(dhbSubmode))) {
|
(not droOnForSubmode(dhbSubmode) or not x8OnForSubmode(dhbSubmode))) {
|
||||||
return TRANS_NOT_ALLOWED;
|
return TRANS_NOT_ALLOWED;
|
||||||
}
|
}
|
||||||
if (txOnForSubmode(commandedSubmode) and
|
if (mpaOnForSubmode(commandedSubmode) and
|
||||||
(not droOnForSubmode(dhbSubmode) or not x8OnForSubmode(dhbSubmode) or
|
(not droOnForSubmode(dhbSubmode) or not x8OnForSubmode(dhbSubmode) or
|
||||||
not txOnForSubmode(dhbSubmode))) {
|
not txOnForSubmode(dhbSubmode))) {
|
||||||
return TRANS_NOT_ALLOWED;
|
return TRANS_NOT_ALLOWED;
|
||||||
@ -628,13 +636,9 @@ bool PayloadPcduHandler::droOnForSubmode(uint8_t submode) {
|
|||||||
return submode & (1 << plpcdu::DRO_ON);
|
return submode & (1 << plpcdu::DRO_ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PayloadPcduHandler::x8OnForSubmode(uint8_t submode) {
|
bool PayloadPcduHandler::x8OnForSubmode(uint8_t submode) { return submode & (1 << plpcdu::X8_ON); }
|
||||||
return submode & (1 << plpcdu::X8_ON);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PayloadPcduHandler::txOnForSubmode(uint8_t submode) {
|
bool PayloadPcduHandler::txOnForSubmode(uint8_t submode) { return submode & (1 << plpcdu::TX_ON); }
|
||||||
return submode & (1 << plpcdu::TX_ON);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool PayloadPcduHandler::mpaOnForSubmode(uint8_t submode) {
|
bool PayloadPcduHandler::mpaOnForSubmode(uint8_t submode) {
|
||||||
return submode & (1 << plpcdu::MPA_ON);
|
return submode & (1 << plpcdu::MPA_ON);
|
||||||
|
Loading…
Reference in New Issue
Block a user
shouldn't these also be events?
I think an event gets triggered in the checker function, checking again..
can confirm the events already get triggered in
checkVoltage
andcheckCurrent