comparison Discovery/Src/data_central.c @ 949:c6b858f2e025 Evo_2_23 tip

GNSS UTC in Date-Time menu: The UTC time provided by the gnss module is not shown in the date-time settings menu. If a valid time signal is available then the OSTC RTC may be set to it by selecting the UTC menu entry. The time zone has to be selected manually. This is possible using a separate edit line.
author Ideenmodellierer
date Sun, 22 Dec 2024 21:19:21 +0100
parents aad1a6b9aaec
children
comparison
equal deleted inserted replaced
948:abdd72c8b567 949:c6b858f2e025
1093 *pCountDownSec = countDownSec; 1093 *pCountDownSec = countDownSec;
1094 *pExitDepthMeter = exitDepthMeter; 1094 *pExitDepthMeter = exitDepthMeter;
1095 *pColor = color; 1095 *pColor = color;
1096 return drawingActive; 1096 return drawingActive;
1097 } 1097 }
1098
1099 void convertUTCToLocal(uint8_t utcHours, uint8_t utcMinutes, uint8_t* pLocalHours, uint8_t* pLocalMinutes)
1100 {
1101 int8_t localHours = 0;
1102 int8_t localMinutes = 0;
1103 SSettings* pSettings = settingsGetPointer();
1104
1105 localHours = utcHours + pSettings->timeZone.hours;
1106 if(localHours < 0)
1107 {
1108 localHours += 24;
1109 }
1110 if(localHours > 24)
1111 {
1112 localHours -= 24;
1113 }
1114 localMinutes = utcMinutes + pSettings->timeZone.minutes;
1115 if(localMinutes < 0)
1116 {
1117 localMinutes += 60;
1118 }
1119 if(localMinutes > 60)
1120 {
1121 localMinutes -= 60;
1122 }
1123 *pLocalHours = localHours;
1124 *pLocalMinutes = localMinutes;
1125 }