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
|
Position string
|
||||||
SubPosition string
|
SubPosition string
|
||||||
Pressure int
|
Pressure int
|
||||||
PressurePsi int
|
PressurePsi string
|
||||||
Status string
|
Status string
|
||||||
Updated time.Time
|
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))
|
v.client.logger.Debug("VEHICLE COND", "key", key, "data", child.Data(), "number", len(submatchall))
|
||||||
|
|
||||||
if tire, ok := v.Tires[pos]; ok {
|
if tire, ok := v.Tires[pos]; ok {
|
||||||
tire.PressurePsi = child.Data().(int)
|
tire.PressurePsi = child.Data().(string)
|
||||||
tire.Updated = time.Now()
|
tire.Updated = time.Now()
|
||||||
} else {
|
} else {
|
||||||
tire.PressurePsi = child.Data().(int)
|
tire.PressurePsi = child.Data().(string)
|
||||||
tire.Updated = time.Now()
|
tire.Updated = time.Now()
|
||||||
v.Tires[pos] = Tire{
|
v.Tires[pos] = Tire{
|
||||||
Position: submatchall[0],
|
Position: submatchall[0],
|
||||||
PressurePsi: child.Data().(int),
|
PressurePsi: child.Data().(string),
|
||||||
Updated: time.Now(),
|
Updated: time.Now(),
|
||||||
}
|
}
|
||||||
if len(submatchall) >= 2 {
|
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))
|
v.client.logger.Debug("VEHICLE COND", "key", key, "data", child.Data(), "number", len(submatchall))
|
||||||
|
|
||||||
if tire, ok := v.Tires[pos]; ok {
|
if tire, ok := v.Tires[pos]; ok {
|
||||||
tire.PressurePsi = child.Data().(int)
|
tire.PressurePsi = child.Data().(string)
|
||||||
tire.Updated = time.Now()
|
tire.Updated = time.Now()
|
||||||
} else {
|
} else {
|
||||||
tire.PressurePsi = child.Data().(int)
|
tire.PressurePsi = child.Data().(string)
|
||||||
tire.Updated = time.Now()
|
tire.Updated = time.Now()
|
||||||
v.Tires[pos] = Tire{
|
v.Tires[pos] = Tire{
|
||||||
Position: submatchall[0],
|
Position: submatchall[0],
|
||||||
PressurePsi: child.Data().(int),
|
PressurePsi: child.Data().(string),
|
||||||
Updated: time.Now(),
|
Updated: time.Now(),
|
||||||
}
|
}
|
||||||
if len(submatchall) >= 2 {
|
if len(submatchall) >= 2 {
|
||||||
|
Reference in New Issue
Block a user