Skip to content

Commit

Permalink
Added option to start PLC in RUN mode
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagoralves authored Sep 17, 2018
1 parent 8c3849d commit 834ab2b
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 8 deletions.
Binary file modified webserver/openplc.db
Binary file not shown.
25 changes: 17 additions & 8 deletions webserver/pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,14 +862,7 @@
<br>"""

settings_tail = """
<br>
<br>
<br>
<label class="container">
<b>Load OpenPLC on boot</b>
<input id="auto_run" type="checkbox">
<span class="checkmark"></span>
</label>
<input type='hidden' value='false' id='auto_run_text' name='auto_run_text'/>
<br>
<br>
<br>
Expand All @@ -892,6 +885,8 @@
var modbus_text = document.getElementById('modbus_server_port');
var dnp3_checkbox = document.getElementById('dnp3_server');
var dnp3_text = document.getElementById('dnp3_server_port');
var auto_run_checkbox = document.getElementById('auto_run');
var auto_run_text = document.getElementById('auto_run_text');
if (modbus_checkbox.checked == true)
{
Expand All @@ -910,6 +905,15 @@
{
dnp3_text.disabled = true;
}
if (auto_run_checkbox.checked == true)
{
auto_run_text.value = 'true';
}
else
{
auto_run_text.value = 'false';
}
}
document.getElementById('modbus_server').onchange = function()
Expand All @@ -922,6 +926,11 @@
setupCheckboxes();
}
document.getElementById('auto_run').onchange = function()
{
setupCheckboxes();
}
function validateForm()
{
var modbus_checkbox = document.forms["uploadForm"]["modbus_server"].checked;
Expand Down

0 comments on commit 834ab2b

Please sign in to comment.