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:
@@ -54,6 +54,9 @@ PB_BIND(alox_EspNowTapConfig, alox_EspNowTapConfig, AUTO)
|
||||
PB_BIND(alox_EspNowTapEvent, alox_EspNowTapEvent, AUTO)
|
||||
|
||||
|
||||
PB_BIND(alox_EspNowInputSendMode, alox_EspNowInputSendMode, AUTO)
|
||||
|
||||
|
||||
PB_BIND(alox_EspNowBatteryReport, alox_EspNowBatteryReport, AUTO)
|
||||
|
||||
|
||||
|
||||
@@ -36,7 +36,9 @@ typedef enum _alox_EspNowMessageType {
|
||||
/* * Master → slave: assigned logical client id after join/presence. */
|
||||
alox_EspNowMessageType_ESPNOW_ASSIGN_ID = 22,
|
||||
/* * Master → slave: forget persisted master/id binding (debug reset). */
|
||||
alox_EspNowMessageType_ESPNOW_CLEAR_ID_BINDING = 23
|
||||
alox_EspNowMessageType_ESPNOW_CLEAR_ID_BINDING = 23,
|
||||
/* * Master → slave: accel/tap ESP-NOW send path (best_effort/fast/wait/reliable). */
|
||||
alox_EspNowMessageType_ESPNOW_SET_INPUT_SEND_MODE = 24
|
||||
} alox_EspNowMessageType;
|
||||
|
||||
/* Struct definitions */
|
||||
@@ -147,6 +149,14 @@ typedef struct _alox_EspNowTapEvent {
|
||||
uint32_t kind;
|
||||
} alox_EspNowTapEvent;
|
||||
|
||||
/* *
|
||||
Master → slave: which esp_now_core_send_* path to use for ACCEL_SAMPLE / TAP_EVENT.
|
||||
Values match uart InputSendMode (0=best_effort … 3=reliable). */
|
||||
typedef struct _alox_EspNowInputSendMode {
|
||||
uint32_t client_id; /* 0 = all slaves; otherwise only matching slave_id applies */
|
||||
uint32_t mode;
|
||||
} alox_EspNowInputSendMode;
|
||||
|
||||
/* * Slave → master: LiPo voltages (periodic ~30 s and on query). */
|
||||
typedef struct _alox_EspNowBatteryReport {
|
||||
uint32_t client_id;
|
||||
@@ -221,6 +231,7 @@ typedef struct _alox_EspNowMessage {
|
||||
alox_EspNowTapConfig tap_config;
|
||||
alox_EspNowAssignId assign_id;
|
||||
alox_EspNowClearIdBinding clear_id_binding;
|
||||
alox_EspNowInputSendMode input_send_mode;
|
||||
} payload;
|
||||
} alox_EspNowMessage;
|
||||
|
||||
@@ -231,8 +242,9 @@ extern "C" {
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _alox_EspNowMessageType_MIN alox_EspNowMessageType_ESPNOW_UNKNOWN
|
||||
#define _alox_EspNowMessageType_MAX alox_EspNowMessageType_ESPNOW_CLEAR_ID_BINDING
|
||||
#define _alox_EspNowMessageType_ARRAYSIZE ((alox_EspNowMessageType)(alox_EspNowMessageType_ESPNOW_CLEAR_ID_BINDING+1))
|
||||
#define _alox_EspNowMessageType_MAX alox_EspNowMessageType_ESPNOW_SET_INPUT_SEND_MODE
|
||||
#define _alox_EspNowMessageType_ARRAYSIZE ((alox_EspNowMessageType)(alox_EspNowMessageType_ESPNOW_SET_INPUT_SEND_MODE+1))
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -276,6 +288,7 @@ extern "C" {
|
||||
#define alox_EspNowTapNotify_init_default {0, 0, 0, 0}
|
||||
#define alox_EspNowTapConfig_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define alox_EspNowTapEvent_init_default {0, 0}
|
||||
#define alox_EspNowInputSendMode_init_default {0, 0}
|
||||
#define alox_EspNowBatteryReport_init_default {0, 0, 0, 0, 0}
|
||||
#define alox_EspNowLedRing_init_default {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define alox_EspNowOtaStart_init_default {0}
|
||||
@@ -299,6 +312,7 @@ extern "C" {
|
||||
#define alox_EspNowTapNotify_init_zero {0, 0, 0, 0}
|
||||
#define alox_EspNowTapConfig_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define alox_EspNowTapEvent_init_zero {0, 0}
|
||||
#define alox_EspNowInputSendMode_init_zero {0, 0}
|
||||
#define alox_EspNowBatteryReport_init_zero {0, 0, 0, 0, 0}
|
||||
#define alox_EspNowLedRing_init_zero {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
|
||||
#define alox_EspNowOtaStart_init_zero {0}
|
||||
@@ -349,6 +363,8 @@ extern "C" {
|
||||
#define alox_EspNowTapConfig_enable_triple_tag 10
|
||||
#define alox_EspNowTapEvent_slave_id_tag 1
|
||||
#define alox_EspNowTapEvent_kind_tag 2
|
||||
#define alox_EspNowInputSendMode_client_id_tag 1
|
||||
#define alox_EspNowInputSendMode_mode_tag 2
|
||||
#define alox_EspNowBatteryReport_client_id_tag 1
|
||||
#define alox_EspNowBatteryReport_lipo1_valid_tag 2
|
||||
#define alox_EspNowBatteryReport_lipo2_valid_tag 3
|
||||
@@ -394,6 +410,7 @@ extern "C" {
|
||||
#define alox_EspNowMessage_tap_config_tag 22
|
||||
#define alox_EspNowMessage_assign_id_tag 23
|
||||
#define alox_EspNowMessage_clear_id_binding_tag 24
|
||||
#define alox_EspNowMessage_input_send_mode_tag 25
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define alox_EspNowUnicastTest_FIELDLIST(X, a) \
|
||||
@@ -502,6 +519,12 @@ X(a, STATIC, SINGULAR, UINT32, kind, 2)
|
||||
#define alox_EspNowTapEvent_CALLBACK NULL
|
||||
#define alox_EspNowTapEvent_DEFAULT NULL
|
||||
|
||||
#define alox_EspNowInputSendMode_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, client_id, 1) \
|
||||
X(a, STATIC, SINGULAR, UINT32, mode, 2)
|
||||
#define alox_EspNowInputSendMode_CALLBACK NULL
|
||||
#define alox_EspNowInputSendMode_DEFAULT NULL
|
||||
|
||||
#define alox_EspNowBatteryReport_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, client_id, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, lipo1_valid, 2) \
|
||||
@@ -572,7 +595,8 @@ X(a, STATIC, ONEOF, MESSAGE, (payload,echo_ping,payload.echo_ping), 20) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,echo_pong,payload.echo_pong), 21) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,tap_config,payload.tap_config), 22) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,assign_id,payload.assign_id), 23) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,clear_id_binding,payload.clear_id_binding), 24)
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,clear_id_binding,payload.clear_id_binding), 24) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,input_send_mode,payload.input_send_mode), 25)
|
||||
#define alox_EspNowMessage_CALLBACK NULL
|
||||
#define alox_EspNowMessage_DEFAULT NULL
|
||||
#define alox_EspNowMessage_payload_discover_MSGTYPE alox_EspNowDiscover
|
||||
@@ -598,6 +622,7 @@ X(a, STATIC, ONEOF, MESSAGE, (payload,clear_id_binding,payload.clear_id_bi
|
||||
#define alox_EspNowMessage_payload_tap_config_MSGTYPE alox_EspNowTapConfig
|
||||
#define alox_EspNowMessage_payload_assign_id_MSGTYPE alox_EspNowAssignId
|
||||
#define alox_EspNowMessage_payload_clear_id_binding_MSGTYPE alox_EspNowClearIdBinding
|
||||
#define alox_EspNowMessage_payload_input_send_mode_MSGTYPE alox_EspNowInputSendMode
|
||||
|
||||
extern const pb_msgdesc_t alox_EspNowUnicastTest_msg;
|
||||
extern const pb_msgdesc_t alox_EspNowEchoPing_msg;
|
||||
@@ -615,6 +640,7 @@ extern const pb_msgdesc_t alox_EspNowBatteryQuery_msg;
|
||||
extern const pb_msgdesc_t alox_EspNowTapNotify_msg;
|
||||
extern const pb_msgdesc_t alox_EspNowTapConfig_msg;
|
||||
extern const pb_msgdesc_t alox_EspNowTapEvent_msg;
|
||||
extern const pb_msgdesc_t alox_EspNowInputSendMode_msg;
|
||||
extern const pb_msgdesc_t alox_EspNowBatteryReport_msg;
|
||||
extern const pb_msgdesc_t alox_EspNowLedRing_msg;
|
||||
extern const pb_msgdesc_t alox_EspNowOtaStart_msg;
|
||||
@@ -640,6 +666,7 @@ extern const pb_msgdesc_t alox_EspNowMessage_msg;
|
||||
#define alox_EspNowTapNotify_fields &alox_EspNowTapNotify_msg
|
||||
#define alox_EspNowTapConfig_fields &alox_EspNowTapConfig_msg
|
||||
#define alox_EspNowTapEvent_fields &alox_EspNowTapEvent_msg
|
||||
#define alox_EspNowInputSendMode_fields &alox_EspNowInputSendMode_msg
|
||||
#define alox_EspNowBatteryReport_fields &alox_EspNowBatteryReport_msg
|
||||
#define alox_EspNowLedRing_fields &alox_EspNowLedRing_msg
|
||||
#define alox_EspNowOtaStart_fields &alox_EspNowOtaStart_msg
|
||||
@@ -663,6 +690,7 @@ extern const pb_msgdesc_t alox_EspNowMessage_msg;
|
||||
#define alox_EspNowEchoPing_size 22
|
||||
#define alox_EspNowEchoPong_size 22
|
||||
#define alox_EspNowFindMe_size 6
|
||||
#define alox_EspNowInputSendMode_size 12
|
||||
#define alox_EspNowLedRing_size 60
|
||||
#define alox_EspNowOtaEnd_size 0
|
||||
#define alox_EspNowOtaPayload_size 209
|
||||
|
||||
@@ -31,6 +31,8 @@ enum EspNowMessageType {
|
||||
ESPNOW_ASSIGN_ID = 22;
|
||||
/** Master → slave: forget persisted master/id binding (debug reset). */
|
||||
ESPNOW_CLEAR_ID_BINDING = 23;
|
||||
/** Master → slave: accel/tap ESP-NOW send path (best_effort/fast/wait/reliable). */
|
||||
ESPNOW_SET_INPUT_SEND_MODE = 24;
|
||||
}
|
||||
|
||||
message EspNowUnicastTest {
|
||||
@@ -138,6 +140,15 @@ message EspNowTapEvent {
|
||||
uint32 kind = 2;
|
||||
}
|
||||
|
||||
/**
|
||||
* Master → slave: which esp_now_core_send_* path to use for ACCEL_SAMPLE / TAP_EVENT.
|
||||
* Values match uart InputSendMode (0=best_effort … 3=reliable).
|
||||
*/
|
||||
message EspNowInputSendMode {
|
||||
uint32 client_id = 1; // 0 = all slaves; otherwise only matching slave_id applies
|
||||
uint32 mode = 2;
|
||||
}
|
||||
|
||||
/** Slave → master: LiPo voltages (periodic ~30 s and on query). */
|
||||
message EspNowBatteryReport {
|
||||
uint32 client_id = 1;
|
||||
@@ -208,5 +219,6 @@ message EspNowMessage {
|
||||
EspNowTapConfig tap_config = 22;
|
||||
EspNowAssignId assign_id = 23;
|
||||
EspNowClearIdBinding clear_id_binding = 24;
|
||||
EspNowInputSendMode input_send_mode = 25;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,6 +42,12 @@ PB_BIND(alox_AccelStreamRequest, alox_AccelStreamRequest, AUTO)
|
||||
PB_BIND(alox_AccelStreamResponse, alox_AccelStreamResponse, AUTO)
|
||||
|
||||
|
||||
PB_BIND(alox_InputSendModeRequest, alox_InputSendModeRequest, AUTO)
|
||||
|
||||
|
||||
PB_BIND(alox_InputSendModeResponse, alox_InputSendModeResponse, AUTO)
|
||||
|
||||
|
||||
PB_BIND(alox_BatteryStatusRequest, alox_BatteryStatusRequest, AUTO)
|
||||
|
||||
|
||||
@@ -158,3 +164,5 @@ PB_BIND(alox_OtaSlaveProgressResponse, alox_OtaSlaveProgressResponse, 2)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -44,9 +44,23 @@ typedef enum _alox_MessageType {
|
||||
/* *
|
||||
Host → device: clear master client-id NVS map + live registry (and notify
|
||||
online slaves), or on a slave clear local master/id binding only. */
|
||||
alox_MessageType_CLIENT_ID_MAP_RESET = 34
|
||||
alox_MessageType_CLIENT_ID_MAP_RESET = 34,
|
||||
/* *
|
||||
Host → master: get/set slave ESP-NOW send path for accel/tap
|
||||
(best_effort / fast / wait / reliable). */
|
||||
alox_MessageType_INPUT_SEND_MODE = 35
|
||||
} alox_MessageType;
|
||||
|
||||
/* *
|
||||
Slave ESP-NOW TX path for ACCEL_SAMPLE / TAP_EVENT (debug A/B).
|
||||
Maps 1:1 to esp_now_core_send_*. */
|
||||
typedef enum _alox_InputSendMode {
|
||||
alox_InputSendMode_INPUT_SEND_BEST_EFFORT = 0,
|
||||
alox_InputSendMode_INPUT_SEND_FAST = 1,
|
||||
alox_InputSendMode_INPUT_SEND_WAIT = 2,
|
||||
alox_InputSendMode_INPUT_SEND_RELIABLE = 3
|
||||
} alox_InputSendMode;
|
||||
|
||||
typedef enum _alox_TapKind {
|
||||
alox_TapKind_TAP_NONE = 0,
|
||||
alox_TapKind_TAP_SINGLE = 1,
|
||||
@@ -136,6 +150,23 @@ typedef struct _alox_AccelStreamResponse {
|
||||
uint32_t slaves_updated;
|
||||
} alox_AccelStreamResponse;
|
||||
|
||||
/* 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). */
|
||||
typedef struct _alox_InputSendModeRequest {
|
||||
bool write;
|
||||
alox_InputSendMode mode;
|
||||
uint32_t client_id;
|
||||
bool all_clients;
|
||||
} alox_InputSendModeRequest;
|
||||
|
||||
typedef struct _alox_InputSendModeResponse {
|
||||
bool success;
|
||||
alox_InputSendMode mode;
|
||||
uint32_t client_id;
|
||||
uint32_t slaves_updated;
|
||||
} alox_InputSendModeResponse;
|
||||
|
||||
/* * Host → master: read LiPo ADC voltages (master local and/or slaves via ESP-NOW). */
|
||||
typedef struct _alox_BatteryStatusRequest {
|
||||
/* * 0 = master only; >0 = one slave; ignored when all_clients */
|
||||
@@ -380,7 +411,7 @@ typedef struct _alox_TapConfigResponse {
|
||||
bool enable_triple;
|
||||
} alox_TapConfigResponse;
|
||||
|
||||
/* Host → device: begin UART OTA (erase inactive OTA slot; device replies OTA_STATUS). */
|
||||
/* Host → device: begin host OTA over UART or BLE (erase inactive OTA slot; device replies OTA_STATUS). */
|
||||
typedef struct _alox_OtaStartPayload {
|
||||
uint32_t total_size;
|
||||
} alox_OtaStartPayload;
|
||||
@@ -471,6 +502,8 @@ typedef struct _alox_UartMessage {
|
||||
alox_BleStreamTick ble_stream_tick;
|
||||
alox_ClientIdMapResetRequest client_id_map_reset_request;
|
||||
alox_ClientIdMapResetResponse client_id_map_reset_response;
|
||||
alox_InputSendModeRequest input_send_mode_request;
|
||||
alox_InputSendModeResponse input_send_mode_response;
|
||||
} payload;
|
||||
} alox_UartMessage;
|
||||
|
||||
@@ -481,8 +514,12 @@ extern "C" {
|
||||
|
||||
/* Helper constants for enums */
|
||||
#define _alox_MessageType_MIN alox_MessageType_UNKNOWN
|
||||
#define _alox_MessageType_MAX alox_MessageType_CLIENT_ID_MAP_RESET
|
||||
#define _alox_MessageType_ARRAYSIZE ((alox_MessageType)(alox_MessageType_CLIENT_ID_MAP_RESET+1))
|
||||
#define _alox_MessageType_MAX alox_MessageType_INPUT_SEND_MODE
|
||||
#define _alox_MessageType_ARRAYSIZE ((alox_MessageType)(alox_MessageType_INPUT_SEND_MODE+1))
|
||||
|
||||
#define _alox_InputSendMode_MIN alox_InputSendMode_INPUT_SEND_BEST_EFFORT
|
||||
#define _alox_InputSendMode_MAX alox_InputSendMode_INPUT_SEND_RELIABLE
|
||||
#define _alox_InputSendMode_ARRAYSIZE ((alox_InputSendMode)(alox_InputSendMode_INPUT_SEND_RELIABLE+1))
|
||||
|
||||
#define _alox_TapKind_MIN alox_TapKind_TAP_NONE
|
||||
#define _alox_TapKind_MAX alox_TapKind_TAP_TRIPLE
|
||||
@@ -501,6 +538,10 @@ extern "C" {
|
||||
|
||||
|
||||
|
||||
#define alox_InputSendModeRequest_mode_ENUMTYPE alox_InputSendMode
|
||||
|
||||
#define alox_InputSendModeResponse_mode_ENUMTYPE alox_InputSendMode
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -554,6 +595,8 @@ extern "C" {
|
||||
#define alox_AccelDeadzoneResponse_init_default {0, 0, 0, 0}
|
||||
#define alox_AccelStreamRequest_init_default {0, 0, 0, 0, 0}
|
||||
#define alox_AccelStreamResponse_init_default {0, 0, 0, 0}
|
||||
#define alox_InputSendModeRequest_init_default {0, _alox_InputSendMode_MIN, 0, 0}
|
||||
#define alox_InputSendModeResponse_init_default {0, _alox_InputSendMode_MIN, 0, 0}
|
||||
#define alox_BatteryStatusRequest_init_default {0, 0}
|
||||
#define alox_LipoReading_init_default {0, 0}
|
||||
#define alox_BatterySample_init_default {0, false, alox_LipoReading_init_default, false, alox_LipoReading_init_default, 0}
|
||||
@@ -603,6 +646,8 @@ extern "C" {
|
||||
#define alox_AccelDeadzoneResponse_init_zero {0, 0, 0, 0}
|
||||
#define alox_AccelStreamRequest_init_zero {0, 0, 0, 0, 0}
|
||||
#define alox_AccelStreamResponse_init_zero {0, 0, 0, 0}
|
||||
#define alox_InputSendModeRequest_init_zero {0, _alox_InputSendMode_MIN, 0, 0}
|
||||
#define alox_InputSendModeResponse_init_zero {0, _alox_InputSendMode_MIN, 0, 0}
|
||||
#define alox_BatteryStatusRequest_init_zero {0, 0}
|
||||
#define alox_LipoReading_init_zero {0, 0}
|
||||
#define alox_BatterySample_init_zero {0, false, alox_LipoReading_init_zero, false, alox_LipoReading_init_zero, 0}
|
||||
@@ -680,6 +725,14 @@ extern "C" {
|
||||
#define alox_AccelStreamResponse_client_id_tag 2
|
||||
#define alox_AccelStreamResponse_success_tag 3
|
||||
#define alox_AccelStreamResponse_slaves_updated_tag 4
|
||||
#define alox_InputSendModeRequest_write_tag 1
|
||||
#define alox_InputSendModeRequest_mode_tag 2
|
||||
#define alox_InputSendModeRequest_client_id_tag 3
|
||||
#define alox_InputSendModeRequest_all_clients_tag 4
|
||||
#define alox_InputSendModeResponse_success_tag 1
|
||||
#define alox_InputSendModeResponse_mode_tag 2
|
||||
#define alox_InputSendModeResponse_client_id_tag 3
|
||||
#define alox_InputSendModeResponse_slaves_updated_tag 4
|
||||
#define alox_BatteryStatusRequest_client_id_tag 1
|
||||
#define alox_BatteryStatusRequest_all_clients_tag 2
|
||||
#define alox_LipoReading_valid_tag 1
|
||||
@@ -846,6 +899,8 @@ extern "C" {
|
||||
#define alox_UartMessage_ble_stream_tick_tag 41
|
||||
#define alox_UartMessage_client_id_map_reset_request_tag 42
|
||||
#define alox_UartMessage_client_id_map_reset_response_tag 43
|
||||
#define alox_UartMessage_input_send_mode_request_tag 44
|
||||
#define alox_UartMessage_input_send_mode_response_tag 45
|
||||
|
||||
/* Struct field encoding specification for nanopb */
|
||||
#define alox_UartMessage_FIELDLIST(X, a) \
|
||||
@@ -887,7 +942,9 @@ X(a, STATIC, ONEOF, MESSAGE, (payload,tap_config_request,payload.tap_confi
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,tap_config_response,payload.tap_config_response), 40) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,ble_stream_tick,payload.ble_stream_tick), 41) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,client_id_map_reset_request,payload.client_id_map_reset_request), 42) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,client_id_map_reset_response,payload.client_id_map_reset_response), 43)
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,client_id_map_reset_response,payload.client_id_map_reset_response), 43) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,input_send_mode_request,payload.input_send_mode_request), 44) \
|
||||
X(a, STATIC, ONEOF, MESSAGE, (payload,input_send_mode_response,payload.input_send_mode_response), 45)
|
||||
#define alox_UartMessage_CALLBACK NULL
|
||||
#define alox_UartMessage_DEFAULT NULL
|
||||
#define alox_UartMessage_payload_ack_payload_MSGTYPE alox_Ack
|
||||
@@ -928,6 +985,8 @@ X(a, STATIC, ONEOF, MESSAGE, (payload,client_id_map_reset_response,payload
|
||||
#define alox_UartMessage_payload_ble_stream_tick_MSGTYPE alox_BleStreamTick
|
||||
#define alox_UartMessage_payload_client_id_map_reset_request_MSGTYPE alox_ClientIdMapResetRequest
|
||||
#define alox_UartMessage_payload_client_id_map_reset_response_MSGTYPE alox_ClientIdMapResetResponse
|
||||
#define alox_UartMessage_payload_input_send_mode_request_MSGTYPE alox_InputSendModeRequest
|
||||
#define alox_UartMessage_payload_input_send_mode_response_MSGTYPE alox_InputSendModeResponse
|
||||
|
||||
#define alox_Ack_FIELDLIST(X, a) \
|
||||
|
||||
@@ -1014,6 +1073,22 @@ X(a, STATIC, SINGULAR, UINT32, slaves_updated, 4)
|
||||
#define alox_AccelStreamResponse_CALLBACK NULL
|
||||
#define alox_AccelStreamResponse_DEFAULT NULL
|
||||
|
||||
#define alox_InputSendModeRequest_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, write, 1) \
|
||||
X(a, STATIC, SINGULAR, UENUM, mode, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, client_id, 3) \
|
||||
X(a, STATIC, SINGULAR, BOOL, all_clients, 4)
|
||||
#define alox_InputSendModeRequest_CALLBACK NULL
|
||||
#define alox_InputSendModeRequest_DEFAULT NULL
|
||||
|
||||
#define alox_InputSendModeResponse_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, BOOL, success, 1) \
|
||||
X(a, STATIC, SINGULAR, UENUM, mode, 2) \
|
||||
X(a, STATIC, SINGULAR, UINT32, client_id, 3) \
|
||||
X(a, STATIC, SINGULAR, UINT32, slaves_updated, 4)
|
||||
#define alox_InputSendModeResponse_CALLBACK NULL
|
||||
#define alox_InputSendModeResponse_DEFAULT NULL
|
||||
|
||||
#define alox_BatteryStatusRequest_FIELDLIST(X, a) \
|
||||
X(a, STATIC, SINGULAR, UINT32, client_id, 1) \
|
||||
X(a, STATIC, SINGULAR, BOOL, all_clients, 2)
|
||||
@@ -1312,6 +1387,8 @@ extern const pb_msgdesc_t alox_AccelDeadzoneRequest_msg;
|
||||
extern const pb_msgdesc_t alox_AccelDeadzoneResponse_msg;
|
||||
extern const pb_msgdesc_t alox_AccelStreamRequest_msg;
|
||||
extern const pb_msgdesc_t alox_AccelStreamResponse_msg;
|
||||
extern const pb_msgdesc_t alox_InputSendModeRequest_msg;
|
||||
extern const pb_msgdesc_t alox_InputSendModeResponse_msg;
|
||||
extern const pb_msgdesc_t alox_BatteryStatusRequest_msg;
|
||||
extern const pb_msgdesc_t alox_LipoReading_msg;
|
||||
extern const pb_msgdesc_t alox_BatterySample_msg;
|
||||
@@ -1363,6 +1440,8 @@ extern const pb_msgdesc_t alox_OtaSlaveProgressResponse_msg;
|
||||
#define alox_AccelDeadzoneResponse_fields &alox_AccelDeadzoneResponse_msg
|
||||
#define alox_AccelStreamRequest_fields &alox_AccelStreamRequest_msg
|
||||
#define alox_AccelStreamResponse_fields &alox_AccelStreamResponse_msg
|
||||
#define alox_InputSendModeRequest_fields &alox_InputSendModeRequest_msg
|
||||
#define alox_InputSendModeResponse_fields &alox_InputSendModeResponse_msg
|
||||
#define alox_BatteryStatusRequest_fields &alox_BatteryStatusRequest_msg
|
||||
#define alox_LipoReading_fields &alox_LipoReading_msg
|
||||
#define alox_BatterySample_fields &alox_BatterySample_msg
|
||||
@@ -1433,6 +1512,8 @@ extern const pb_msgdesc_t alox_OtaSlaveProgressResponse_msg;
|
||||
#define alox_EspNowFindMeResponse_size 8
|
||||
#define alox_EspNowUnicastTestRequest_size 12
|
||||
#define alox_EspNowUnicastTestResponse_size 8
|
||||
#define alox_InputSendModeRequest_size 12
|
||||
#define alox_InputSendModeResponse_size 16
|
||||
#define alox_LedRingProgressRequest_size 64
|
||||
#define alox_LedRingProgressResponse_size 32
|
||||
#define alox_LipoReading_size 8
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user