Skip to content

Commit

Permalink
fix charging indication for dumb battery sensors
Browse files Browse the repository at this point in the history
  • Loading branch information
geeksville committed Jan 16, 2021
1 parent d1be7cf commit fd9ffbb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Power.cpp
Expand Up @@ -83,7 +83,7 @@ class AnalogBatteryLevel : public HasBatteryLevel

/// If we see a battery voltage higher than physics allows - assume charger is pumping
/// in power
virtual bool isVBUSPlug() { return getBattVoltage() > chargingVolt; }
virtual bool isVBUSPlug() { return getBattVoltage() > 1000 * chargingVolt; }

/// Assume charging if we have a battery and external power is connected.
/// we can't be smart enough to say 'full'?
Expand Down

1 comment on commit fd9ffbb

@geeksville
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit has been mentioned on Meshtastic. There might be relevant details there:

https://meshtastic.discourse.group/t/version-1-1-42-device-code-ready-for-alpha-testers/2427/3

Please sign in to comment.