Starting work on the Climate Profiles
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 23s

This commit is contained in:
2025-05-29 13:45:14 -04:00
parent ed2495ee5c
commit d642b957d8
2 changed files with 8 additions and 7 deletions

View File

@ -356,9 +356,8 @@ func (c *Client) GetVehicles() []*Vehicle {
} }
vehicle.GetVehicleStatus() vehicle.GetVehicleStatus()
vehicle.GetVehicleCondition() vehicle.GetVehicleCondition()
// TODO: Temporary disabled for getting successful testing results vehicle.GetClimatePresets()
// vehicle.GetClimatePresets() vehicle.GetClimateUserPresets()
// vehicle.GetClimateUserPresets()
vehicles = append(vehicles, vehicle) vehicles = append(vehicles, vehicle)
} }
@ -410,9 +409,8 @@ func (c *Client) GetVehicleByVIN(vin string) *Vehicle {
vehicle.ClimateProfiles = make(map[string]ClimateProfile) vehicle.ClimateProfiles = make(map[string]ClimateProfile)
vehicle.GetVehicleStatus() vehicle.GetVehicleStatus()
vehicle.GetVehicleCondition() vehicle.GetVehicleCondition()
// TODO: Temporary disabled for getting successful testing results vehicle.GetClimatePresets()
// vehicle.GetClimatePresets() vehicle.GetClimateUserPresets()
// vehicle.GetClimateUserPresets()
} }
return vehicle return vehicle

View File

@ -159,7 +159,8 @@ func (v *Vehicle) String() string {
vString += "Miles: " + strconv.Itoa(v.DistanceToEmpty.Miles) + "\n" vString += "Miles: " + strconv.Itoa(v.DistanceToEmpty.Miles) + "\n"
vString += "Kilometers: " + strconv.Itoa(v.DistanceToEmpty.Kilometers) + "\n" vString += "Kilometers: " + strconv.Itoa(v.DistanceToEmpty.Kilometers) + "\n"
vString += "=== FUEL CONSUMPTION =====================\n" vString += "=== FUEL =============================\n"
vString += "Tank (%): " + fmt.Sprintf("%v", v.DistanceToEmpty.Percentage) + "\n"
vString += "MPG: " + fmt.Sprintf("%v", v.FuelConsumptionAvg.MPG) + "\n" vString += "MPG: " + fmt.Sprintf("%v", v.FuelConsumptionAvg.MPG) + "\n"
vString += "Litres per 100 km: " + fmt.Sprintf("%v", v.FuelConsumptionAvg.LP100Km) + "\n" vString += "Litres per 100 km: " + fmt.Sprintf("%v", v.FuelConsumptionAvg.LP100Km) + "\n"
@ -443,6 +444,7 @@ func (v *Vehicle) GetClimateQuickPresets() {
// ONLY FOR THAT REQUEST BECAUSE OF API SENDS BACK ESCAPING DATA IN DATA FIELD // ONLY FOR THAT REQUEST BECAUSE OF API SENDS BACK ESCAPING DATA IN DATA FIELD
data, ok := respParsed.Path("data").Data().(string) data, ok := respParsed.Path("data").Data().(string)
// rawIn := json.RawMessage(in) // rawIn := json.RawMessage(in)
// bytes, err := rawIn.MarshalJSON() // bytes, err := rawIn.MarshalJSON()
// if err != nil { // if err != nil {
@ -569,6 +571,7 @@ func (v *Vehicle) GetVehicleStatus() {
v.GeoLocation.Latitude = float64(vSta.Latitude) v.GeoLocation.Latitude = float64(vSta.Latitude)
v.GeoLocation.Longitude = float64(vSta.Longitude) v.GeoLocation.Longitude = float64(vSta.Longitude)
v.GeoLocation.Heading = vSta.Heading
re := regexp.MustCompile(`[A-Z][^A-Z]*`) re := regexp.MustCompile(`[A-Z][^A-Z]*`)