add some automation to pi side

This commit is contained in:
legop3
2025-11-11 21:04:04 -05:00
parent 3bc2921f25
commit 74a460a980
11 changed files with 278 additions and 17 deletions
+23
View File
@@ -0,0 +1,23 @@
package roverd
var (
defaultStreamPackets = []byte{100, 21, 34}
packetSizes = map[byte]int{
100: 80,
21: 1,
34: 1,
}
expectedPayloadLength = func() int {
sum := 0
for _, id := range defaultStreamPackets {
sum += 1 + packetSizes[id]
}
return sum
}()
)
type SensorSample struct {
Timestamp int64
ChargingState byte
ChargeSources byte
}