SetEnableThreshold sets loadpoint enable threshold
(threshold float64)
| 528 | |
| 529 | // SetEnableThreshold sets loadpoint enable threshold |
| 530 | func (lp *Loadpoint) SetEnableThreshold(threshold float64) { |
| 531 | lp.Lock() |
| 532 | defer lp.Unlock() |
| 533 | |
| 534 | lp.log.DEBUG.Println("set enable threshold:", threshold) |
| 535 | |
| 536 | if lp.Enable.Threshold != threshold { |
| 537 | lp.Enable.Threshold = threshold |
| 538 | // TODO reduce APIs |
| 539 | lp.setThresholds(loadpoint.ThresholdsConfig{ |
| 540 | Enable: lp.Enable, |
| 541 | Disable: lp.Disable, |
| 542 | }) |
| 543 | } |
| 544 | } |
| 545 | |
| 546 | // GetDisableThreshold gets the loadpoint enable threshold |
| 547 | func (lp *Loadpoint) GetDisableThreshold() float64 { |
nothing calls this directly
no test coverage detected