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:
@@ -554,7 +554,7 @@ nvr_write(uint16_t addr, uint8_t val, void *priv)
|
||||
|
||||
if ((local->addr < RTC_REGA) || ((local->cent != 0xff) && (local->addr == local->cent))) {
|
||||
if ((local->addr != 1) && (local->addr != 3) && (local->addr != 5)) {
|
||||
if ((old != val) && !(enable_sync & TIME_SYNC_ENABLED)) {
|
||||
if ((old != val) && !(time_sync & TIME_SYNC_ENABLED)) {
|
||||
/* Update internal clock. */
|
||||
time_get(nvr, &tm);
|
||||
nvr_time_set(&tm);
|
||||
|
||||
Reference in New Issue
Block a user