comparison Discovery/Src/data_exchange_main.c @ 988:d9290c76b840 GasConsumption

OSTC4/5 joined code: In the previous version code differences between OSTC4/5 were identified using the ENABLE_GPIO_V2 compiler switch. In the new version this is done using the display version as indicator which OSTC model is in used. Since this is detected by Firmware the information is forwarded from there to the RTE. This causes a little delay in the GPIO initialization but this applies only to the cold start of the RTE which should not happen very often.
author ideenmodellierer
date Sun, 06 Apr 2025 21:02:17 +0200 (4 weeks ago)
parents 3420e3ba698d
children
comparison
equal deleted inserted replaced
984:41136649b90d 988:d9290c76b840
410 break; 410 break;
411 case SENSOR_DIGO2M: SensorActive[SENSOR_DIGO2] = 1; 411 case SENSOR_DIGO2M: SensorActive[SENSOR_DIGO2] = 1;
412 break; 412 break;
413 case SENSOR_CO2: SensorActive[SENSOR_CO2] = 1; 413 case SENSOR_CO2: SensorActive[SENSOR_CO2] = 1;
414 break; 414 break;
415 #if defined ENABLE_GPIO_V2 || defined ENABLE_GNSS_SUPPORT 415 #if defined ENABLE_GNSS_INTERNAL || defined ENABLE_GNSS_EXTERN
416 case SENSOR_GNSS: SensorActive[SENSOR_GNSS] = 1; 416 case SENSOR_GNSS: SensorActive[SENSOR_GNSS] = 1;
417 break; 417 break;
418 #endif 418 #endif
419 #ifdef ENABLE_SENTINEL_MODE 419 #ifdef ENABLE_SENTINEL_MODE
420 case SENSOR_SENTINEL: SensorActive[SENSOR_SENTINEL] = 1; 420 case SENSOR_SENTINEL: SensorActive[SENSOR_SENTINEL] = 1;
440 externalInterface_Cmd |= EXT_INTERFACE_33V_ON; 440 externalInterface_Cmd |= EXT_INTERFACE_33V_ON;
441 externalInterface_Cmd &= (~EXT_INTERFACE_ADC_ON); 441 externalInterface_Cmd &= (~EXT_INTERFACE_ADC_ON);
442 } 442 }
443 #endif 443 #endif
444 444
445 #ifdef ENABLE_GPIO_V2 445 if((isNewDisplay()) && getBuzzerActivationState())
446 if(getBuzzerActivationState())
447 { 446 {
448 externalInterface_Cmd |= EXT_INTERFACE_BUZZER_ON; 447 externalInterface_Cmd |= EXT_INTERFACE_BUZZER_ON;
449 } 448 }
450 #endif
451 449
452 dataOut.data.externalInterface_Cmd = externalInterface_Cmd; 450 dataOut.data.externalInterface_Cmd = externalInterface_Cmd;
453 externalInterface_Cmd = 0; 451 externalInterface_Cmd = 0;
454 452
455 if((hardwareDataGetPointer()->primarySerial <= 32) || (((hardwareDataGetPointer()->primarySerial == 72) && (hardwareDataGetPointer()->secondarySerial == 15)))) 453 if((hardwareDataGetPointer()->primarySerial <= 32) || (((hardwareDataGetPointer()->primarySerial == 72) && (hardwareDataGetPointer()->secondarySerial == 15))))
466 else 464 else
467 { 465 {
468 dataOut.revisionHardware = 0xFF; 466 dataOut.revisionHardware = 0xFF;
469 dataOut.revisionCRCx0x7A = 0xFF; 467 dataOut.revisionCRCx0x7A = 0xFF;
470 } 468 }
471 469 if(isNewDisplay())
470 {
471 dataOut.displayVersion = 1;
472 }
473
472 if(DataEX_check_header_and_footer_ok() && !told_reset_logik_alles_ok) 474 if(DataEX_check_header_and_footer_ok() && !told_reset_logik_alles_ok)
473 { 475 {
474 MX_tell_reset_logik_alles_ok(); 476 MX_tell_reset_logik_alles_ok();
475 told_reset_logik_alles_ok = 1; 477 told_reset_logik_alles_ok = 1;
476 } 478 }