Add accelerometer deadzone via UART and ESP-NOW.
Filter BMA456 logs by configurable LSB threshold; master can set deadzone for local sensor or slaves using ACCEL_DEADZONE (UART) and ESP-NOW broadcast until unicast delivery is restored. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -9,6 +9,7 @@ enum MessageType {
|
||||
VERSION = 3;
|
||||
CLIENT_INFO = 4;
|
||||
CLIENT_INPUT = 5;
|
||||
ACCEL_DEADZONE = 6;
|
||||
OTA_START = 16;
|
||||
OTA_PAYLOAD = 17;
|
||||
OTA_END = 18;
|
||||
@@ -28,6 +29,8 @@ message UartMessage {
|
||||
OtaPayload ota_payload = 8;
|
||||
OtaEndPayload ota_end = 9;
|
||||
OtaStatusPayload ota_status = 10;
|
||||
AccelDeadzoneRequest accel_deadzone_request = 11;
|
||||
AccelDeadzoneResponse accel_deadzone_response = 12;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,6 +70,23 @@ message ClientInputResponse {
|
||||
repeated ClientInput clients = 1;
|
||||
}
|
||||
|
||||
// write=false: read deadzone; write=true: apply deadzone (LSB per axis, raw accel units).
|
||||
// client_id 0 = local BMA456 on this node; >0 = slave id on master; ignored on slave.
|
||||
// all_clients = true (master only): push deadzone to every registered slave via ESP-NOW.
|
||||
message AccelDeadzoneRequest {
|
||||
bool write = 1;
|
||||
uint32 deadzone = 2;
|
||||
uint32 client_id = 3;
|
||||
bool all_clients = 4;
|
||||
}
|
||||
|
||||
message AccelDeadzoneResponse {
|
||||
uint32 deadzone = 1;
|
||||
uint32 client_id = 2;
|
||||
bool success = 3;
|
||||
uint32 slaves_updated = 4;
|
||||
}
|
||||
|
||||
message OtaStartPayload {
|
||||
uint32 total_size = 1;
|
||||
uint32 block_size = 2;
|
||||
|
||||
Reference in New Issue
Block a user