Upgraded resty to v3
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 24s
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 24s
This commit is contained in:
10
vehicle.go
10
vehicle.go
@ -919,7 +919,9 @@ func (v *Vehicle) GetVehicleStatus() {
|
||||
v.DistanceToEmpty.Kilometers = vSta.DistanceToEmptyFuelKilometers
|
||||
v.DistanceToEmpty.Miles10s = vSta.DistanceToEmptyFuelMiles10s
|
||||
v.DistanceToEmpty.Kilometers10s = vSta.DistanceToEmptyFuelKilometers10s
|
||||
v.DistanceToEmpty.Percentage = vSta.RemainingFuelPercent
|
||||
if vSta.RemainingFuelPercent >= 0 && vSta.RemainingFuelPercent <= 100 {
|
||||
v.DistanceToEmpty.Percentage = vSta.RemainingFuelPercent
|
||||
}
|
||||
v.FuelConsumptionAvg.MPG = float64(vSta.AvgFuelConsumptionMpg)
|
||||
v.FuelConsumptionAvg.LP100Km = float64(vSta.AvgFuelConsumptionLitersPer100Kilometers)
|
||||
|
||||
@ -940,11 +942,13 @@ func (v *Vehicle) GetVehicleStatus() {
|
||||
for _, element := range submatchall {
|
||||
fmt.Println(element)
|
||||
}
|
||||
|
||||
door := Door{}
|
||||
door.Position = submatchall[0]
|
||||
if len(submatchall) >= 3 {
|
||||
door.SubPosition = submatchall[1]
|
||||
}
|
||||
|
||||
door.Status = child.Data().(string)
|
||||
door.Updated = time.Now()
|
||||
v.Doors = append(v.Doors, &door)
|
||||
@ -955,11 +959,13 @@ func (v *Vehicle) GetVehicleStatus() {
|
||||
for _, element := range submatchall {
|
||||
fmt.Println(element)
|
||||
}
|
||||
|
||||
door := Door{}
|
||||
door.Position = submatchall[0]
|
||||
if len(submatchall) >= 3 {
|
||||
door.SubPosition = submatchall[1]
|
||||
}
|
||||
|
||||
door.Status = child.Data().(string)
|
||||
door.Updated = time.Now()
|
||||
v.Doors = append(v.Doors, &door)
|
||||
@ -970,11 +976,13 @@ func (v *Vehicle) GetVehicleStatus() {
|
||||
for _, element := range submatchall {
|
||||
fmt.Println(element)
|
||||
}
|
||||
|
||||
window := Window{}
|
||||
window.Position = submatchall[0]
|
||||
if len(submatchall) >= 3 {
|
||||
window.SubPosition = submatchall[1]
|
||||
}
|
||||
|
||||
window.Status = child.Data().(string)
|
||||
window.Updated = time.Now()
|
||||
v.Windows = append(v.Windows, &window)
|
||||
|
Reference in New Issue
Block a user