Removed references to nexboot in the HTML pages

parent 06c81acf
......@@ -55,7 +55,7 @@ static EventGroupHandle_t wifi_event_group;
to the AP with an IP? */
const int WIFI_CONNECTED_BIT = BIT0;
static const char *TAG = "Nexboot";
static const char *TAG = "HTWBAckwash";
static esp_err_t event_handler(void *ctx, system_event_t *event)
{
......@@ -204,54 +204,6 @@ static void mg_ev_handler(struct mg_connection *nc, int ev, void *p) {
free(uri);
break;
}
case MG_EV_HTTP_PART_BEGIN: {
ESP_LOGI(TAG, "Starting upload file from %p\n", nc);
if (data == NULL) {
data = calloc(1, sizeof(struct fwriter_data));
data->bytes_written = 0;
data->update_partition = NULL;
data->update_handle = 0;
data->update_partition = esp_ota_get_next_update_partition(NULL);
ESP_LOGI(TAG, "Writing to partition subtype %d at offset 0x%x\n",
data->update_partition->subtype, data->update_partition->address);
if(data->update_partition == NULL) ESP_ERROR_CHECK(ESP_FAIL);
ESP_ERROR_CHECK(esp_ota_begin(data->update_partition, OTA_SIZE_UNKNOWN, &data->update_handle));
ESP_LOGI(TAG, "esp_ota_begin succeeded\n");
}
nc->user_data = (void *) data;
break;
}
case MG_EV_HTTP_PART_DATA: {
data->bytes_written += mp->data.len;
ESP_LOGD(TAG, "MG_EV_HTTP_PART_DATA %p len %d\n", nc, mp->data.len);
ESP_ERROR_CHECK(esp_ota_write( data->update_handle, (void *)mp->data.p, mp->data.len));
break;
}
case MG_EV_HTTP_PART_END: {
ESP_LOGI(TAG, "Upload done, filesize: %d\n", mp->data.len);
mg_printf(nc,
"HTTP/1.1 200 OK\r\n"
"Content-Type: text/plain\r\n"
"Connection: close\r\n\r\n"
"Written POST data to OTA partition\n\n");
nc->flags |= MG_F_SEND_AND_CLOSE;
nc->user_data = NULL;
ESP_ERROR_CHECK(esp_ota_end(data->update_handle));
ESP_ERROR_CHECK(esp_ota_set_boot_partition(data->update_partition));
free(data);
ESP_LOGI(TAG,"Booting update... ");
esp_restart();
break;
}
case MG_EV_CLOSE: {
ESP_LOGI(TAG, "Connection %p closed\n", nc);
break;
......
......@@ -6,16 +6,10 @@
html, body, iframe { margin: 0; padding: 0; height: 100%; }
iframe { display: block; width: 100%; border: none; }
</style>
<title>Nexboot Network Bootloader for ESP32</title>
<title>Hackthewater Autobackwash</title>
</head>
<body>
<h1>Nexboot Network Bootloader for ESP32</h1>
<div>Select binary firmware to upload</div>
<form name="fw_upload" action="/" method="POST" enctype="multipart/form-data">
<input type="file" name="fw">
<input type="submit" value="upload">
</form>
<br>
<h1>Hackthewater Autobackwash</h1>
<div><a href=/reboot>REBOOT</a></div>
</body>
</html>
......
......@@ -7,7 +7,7 @@
html, body, iframe { margin: 0; padding: 0; height: 100%; }
iframe { display: block; width: 100%; border: none; }
</style>
<title>Nexboot Network Bootloader for ESP32</title>
<title>Hackthewater Autobackwash</title>
</head>
<body>
<h1>Rebooting...</h1>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment