More changes
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 23s

This commit is contained in:
2025-06-03 19:14:50 -04:00
parent ac8efafe29
commit 68eb2a5911
3 changed files with 17 additions and 5 deletions

View File

@ -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" {

View File

@ -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",

View File

@ -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 {