# HG changeset patch # User Ideenmodellierer # Date 1677010771 -3600 # Node ID 7e84ae1513b6fc552478892ec84c927e623abce9 # Parent b392524753fba2cbcbb5b74cd16bc4655e5e4783 Code cleanup sensors under development: Deactivated compile option for Sentinel and CO2 sensor. Added missing compile switches. diff -r b392524753fb -r 7e84ae1513b6 Common/Inc/configuration.h --- a/Common/Inc/configuration.h Sun Feb 19 21:52:02 2023 +0100 +++ b/Common/Inc/configuration.h Tue Feb 21 21:19:31 2023 +0100 @@ -64,7 +64,7 @@ #define ENABLE_PSCR_MODE /* Enable to have CO2 sensor functionality available */ -#define ENABLE_CO2_SUPPORT +/* #define ENABLE_CO2_SUPPORT */ /* Enable to have Sentinel rebreather interface available */ /* #define ENABLE_SENTINEL_MODE */ diff -r b392524753fb -r 7e84ae1513b6 Discovery/Src/tMenuEditHardware.c --- a/Discovery/Src/tMenuEditHardware.c Sun Feb 19 21:52:02 2023 +0100 +++ b/Discovery/Src/tMenuEditHardware.c Tue Feb 21 21:19:31 2023 +0100 @@ -327,8 +327,10 @@ pSettings->ppo2sensors_source = O2_SENSOR_SOURCE_DIGITAL; } break; +#ifdef ENABLE_SENTINEL_MODE case SENSOR_SENTINEL: pSettings->ppo2sensors_source = O2_SENSOR_SOURCE_SENTINEL; break; +#endif default: break; } @@ -418,7 +420,11 @@ } else { - if((pSettings->ppo2sensors_source == O2_SENSOR_SOURCE_ANALOG) || (pSettings->ppo2sensors_source == O2_SENSOR_SOURCE_ANADIG)|| (pSettings->ppo2sensors_source == O2_SENSOR_SOURCE_SENTINEL)) + if((pSettings->ppo2sensors_source == O2_SENSOR_SOURCE_ANALOG) || (pSettings->ppo2sensors_source == O2_SENSOR_SOURCE_ANADIG) +#ifdef ENABLE_CO2_SUPPORT + || (pSettings->ppo2sensors_source == O2_SENSOR_SOURCE_SENTINEL) +#endif + ) { strSensorId[0] = TXT_2BYTE; strSensorId[1] = TXT2BYTE_O2Calib; @@ -473,7 +479,7 @@ { SSettings *pSettings = settingsGetPointer(); uint8_t sensorActive[3]; - uint8_t text[3]; + char text[3]; set_globalState(StMHARD3_Sensors); resetMenuEdit(CLUT_MenuPageHardware); diff -r b392524753fb -r 7e84ae1513b6 Small_CPU/Src/externalInterface.c --- a/Small_CPU/Src/externalInterface.c Sun Feb 19 21:52:02 2023 +0100 +++ b/Small_CPU/Src/externalInterface.c Tue Feb 21 21:19:31 2023 +0100 @@ -314,9 +314,14 @@ case (EXT_INTERFACE_UART_CO2 >> 8): case (EXT_INTERFACE_UART_O2 >> 8): case (EXT_INTERFACE_UART_SENTINEL >> 8): - if((externalAutoDetect <= DETECTION_START) || ((protocol == EXT_INTERFACE_UART_CO2 >> 8) && (externalAutoDetect == DETECTION_CO2)) - || ((protocol == EXT_INTERFACE_UART_O2 >> 8) && (externalAutoDetect == DETECTION_DIGO2)) - || ((protocol == EXT_INTERFACE_UART_SENTINEL >> 8) && (externalAutoDetect == DETECTION_SENTINEL))) + if((externalAutoDetect <= DETECTION_START) || ((protocol == EXT_INTERFACE_UART_O2 >> 8) && (externalAutoDetect == DETECTION_DIGO2)) +#ifdef ENABLE_CO2_SUPPORT + || ((protocol == EXT_INTERFACE_UART_CO2 >> 8) && (externalAutoDetect == DETECTION_CO2)) +#endif +#ifdef ENABLE_SENTINEL_MODE + || ((protocol == EXT_INTERFACE_UART_SENTINEL >> 8) && (externalAutoDetect == DETECTION_SENTINEL)) +#endif + ) { sensorDataId = 0; externalUART_Protocol = protocol;