MCPcopy Create free account
hub / github.com/evcc-io/evcc / GetPlanGoal

Method GetPlanGoal

core/loadpoint_plan.go:95–106  ·  view source on GitHub ↗

GetPlanGoal returns the plan goal in %, true or kWh, false

()

Source from the content-addressed store, hash-verified

93
94// GetPlanGoal returns the plan goal in %, true or kWh, false
95func (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

Callers 1

plannerActiveMethod · 0.95

Calls 5

RLockMethod · 0.95
RUnlockMethod · 0.95
socBasedPlanningMethod · 0.95
nextVehiclePlanMethod · 0.95
getPlanEnergyMethod · 0.95

Tested by

no test coverage detected