Alphan version
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 25s
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 25s
This commit is contained in:
93
vehicle.go
93
vehicle.go
@ -10,29 +10,29 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
var parts = map[string]map[string][]string{
|
||||
"door": {
|
||||
"suffix": {"position", "status"},
|
||||
"position1": {"front", "rear", "boot", "enginehood"},
|
||||
"position2": {"right", "left"},
|
||||
},
|
||||
"window": {
|
||||
"suffix": {"status"},
|
||||
"position1": {"front", "rear", "sunroof"},
|
||||
"position2": {"right", "left"},
|
||||
},
|
||||
"tire": {
|
||||
"prefix": {"status"},
|
||||
"position1": {"front", "rear"},
|
||||
"position2": {"right", "left"},
|
||||
},
|
||||
"tyre": {
|
||||
"prefix": {"pressure"},
|
||||
"suffix": {"psi", "unit"},
|
||||
"position1": {"front", "rear"},
|
||||
"position2": {"right", "left"},
|
||||
},
|
||||
}
|
||||
// var parts = map[string]map[string][]string{
|
||||
// "door": {
|
||||
// "suffix": {"position", "status"},
|
||||
// "position1": {"front", "rear", "boot", "enginehood"},
|
||||
// "position2": {"right", "left"},
|
||||
// },
|
||||
// "window": {
|
||||
// "suffix": {"status"},
|
||||
// "position1": {"front", "rear", "sunroof"},
|
||||
// "position2": {"right", "left"},
|
||||
// },
|
||||
// "tire": {
|
||||
// "prefix": {"status"},
|
||||
// "position1": {"front", "rear"},
|
||||
// "position2": {"right", "left"},
|
||||
// },
|
||||
// "tyre": {
|
||||
// "prefix": {"pressure"},
|
||||
// "suffix": {"psi", "unit"},
|
||||
// "position1": {"front", "rear"},
|
||||
// "position2": {"right", "left"},
|
||||
// },
|
||||
// }
|
||||
|
||||
// Vehicle .
|
||||
type Vehicle struct {
|
||||
@ -618,7 +618,6 @@ func (v *Vehicle) GetVehicleStatus() {
|
||||
val.Field(i).Interface() == "" ||
|
||||
val.Field(i).Interface() == 0 ||
|
||||
val.Field(i).Interface() == float64(0) ||
|
||||
(val.Field(i).Interface() == 101 && typeOfS.Field(i).Name == "RemainingFuelPercent") ||
|
||||
val.Field(i).Interface() == nil {
|
||||
continue
|
||||
}
|
||||
@ -976,9 +975,9 @@ func (v *Vehicle) getAPIGen() string {
|
||||
|
||||
// isPINRequired .
|
||||
// Return if a vehicle with an active remote service subscription exists.
|
||||
func (v *Vehicle) isPINRequired() bool {
|
||||
return v.getRemoteOptionsStatus()
|
||||
}
|
||||
// func (v *Vehicle) isPINRequired() bool {
|
||||
// return v.getRemoteOptionsStatus()
|
||||
// }
|
||||
|
||||
// isEV .
|
||||
// Get whether the specified VIN is an Electric Vehicle.
|
||||
@ -992,29 +991,29 @@ func (v *Vehicle) getRemoteOptionsStatus() bool {
|
||||
return contains(v.SubscriptionFeatures, FEATURE_REMOTE)
|
||||
}
|
||||
|
||||
// getRemoteStartStatus .
|
||||
// Get whether the specified VIN has remote engine start service available.
|
||||
func (v *Vehicle) getRemoteStartStatus() bool {
|
||||
return contains(v.Features, FEATURE_REMOTE_START)
|
||||
}
|
||||
// // getRemoteStartStatus .
|
||||
// // Get whether the specified VIN has remote engine start service available.
|
||||
// func (v *Vehicle) getRemoteStartStatus() bool {
|
||||
// return contains(v.Features, FEATURE_REMOTE_START)
|
||||
// }
|
||||
|
||||
// getSafetyStatus .
|
||||
// Get whether the specified VIN is has an active Starlink Safety Plus service plan.
|
||||
func (v *Vehicle) getSafetyStatus() bool {
|
||||
return contains(v.SubscriptionFeatures, FEATURE_SAFETY)
|
||||
}
|
||||
// // getSafetyStatus .
|
||||
// // Get whether the specified VIN is has an active Starlink Safety Plus service plan.
|
||||
// func (v *Vehicle) getSafetyStatus() bool {
|
||||
// return contains(v.SubscriptionFeatures, FEATURE_SAFETY)
|
||||
// }
|
||||
|
||||
// getSubscriptionStatus .
|
||||
// Get whether the specified VIN has an active service plan.
|
||||
func (v *Vehicle) getSubscriptionStatus() bool {
|
||||
return contains(v.SubscriptionFeatures, FEATURE_ACTIVE)
|
||||
}
|
||||
// // getSubscriptionStatus .
|
||||
// // Get whether the specified VIN has an active service plan.
|
||||
// func (v *Vehicle) getSubscriptionStatus() bool {
|
||||
// return contains(v.SubscriptionFeatures, FEATURE_ACTIVE)
|
||||
// }
|
||||
|
||||
// getVehicleName .
|
||||
// Get the nickname of a specified VIN.
|
||||
func (v *Vehicle) getVehicleName() string {
|
||||
return v.CarName
|
||||
}
|
||||
// // getVehicleName .
|
||||
// // Get the nickname of a specified VIN.
|
||||
// func (v *Vehicle) getVehicleName() string {
|
||||
// return v.CarName
|
||||
// }
|
||||
|
||||
// func getClimateData() {}
|
||||
// func saveClimateSettings() {}
|
||||
|
Reference in New Issue
Block a user