diff Discovery/Src/data_exchange_main.c @ 969:81049905d829 Evo_2_23

Zusammenf?hren
author heinrichsweikamp
date Sun, 19 Jan 2025 12:02:59 +0100
parents 3420e3ba698d
children d9290c76b840
line wrap: on
line diff
--- a/Discovery/Src/data_exchange_main.c	Sun Jan 19 12:00:50 2025 +0100
+++ b/Discovery/Src/data_exchange_main.c	Sun Jan 19 12:02:59 2025 +0100
@@ -73,6 +73,7 @@
 #include "buehlmann.h"
 #include "externLogbookFlash.h"
 #include "vpm.h"
+#include "check_warning.h"
 
 /* #define TESTBENCH */
 
@@ -441,6 +442,13 @@
 	}
 #endif
 
+#ifdef ENABLE_GPIO_V2
+	if(getBuzzerActivationState())
+	{
+		externalInterface_Cmd |= EXT_INTERFACE_BUZZER_ON;
+	}
+#endif
+
 	dataOut.data.externalInterface_Cmd = externalInterface_Cmd;
 	externalInterface_Cmd = 0;
 
@@ -474,7 +482,7 @@
 		
 		settingsHelperButtonSens_keepPercentageValues(settingsGetPointerStandard()->ButtonResponsiveness[3], settings->ButtonResponsiveness);
 		setButtonResponsiveness(settings->ButtonResponsiveness);
-		DataEX_setExtInterface_Cmd(EXT_INTERFACE_COPY_SENSORMAP);
+		DataEX_setExtInterface_Cmd(EXT_INTERFACE_COPY_SENSORMAP, 0);
 	}
 }
 
@@ -583,13 +591,16 @@
 	RTC_DateTypeDef sdatestructure;
 	RTC_TimeTypeDef stimestructure;
 
+	const SFirmwareData *pFirmwareInfo;
+    pFirmwareInfo = firmwareDataGetPointer();
+
 	stimestructure.Hours = UNKNOWN_TIME_HOURS;
 	stimestructure.Minutes = UNKNOWN_TIME_MINUTES;
 	stimestructure.Seconds = UNKNOWN_TIME_SECOND;
 
 	sdatestructure.Date = UNKNOWN_DATE_DAY;
 	sdatestructure.Month = UNKNOWN_DATE_MONTH;
-	sdatestructure.Year = UNKNOWN_DATE_YEAR;
+	sdatestructure.Year =  pFirmwareInfo->release_year;
 	setWeekday(&sdatestructure);
 
 	DataEX_helper_SetTime(stimestructure, &lineWrite->time_rtc_tr);
@@ -1352,9 +1363,14 @@
 	return retval;
 }
 
-void DataEX_setExtInterface_Cmd(uint16_t Cmd)
+void DataEX_setExtInterface_Cmd(uint16_t Cmd, uint8_t sensorId)
 {
-	externalInterface_Cmd = Cmd;
+	if(sensorId < EXT_INTERFACE_SENSOR_CNT - 1)
+	{
+		externalInterface_Cmd |= Cmd;
+		externalInterface_Cmd |= sensorId << 8;
+	}
+
 	return;
 }