File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -132,6 +132,19 @@ bool hostedEndUpdate() {
132132 return err == ESP_OK ;
133133}
134134
135+ bool hostedActivateUpdate () {
136+ esp_err_t err = esp_hosted_slave_ota_activate ();
137+ if (err != ESP_OK ) {
138+ log_e ("Failed to activate Update: %s" , esp_err_to_name (err ));
139+ }
140+ // else {
141+ // hostedDeinit();
142+ // delay(1000);
143+ // hostedInit();
144+ // }
145+ return err == ESP_OK ;
146+ }
147+
135148static bool hostedInit () {
136149 if (!hosted_initialized ) {
137150 log_i ("Initializing ESP-Hosted" );
Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ char * hostedGetUpdateURL();
5151bool hostedBeginUpdate ();
5252bool hostedWriteUpdate (uint8_t * buf , uint32_t len );
5353bool hostedEndUpdate ();
54+ bool hostedActivateUpdate ();
5455
5556#ifdef __cplusplus
5657}
You can’t perform that action at this time.
0 commit comments