mirror of
https://github.com/KevinMidboe/TinyGSM.git
synced 2025-10-29 18:00:18 +00:00
Fix initialization
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
Reference in New Issue
Block a user