Mercurial > public > ostc4
comparison Discovery/Src/tInfoSensor.c @ 957:3420e3ba698d Evo_2_23
External sensor commands: Add sensor ID to command:
In the previous version a command was send without information regarding the target sensor. To have the possibility in future to e.g. calibrate a specific sensor, the sensor ID is now transmitted together with the command. As example in the new implementation the O2 Sensor selected in the sensor menu will blink to enable sensor identification.
author | Ideenmodellierer |
---|---|
date | Mon, 06 Jan 2025 20:06:35 +0100 |
parents | 17d9d6eddd8d |
children |
comparison
equal
deleted
inserted
replaced
956:083afabc6578 | 957:3420e3ba698d |
---|---|
59 break; | 59 break; |
60 default: | 60 default: |
61 case 0: setBackMenu((uint32_t)openEdit_O2Sensors,0,1); | 61 case 0: setBackMenu((uint32_t)openEdit_O2Sensors,0,1); |
62 break; | 62 break; |
63 } | 63 } |
64 | |
65 sensorActive = 1; | 64 sensorActive = 1; |
66 if(pSettings->ppo2sensors_deactivated & (1 << (activeSensorId))) | 65 if(pSettings->ppo2sensors_deactivated & (1 << (activeSensorId))) |
67 { | 66 { |
68 sensorActive = 0; | 67 sensorActive = 0; |
69 } | 68 } |
69 DataEX_setExtInterface_Cmd(EXT_INTERFACE_O2_INDICATE, activeSensorId); | |
70 } | 70 } |
71 | 71 |
72 | 72 |
73 uint8_t OnAction_Sensor(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) | 73 uint8_t OnAction_Sensor(uint32_t editId, uint8_t blockNumber, uint8_t digitNumber, uint8_t digitContent, uint8_t action) |
74 { | 74 { |
258 sensorActive = 0; | 258 sensorActive = 0; |
259 } | 259 } |
260 break; | 260 break; |
261 case ACTION_BUTTON_NEXT: if(stateRealGetPointer()->lifeData.extIf_sensor_map[activeSensorId] == SENSOR_CO2M) | 261 case ACTION_BUTTON_NEXT: if(stateRealGetPointer()->lifeData.extIf_sensor_map[activeSensorId] == SENSOR_CO2M) |
262 { | 262 { |
263 DataEX_setExtInterface_Cmd(EXT_INTERFACE_CO2_CALIB); | 263 DataEX_setExtInterface_Cmd(EXT_INTERFACE_CO2_CALIB, activeSensorId); |
264 } | 264 } |
265 break; | 265 break; |
266 case ACTION_TIMEOUT: | 266 case ACTION_TIMEOUT: |
267 case ACTION_MODE_CHANGE: | 267 case ACTION_MODE_CHANGE: |
268 case ACTION_IDLE_TICK: | 268 case ACTION_IDLE_TICK: |