fix regression: no temp/hum-read

This commit is contained in:
Staars 2020-02-04 14:12:46 +01:00
parent 0b8040c3c0
commit e1973fbfff

View File

@ -355,6 +355,8 @@ void HM10readTempHum(char *_buf){
_tempFloat=(float)(LYWSD03.temp)/100.0f; _tempFloat=(float)(LYWSD03.temp)/100.0f;
if(_tempFloat<60){ if(_tempFloat<60){
MIBLEsensors.at(_slot).temp=_tempFloat; MIBLEsensors.at(_slot).temp=_tempFloat;
HM10.mode.awaitingHT = false;
HM10.current_task_delay = 0;
} }
_tempFloat=(float)LYWSD03.hum; _tempFloat=(float)LYWSD03.hum;
if(_tempFloat<100){ if(_tempFloat<100){
@ -399,8 +401,6 @@ bool HM10SerialHandleFeedback(){
} }
if(HM10.mode.awaitingHT) { if(HM10.mode.awaitingHT) {
HM10readTempHum(ret); HM10readTempHum(ret);
HM10.mode.awaitingHT = false;
HM10.current_task_delay = 0;
} }
else if(HM10.mode.awaitingB) { else if(HM10.mode.awaitingB) {
HM10readBat(ret); HM10readBat(ret);