Add UART ACCEL_READ command for on-demand BMA456 samples.
Expose MessageType 24 with protobuf response (success, x, y, z in raw LSB), firmware handler with mutex-safe I2C read, goTool `accel` CLI, and docs. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -22,6 +22,7 @@ enum MessageType {
|
||||
OTA_SLAVE_PROGRESS = 21;
|
||||
FIND_ME = 22;
|
||||
RESTART = 23;
|
||||
ACCEL_READ = 24;
|
||||
}
|
||||
|
||||
message UartMessage {
|
||||
@@ -48,6 +49,8 @@ message UartMessage {
|
||||
EspNowFindMeResponse espnow_find_me_response = 20;
|
||||
RestartRequest restart_request = 21;
|
||||
RestartResponse restart_response = 22;
|
||||
AccelReadRequest accel_read_request = 23;
|
||||
AccelReadResponse accel_read_response = 24;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -106,6 +109,16 @@ message AccelDeadzoneResponse {
|
||||
uint32 slaves_updated = 4;
|
||||
}
|
||||
|
||||
// Host → device: read current BMA456 accelerometer sample (raw LSB, ±2g range).
|
||||
message AccelReadRequest {}
|
||||
|
||||
message AccelReadResponse {
|
||||
bool success = 1;
|
||||
sint32 x = 2;
|
||||
sint32 y = 3;
|
||||
sint32 z = 4;
|
||||
}
|
||||
|
||||
message EspNowUnicastTestRequest {
|
||||
uint32 client_id = 1;
|
||||
uint32 seq = 2;
|
||||
|
||||
Reference in New Issue
Block a user