* Code refactoring for GPS to RTC clock
* Enabled GPS adjust RTC option for Horus * Moved sensor ID to the right to allow display of GPS date/time in Telemetry screen
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
|
||||
#include "opentx.h"
|
||||
|
||||
void rtcSetTime(struct gtm * t)
|
||||
void rtcSetTime(const struct gtm * t)
|
||||
{
|
||||
RTC_TimeTypeDef RTC_TimeStruct;
|
||||
RTC_DateTypeDef RTC_DateStruct;
|
||||
|
||||
@@ -263,7 +263,7 @@ void rtcGetTime(struct gtm * utm)
|
||||
utm->tm_wday = rtc.wday - 1;
|
||||
}
|
||||
|
||||
void rtcSetTime(struct gtm * t)
|
||||
void rtcSetTime(const struct gtm * t)
|
||||
{
|
||||
g_rtcTime = gmktime(t); // update local timestamp and get wday calculated
|
||||
g_ms100 = 0; // start of next second begins now
|
||||
|
||||
@@ -236,7 +236,7 @@ struct t_i2cTime
|
||||
uint8_t Time[7] ;
|
||||
} I2CTime ;
|
||||
|
||||
void rtcSetTime(struct gtm * t)
|
||||
void rtcSetTime(const struct gtm * t)
|
||||
{
|
||||
g_rtcTime = gmktime(t); // update local timestamp and get wday calculated
|
||||
g_ms100 = 0; // start of next second begins now
|
||||
|
||||
@@ -60,7 +60,7 @@ void writeRtc(gtm* ptr)
|
||||
i2cWriteBuffer(DS3231_I2C_ADDR, read_buffer, 1, buffer, 7);
|
||||
}
|
||||
|
||||
void rtcSetTime(struct gtm * t)
|
||||
void rtcSetTime(const struct gtm * t)
|
||||
{
|
||||
writeRtc(t);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user