mirror of
https://github.com/CopterExpress/clover.git
synced 2026-05-26 11:43:25 +00:00
led: don’t indicate low voltage lower than 2.0
This commit is contained in:
@@ -278,7 +278,8 @@ void handleLog(const rosgraph_msgs::Log& log)
|
||||
void handleBattery(const sensor_msgs::BatteryState& msg)
|
||||
{
|
||||
for (auto const& voltage : msg.cell_voltage) {
|
||||
if (voltage < low_battery_threshold) {
|
||||
if (voltage < low_battery_threshold &&
|
||||
voltage > 2.0) { // voltage < 2.0 likely indicates incorrect voltage measurement
|
||||
// notify low battery every time
|
||||
notify("low_battery");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user