Apply now and off modes immediately (#108)
This commit is contained in:
parent
4dd1c46497
commit
01ef46d47e
1 changed files with 4 additions and 0 deletions
|
|
@ -451,8 +451,12 @@ func (lp *LoadPoint) update() {
|
|||
// execute loading strategy
|
||||
switch mode := lp.GetMode(); mode {
|
||||
case api.ModeOff:
|
||||
// apply immediately
|
||||
lp.guardUpdated = lp.clock.Now()
|
||||
err = lp.rampOff()
|
||||
case api.ModeNow:
|
||||
// apply immediately
|
||||
lp.guardUpdated = lp.clock.Now()
|
||||
// ensure that new connections happen at min current
|
||||
current := lp.MinCurrent
|
||||
if lp.connected() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue