mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-21 10:26:06 +03:00
Merge pull request #2048 from hotchpotch/ota-gethostname
Add ArduinoOTA::getHostname() interface
This commit is contained in:
commit
c50d6ffb66
@ -77,6 +77,10 @@ void ArduinoOTAClass::setHostname(const char * hostname) {
|
||||
}
|
||||
}
|
||||
|
||||
String ArduinoOTAClass::getHostname() {
|
||||
return _hostname;
|
||||
}
|
||||
|
||||
void ArduinoOTAClass::setPassword(const char * password) {
|
||||
if (!_initialized && !_password.length() && password) {
|
||||
_password = password;
|
||||
|
@ -31,6 +31,7 @@ class ArduinoOTAClass
|
||||
~ArduinoOTAClass();
|
||||
void setPort(uint16_t port);
|
||||
void setHostname(const char *hostname);
|
||||
String getHostname();
|
||||
void setPassword(const char *password);
|
||||
void onStart(OTA_CALLBACK(fn));
|
||||
void onEnd(OTA_CALLBACK(fn));
|
||||
|
Loading…
x
Reference in New Issue
Block a user