a lot of fixes, but some stuff doesnt work..
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good
This commit is contained in:
@ -20,7 +20,7 @@ void Max31865EiveHandler::doStartUp() {
|
||||
}
|
||||
if ((state == InternalState::ON or state == InternalState::ACTIVE) and transitionOk) {
|
||||
if (instantNormal) {
|
||||
setMode(_MODE_TO_NORMAL);
|
||||
setMode(MODE_NORMAL);
|
||||
} else {
|
||||
setMode(MODE_ON);
|
||||
}
|
||||
@ -102,7 +102,16 @@ void Max31865EiveHandler::simpleCommand(EiveMax31855::RtdCommands cmd) {
|
||||
rawPacketLen = 1;
|
||||
}
|
||||
void Max31865EiveHandler::doTransition(Mode_t modeFrom, Submode_t subModeFrom) {
|
||||
DeviceHandlerBase::doTransition(modeFrom, subModeFrom);
|
||||
if (mode == _MODE_TO_NORMAL) {
|
||||
if (state != InternalState::ACTIVE) {
|
||||
state = InternalState::ACTIVE;
|
||||
transitionOk = false;
|
||||
} else if (transitionOk) {
|
||||
setMode(MODE_NORMAL);
|
||||
}
|
||||
} else {
|
||||
DeviceHandlerBase::doTransition(modeFrom, subModeFrom);
|
||||
}
|
||||
}
|
||||
|
||||
void Max31865EiveHandler::fillCommandAndReplyMap() {
|
||||
@ -131,13 +140,11 @@ ReturnValue_t Max31865EiveHandler::interpretDeviceReply(DeviceCommandId_t id,
|
||||
if (result != RETURN_OK) {
|
||||
return result;
|
||||
}
|
||||
if (mode == _MODE_START_UP) {
|
||||
if (exchangeStruct.active and state == InternalState::ACTIVE) {
|
||||
transitionOk = true;
|
||||
}
|
||||
if (exchangeStruct.configured and state == InternalState::ON) {
|
||||
transitionOk = true;
|
||||
}
|
||||
if (mode == _MODE_TO_NORMAL and exchangeStruct.active and state == InternalState::ACTIVE) {
|
||||
transitionOk = true;
|
||||
}
|
||||
if (mode == _MODE_START_UP and exchangeStruct.configured and state == InternalState::ON) {
|
||||
transitionOk = true;
|
||||
}
|
||||
// Calculate resistance
|
||||
float rtdValue = exchangeStruct.adcCode * EiveMax31855::RTD_RREF_PT1000 / INT16_MAX;
|
||||
|
Reference in New Issue
Block a user