Vehicle: add autodetectdisabled feature (#30941)
This commit is contained in:
parent
95868686a0
commit
1056e85af2
6 changed files with 40 additions and 19 deletions
|
|
@ -4,17 +4,18 @@ type Feature int
|
|||
|
||||
//go:generate go tool enumer -type Feature -text
|
||||
const (
|
||||
_ Feature = iota
|
||||
CoarseCurrent // charger
|
||||
IntegratedDevice // charger - always connected - no vehicle, no charging sessions
|
||||
SwitchDevice // charger - no current control - heat pumps or switch sockets
|
||||
Heating // charger - heating device - soc ist temperature (°C)
|
||||
Continuous // charger - heating device where disabled means "normal operation"
|
||||
Average // tariff
|
||||
Cacheable // tariff
|
||||
Offline // vehicle
|
||||
Retryable // vehicle
|
||||
Streaming // vehicle
|
||||
WelcomeCharge // vehicle
|
||||
ClimaterDisabled // vehicle - ignore climater state for charge control
|
||||
_ Feature = iota
|
||||
CoarseCurrent // charger
|
||||
IntegratedDevice // charger - always connected - no vehicle, no charging sessions
|
||||
SwitchDevice // charger - no current control - heat pumps or switch sockets
|
||||
Heating // charger - heating device - soc ist temperature (°C)
|
||||
Continuous // charger - heating device where disabled means "normal operation"
|
||||
Average // tariff
|
||||
Cacheable // tariff
|
||||
Offline // vehicle
|
||||
Retryable // vehicle
|
||||
Streaming // vehicle
|
||||
WelcomeCharge // vehicle
|
||||
ClimaterDisabled // vehicle - ignore climater state for charge control
|
||||
AutodetectDisabled // vehicle - do not try to identify vehicle by status
|
||||
)
|
||||
|
|
|
|||
|
|
@ -7,11 +7,11 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
const _FeatureName = "CoarseCurrentIntegratedDeviceSwitchDeviceHeatingContinuousAverageCacheableOfflineRetryableStreamingWelcomeChargeClimaterDisabled"
|
||||
const _FeatureName = "CoarseCurrentIntegratedDeviceSwitchDeviceHeatingContinuousAverageCacheableOfflineRetryableStreamingWelcomeChargeClimaterDisabledAutodetectDisabled"
|
||||
|
||||
var _FeatureIndex = [...]uint8{0, 13, 29, 41, 48, 58, 65, 74, 81, 90, 99, 112, 128}
|
||||
var _FeatureIndex = [...]uint8{0, 13, 29, 41, 48, 58, 65, 74, 81, 90, 99, 112, 128, 146}
|
||||
|
||||
const _FeatureLowerName = "coarsecurrentintegrateddeviceswitchdeviceheatingcontinuousaveragecacheableofflineretryablestreamingwelcomechargeclimaterdisabled"
|
||||
const _FeatureLowerName = "coarsecurrentintegrateddeviceswitchdeviceheatingcontinuousaveragecacheableofflineretryablestreamingwelcomechargeclimaterdisabledautodetectdisabled"
|
||||
|
||||
func (i Feature) String() string {
|
||||
i -= 1
|
||||
|
|
@ -37,9 +37,10 @@ func _FeatureNoOp() {
|
|||
_ = x[Streaming-(10)]
|
||||
_ = x[WelcomeCharge-(11)]
|
||||
_ = x[ClimaterDisabled-(12)]
|
||||
_ = x[AutodetectDisabled-(13)]
|
||||
}
|
||||
|
||||
var _FeatureValues = []Feature{CoarseCurrent, IntegratedDevice, SwitchDevice, Heating, Continuous, Average, Cacheable, Offline, Retryable, Streaming, WelcomeCharge, ClimaterDisabled}
|
||||
var _FeatureValues = []Feature{CoarseCurrent, IntegratedDevice, SwitchDevice, Heating, Continuous, Average, Cacheable, Offline, Retryable, Streaming, WelcomeCharge, ClimaterDisabled, AutodetectDisabled}
|
||||
|
||||
var _FeatureNameToValueMap = map[string]Feature{
|
||||
_FeatureName[0:13]: CoarseCurrent,
|
||||
|
|
@ -66,6 +67,8 @@ var _FeatureNameToValueMap = map[string]Feature{
|
|||
_FeatureLowerName[99:112]: WelcomeCharge,
|
||||
_FeatureName[112:128]: ClimaterDisabled,
|
||||
_FeatureLowerName[112:128]: ClimaterDisabled,
|
||||
_FeatureName[128:146]: AutodetectDisabled,
|
||||
_FeatureLowerName[128:146]: AutodetectDisabled,
|
||||
}
|
||||
|
||||
var _FeatureNames = []string{
|
||||
|
|
@ -81,6 +84,7 @@ var _FeatureNames = []string{
|
|||
_FeatureName[90:99],
|
||||
_FeatureName[99:112],
|
||||
_FeatureName[112:128],
|
||||
_FeatureName[128:146],
|
||||
}
|
||||
|
||||
// FeatureString retrieves an enum value from the enum constants string name.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue