Vehicles: add maximum power, improves planner (#25303)
Signed-off-by: Marcel Goerentz <m.goerentz@t-online.de> Co-authored-by: Michael Geers <michael@geers.tv>
This commit is contained in:
parent
b6c3d55608
commit
38e86fe73d
8 changed files with 57 additions and 2 deletions
|
|
@ -13,6 +13,7 @@ type ActionConfig struct {
|
|||
Priority int `mapstructure:"priority,omitempty"` // Priority
|
||||
MinCurrent float64 `mapstructure:"minCurrent,omitempty"` // Minimum Current
|
||||
MaxCurrent float64 `mapstructure:"maxCurrent,omitempty"` // Maximum Current
|
||||
MaxPower float64 `mapstructure:"maxPower,omitempty"` // Maximum Charging Power
|
||||
}
|
||||
|
||||
// String implements Stringer and returns the ActionConfig as comma-separated key:value string
|
||||
|
|
@ -38,6 +39,10 @@ func (a ActionConfig) GetMaxCurrent() (float64, bool) {
|
|||
return a.MaxCurrent, a.MaxCurrent > 0
|
||||
}
|
||||
|
||||
func (a ActionConfig) GetMaxPower() (float64, bool) {
|
||||
return a.MaxPower, a.MaxPower > 0
|
||||
}
|
||||
|
||||
func (a ActionConfig) GetPriority() (int, bool) {
|
||||
return a.Priority, a.Priority > 0
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue