diff Small_CPU/Src/uartProtocol_O2.c @ 798:e9eba334b942

Migrated CO2 protocol implementation to new format: The previous implementation was a monolithic protocol implementation which was not usable together with the multiplexer. The new implementation moves the CO2 implementation into a separate C file and decoubles the upper layer external interface, which is not able to handle DiveO2 and CO2 sensors in parallel without restriction to port assignments.
author Ideenmodellierer
date Mon, 07 Aug 2023 20:29:44 +0200
parents d4083ac09b5d
children f8a112c5e71d
line wrap: on
line diff
--- a/Small_CPU/Src/uartProtocol_O2.c	Mon Jul 31 20:10:27 2023 +0200
+++ b/Small_CPU/Src/uartProtocol_O2.c	Mon Aug 07 20:29:44 2023 +0200
@@ -49,9 +49,9 @@
 					break;
 		case UART_O2_REQ_ID: 	*cmdLength = snprintf((char*)cmdString, 10, "#IDNR");
 			break;
-		case UART_O2_REQ_O2: 	*cmdLength = snprintf((char*)cmdString, 10, "#DOXY");
+		case UART_O2_REQ_O2: 	*cmdLength = snprintf((char*)cmdString, 10, "#MOXY");
 			break;
-		case UART_O2_REQ_RAW:	*cmdLength = snprintf((char*)cmdString, 10, "#DRAW");
+		case UART_O2_REQ_RAW:	*cmdLength = snprintf((char*)cmdString, 10, "#MRAW");
 			break;
 		default: *cmdLength = 0;
 			break;
@@ -99,7 +99,7 @@
 		UART_FlushRxBuffer();
 	}
 
-	if(localComState == UART_O2_INIT)
+	if(localComState == UART_COMMON_INIT)
 	{
 		memset((char*) &tmpSensorDataDiveO2, 0, sizeof(tmpSensorDataDiveO2));
 		externalInterface_SetSensorData(0xFF,(uint8_t*)&tmpSensorDataDiveO2);