Mercurial > public > ostc4
comparison Discovery/Src/tCCR.c @ 757:39ff186b6f98
Dev Bugfix: ignore analog out of bounds limits for DiveO2 sensor:
The DiveO2 sensor provides a status information which may be used to identify if the value is valid or not. The sensor does not provide a voltage => to have a value for the voltage the value of the ppo2 is taken (equals calibration coeff of 1). For the analog out of bounds detection this value is too high and the DiveO2 is marked as out of bounds. To avoid this problem DiveO2 sensors are now excluded from the analog out of bounds detection.
author | Ideenmodellierer |
---|---|
date | Tue, 07 Mar 2023 22:14:20 +0100 |
parents | dd5db6e2c9a4 |
children | b6d8a6fbf4fd |
comparison
equal
deleted
inserted
replaced
756:6de83d8205a0 | 757:39ff186b6f98 |
---|---|
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))->status & DVO2_FATAL_ERROR)) |
184 || ((stateUsed->lifeData.sensorVoltage_mV[index] < MIN_SENSOR_VOLTAGE_MV) || (stateUsed->lifeData.sensorVoltage_mV[index] > MAX_SENSOR_VOLTAGE_MV))) | 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 { | 186 { |
186 sensorActive[index] = 0; | 187 sensorActive[index] = 0; |
187 switch(index) | 188 switch(index) |
188 { | 189 { |
189 case 0: | 190 case 0: |