config: replace numeric enable_sync setting with time_sync string
This shouldn't break existing configs. Existing "enable_sync" setings are automatically replaced with an appropriate "time_sync" value. In case "enable_sync" and "time_sync" settings are both present in a configuration file (shouldn't happen without manually editing the config), "time_sync" takes precedence.
This commit is contained in:
@@ -280,7 +280,7 @@ rtc_start(nvr_t *nvr)
|
||||
struct tm tm;
|
||||
|
||||
/* Initialize the internal and chip times. */
|
||||
if (enable_sync & TIME_SYNC_ENABLED) {
|
||||
if (time_sync & TIME_SYNC_ENABLED) {
|
||||
/* Use the internal clock's time. */
|
||||
nvr_time_get(&tm);
|
||||
rtc_time_set(nvr->regs, &tm);
|
||||
|
||||
@@ -258,7 +258,7 @@ tc8521_start(nvr_t *nvr)
|
||||
struct tm tm;
|
||||
|
||||
/* Initialize the internal and chip times. */
|
||||
if (enable_sync & TIME_SYNC_ENABLED) {
|
||||
if (time_sync & TIME_SYNC_ENABLED) {
|
||||
/* Use the internal clock's time. */
|
||||
nvr_time_get(&tm);
|
||||
tc8521_time_set(nvr->regs, &tm);
|
||||
|
||||
Reference in New Issue
Block a user