46 #ifdef USE_OTA_PASSWORD 48 #endif // USE_OTA_PASSWORD 59 #ifdef USE_OTA_STATE_CALLBACK 65 void setup()
override;
82 bool writeall_(
const uint8_t *buf,
size_t len);
84 #ifdef USE_OTA_PASSWORD 86 #endif // USE_OTA_PASSWORD 103 #ifdef USE_OTA_STATE_CALLBACK void dump_config() override
uint16_t get_port() const
uint32_t safe_mode_enable_time_
The time safe mode should be on for.
bool get_safe_mode_pending()
void add_on_state_callback(std::function< void(OTAState, float, uint8_t)> &&callback)
void set_auth_password(const std::string &password)
uint32_t safe_mode_start_time_
stores when safe mode was enabled.
bool readall_(uint8_t *buf, size_t len)
static const uint32_t ENTER_SAFE_MODE_MAGIC
a magic number to indicate that safe mode should be entered on next boot
void set_port(uint16_t port)
Manually set the port OTA should listen on.
std::unique_ptr< socket::Socket > client_
float get_setup_priority() const override
bool has_safe_mode_
stores whether safe mode can be enabled.
void write_rtc_(uint32_t val)
void on_safe_shutdown() override
OTAComponent * global_ota_component
bool should_enter_safe_mode(uint8_t num_attempts, uint32_t enable_time)
uint8_t safe_mode_num_attempts_
uint32_t safe_mode_rtc_value_
Implementation of SPI Controller mode.
void set_safe_mode_pending(const bool &pending)
Set to true if the next startup will enter safe mode.
bool writeall_(const uint8_t *buf, size_t len)
std::unique_ptr< socket::Socket > server_
CallbackManager< void(OTAState, float, uint8_t)> state_callback_
OTAComponent provides a simple way to integrate Over-the-Air updates into your app using ArduinoOTA...