Skip to content

Commit

Permalink
mqtt-gateway v0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
stfnmllr committed Jan 4, 2023
1 parent 365cd04 commit e77fc54
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion internal/devices/cs.go
Original file line number Diff line number Diff line change
Expand Up @@ -413,7 +413,11 @@ func (cs *CS) setLocoSpeed(client *client.Client, addr uint, publish bool) gatew

func (cs *CS) stopLoco(client *client.Client, addr uint) gateway.HndFn {
return func(payload any) (any, error) {
return client.SetLocoSpeed128(addr, 1)
speed, err := client.SetLocoSpeed128(addr, 1) // emergency stop
if err != nil {
return nil, err
}
return speed128(speed).speed127(), nil // speed should be 0
}
}

Expand Down

0 comments on commit e77fc54

Please sign in to comment.