GetPlanGoal returns the plan goal in %, true or kWh, false
()
| 93 | |
| 94 | // GetPlanGoal returns the plan goal in %, true or kWh, false |
| 95 | func (lp *Loadpoint) GetPlanGoal() (float64, bool) { |
| 96 | lp.RLock() |
| 97 | defer lp.RUnlock() |
| 98 | |
| 99 | if lp.socBasedPlanning() { |
| 100 | _, soc, _ := lp.nextVehiclePlan() |
| 101 | return float64(soc), true |
| 102 | } |
| 103 | |
| 104 | _, limit := lp.getPlanEnergy() |
| 105 | return limit, false |
| 106 | } |
| 107 | |
| 108 | // GetPlan creates a charging plan for given time and duration |
| 109 | // The plan is sorted by time |
no test coverage detected