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:
Marcel Goerentz 2025-12-16 08:33:46 +01:00 • committed by GitHub
parent b6c3d55608
commit 38e86fe73d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 57 additions and 2 deletions

View file

@ -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
}