1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-12 01:53:07 +03:00

Add getCommand() api for OTA update type (#2259)

This commit is contained in:
andig
2016-07-15 10:03:34 +02:00
committed by Me No Dev
parent 1f7989b31d
commit c4f9f102ce
3 changed files with 14 additions and 2 deletions

View File

@ -180,7 +180,7 @@ void ArduinoOTAClass::_onRx(){
nonce_md5.add(String(micros()));
nonce_md5.calculate();
_nonce = nonce_md5.toString();
char auth_req[38];
sprintf(auth_req, "AUTH %s", _nonce.c_str());
_udp_ota->append((const char *)auth_req, strlen(auth_req));
@ -326,4 +326,8 @@ void ArduinoOTAClass::handle() {
}
}
int ArduinoOTAClass::getCommand() {
return _cmd;
}
ArduinoOTAClass ArduinoOTA;