From efaac3c7d66662651400a166aaffc6e50ab60c78 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 28 Dec 2016 15:24:11 +0100 Subject: Add reversed messages --- protocol2.go | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 protocol2.go diff --git a/protocol2.go b/protocol2.go new file mode 100644 index 0000000..e9ea377 --- /dev/null +++ b/protocol2.go @@ -0,0 +1,31 @@ +package anki + +const ( + VehicleMsgV2CSpeedUpdate = 0x36 + VehicleMsgV2CStatusUpdate = 0x3f + VehicleMsgV2CCollisionDetected = 0x4d +) + +type VehicleMsgSpeedUpdate struct { + Size uint8 + MsgID uint8 + DesiredSpeed uint16 + Accel uint16 + CurrentSpeed uint16 +} + +type VehicleMsgStatusUpdate struct { + Size uint8 + MsgID uint8 + IsOnTrack uint8 + IsOnCharger uint8 + HasLowBattery uint8 + HasChargedBattery uint8 +} + +type VehicleMsgCollisionDetected struct { + Size uint8 + MsgID uint8 + WasSideOnCollision uint8 + WasFrontBackCollision uint8 +} -- cgit v1.2.3