From 8837eb1e70b8c7f69dada5dbb043a962448e2520 Mon Sep 17 00:00:00 2001 From: bonamin Date: Wed, 28 Oct 2026 20:43:07 +0200 Subject: [PATCH] docs(api-reference): firmware 3.2.0 smart face sync fields on clock.set_config/get_config Mirrors project-vesper F-083: face_sync_mode (force | smart) and smart_max_wait_min (1-359, default 61). Co-Authored-By: Claude Opus 5.5 --- .../pages/engineering/developer/ApiReferencePage.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/frontend/src/pages/engineering/developer/ApiReferencePage.jsx b/frontend/src/pages/engineering/developer/ApiReferencePage.jsx index 8d9d0f4..3fda5ac 100644 --- a/frontend/src/pages/engineering/developer/ApiReferencePage.jsx +++ b/frontend/src/pages/engineering/developer/ApiReferencePage.jsx @@ -374,13 +374,17 @@ const NAMESPACES = [ { field: 'c2', type: 'int', required: false, notes: 'Relay output for clock pulse 2 (1-based). 0 = disabled.' }, { field: 'pulse_duration', type: 'int', required: false, notes: 'Duration of each clock pulse in milliseconds.' }, { field: 'pause_duration', type: 'int', required: false, notes: 'Pause between C1 and C2 pulses in milliseconds.' }, + { field: 'face_sync_mode', type: 'string', required: false, notes: 'fw 3.2.0+. "force" (default) or "smart". The face only moves forward: when it is AHEAD of real time (DST fall-back, a correction), force runs it round the dial to catch up; smart stops it until real time catches up, if it is at most smart_max_wait_min ahead (otherwise it runs the lap).' }, + { field: 'smart_max_wait_min', type: 'int', required: false, notes: 'fw 3.2.0+. 1-359, default 61 (covers a DST fall-back). Capped below 6 h because a face ahead by N minutes reads the same as one behind by 720 - N.' }, ], response: '{ "status": "SUCCESS", "type": "clock.set_config", "message": "Clock configuration updated and saved" }', errors: [ - { message: 'Provide at least one field: enabled, c1, c2, pulse_duration, pause_duration', condition: 'No known fields present in contents' }, + { message: 'Provide at least one field: enabled, c1, c2, pulse_duration, pause_duration, face_sync_mode, smart_max_wait_min', condition: 'No known fields present in contents' }, + { message: 'face_sync_mode must be "force" or "smart"', condition: 'Any other value' }, + { message: 'smart_max_wait_min must be 1-359', condition: 'Out of range or not an integer' }, { message: 'Settings applied but failed to save to SD', condition: 'SD card write failed after applying values' }, ], - example: '{ "v": 2, "cmd": "clock.set_config", "contents": { "enabled": true, "c1": 5, "c2": 6, "pulse_duration": 100, "pause_duration": 500 } }', + example: '{ "v": 2, "cmd": "clock.set_config", "contents": { "enabled": true, "c1": 5, "c2": 6, "pulse_duration": 100, "pause_duration": 500 } }\n\n{ "v": 2, "cmd": "clock.set_config", "contents": { "face_sync_mode": "smart", "smart_max_wait_min": 61 } }', warning: null, }, { @@ -606,7 +610,7 @@ const NAMESPACES = [ transports: ['All'], description: 'Read full clock configuration — outputs, timings, alerts, backlight, silence, enabled state, NTP settings and timezone (timezone = the clock.get_timezone object, fw 3.0.0 replaced gmt_offset_sec / dst_offset_sec; ntp = the settings part of clock.get_ntp, fw 3.1.0 replaced ntp_server).', contents: null, - response: '{\n "status": "SUCCESS",\n "type": "clock.get_config",\n "data": {\n "enabled": true,\n "c1output": 4, "c2output": 5,\n "pulse_duration": 100, "pause_duration": 500,\n "physical_hour": 10, "physical_minute": 30,\n "next_is_c1": true, "last_sync_time": 1740000000,\n "alert_type": "HOURS", "alert_interval": 1,\n "hour_bell": 5, "half_bell": 255, "quarter_bell": 255,\n "backlight": true, "backlight_output": 6,\n "backlight_on": "07:00", "backlight_off": "22:00",\n "daytime_silence": false, "daytime_on": "00:00", "daytime_off": "00:00",\n "night_silence": true, "night_on": "22:00", "night_off": "07:00",\n "timezone": { ...same object as clock.get_timezone... },\n "ntp": { "auto": true, "sync_time": "04:30", "sync_time_min": 270, "servers": ["pool.ntp.org", "time.google.com", "time.cloudflare.com"] }\n }\n}', + response: '{\n "status": "SUCCESS",\n "type": "clock.get_config",\n "data": {\n "enabled": true,\n "c1output": 4, "c2output": 5,\n "pulse_duration": 100, "pause_duration": 500,\n "physical_hour": 10, "physical_minute": 30,\n "next_is_c1": true, "last_sync_time": 1740000000,\n "face_sync_mode": "force", "smart_max_wait_min": 61,\n "alert_type": "HOURS", "alert_interval": 1,\n "hour_bell": 5, "half_bell": 255, "quarter_bell": 255,\n "backlight": true, "backlight_output": 6,\n "backlight_on": "07:00", "backlight_off": "22:00",\n "daytime_silence": false, "daytime_on": "00:00", "daytime_off": "00:00",\n "night_silence": true, "night_on": "22:00", "night_off": "07:00",\n "timezone": { ...same object as clock.get_timezone... },\n "ntp": { "auto": true, "sync_time": "04:30", "sync_time_min": 270, "servers": ["pool.ntp.org", "time.google.com", "time.cloudflare.com"] }\n }\n}', errors: [], example: '{ "v": 2, "cmd": "clock.get_config" }', warning: null,