Skip to content

Commit

Permalink
Planner: validate vehicle is actually connected
Browse files Browse the repository at this point in the history
  • Loading branch information
andig committed Jan 23, 2025
1 parent 1d0ee82 commit 3bccab4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/loadpoint_plan.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3bccab4

Please sign in to comment.