diff --git a/uncanny/can.go b/uncanny/can.go index 6322360..5fbdaf1 100644 --- a/uncanny/can.go +++ b/uncanny/can.go @@ -40,6 +40,7 @@ func (c *Can) Stop() { } func (c *Can) Handle(frame can.Frame) { + log.Printf("Got CAN frame to 0x%08x", frame.ID) typ, obj, err := DecodeMessage(frame) if err != nil { if err == UnsupportedMessageType { @@ -50,14 +51,17 @@ func (c *Can) Handle(frame can.Frame) { } else { switch typ { case MessageTypeFeedback: + log.Printf("Got feedback message: %+v", obj.(FeedbackMessage)) c.swstate = obj.(FeedbackMessage) case MessageTypeFeedbackRequest: // ignore case MessageTypePower: + log.Printf("Got power message: %+v", obj.(PowerMessage)) // ignore case MessageTypePowerRequest: // ignore case MessageTypeDispense: + log.Printf("Got dispense message: %+v", obj.(DispenseMessage)) c.dispstate = obj.(DispenseMessage).Slot case MessageTypeAuto: // ignore