File tree 3 files changed +10
-2
lines changed
3 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -223,6 +223,10 @@ bool IOExpander::test() {
223
223
DebugTrace (" Ch%d power fault\n " , channel.channelIndex + 1 );
224
224
generateChannelError (SCPI_ERROR_CH1_FAULT_DETECTED, channel.channelIndex );
225
225
}
226
+ #else
227
+ testBit (IO_BIT_IN_PWRGOOD);
228
+ channel.flags .powerOk = 1 ;
229
+ testResult = TEST_OK;
226
230
#endif
227
231
}
228
232
#endif
Original file line number Diff line number Diff line change @@ -95,12 +95,13 @@ float TempSensor::doRead() {
95
95
return NAN;
96
96
}
97
97
98
- void TempSensor::testTemperatureValidity (float value) {
98
+ void TempSensor::testTemperatureValidity (float & value) {
99
99
Channel *channel = getChannel ();
100
100
if (!channel || channel->isOk ()) {
101
101
bool isTemperatureValueInvalid = isNaN (value) || value < TEMP_SENSOR_MIN_VALID_TEMPERATURE || value > TEMP_SENSOR_MAX_VALID_TEMPERATURE;
102
102
if (isTemperatureValueInvalid) {
103
103
if (g_testResult == TEST_OK) {
104
+ #if !CONF_SURVIVE_MODE
104
105
g_testResult = TEST_FAILED;
105
106
106
107
if (channel) {
@@ -109,6 +110,9 @@ void TempSensor::testTemperatureValidity(float value) {
109
110
}
110
111
111
112
generateError (scpi_error);
113
+ #else
114
+ value = 60 .0f ;
115
+ #endif
112
116
}
113
117
} else {
114
118
g_testResult = TEST_OK;
Original file line number Diff line number Diff line change @@ -69,7 +69,7 @@ class TempSensor {
69
69
private:
70
70
float doRead ();
71
71
72
- void testTemperatureValidity (float value);
72
+ void testTemperatureValidity (float & value);
73
73
};
74
74
75
75
// //////////////////////////////////////////////////////////////////////////////
You can’t perform that action at this time.
0 commit comments