Add debug log ring buffer with timestamps, log CLI subcommand

This commit is contained in:
Ian Gulliver
2026-04-07 09:18:43 +09:00
parent ffcbaf0665
commit d215ddc6f2
12 changed files with 128 additions and 9 deletions

View File

@@ -13,6 +13,17 @@ type ResponseInfo struct {
FirmwareName string
}
type RequestLog struct{}
type LogEntry struct {
TimestampUS uint32
Message string
}
type ResponseLog struct {
Entries []LogEntry
}
type RequestTest struct {
Name string
}
@@ -44,6 +55,8 @@ func init() {
msgpack.RegisterExt(3, (*ResponsePICOBOOT)(nil))
msgpack.RegisterExt(4, (*RequestInfo)(nil))
msgpack.RegisterExt(5, (*ResponseInfo)(nil))
msgpack.RegisterExt(6, (*RequestLog)(nil))
msgpack.RegisterExt(7, (*ResponseLog)(nil))
msgpack.RegisterExt(127, (*RequestTest)(nil))
msgpack.RegisterExt(126, (*ResponseTest)(nil))
}