comparison Discovery/Src/data_exchange_main.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 e9c37071933b
children
comparison
equal deleted inserted replaced
956:083afabc6578 957:3420e3ba698d
480 if(!wasUpdateNotPowerOn) 480 if(!wasUpdateNotPowerOn)
481 wasPowerOn = 1; 481 wasPowerOn = 1;
482 482
483 settingsHelperButtonSens_keepPercentageValues(settingsGetPointerStandard()->ButtonResponsiveness[3], settings->ButtonResponsiveness); 483 settingsHelperButtonSens_keepPercentageValues(settingsGetPointerStandard()->ButtonResponsiveness[3], settings->ButtonResponsiveness);
484 setButtonResponsiveness(settings->ButtonResponsiveness); 484 setButtonResponsiveness(settings->ButtonResponsiveness);
485 DataEX_setExtInterface_Cmd(EXT_INTERFACE_COPY_SENSORMAP); 485 DataEX_setExtInterface_Cmd(EXT_INTERFACE_COPY_SENSORMAP, 0);
486 } 486 }
487 } 487 }
488 488
489 489
490 void DataEX_copy_to_deco(void) 490 void DataEX_copy_to_deco(void)
1361 retval = hw_Info.extADC; 1361 retval = hw_Info.extADC;
1362 1362
1363 return retval; 1363 return retval;
1364 } 1364 }
1365 1365
1366 void DataEX_setExtInterface_Cmd(uint16_t Cmd) 1366 void DataEX_setExtInterface_Cmd(uint16_t Cmd, uint8_t sensorId)
1367 { 1367 {
1368 externalInterface_Cmd = Cmd; 1368 if(sensorId < EXT_INTERFACE_SENSOR_CNT - 1)
1369 {
1370 externalInterface_Cmd |= Cmd;
1371 externalInterface_Cmd |= sensorId << 8;
1372 }
1373
1369 return; 1374 return;
1370 } 1375 }
1371 1376