SetDisableThreshold sets loadpoint disable threshold
(threshold float64)
| 552 | |
| 553 | // SetDisableThreshold sets loadpoint disable threshold |
| 554 | func (lp *Loadpoint) SetDisableThreshold(threshold float64) { |
| 555 | lp.Lock() |
| 556 | defer lp.Unlock() |
| 557 | |
| 558 | lp.log.DEBUG.Println("set disable threshold:", threshold) |
| 559 | |
| 560 | if lp.Disable.Threshold != threshold { |
| 561 | lp.Disable.Threshold = threshold |
| 562 | // TODO reduce APIs |
| 563 | lp.setThresholds(loadpoint.ThresholdsConfig{ |
| 564 | Enable: lp.Enable, |
| 565 | Disable: lp.Disable, |
| 566 | }) |
| 567 | } |
| 568 | } |
| 569 | |
| 570 | // GetEnableDelay gets the loadpoint enable delay |
| 571 | func (lp *Loadpoint) GetEnableDelay() time.Duration { |
nothing calls this directly
no test coverage detected