Add Plc.IsEnabled() method and refactor places that were checking settings directly to use it instead.

This commit is contained in:
Patrick Fairbank
2020-03-22 17:42:37 -07:00
parent 27dc4a8773
commit 31505b265f
7 changed files with 18 additions and 11 deletions

View File

@@ -118,7 +118,7 @@
<p><span class="label label-scoring" id="refereeScoreStatus">Referee</span><br />
<span class="label label-scoring" id="redScoreStatus"></span><br />
<span class="label label-scoring" id="blueScoreStatus"></span></p>
{{if .EventSettings.PlcAddress}}
{{if .PlcIsEnabled}}
<p>PLC Status</p>
<p>
<span class="label label-scoring" id="plcStatus"></span><br />

View File

@@ -30,7 +30,7 @@
</div>
{{end}}
</div>
{{if eq .EventSettings.PlcAddress ""}}
{{if not .PlcIsEnabled}}
<div id="elements">
<div class="scoring-section">
<div>