mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 01:40:20 +00:00
Fix get battery voltage, fixes #369
Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
This commit is contained in:
@@ -55,7 +55,7 @@ class TinyGsmBattery {
|
||||
thisModem().streamSkipUntil(','); // Skip battery charge status
|
||||
thisModem().streamSkipUntil(','); // Skip battery charge level
|
||||
// return voltage in mV
|
||||
uint16_t res = thisModem().streamGetIntBefore(',');
|
||||
uint16_t res = thisModem().streamGetIntBefore('\n');
|
||||
// Wait for final OK
|
||||
thisModem().waitResponse();
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user