More int to string chnages
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:
14
vehicle.go
14
vehicle.go
@ -138,7 +138,7 @@ type Tire struct {
|
||||
Position string
|
||||
SubPosition string
|
||||
Pressure int
|
||||
PressurePsi int
|
||||
PressurePsi string
|
||||
Status string
|
||||
Updated time.Time
|
||||
}
|
||||
@ -660,14 +660,14 @@ func (v *Vehicle) GetVehicleStatus() {
|
||||
v.client.logger.Debug("VEHICLE COND", "key", key, "data", child.Data(), "number", len(submatchall))
|
||||
|
||||
if tire, ok := v.Tires[pos]; ok {
|
||||
tire.PressurePsi = child.Data().(int)
|
||||
tire.PressurePsi = child.Data().(string)
|
||||
tire.Updated = time.Now()
|
||||
} else {
|
||||
tire.PressurePsi = child.Data().(int)
|
||||
tire.PressurePsi = child.Data().(string)
|
||||
tire.Updated = time.Now()
|
||||
v.Tires[pos] = Tire{
|
||||
Position: submatchall[0],
|
||||
PressurePsi: child.Data().(int),
|
||||
PressurePsi: child.Data().(string),
|
||||
Updated: time.Now(),
|
||||
}
|
||||
if len(submatchall) >= 2 {
|
||||
@ -832,14 +832,14 @@ func (v *Vehicle) GetVehicleCondition() {
|
||||
v.client.logger.Debug("VEHICLE COND", "key", key, "data", child.Data(), "number", len(submatchall))
|
||||
|
||||
if tire, ok := v.Tires[pos]; ok {
|
||||
tire.PressurePsi = child.Data().(int)
|
||||
tire.PressurePsi = child.Data().(string)
|
||||
tire.Updated = time.Now()
|
||||
} else {
|
||||
tire.PressurePsi = child.Data().(int)
|
||||
tire.PressurePsi = child.Data().(string)
|
||||
tire.Updated = time.Now()
|
||||
v.Tires[pos] = Tire{
|
||||
Position: submatchall[0],
|
||||
PressurePsi: child.Data().(int),
|
||||
PressurePsi: child.Data().(string),
|
||||
Updated: time.Now(),
|
||||
}
|
||||
if len(submatchall) >= 2 {
|
||||
|
Reference in New Issue
Block a user