From c98426cd27fcaffae1d6ba54653ca9f429166212 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Kowalski?= <82044322+pkowalsk1@users.noreply.github.com> Date: Mon, 14 Aug 2023 12:06:53 +0200 Subject: [PATCH] fix bat temp and voltage on /battery topic (#176) --- panther_battery/src/adc_node.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/panther_battery/src/adc_node.py b/panther_battery/src/adc_node.py index cae4c5a80..0da93c56c 100755 --- a/panther_battery/src/adc_node.py +++ b/panther_battery/src/adc_node.py @@ -141,8 +141,8 @@ def _battery_timer_cb(self, *args) -> None: self._publish_battery_msg( self._battery_pub, - (V_bat_1 + V_bat_2) / 2.0, - (temp_bat_1 + temp_bat_2) / 2.0, + max(V_bat_1, V_bat_2), + max(temp_bat_1, temp_bat_2), -(I_bat_1 + I_bat_2) + I_charge_bat_1 + I_charge_bat_2, I_charge_bat_1 + I_charge_bat_2, )