Planner: remove expired plan when vehicle disconnects (#15160)
This commit is contained in:
parent
101d62a133
commit
4f0739f2bb
1 changed files with 3 additions and 1 deletions
|
|
@ -100,7 +100,9 @@ func (lp *Loadpoint) plannerActive() (active bool) {
|
|||
if planTime.IsZero() {
|
||||
return false
|
||||
}
|
||||
if lp.clock.Until(planTime) < 0 && !lp.planActive {
|
||||
// keep overrunning plans as long as a vehicle is connected
|
||||
if lp.clock.Until(planTime) < 0 && (!lp.planActive || !lp.connected()) {
|
||||
lp.log.DEBUG.Println("plan: deleting expired plan")
|
||||
lp.deletePlan()
|
||||
return false
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue