comparison Discovery/Src/data_exchange_main.c @ 951:e9c37071933b Evo_2_23

Added vibration warning: The internal buzzer of the GPIO_V2 may now be used as additional warning notificator. It can be activated using the check button in the customer view menu. The vibration will be active while the warning message is displayed in the dive window. In case the diver is in the menu then the warning will be active for a shorter duration.
author Ideenmodellierer
date Sun, 29 Dec 2024 18:29:56 +0100
parents 5a9bc2e6112d
children
comparison
equal deleted inserted replaced
950:922ee3d7d2f3 951:e9c37071933b
71 #include "tCCR.h" 71 #include "tCCR.h"
72 #include "timer.h" 72 #include "timer.h"
73 #include "buehlmann.h" 73 #include "buehlmann.h"
74 #include "externLogbookFlash.h" 74 #include "externLogbookFlash.h"
75 #include "vpm.h" 75 #include "vpm.h"
76 #include "check_warning.h"
76 77
77 /* #define TESTBENCH */ 78 /* #define TESTBENCH */
78 79
79 /* Exported variables --------------------------------------------------------*/ 80 /* Exported variables --------------------------------------------------------*/
80 static uint8_t wasPowerOn = 0; 81 static uint8_t wasPowerOn = 0;
436 #ifdef ENABLE_SENTINEL_MODE 437 #ifdef ENABLE_SENTINEL_MODE
437 if(SensorActive[SENSOR_SENTINEL]) 438 if(SensorActive[SENSOR_SENTINEL])
438 { 439 {
439 externalInterface_Cmd |= EXT_INTERFACE_33V_ON; 440 externalInterface_Cmd |= EXT_INTERFACE_33V_ON;
440 externalInterface_Cmd &= (~EXT_INTERFACE_ADC_ON); 441 externalInterface_Cmd &= (~EXT_INTERFACE_ADC_ON);
442 }
443 #endif
444
445 #ifdef ENABLE_GPIO_V2
446 if(getBuzzerActivationState())
447 {
448 externalInterface_Cmd |= EXT_INTERFACE_BUZZER_ON;
441 } 449 }
442 #endif 450 #endif
443 451
444 dataOut.data.externalInterface_Cmd = externalInterface_Cmd; 452 dataOut.data.externalInterface_Cmd = externalInterface_Cmd;
445 externalInterface_Cmd = 0; 453 externalInterface_Cmd = 0;
581 static void DataEX_helper_set_Unknown_Date_deviceData(SDeviceLine *lineWrite) 589 static void DataEX_helper_set_Unknown_Date_deviceData(SDeviceLine *lineWrite)
582 { 590 {
583 RTC_DateTypeDef sdatestructure; 591 RTC_DateTypeDef sdatestructure;
584 RTC_TimeTypeDef stimestructure; 592 RTC_TimeTypeDef stimestructure;
585 593
594 const SFirmwareData *pFirmwareInfo;
595 pFirmwareInfo = firmwareDataGetPointer();
596
586 stimestructure.Hours = UNKNOWN_TIME_HOURS; 597 stimestructure.Hours = UNKNOWN_TIME_HOURS;
587 stimestructure.Minutes = UNKNOWN_TIME_MINUTES; 598 stimestructure.Minutes = UNKNOWN_TIME_MINUTES;
588 stimestructure.Seconds = UNKNOWN_TIME_SECOND; 599 stimestructure.Seconds = UNKNOWN_TIME_SECOND;
589 600
590 sdatestructure.Date = UNKNOWN_DATE_DAY; 601 sdatestructure.Date = UNKNOWN_DATE_DAY;
591 sdatestructure.Month = UNKNOWN_DATE_MONTH; 602 sdatestructure.Month = UNKNOWN_DATE_MONTH;
592 sdatestructure.Year = UNKNOWN_DATE_YEAR; 603 sdatestructure.Year = pFirmwareInfo->release_year;
593 setWeekday(&sdatestructure); 604 setWeekday(&sdatestructure);
594 605
595 DataEX_helper_SetTime(stimestructure, &lineWrite->time_rtc_tr); 606 DataEX_helper_SetTime(stimestructure, &lineWrite->time_rtc_tr);
596 DataEX_helper_SetDate(sdatestructure, &lineWrite->date_rtc_dr); 607 DataEX_helper_SetDate(sdatestructure, &lineWrite->date_rtc_dr);
597 } 608 }