improved stuff

This commit is contained in:
henne 2025-08-09 13:45:56 +02:00
parent 0c74228b51
commit 94f0c7430e
No known key found for this signature in database

View file

@ -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
}