setPlanActive updates plan active flag
(active bool)
| 44 | |
| 45 | // setPlanActive updates plan active flag |
| 46 | func (lp *Loadpoint) setPlanActive(active bool) { |
| 47 | if !active { |
| 48 | lp.planOverrunSent = false |
| 49 | lp.planSlotEnd = time.Time{} |
| 50 | lp.clearPlanLock() |
| 51 | } |
| 52 | if lp.planActive != active { |
| 53 | lp.planActive = active |
| 54 | lp.publish(keys.PlanActive, lp.planActive) |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | // finishPlan deletes the charging plan, either loadpoint or vehicle |
| 59 | func (lp *Loadpoint) finishPlan() { |
no test coverage detected