Added controller restart functionality

This commit is contained in:
Brikwerk 2021-09-23 14:40:37 -07:00
commit 6bb7fb4c2e
2 changed files with 6 additions and 0 deletions

View file

@ -394,6 +394,11 @@ function recreateProController() {
socket.emit('create_pro_controller');
}
function restartController() {
shutdownController();
setTimeout(recreateProController, 2000);
}
function checkForLoad() {
if (STATE[NXBT_CONTROLLER_INDEX]) {
controller_state = STATE[NXBT_CONTROLLER_INDEX].state

View file

@ -197,6 +197,7 @@
<h2 class="surface-lighter">Controller Commands</h2>
<button onclick="shutdownController()">Shutdown Controller</button>
<button onclick="recreateProController()">Recreate Controller</button>
<button onclick="restartController()">Restart Controller</button>
<h2 class="surface-lighter">Controller Macro</h2>
<p>