Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
A
Autobackwash-firmware
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hackthewater
Autobackwash-firmware
Commits
585a671e
Commit
585a671e
authored
May 25, 2018
by
Stefy Lanza (nextime / spora )
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed references to nexboot in the HTML pages
parent
06c81acf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
58 deletions
+4
-58
nexboot.c
main/nexboot.c
+1
-49
index.html
web/index.html
+2
-8
reboot.html
web/reboot.html
+1
-1
No files found.
main/nexboot.c
View file @
585a671e
...
@@ -55,7 +55,7 @@ static EventGroupHandle_t wifi_event_group;
...
@@ -55,7 +55,7 @@ static EventGroupHandle_t wifi_event_group;
to the AP with an IP? */
to the AP with an IP? */
const
int
WIFI_CONNECTED_BIT
=
BIT0
;
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
)
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) {
...
@@ -204,54 +204,6 @@ static void mg_ev_handler(struct mg_connection *nc, int ev, void *p) {
free
(
uri
);
free
(
uri
);
break
;
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
:
{
case
MG_EV_CLOSE
:
{
ESP_LOGI
(
TAG
,
"Connection %p closed
\n
"
,
nc
);
ESP_LOGI
(
TAG
,
"Connection %p closed
\n
"
,
nc
);
break
;
break
;
...
...
web/index.html
View file @
585a671e
...
@@ -6,16 +6,10 @@
...
@@ -6,16 +6,10 @@
html
,
body
,
iframe
{
margin
:
0
;
padding
:
0
;
height
:
100%
;
}
html
,
body
,
iframe
{
margin
:
0
;
padding
:
0
;
height
:
100%
;
}
iframe
{
display
:
block
;
width
:
100%
;
border
:
none
;
}
iframe
{
display
:
block
;
width
:
100%
;
border
:
none
;
}
</style>
</style>
<title>
Nexboot Network Bootloader for ESP32
</title>
<title>
Hackthewater Autobackwash
</title>
</head>
</head>
<body>
<body>
<h1>
Nexboot Network Bootloader for ESP32
</h1>
<h1>
Hackthewater Autobackwash
</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>
<div><a
href=
/reboot
>
REBOOT
</a></div>
<div><a
href=
/reboot
>
REBOOT
</a></div>
</body>
</body>
</html>
</html>
...
...
web/reboot.html
View file @
585a671e
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
html
,
body
,
iframe
{
margin
:
0
;
padding
:
0
;
height
:
100%
;
}
html
,
body
,
iframe
{
margin
:
0
;
padding
:
0
;
height
:
100%
;
}
iframe
{
display
:
block
;
width
:
100%
;
border
:
none
;
}
iframe
{
display
:
block
;
width
:
100%
;
border
:
none
;
}
</style>
</style>
<title>
Nexboot Network Bootloader for ESP32
</title>
<title>
Hackthewater Autobackwash
</title>
</head>
</head>
<body>
<body>
<h1>
Rebooting...
</h1>
<h1>
Rebooting...
</h1>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment