More debugging
This commit is contained in:
parent
680b9d48c2
commit
c5eab4ce6d
1 changed files with 3 additions and 0 deletions
|
@ -113,14 +113,17 @@ func (c *Can) ActiveDispenser() int {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Can) Dispense(slot int) error {
|
func (c *Can) Dispense(slot int) error {
|
||||||
|
log.Printf("Starting dispense on slot %d", slot)
|
||||||
return c.bus.Publish(DispenseMessage{slot}.Encode())
|
return c.bus.Publish(DispenseMessage{slot}.Encode())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Can) Cancel() error {
|
func (c *Can) Cancel() error {
|
||||||
|
log.Printf("Stopping dispense")
|
||||||
return c.bus.Publish(DispenseMessage{DispenseSlotOff}.Encode())
|
return c.bus.Publish(DispenseMessage{DispenseSlotOff}.Encode())
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *Can) initialize() {
|
func (c *Can) initialize() {
|
||||||
|
log.Printf("Initializing")
|
||||||
// enable automatic status updates
|
// enable automatic status updates
|
||||||
c.bus.Publish(AutoMessage{true}.Encode())
|
c.bus.Publish(AutoMessage{true}.Encode())
|
||||||
c.bus.Publish(RequestFeedbackMessage())
|
c.bus.Publish(RequestFeedbackMessage())
|
||||||
|
|
Loading…
Reference in a new issue