需要备份旧的等待事件
This commit is contained in:
parent
d698501b40
commit
c74a49e3ae
|
@ -404,6 +404,9 @@ String Esp8266::Send(const String& cmd, cstring expect, cstring expect2, uint ms
|
||||||
we.Key1 = expect;
|
we.Key1 = expect;
|
||||||
we.Key2 = expect2;
|
we.Key2 = expect2;
|
||||||
|
|
||||||
|
// 保存旧任务
|
||||||
|
auto old = _Expect;
|
||||||
|
|
||||||
_Expect = &we;
|
_Expect = &we;
|
||||||
|
|
||||||
#if NET_DEBUG
|
#if NET_DEBUG
|
||||||
|
@ -430,7 +433,8 @@ String Esp8266::Send(const String& cmd, cstring expect, cstring expect2, uint ms
|
||||||
}
|
}
|
||||||
|
|
||||||
we.Wait(msTimeout);
|
we.Wait(msTimeout);
|
||||||
if(_Expect == &we) _Expect = nullptr;
|
//if(_Expect == &we) _Expect = nullptr;
|
||||||
|
_Expect = old;
|
||||||
|
|
||||||
//if(rs.Length() > 4) rs.Trim();
|
//if(rs.Length() > 4) rs.Trim();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue