fix?
This commit is contained in:
parent
a9c10c8332
commit
f66d5d3224
1 changed files with 4 additions and 3 deletions
|
@ -60,9 +60,10 @@ func (r *Radar) decodeInput(buf []byte) {
|
|||
valid = "yes"
|
||||
}
|
||||
log.Printf("Speed: %dkm/h (%s, Over: %s, Valid: %s)", buf[3], dir, overspeed, valid)
|
||||
r.speedHandler(int(buf[3]))
|
||||
if overspeed == "yes" && valid == "yes" {
|
||||
|
||||
if r.speedHandler != nil {
|
||||
r.speedHandler(int(buf[3]))
|
||||
}
|
||||
if overspeed == "yes" && valid == "yes" && r.handler != nil {
|
||||
r.handler(int(buf[3]))
|
||||
}
|
||||
return
|
||||
|
|
Loading…
Add table
Reference in a new issue