RCT: add holdcharge battery mode (#31041)
This commit is contained in:
parent
dfe3208c82
commit
ce9027aba5
1 changed files with 21 additions and 0 deletions
21
meter/rct.go
21
meter/rct.go
|
|
@ -188,6 +188,10 @@ func NewRCT(ctx context.Context, uri, usage string, batterySocLimits batterySocL
|
|||
return m.conn.Write(rct.BatterySoCTargetMin, floatVal(batterySocLimits.MinSoc/100))
|
||||
})
|
||||
|
||||
eg.Go(func() error {
|
||||
return m.conn.Write(rct.PowerMngSocMax, floatVal(batterySocLimits.MaxSoc/100))
|
||||
})
|
||||
|
||||
eg.Go(func() error {
|
||||
return m.conn.Write(rct.PowerMngBatteryPowerExternW, floatVal(0))
|
||||
})
|
||||
|
|
@ -197,6 +201,10 @@ func NewRCT(ctx context.Context, uri, usage string, batterySocLimits batterySocL
|
|||
return m.conn.Write(rct.PowerMngSocStrategy, []byte{rct.SOCTargetInternal})
|
||||
})
|
||||
|
||||
eg.Go(func() error {
|
||||
return m.conn.Write(rct.PowerMngSocMax, floatVal(batterySocLimits.MaxSoc/100))
|
||||
})
|
||||
|
||||
eg.Go(func() error {
|
||||
return m.conn.Write(rct.BatterySoCTargetMin, floatVal(batterySocLimits.MaxSoc/100))
|
||||
})
|
||||
|
|
@ -214,6 +222,19 @@ func NewRCT(ctx context.Context, uri, usage string, batterySocLimits batterySocL
|
|||
return m.conn.Write(rct.PowerMngSocStrategy, []byte{rct.SOCTargetExternal})
|
||||
})
|
||||
|
||||
case api.BatteryHoldCharge:
|
||||
eg.Go(func() error {
|
||||
return m.conn.Write(rct.PowerMngSocStrategy, []byte{rct.SOCTargetInternal})
|
||||
})
|
||||
|
||||
eg.Go(func() error {
|
||||
return m.conn.Write(rct.BatterySoCTargetMin, floatVal(batterySocLimits.MinSoc/100))
|
||||
})
|
||||
|
||||
eg.Go(func() error {
|
||||
return m.conn.Write(rct.PowerMngSocMax, floatVal(batterySocLimits.MinSoc/100))
|
||||
})
|
||||
|
||||
default:
|
||||
return api.ErrNotAvailable
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue