diff --git a/software/frontend/index.html b/software/frontend/index.html
index 859c932..3b590a9 100644
--- a/software/frontend/index.html
+++ b/software/frontend/index.html
@@ -167,7 +167,7 @@
Configuration Editor
Loading…
-
+
@@ -316,7 +316,9 @@
return;
}
- alert("Configuration saved successfully!");
+ alert("Configuration saved successfully, device will now reboot/shutdown! " +
+ "On battery, press Power button after shutdown to restart.");
+ await fetch('/api/v1/reboot/application', {'method': 'POST'});
} catch (err) {
alert("Error saving configuration: " + err);
}
diff --git a/software/src/webserver.py b/software/src/webserver.py
index f87f467..3f26514 100644
--- a/software/src/webserver.py
+++ b/software/src/webserver.py
@@ -269,10 +269,9 @@ async def audiofile_delete(request):
@webapp.route('/api/v1/reboot/', methods=['POST'])
async def reboot(request, method):
- if hwconfig.get_on_battery():
- return 'not allowed: usb not connected', 403
-
if method == 'bootloader':
+ if hwconfig.get_on_battery():
+ return 'not possible: connect USB first', 403
leds.set_state(LedManager.REBOOTING)
timer_manager.schedule(time.ticks_ms() + 1500, machine.bootloader)
elif method == 'application':