Mercurial > public > ostc4
comparison Discovery/Src/tCCR.c @ 782:9a1bb9e7cb61
Sensor status support for multiplexed DiveO2 sensors:
The sensor status is now provided for every DiveO2 sensor connected to the OSTC => The sensor error detection had to be extended to support the bigger data structure.
author | Ideenmodellierer |
---|---|
date | Mon, 29 May 2023 20:22:15 +0200 |
parents | b6d8a6fbf4fd |
children | acf6614dc396 |
comparison
equal
deleted
inserted
replaced
781:01b3eb9d55c3 | 782:9a1bb9e7cb61 |
---|---|
178 { | 178 { |
179 sensorState[index] = sensorOK; | 179 sensorState[index] = sensorOK; |
180 | 180 |
181 if(sensorActive[index]) | 181 if(sensorActive[index]) |
182 { | 182 { |
183 if(((stateUsed->lifeData.extIf_sensor_map[index] == SENSOR_DIGO2) && (((SSensorDataDiveO2*)(stateUsed->lifeData.extIf_sensor_data))->status & DVO2_FATAL_ERROR)) | 183 if(((stateUsed->lifeData.extIf_sensor_map[index] == SENSOR_DIGO2) && (((SSensorDataDiveO2*)(stateUsed->lifeData.extIf_sensor_data[index]))->status & DVO2_FATAL_ERROR)) |
184 || ((stateUsed->lifeData.extIf_sensor_map[index] != SENSOR_DIGO2) | 184 || ((stateUsed->lifeData.extIf_sensor_map[index] != SENSOR_DIGO2) |
185 && (((stateUsed->lifeData.sensorVoltage_mV[index] < MIN_SENSOR_VOLTAGE_MV) || (stateUsed->lifeData.sensorVoltage_mV[index] > MAX_SENSOR_VOLTAGE_MV))))) | 185 && (((stateUsed->lifeData.sensorVoltage_mV[index] < MIN_SENSOR_VOLTAGE_MV) || (stateUsed->lifeData.sensorVoltage_mV[index] > MAX_SENSOR_VOLTAGE_MV))))) |
186 { | 186 { |
187 sensorActive[index] = 0; | 187 sensorActive[index] = 0; |
188 switch(index) | 188 switch(index) |