RobotnikAutomation / daly_bms

ROS package for Daly Battery Monitor System (BMS)
BSD 3-Clause "New" or "Revised" License
10 stars 9 forks source link

Decouple driver #1

Closed alvarovillena closed 2 years ago

alvarovillena commented 2 years ago
alvarovillena commented 2 years ago

By the way, this should not be a fork from the driver anymore

alvarovillena commented 2 years ago

Fixed several issues related to time_remaining calculation that caused either division by 0 or trying to publish a negative number in an unsigned int message. This was causing either constant publications with the same values without crashing, or node crashing.

Also fixed the fact that we were not taking into account the mosfet 'stationary' mode. Time charging and charging status was not being updated in this case. If node was initialized when mosfet was in 'stationary' mode, we were not reporting charge.