From 7ecedbc39fef365c06577eb368adcb8ff64625f0 Mon Sep 17 00:00:00 2001 From: Adeeb Shihadeh Date: Fri, 8 Nov 2024 13:31:43 -0800 Subject: [PATCH] setup: no low voltage warning without INA --- selfdrive/ui/qt/setup/setup.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/ui/qt/setup/setup.cc b/selfdrive/ui/qt/setup/setup.cc index aff9b015b3..c716b6b4e9 100644 --- a/selfdrive/ui/qt/setup/setup.cc +++ b/selfdrive/ui/qt/setup/setup.cc @@ -408,7 +408,7 @@ Setup::Setup(QWidget *parent) : QStackedWidget(parent) { std::stringstream buffer; buffer << std::ifstream("/sys/class/hwmon/hwmon1/in1_input").rdbuf(); float voltage = (float)std::atoi(buffer.str().c_str()) / 1000.; - if (voltage < 7) { + if (voltage > 0 && voltage < 7) { addWidget(low_voltage()); }