SetLimitSoc sets the session soc limit
(soc int)
| 303 | |
| 304 | // SetLimitSoc sets the session soc limit |
| 305 | func (lp *Loadpoint) SetLimitSoc(soc int) { |
| 306 | lp.Lock() |
| 307 | defer lp.Unlock() |
| 308 | |
| 309 | lp.log.DEBUG.Println("set session soc limit:", soc) |
| 310 | |
| 311 | // apply immediately |
| 312 | if lp.limitSoc != soc { |
| 313 | lp.setLimitSoc(soc) |
| 314 | lp.requestUpdate() |
| 315 | } |
| 316 | } |
| 317 | |
| 318 | // GetLimitEnergy returns the session limit energy |
| 319 | func (lp *Loadpoint) GetLimitEnergy() float64 { |
no test coverage detected