More debugging

This commit is contained in:
Gregor Riepl 2021-01-31 18:41:50 +01:00
parent 680b9d48c2
commit c5eab4ce6d

View file

@ -113,14 +113,17 @@ func (c *Can) ActiveDispenser() int {
}
func (c *Can) Dispense(slot int) error {
log.Printf("Starting dispense on slot %d", slot)
return c.bus.Publish(DispenseMessage{slot}.Encode())
}
func (c *Can) Cancel() error {
log.Printf("Stopping dispense")
return c.bus.Publish(DispenseMessage{DispenseSlotOff}.Encode())
}
func (c *Can) initialize() {
log.Printf("Initializing")
// enable automatic status updates
c.bus.Publish(AutoMessage{true}.Encode())
c.bus.Publish(RequestFeedbackMessage())