Fix initialization

This commit is contained in:
Sara Damiano
2019-05-22 13:40:11 -04:00
parent 62182e11c9
commit 7d87baf8b2

View File

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