Browse Source

Fix initialization

v_master
Sara Damiano 5 years ago
parent
commit
7d87baf8b2
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      src/TinyGsmClientM95.h

+ 3
- 2
src/TinyGsmClientM95.h View File

@ -540,14 +540,15 @@ TINY_GSM_MODEM_GET_GPRS_IP_CONNECTED()
return true;
}
float getTemperature(uint16_t &milliVolts = 0) {
float getTemperature() {
sendAT(GF("+QTEMP"));
if (waitResponse(GF(GSM_NL "+QTEMP:")) != 1) {
return (float)-9999;
}
streamSkipUntil(','); // Skip mode
// Read charge of thermistor
milliVolts = stream.readStringUntil(',').toInt();
// milliVolts = stream.readStringUntil(',').toInt();
streamSkipUntil(','); // Skip thermistor charge
float temp = stream.readStringUntil('\n').toFloat();
// Wait for final OK
waitResponse();


Loading…
Cancel
Save