From 2a2f9bb788be22ec5ee545c4dac2c0a56437a81d Mon Sep 17 00:00:00 2001 From: Matt Atlas Date: Sun, 13 Mar 2022 21:42:21 +0100 Subject: [PATCH] add engine control global control --- nano/templates/engines_control.tmpl | 38 ++++++++++++++++++++++++----- 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/nano/templates/engines_control.tmpl b/nano/templates/engines_control.tmpl index 726edf27ac3..56c783d94de 100644 --- a/nano/templates/engines_control.tmpl +++ b/nano/templates/engines_control.tmpl @@ -1,8 +1,35 @@
- {{:helper.link('Overall status', 'note', {'state' :'status'}, null, data.state == 'status' ? 'selected' : null)}} + {{:helper.link('Overall info', 'note', {'state' :'status'}, null, data.state == 'status' ? 'selected' : null)}} {{:helper.link('Details', 'note', {'state' : 'engines'}, null, data.state == 'engines' ? 'selected' : null)}}
- +
+
+
+ Global controls: +
+
+ {{:helper.link(data.global_state ? 'Shut all down' : 'Power all up', 'power', {'global_toggle' : 1}, null, data.global_state ? 'selected' : null)}} +
+
+
+
+ Thrust limit: +
+
+ {{:helper.link('', 'circle-plus', { 'global_limit' : 0.1}, null, null)}} + {{:helper.link(data.global_limit+'%', null, { 'set_global_limit' : 1 }, null, null)}} + {{:helper.link('', 'circle-minus', { 'global_limit' : -0.1}, null, null)}} +
+
+
+
+ Total thrust: +
+
+ {{:data.total_thrust}} +
+
+
{{if data.state == "engines"}} {{if data.engines_info}} {{for data.engines_info}} @@ -11,9 +38,8 @@ Engine #{{:(index + 1)}}:
- {{:helper.link(value.eng_on ? 'Shutdown' : 'Power up', 'power', { 'toggle' : 1, 'engine' : value.eng_reference }, null, value.eng_on ? 'selected' : null)}} + {{:helper.link(value.eng_on ? 'Shutdown' : 'Power up', 'power', { 'toggle' : 1, 'engine' : value.eng_reference }, null, value.eng_on ? value.eng_on == 1 ? 'linkOn' : 'yellowButton' : null)}}
-
@@ -28,7 +54,7 @@ Status:
- {{:value.eng_on ? 'Online' : 'Offline'}}
+ {{:value.eng_on ? value.eng_on == 1 ? 'Online' : 'Booting' : 'Offline'}}
{{:value.eng_status}}
@@ -63,7 +89,7 @@ Engine #{{:(index + 1)}}:
- {{:helper.link(value.eng_on ? 'Shutdown' : 'Power up', 'power', { 'toggle' : 1, 'engine' : value.eng_reference }, null, value.eng_on ? 'selected' : null)}} + {{:helper.link(value.eng_on ? 'Shutdown' : 'Power up', 'power', { 'toggle' : 1, 'engine' : value.eng_reference }, null, value.eng_on ? value.eng_on == 1 ? 'linkOn' : 'yellowButton' : null)}}