Add new feature status mappings and update run time validation in vehicle functions
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 23s
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 23s
This commit is contained in:
@ -161,6 +161,12 @@ var features = map[string]string{
|
|||||||
"RCC": "Remote Climate Control",
|
"RCC": "Remote Climate Control",
|
||||||
"ACCS": "Adaptive Cruise Control",
|
"ACCS": "Adaptive Cruise Control",
|
||||||
"SXM360L": "SiriusXM with 360L",
|
"SXM360L": "SiriusXM with 360L",
|
||||||
|
"WDWSTAT": "Window Status",
|
||||||
|
"MOONSTAT": "Moonroof Status",
|
||||||
|
"RTGU": "Remote Trunk / Rear Gate Unlock",
|
||||||
|
"RVFS": "Remote Vehicle Find System",
|
||||||
|
"TLD": "Tire Pressure Low Detection",
|
||||||
|
"DOOR_LU_STAT": "Door Lock/Unlock Status",
|
||||||
}
|
}
|
||||||
|
|
||||||
var troubles = map[string]string{
|
var troubles = map[string]string{
|
||||||
|
14
vehicle.go
14
vehicle.go
@ -202,8 +202,8 @@ func (v *Vehicle) Unlock() (chan string, error) {
|
|||||||
// EngineStart
|
// EngineStart
|
||||||
// Sends a command to start engine and set climate control.
|
// Sends a command to start engine and set climate control.
|
||||||
func (v *Vehicle) EngineStart(run, delay int, horn bool) (chan string, error) {
|
func (v *Vehicle) EngineStart(run, delay int, horn bool) (chan string, error) {
|
||||||
if run < 1 || run > 10 {
|
if slices.Contains([]int{0, 1, 5, 10}, run) {
|
||||||
return nil, errors.New("run time must be between 1 and 10 minutes")
|
return nil, errors.New("run time must be 0, 1, 5 or 10 minutes")
|
||||||
}
|
}
|
||||||
|
|
||||||
var startConfig string
|
var startConfig string
|
||||||
@ -542,16 +542,6 @@ func (v *Vehicle) UpdateClimateQuickPresets() error {
|
|||||||
"outerAirCirculation": "outsideAir", // outsideAir | recirculation
|
"outerAirCirculation": "outsideAir", // outsideAir | recirculation
|
||||||
"airConditionOn": "false", // boolean
|
"airConditionOn": "false", // boolean
|
||||||
"startConfiguration": "START_ENGINE_ALLOW_KEY_IN_IGNITION", // START_ENGINE_ALLOW_KEY_IN_IGNITION | ONLY FOR PHEV > START_CLIMATE_CONTROL_ONLY_ALLOW_KEY_IN_IGNITION
|
"startConfiguration": "START_ENGINE_ALLOW_KEY_IN_IGNITION", // START_ENGINE_ALLOW_KEY_IN_IGNITION | ONLY FOR PHEV > START_CLIMATE_CONTROL_ONLY_ALLOW_KEY_IN_IGNITION
|
||||||
|
|
||||||
// "presetType": "userPreset",
|
|
||||||
// "climateZoneFrontTemp": "65",
|
|
||||||
// "climateZoneFrontAirMode": "FEET_FACE_BALANCED",
|
|
||||||
// "climateZoneFrontAirVolume": "5",
|
|
||||||
// "outerAirCirculation": "outsideAir",
|
|
||||||
// "heatedRearWindowActive": "false",
|
|
||||||
// "heatedSeatFrontLeft": "HIGH_COOL",
|
|
||||||
// "airConditionOn": "false",
|
|
||||||
// "startConfiguration": "START_ENGINE_ALLOW_KEY_IN_IGNITION",
|
|
||||||
}
|
}
|
||||||
reqUrl := MOBILE_API_VERSION + apiURLs["API_G2_SAVE_RES_QUICK_START_SETTINGS"]
|
reqUrl := MOBILE_API_VERSION + apiURLs["API_G2_SAVE_RES_QUICK_START_SETTINGS"]
|
||||||
resp, _ := v.client.execute(POST, reqUrl, params, true)
|
resp, _ := v.client.execute(POST, reqUrl, params, true)
|
||||||
|
Reference in New Issue
Block a user