From 03a32365820cf5d344c1803cd76a4e8849dbdb60 Mon Sep 17 00:00:00 2001 From: Craig Leres Date: Tue, 24 Mar 2026 16:27:17 -0700 Subject: [PATCH 1/2] Add support for TPMS pressure without temperature Until now the app would only display TPMS info when pressure and temperature were both greater than zero. Since not all vehicle modules implement the recovery of both pressure and temperature (and not all cars with TPMS even have hardware support to measure temperature) add code to handle the w/pressure and w/o temperature case. To take advantage of this change it is necessary to turn off the workaround with: config set server.v2 workaround.ios_tpms_display false --- OpenVehicleApp/ovms/ovmsBodyViewController.m | 20 +++++++++++++++++++ .../ovms/ovmsStatusViewControllerPad.m | 20 +++++++++++++++++++ 2 files changed, 40 insertions(+) diff --git a/OpenVehicleApp/ovms/ovmsBodyViewController.m b/OpenVehicleApp/ovms/ovmsBodyViewController.m index 75ce58a..09adbb2 100644 --- a/OpenVehicleApp/ovms/ovmsBodyViewController.m +++ b/OpenVehicleApp/ovms/ovmsBodyViewController.m @@ -404,6 +404,11 @@ -(void) update m_car_wheel_fr_pressure.text = [ovmsAppDelegate myRef].car_tpms_fr_pressure_s; m_car_wheel_fr_temp.text = [ovmsAppDelegate myRef].car_tpms_fr_temp_s; } + else if ([ovmsAppDelegate myRef].car_tpms_fr_pressure_s > 0) + { + m_car_wheel_fr_pressure.text = [ovmsAppDelegate myRef].car_tpms_fr_pressure_s; + m_car_wheel_fr_temp.text = @""; + } else { m_car_wheel_fr_pressure.text = @""; @@ -415,6 +420,11 @@ -(void) update m_car_wheel_rr_pressure.text = [ovmsAppDelegate myRef].car_tpms_rr_pressure_s; m_car_wheel_rr_temp.text = [ovmsAppDelegate myRef].car_tpms_rr_temp_s; } + else if ([ovmsAppDelegate myRef].car_tpms_rr_pressure_s > 0) + { + m_car_wheel_rr_pressure.text = [ovmsAppDelegate myRef].car_tpms_rr_pressure_s; + m_car_wheel_rr_temp.text = @""; + } else { m_car_wheel_rr_pressure.text = @""; @@ -426,6 +436,11 @@ -(void) update m_car_wheel_fl_pressure.text = [ovmsAppDelegate myRef].car_tpms_fl_pressure_s; m_car_wheel_fl_temp.text = [ovmsAppDelegate myRef].car_tpms_fl_temp_s; } + else if ([ovmsAppDelegate myRef].car_tpms_fl_pressure_s > 0) + { + m_car_wheel_fl_pressure.text = [ovmsAppDelegate myRef].car_tpms_fl_pressure_s; + m_car_wheel_fl_temp.text = @""; + } else { m_car_wheel_fl_pressure.text = @""; @@ -437,6 +452,11 @@ -(void) update m_car_wheel_rl_pressure.text = [ovmsAppDelegate myRef].car_tpms_rl_pressure_s; m_car_wheel_rl_temp.text = [ovmsAppDelegate myRef].car_tpms_rl_temp_s; } + else if ([ovmsAppDelegate myRef].car_tpms_rl_pressure_s > 0) + { + m_car_wheel_rl_pressure.text = [ovmsAppDelegate myRef].car_tpms_rl_pressure_s; + m_car_wheel_rl_temp.text = @""; + } else { m_car_wheel_rl_pressure.text = @""; diff --git a/OpenVehicleApp/ovms/ovmsStatusViewControllerPad.m b/OpenVehicleApp/ovms/ovmsStatusViewControllerPad.m index e62b27c..619ce8a 100644 --- a/OpenVehicleApp/ovms/ovmsStatusViewControllerPad.m +++ b/OpenVehicleApp/ovms/ovmsStatusViewControllerPad.m @@ -824,6 +824,11 @@ -(void) updateCar m_car_wheel_fr_pressure.text = [ovmsAppDelegate myRef].car_tpms_fr_pressure_s; m_car_wheel_fr_temp.text = [ovmsAppDelegate myRef].car_tpms_fr_temp_s; } + else if ([ovmsAppDelegate myRef].car_tpms_fr_pressure_s > 0) + { + m_car_wheel_fr_pressure.text = [ovmsAppDelegate myRef].car_tpms_fr_pressure_s; + m_car_wheel_fr_temp.text = @""; + } else { m_car_wheel_fr_pressure.text = @""; @@ -835,6 +840,11 @@ -(void) updateCar m_car_wheel_rr_pressure.text = [ovmsAppDelegate myRef].car_tpms_rr_pressure_s; m_car_wheel_rr_temp.text = [ovmsAppDelegate myRef].car_tpms_rr_temp_s; } + else if ([ovmsAppDelegate myRef].car_tpms_rr_pressure_s > 0) + { + m_car_wheel_rr_pressure.text = [ovmsAppDelegate myRef].car_tpms_rr_pressure_s; + m_car_wheel_rr_temp.text = @""; + } else { m_car_wheel_rr_pressure.text = @""; @@ -846,6 +856,11 @@ -(void) updateCar m_car_wheel_fl_pressure.text = [ovmsAppDelegate myRef].car_tpms_fl_pressure_s; m_car_wheel_fl_temp.text = [ovmsAppDelegate myRef].car_tpms_fl_temp_s; } + else if ([ovmsAppDelegate myRef].car_tpms_fl_pressure_s > 0) + { + m_car_wheel_fl_pressure.text = [ovmsAppDelegate myRef].car_tpms_fl_pressure_s; + m_car_wheel_fl_temp.text = @""; + } else { m_car_wheel_fl_pressure.text = @""; @@ -857,6 +872,11 @@ -(void) updateCar m_car_wheel_rl_pressure.text = [ovmsAppDelegate myRef].car_tpms_rl_pressure_s; m_car_wheel_rl_temp.text = [ovmsAppDelegate myRef].car_tpms_rl_temp_s; } + else if ([ovmsAppDelegate myRef].car_tpms_rl_pressure_s > 0) + { + m_car_wheel_rl_pressure.text = [ovmsAppDelegate myRef].car_tpms_rl_pressure_s; + m_car_wheel_rl_temp.text = @""; + } else { m_car_wheel_rl_pressure.text = @""; From 28252dd8a3527289632d2186593722900331015e Mon Sep 17 00:00:00 2001 From: Craig Leres Date: Tue, 24 Mar 2026 17:13:46 -0700 Subject: [PATCH 2/2] Simpler verison that handles temperature without pressure. --- OpenVehicleApp/ovms/ovmsBodyViewController.m | 62 +++++------------ .../ovms/ovmsStatusViewControllerPad.m | 66 ++++++------------- 2 files changed, 36 insertions(+), 92 deletions(-) diff --git a/OpenVehicleApp/ovms/ovmsBodyViewController.m b/OpenVehicleApp/ovms/ovmsBodyViewController.m index 09adbb2..5fbc49c 100644 --- a/OpenVehicleApp/ovms/ovmsBodyViewController.m +++ b/OpenVehicleApp/ovms/ovmsBodyViewController.m @@ -399,69 +399,41 @@ -(void) update m_car_wheel_rl_temp.textColor = [UIColor whiteColor]; } - if ([ovmsAppDelegate myRef].car_tpms_fr_temp > 0) - { + if ([ovmsAppDelegate myRef].car_tpms_fr_pressure_s > 0) m_car_wheel_fr_pressure.text = [ovmsAppDelegate myRef].car_tpms_fr_pressure_s; - m_car_wheel_fr_temp.text = [ovmsAppDelegate myRef].car_tpms_fr_temp_s; - } - else if ([ovmsAppDelegate myRef].car_tpms_fr_pressure_s > 0) - { - m_car_wheel_fr_pressure.text = [ovmsAppDelegate myRef].car_tpms_fr_pressure_s; - m_car_wheel_fr_temp.text = @""; - } else - { m_car_wheel_fr_pressure.text = @""; + if ([ovmsAppDelegate myRef].car_tpms_fr_temp > 0) + m_car_wheel_fr_temp.text = [ovmsAppDelegate myRef].car_tpms_fr_temp_s; + else m_car_wheel_fr_temp.text = @""; - } - if ([ovmsAppDelegate myRef].car_tpms_rr_temp > 0) - { + if ([ovmsAppDelegate myRef].car_tpms_rr_pressure_s > 0) m_car_wheel_rr_pressure.text = [ovmsAppDelegate myRef].car_tpms_rr_pressure_s; - m_car_wheel_rr_temp.text = [ovmsAppDelegate myRef].car_tpms_rr_temp_s; - } - else if ([ovmsAppDelegate myRef].car_tpms_rr_pressure_s > 0) - { - m_car_wheel_rr_pressure.text = [ovmsAppDelegate myRef].car_tpms_rr_pressure_s; - m_car_wheel_rr_temp.text = @""; - } else - { m_car_wheel_rr_pressure.text = @""; + if ([ovmsAppDelegate myRef].car_tpms_rr_temp > 0) + m_car_wheel_rr_temp.text = [ovmsAppDelegate myRef].car_tpms_rr_temp_s; + else m_car_wheel_rr_temp.text = @""; - } - if ([ovmsAppDelegate myRef].car_tpms_fl_temp > 0) - { + if ([ovmsAppDelegate myRef].car_tpms_fl_pressure_s > 0) m_car_wheel_fl_pressure.text = [ovmsAppDelegate myRef].car_tpms_fl_pressure_s; - m_car_wheel_fl_temp.text = [ovmsAppDelegate myRef].car_tpms_fl_temp_s; - } - else if ([ovmsAppDelegate myRef].car_tpms_fl_pressure_s > 0) - { - m_car_wheel_fl_pressure.text = [ovmsAppDelegate myRef].car_tpms_fl_pressure_s; - m_car_wheel_fl_temp.text = @""; - } else - { m_car_wheel_fl_pressure.text = @""; + if ([ovmsAppDelegate myRef].car_tpms_fl_temp > 0) + m_car_wheel_fl_temp.text = [ovmsAppDelegate myRef].car_tpms_fl_temp_s; + else m_car_wheel_fl_temp.text = @""; - } - - if ([ovmsAppDelegate myRef].car_tpms_rl_temp > 0) - { - m_car_wheel_rl_pressure.text = [ovmsAppDelegate myRef].car_tpms_rl_pressure_s; - m_car_wheel_rl_temp.text = [ovmsAppDelegate myRef].car_tpms_rl_temp_s; - } - else if ([ovmsAppDelegate myRef].car_tpms_rl_pressure_s > 0) - { + + if ([ovmsAppDelegate myRef].car_tpms_rl_pressure_s > 0) m_car_wheel_rl_pressure.text = [ovmsAppDelegate myRef].car_tpms_rl_pressure_s; - m_car_wheel_rl_temp.text = @""; - } else - { m_car_wheel_rl_pressure.text = @""; + if ([ovmsAppDelegate myRef].car_tpms_rl_temp > 0) + m_car_wheel_rl_temp.text = [ovmsAppDelegate myRef].car_tpms_rl_temp_s; + else m_car_wheel_rl_temp.text = @""; - } m_car_aux_battery.text = [NSString stringWithFormat:@"%0.1fV", [ovmsAppDelegate myRef].car_aux_battery_voltage]; diff --git a/OpenVehicleApp/ovms/ovmsStatusViewControllerPad.m b/OpenVehicleApp/ovms/ovmsStatusViewControllerPad.m index 619ce8a..602d8be 100644 --- a/OpenVehicleApp/ovms/ovmsStatusViewControllerPad.m +++ b/OpenVehicleApp/ovms/ovmsStatusViewControllerPad.m @@ -819,69 +819,41 @@ -(void) updateCar m_car_wheel_rl_temp.textColor = [UIColor whiteColor]; } - if ([ovmsAppDelegate myRef].car_tpms_fr_temp > 0) - { - m_car_wheel_fr_pressure.text = [ovmsAppDelegate myRef].car_tpms_fr_pressure_s; - m_car_wheel_fr_temp.text = [ovmsAppDelegate myRef].car_tpms_fr_temp_s; - } - else if ([ovmsAppDelegate myRef].car_tpms_fr_pressure_s > 0) - { + if ([ovmsAppDelegate myRef].car_tpms_fr_pressure_s > 0) m_car_wheel_fr_pressure.text = [ovmsAppDelegate myRef].car_tpms_fr_pressure_s; - m_car_wheel_fr_temp.text = @""; - } else - { m_car_wheel_fr_pressure.text = @""; + if ([ovmsAppDelegate myRef].car_tpms_fr_temp > 0) + m_car_wheel_fr_temp.text = [ovmsAppDelegate myRef].car_tpms_fr_temp_s; + else m_car_wheel_fr_temp.text = @""; - } - - if ([ovmsAppDelegate myRef].car_tpms_rr_temp > 0) - { - m_car_wheel_rr_pressure.text = [ovmsAppDelegate myRef].car_tpms_rr_pressure_s; - m_car_wheel_rr_temp.text = [ovmsAppDelegate myRef].car_tpms_rr_temp_s; - } - else if ([ovmsAppDelegate myRef].car_tpms_rr_pressure_s > 0) - { + + if ([ovmsAppDelegate myRef].car_tpms_rr_pressure_s > 0) m_car_wheel_rr_pressure.text = [ovmsAppDelegate myRef].car_tpms_rr_pressure_s; - m_car_wheel_rr_temp.text = @""; - } else - { m_car_wheel_rr_pressure.text = @""; + if ([ovmsAppDelegate myRef].car_tpms_rr_temp > 0) + m_car_wheel_rr_temp.text = [ovmsAppDelegate myRef].car_tpms_rr_temp_s; + else m_car_wheel_rr_temp.text = @""; - } - - if ([ovmsAppDelegate myRef].car_tpms_fl_temp > 0) - { - m_car_wheel_fl_pressure.text = [ovmsAppDelegate myRef].car_tpms_fl_pressure_s; - m_car_wheel_fl_temp.text = [ovmsAppDelegate myRef].car_tpms_fl_temp_s; - } - else if ([ovmsAppDelegate myRef].car_tpms_fl_pressure_s > 0) - { + + if ([ovmsAppDelegate myRef].car_tpms_fl_pressure_s > 0) m_car_wheel_fl_pressure.text = [ovmsAppDelegate myRef].car_tpms_fl_pressure_s; - m_car_wheel_fl_temp.text = @""; - } else - { m_car_wheel_fl_pressure.text = @""; + if ([ovmsAppDelegate myRef].car_tpms_fl_temp > 0) + m_car_wheel_fl_temp.text = [ovmsAppDelegate myRef].car_tpms_fl_temp_s; + else m_car_wheel_fl_temp.text = @""; - } - - if ([ovmsAppDelegate myRef].car_tpms_rl_temp > 0) - { - m_car_wheel_rl_pressure.text = [ovmsAppDelegate myRef].car_tpms_rl_pressure_s; - m_car_wheel_rl_temp.text = [ovmsAppDelegate myRef].car_tpms_rl_temp_s; - } - else if ([ovmsAppDelegate myRef].car_tpms_rl_pressure_s > 0) - { + + if ([ovmsAppDelegate myRef].car_tpms_rl_pressure_s > 0) m_car_wheel_rl_pressure.text = [ovmsAppDelegate myRef].car_tpms_rl_pressure_s; - m_car_wheel_rl_temp.text = @""; - } else - { m_car_wheel_rl_pressure.text = @""; + if ([ovmsAppDelegate myRef].car_tpms_rl_temp > 0) + m_car_wheel_rl_temp.text = [ovmsAppDelegate myRef].car_tpms_rl_temp_s; + else m_car_wheel_rl_temp.text = @""; - } m_car_aux_battery.text = [NSString stringWithFormat:@"%0.1fV", [ovmsAppDelegate myRef].car_aux_battery_voltage];