Add Go UART tool to query firmware VERSION over serial.
Framed protobuf client for /dev/ttyUSB0 at 921600 baud with generated uart_messages types matching the device protocol. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
# goTool
|
||||
|
||||
Host-side UART utilities for Powerpod.
|
||||
|
||||
## version command
|
||||
|
||||
Sends `MessageType.VERSION` (0x03) in a framed UART packet and prints the protobuf response.
|
||||
|
||||
```bash
|
||||
cd goTool
|
||||
go mod tidy
|
||||
go run . -port /dev/ttyUSB0
|
||||
```
|
||||
|
||||
Options:
|
||||
|
||||
- `-port` — serial device (required)
|
||||
- `-baud` — default `921600` (must match firmware)
|
||||
|
||||
## Regenerate protobuf
|
||||
|
||||
```bash
|
||||
protoc --go_out=./pb --go_opt=paths=source_relative \
|
||||
--go_opt=Muart_messages.proto=powerpod/gotool/pb \
|
||||
-I ../main/proto ../main/proto/uart_messages.proto
|
||||
```
|
||||
Reference in New Issue
Block a user