From 4b7af175ce412cced059da684bc4b33f44bde10e Mon Sep 17 00:00:00 2001 From: Alex Savin Date: Thu, 29 May 2025 00:38:28 -0400 Subject: [PATCH] Fixed not correct if condition --- vehicle.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vehicle.go b/vehicle.go index f3e7a97..b2f940f 100644 --- a/vehicle.go +++ b/vehicle.go @@ -653,7 +653,7 @@ func (v *Vehicle) GetVehicleStatus() { } } } - if strings.HasPrefix(key, "tirePressure") && !strings.HasSuffix(key, "Psi") { + if strings.HasPrefix(key, "tirePressure") && strings.HasSuffix(key, "Psi") { pos := strings.TrimPrefix(key, "tirePressure") pos = strings.TrimSuffix(pos, "Psi") submatchall := re.FindAllString(pos, -1) @@ -825,7 +825,7 @@ func (v *Vehicle) GetVehicleCondition() { } } } - if strings.HasPrefix(key, "tirePressure") && !strings.HasSuffix(key, "Psi") { + if strings.HasPrefix(key, "tirePressure") && strings.HasSuffix(key, "Psi") { pos := strings.TrimPrefix(key, "tirePressure") pos = strings.TrimSuffix(pos, "Psi") submatchall := re.FindAllString(pos, -1)