Mercurial > public > ostc4
comparison Small_CPU/Src/uartProtocol_O2.c @ 1081:1b38d7b8da35 Icon_Integration
Send sensor data cyclic:
In the previous version the sensor data which had been updated at last was send to the main CPU. With the introduction of the hud a second device is sending sensor data information => in case of fast sensor data updated it could happen that a sensor data record was never transmitted. To avoid this the sensor data of all sensor slots is now transmitted on a cyclic basis.
| author | Ideenmodellierer |
|---|---|
| date | Sun, 15 Mar 2026 21:28:53 +0100 |
| parents | 0b81ac558e89 |
| children |
comparison
equal
deleted
inserted
replaced
| 1080:b02311fbb1e1 | 1081:1b38d7b8da35 |
|---|---|
| 101 } | 101 } |
| 102 | 102 |
| 103 if(localComState == UART_O2_INIT) | 103 if(localComState == UART_O2_INIT) |
| 104 { | 104 { |
| 105 memset((char*) &tmpSensorDataDiveO2, 0, sizeof(tmpSensorDataDiveO2)); | 105 memset((char*) &tmpSensorDataDiveO2, 0, sizeof(tmpSensorDataDiveO2)); |
| 106 externalInterface_SetSensorData(0xFF,(uint8_t*)&tmpSensorDataDiveO2); | 106 externalInterface_ResetSensorData(activeSensor + EXT_INTERFACE_MUX_OFFSET); |
| 107 | 107 |
| 108 localComState = UART_O2_CHECK; | 108 localComState = UART_O2_CHECK; |
| 109 lastComState = UART_O2_CHECK; | 109 lastComState = UART_O2_CHECK; |
| 110 UART_ReadData(SENSOR_DIGO2, 1); /* flush buffer */ | 110 UART_ReadData(SENSOR_DIGO2, 1); /* flush buffer */ |
| 111 uartO2_SetupCmd(localComState,cmdString,&cmdLength); | 111 uartO2_SetupCmd(localComState,cmdString,&cmdLength); |
