Add selectable ESP-NOW send path for accel/tap input.

Expose best_effort/fast/wait/reliable via UART, dashboard, and CLI so
loss vs latency can be compared under real multi-pod load.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-11-01 22:34:03 +01:00
co-authored by Cursor
parent 178ab46cec
commit 1adaddd6c8
25 changed files with 1178 additions and 255 deletions
+35
View File
@@ -42,6 +42,11 @@ enum MessageType {
* online slaves), or on a slave clear local master/id binding only.
*/
CLIENT_ID_MAP_RESET = 34;
/**
* Host → master: get/set slave ESP-NOW send path for accel/tap
* (best_effort / fast / wait / reliable).
*/
INPUT_SEND_MODE = 35;
}
message UartMessage {
@@ -85,6 +90,8 @@ message UartMessage {
BleStreamTick ble_stream_tick = 41;
ClientIdMapResetRequest client_id_map_reset_request = 42;
ClientIdMapResetResponse client_id_map_reset_response = 43;
InputSendModeRequest input_send_mode_request = 44;
InputSendModeResponse input_send_mode_response = 45;
}
}
@@ -167,6 +174,34 @@ message AccelStreamResponse {
uint32 slaves_updated = 4;
}
/**
* Slave ESP-NOW TX path for ACCEL_SAMPLE / TAP_EVENT (debug A/B).
* Maps 1:1 to esp_now_core_send_*.
*/
enum InputSendMode {
INPUT_SEND_BEST_EFFORT = 0;
INPUT_SEND_FAST = 1;
INPUT_SEND_WAIT = 2;
INPUT_SEND_RELIABLE = 3;
}
// Host → master: get/set input send mode on slaves.
// write=false: return last mode remembered on master (client_id ignored).
// write=true: push mode via ESP-NOW (all_clients or one client_id).
message InputSendModeRequest {
bool write = 1;
InputSendMode mode = 2;
uint32 client_id = 3;
bool all_clients = 4;
}
message InputSendModeResponse {
bool success = 1;
InputSendMode mode = 2;
uint32 client_id = 3;
uint32 slaves_updated = 4;
}
/** Host → master: read LiPo ADC voltages (master local and/or slaves via ESP-NOW). */
message BatteryStatusRequest {
/** 0 = master only; >0 = one slave; ignored when all_clients */