Added battery and temperature functions

This commit is contained in:
Sara Damiano
2019-05-22 12:03:09 -04:00
parent 96bbf381ad
commit 880c4614e4
14 changed files with 331 additions and 37 deletions

View File

@@ -489,7 +489,7 @@ TINY_GSM_MODEM_GET_GPRS_IP_CONNECTED()
}
/*
* Battery functions
* Battery & temperature functions
*/
uint16_t getBattVoltage() TINY_GSM_ATTR_NOT_AVAILABLE;
@@ -505,6 +505,16 @@ TINY_GSM_MODEM_GET_GPRS_IP_CONNECTED()
return res;
}
uint8_t getBattChargeState() TINY_GSM_ATTR_NOT_AVAILABLE;
bool getBattStats(uint8_t &chargeState, int8_t &percent, uint16_t &milliVolts) {
percent = getBattPercent();
return true;
}
// This would only available for a small number of modules in this group (TOBY-L)
float getTemperature() TINY_GSM_ATTR_NOT_IMPLEMENTED;
/*
* Client related functions
*/