Step 3.3b: status.ptp for the web UI
- ptp_clock_status() adds status.ptp: state (LISTENING / UNCALIBRATED / SLAVE), locked, gm_id, offset_ns, freq_ppb, path_delay_ns + path_delay_sd_ns (window of 64, from lock on), steps_removed, gm_time/freq_traceable, version, own_class (255 slave / 248 auto, master), clock_id, gm_class/accuracy/p1/p2, sync_avg/min/max_ms and sync_jitter_us (HW Sync intervals), announce_avg_ms, delay_req/resp counters, hw_ts, window. Snapshot under a mutex shared with the PTP task. - Per-Sync log moved to debug; info level logs state changes plus a 60 s summary (max |offset|, freq, delay). - Verified vs ptp4l: LISTENING -> UNCALIBRATED -> SLAVE in ~35 s; locked offset within a few hundred ns, delay 10.27 us +-0.20 us, Delay_Req/Resp 69/69, Sync avg 1000.097 ms, Announce avg 2000 ms. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "aes67_ptp.h"
|
||||
|
||||
#include "aes67_cfg.h"
|
||||
#include "aes67_web.h"
|
||||
#include "ptp_clock.h"
|
||||
#include "ptp_hw.h"
|
||||
|
||||
@@ -38,5 +39,9 @@ esp_err_t aes67_ptp_start(esp_eth_handle_t eth)
|
||||
if (err != ESP_OK) {
|
||||
return err;
|
||||
}
|
||||
return ptp_clock_start(netif);
|
||||
err = ptp_clock_start(netif);
|
||||
if (err == ESP_OK) {
|
||||
err = status_register(ptp_clock_status);
|
||||
}
|
||||
return err;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user