Added ECHO cmd and fixed some timing issues

This commit is contained in:
2026-06-06 17:44:40 +02:00
parent 35ce1476d8
commit ac223ada72
29 changed files with 1182 additions and 152 deletions
+20
View File
@@ -29,6 +29,8 @@ enum MessageType {
reserved 28;
/** Combined cached accel + tap poll (one UART round-trip, ~16 ms cadence). */
CACHE_STATUS = 29;
/** Host → master → slave → master: timestamp echo round-trip (latency test). */
ESPNOW_ECHO_PING = 30;
}
message UartMessage {
@@ -63,6 +65,8 @@ message UartMessage {
TapNotifyResponse tap_notify_response = 30;
CacheStatusRequest cache_status_request = 33;
CacheStatusResponse cache_status_response = 34;
EspNowEchoPingRequest espnow_echo_ping_request = 35;
EspNowEchoPingResponse espnow_echo_ping_response = 36;
}
}
@@ -255,6 +259,22 @@ message EspNowUnicastTestResponse {
uint32 seq = 2;
}
/** Host → master: ESP-NOW echo ping to one slave (timestamp echoed back). */
message EspNowEchoPingRequest {
uint32 client_id = 1;
/** Microseconds since Unix epoch (host clock). */
uint64 timestamp_us = 2;
}
message EspNowEchoPingResponse {
bool success = 1;
uint32 client_id = 2;
/** Echoed host timestamp from goTool request. */
uint64 timestamp_us = 3;
/** esp_timer_get_time() delta from ping send to pong recv (master→slave→master). */
uint32 esp_rtt_us = 4;
}
// Host → master: LED ring on master (client_id=0) and/or slaves via ESP-NOW.
// mode: 0=clear, 1=progress (0100 %), 2=digit (010), 3=blink, 4=find-me, 5=all LEDs solid color.
message LedRingProgressRequest {