Mercurial > public > ostc4
diff Small_CPU/Inc/uartProtocol_Co2.h @ 1072:8b97003dbb60 Icon_Integration
Improve CO2 calibration:
The most common calibration environment for diving is fresh air => ~400ppm co2. Some sensors do not have this setting as default => Calibration to 0ppm. To make sure that a proper calibration reference is set the common used value of 400ppm is not set before starting the calibration. For implementation new states were added to the co2 protocol state maschine. In addition the rx processor is now able to handle two responds parameters.
| author | Ideenmodellierer |
|---|---|
| date | Thu, 19 Feb 2026 21:37:34 +0100 |
| parents | a3f42192da0f |
| children |
line wrap: on
line diff
--- a/Small_CPU/Inc/uartProtocol_Co2.h Thu Feb 19 13:28:37 2026 +0100 +++ b/Small_CPU/Inc/uartProtocol_Co2.h Thu Feb 19 21:37:34 2026 +0100 @@ -39,7 +39,9 @@ UART_CO2_SETUP = 10, /* collecting data needed to be read out of the sensor once at startup */ UART_CO2_MODE, /* set operation mode for sensor */ UART_CO2_OPERATING, /* normal operation */ - UART_CO2_CALIBRATE /* request calibration */ + UART_CO2_CALIBRATE_H, /* request calibration */ + UART_CO2_CALIBRATE_L, + UART_CO2_CALIBRATE } uartCO2Status_t; typedef enum @@ -68,7 +70,9 @@ { CO2CMD_MODE_POLL, /* Set operation mode of sensor to polling => only send data if requested */ CO2CMD_MODE_STREAM, /* Set operation mode of sensor to streaming => send data every two seconds */ - CO2CMD_CALIBRATE, /* Calibrate sensor */ + CO2CMD_CALIBRATE_H, /* Calibrate sensor, send HIGH reference */ + CO2CMD_CALIBRATE_L, /* Send low reference */ + CO2CMD_CALIBRATE, /* Execute calibration */ CO2CMD_GETSCALE, /* Get scaling factor */ CO2CMD_GETDATA /* Read sensor data */ } co2SensorCmd_t;
