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

Method SetDisableThreshold

core/loadpoint_api.go:554–568  ·  view source on GitHub ↗

SetDisableThreshold sets loadpoint disable threshold

(threshold float64)

Source from the content-addressed store, hash-verified

552
553// SetDisableThreshold sets loadpoint disable threshold
554func (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
571func (lp *Loadpoint) GetEnableDelay() time.Duration {

Callers

nothing calls this directly

Calls 4

LockMethod · 0.95
UnlockMethod · 0.95
setThresholdsMethod · 0.95
PrintlnMethod · 0.80

Tested by

no test coverage detected