Planner: validate vehicle is actually connected
This commit is contained in:
parent
1d0ee82634
commit
3bccab48b3
1 changed files with 5 additions and 0 deletions
|
|
@ -98,6 +98,11 @@ func (lp *Loadpoint) plannerActive() (active bool) {
|
|||
lp.publish(keys.PlanOverrun, planOverrun)
|
||||
}()
|
||||
|
||||
// re-check since plannerActive() is called before conencted() check in Update()
|
||||
if !lp.connected() {
|
||||
return false
|
||||
}
|
||||
|
||||
planTime := lp.EffectivePlanTime()
|
||||
if planTime.IsZero() {
|
||||
return false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue