From 5f29023e871561e1ab4238bd8a00a58761583cd4 Mon Sep 17 00:00:00 2001
From: Angel <roangel@student.ethz.ch>
Date: Wed, 18 Oct 2017 13:08:45 +0200
Subject: [PATCH] added trial to fix the battery label not updating

---
 pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp b/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp
index 66ded0c2..ba70d725 100644
--- a/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp
+++ b/pps_ws/src/d_fall_pps/GUI_Qt/studentGUI/src/MainWindow.cpp
@@ -277,10 +277,11 @@ void MainWindow::updateBatteryVoltage(float battery_voltage)
 {
     m_battery_voltage = battery_voltage;
     // Need to take voltage, display it and transform it to percentage
-    int percentage = (int) fromVoltageToPercent(m_battery_voltage);
+    // int percentage = (int) fromVoltageToPercent(m_battery_voltage);
 
     QString qstr = "Raw voltage: ";
     qstr.append(QString::number(battery_voltage, 'f', 2));
+    ui->raw_voltage->clear();
     ui->raw_voltage->setText(qstr);
 }
 
-- 
GitLab