* 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:
Damjan Adamic
2016-09-02 20:47:56 +02:00
parent 07c4563764
commit d8a00c3f3d
9 changed files with 77 additions and 53 deletions
@@ -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;
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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);
}