From: Bdale Garbee Date: Mon, 26 May 2025 19:53:21 +0000 (-0600) Subject: only allow tests to start if system is fully armed X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=af30ad4002d8a0327d3b7b891d989aca12ca366b;p=fw%2Fquantimotor only allow tests to start if system is fully armed --- diff --git a/ui/app.py b/ui/app.py index b3588d6..c71ccf4 100755 --- a/ui/app.py +++ b/ui/app.py @@ -78,8 +78,7 @@ def sense_armed(): else: return 'remote' else: - return armreq - #return 'safe' + return 'safe' path = os.path.abspath(os.path.dirname(__file__)) config = { diff --git a/ui/index.html b/ui/index.html index c83b365..1b5effc 100644 --- a/ui/index.html +++ b/ui/index.html @@ -19,6 +19,11 @@ $('#pyro').text(response.pyro); $('#battery').text(response.battery); $('#armed').text(response.armed); + if (response.armed == "armed") { + document.querySelector('#startTest').removeAttribute('disabled'); + } else { + document.querySelector('#startTest').setAttribute('disabled', true); + } }); request.fail(function(jqXHR, textStatus) { @@ -33,19 +38,16 @@