More changes
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:
@ -264,7 +264,7 @@ func (c *Client) execute(requestUrl string, method string, params map[string]str
|
||||
}
|
||||
|
||||
if r, ok := c.parseResponse(resBytes); ok {
|
||||
c.logger.Debug("parsed http request output", "data", r.Data)
|
||||
// c.logger.Debug("parsed http request output", "data", r.Data)
|
||||
|
||||
// dataName field has the list of the states [ remoteServiceStatus | errorResponse ]
|
||||
if r.DataName == "remoteServiceStatus" {
|
||||
|
12
consts.go
12
consts.go
@ -157,6 +157,18 @@ var troubles = map[string]string{
|
||||
"WASH_MIL": "Windshield Washer Fluid Level",
|
||||
}
|
||||
|
||||
var badValues = []any{
|
||||
"NOT_EQUIPPED",
|
||||
"UNKNOWN",
|
||||
"None",
|
||||
"16383",
|
||||
"65535",
|
||||
"-64",
|
||||
"",
|
||||
0,
|
||||
float64(0),
|
||||
nil}
|
||||
|
||||
// var modelCodes = map[string]string{
|
||||
// "PDL": "Subaru Outback Touring XT",
|
||||
// "LDJ": "Subaru Outback Limited XT",
|
||||
|
@ -626,8 +626,8 @@ func (v *Vehicle) GetVehicleStatus() {
|
||||
val := reflect.ValueOf(vs)
|
||||
typeOfS := val.Type()
|
||||
|
||||
badValues := []any{"NOT_EQUIPPED", "UNKNOWN", "None", "16383", "65535", "-64", "", 0, float64(0), nil}
|
||||
for i := 0; i < val.NumField(); i++ {
|
||||
// for i := 0; i < val.NumField(); i++ {
|
||||
for i := range val.NumField() {
|
||||
if slices.Contains(badValues, val.Field(i).Interface()) {
|
||||
continue
|
||||
} else {
|
||||
@ -675,8 +675,8 @@ func (v *Vehicle) GetVehicleCondition() {
|
||||
val := reflect.ValueOf(vc)
|
||||
typeOfS := val.Type()
|
||||
|
||||
badValues := []any{"NOT_EQUIPPED", "UNKNOWN", "None", "16383", "65535", "-64", "", 0, float64(0), nil}
|
||||
for i := 0; i < val.NumField(); i++ {
|
||||
// for i := 0; i < val.NumField(); i++ {
|
||||
for i := range val.NumField() {
|
||||
if slices.Contains(badValues, val.Field(i).Interface()) {
|
||||
continue
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user