improved stuff
This commit is contained in:
parent
0c74228b51
commit
94f0c7430e
1 changed files with 6 additions and 2 deletions
|
@ -65,8 +65,12 @@ func (r *Radar) decodeInput(buf []byte) {
|
|||
} else {
|
||||
log.Printf("speedhandler = nil")
|
||||
}
|
||||
if overspeed == "yes" && valid == "yes" && r.handler != nil {
|
||||
r.handler(int(buf[3]))
|
||||
if r.handler != nil {
|
||||
if overspeed == "yes" && valid == "yes" {
|
||||
r.handler(int(buf[3]))
|
||||
}
|
||||
} else {
|
||||
log.Printf("eventhandler = nil")
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue