big code push
This commit is contained in:
888
iforte/base.js
888
iforte/base.js
File diff suppressed because it is too large
Load Diff
@@ -1,39 +1,71 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="../files/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../files/layout.css">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width,initial-scale=1,shrink-to-fit=no"
|
||||
/>
|
||||
<link rel="stylesheet" href="../files/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="../files/layout.css" />
|
||||
<script src="../files/jquery-3.3.1.min.js"></script>
|
||||
<script src="../files/popper.min.js"></script>
|
||||
<script src="../files/bootstrap.min.js"></script>
|
||||
<script src="./base.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar fixed-top navbar-expand-md navbar-dark bg-dark">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="./index.html"><img src="../files/robe_logo_white.svg"></a><button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"><span class="navbar-toggler-icon"></span></button>
|
||||
<a class="navbar-brand" href="./index.html"
|
||||
><img src="../files/robe_logo_white.svg" /></a
|
||||
><button
|
||||
class="navbar-toggler"
|
||||
type="button"
|
||||
data-toggle="collapse"
|
||||
data-target="#navbar"
|
||||
>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbar">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active"><a class="nav-link" href="./index.html">Status</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="./personality.html">Personality</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="./logs.html">Logs</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="./sensors.html">RAINS logs</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="./discovery.html">Discovery</a></li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="./index.html">Status</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="./personality.html">Personality</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="./logs.html">Logs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="./sensors.html">RAINS logs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="./discovery.html">Discovery</a>
|
||||
</li>
|
||||
<li class="nav-item"><a class="nav-link" id="scfg">Settings</a></li>
|
||||
<li class="nav-item"><a class="nav-link" id="idnt"><img class="rdmi" src="../files/identify.svg"></a></li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="idnt"
|
||||
><img class="rdmi" src="../files/identify.svg"
|
||||
/></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="fixed-top text-center device-label" id="pth" onclick="window.location = ('../index.html')"></div>
|
||||
<div
|
||||
class="fixed-top text-center device-label"
|
||||
id="pth"
|
||||
onclick="window.location = ('../index.html')"
|
||||
></div>
|
||||
|
||||
<div class="container-fluid in">
|
||||
<h1>Device status</h1>
|
||||
<div class="row" id="boxes">
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>DMX/RDM settings <a class="cfg" onclick="open_modal(0);">
|
||||
<img src="../files/settings.svg">
|
||||
<h2>
|
||||
DMX/RDM settings
|
||||
<a class="cfg" onclick="open_modal(0);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
@@ -52,7 +84,6 @@
|
||||
</li>
|
||||
<li>
|
||||
<div id="iforte_dmxp_v"></div>
|
||||
<small id="iforte_dmxf_v"></small>
|
||||
</li>
|
||||
<li>
|
||||
<div id="iforte_dmxi_v"></div>
|
||||
@@ -73,8 +104,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Device times <a class="cfg" onclick="open_modal(1);">
|
||||
<img src="../files/settings.svg">
|
||||
<h2>
|
||||
Device times
|
||||
<a class="cfg" onclick="open_modal(1);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
@@ -83,7 +116,10 @@
|
||||
</ul>
|
||||
<ul class="group vals" id="">
|
||||
<li>
|
||||
<div id="iforte_h0_v"></div>h / <div id="iforte_hr0_v"></div>h
|
||||
<div id="iforte_h0_v"></div>
|
||||
h /
|
||||
<div id="iforte_hr0_v"></div>
|
||||
h
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
@@ -95,17 +131,21 @@
|
||||
</ul>
|
||||
<ul class="group vals">
|
||||
<li>
|
||||
<div id="iforte_h1_v"></div>h
|
||||
<div id="iforte_h1_v"></div>
|
||||
h
|
||||
</li>
|
||||
<li>
|
||||
<div id="iforte_hr1_v"></div>h
|
||||
<div id="iforte_hr1_v"></div>
|
||||
h
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Device temperatures <a class="cfg" onclick="open_modal(2);">
|
||||
<img src="../files/settings.svg">
|
||||
<h2>
|
||||
Device temperatures
|
||||
<a class="cfg" onclick="open_modal(2);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
@@ -117,29 +157,71 @@
|
||||
</ul>
|
||||
<ul class="group vals" id="">
|
||||
<li>
|
||||
<div id="iforte_t0_v"></div>° <div class="iforte_tu"></div> / <div id="iforte_tm0_v"></div>° <div class="iforte_tu"></div> / <div id="iforte_tmr0_v"></div>° <div class="iforte_tu"></div>
|
||||
<div id="iforte_t0_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
/
|
||||
<div id="iforte_tm0_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
/
|
||||
<div id="iforte_tmr0_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="iforte_t3_v"></div>° <div class="iforte_tu"></div> / <div id="iforte_tm3_v"></div>° <div class="iforte_tu"></div> / <div id="iforte_tmr3_v"></div>° <div class="iforte_tu"></div>
|
||||
<div id="iforte_t3_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
/
|
||||
<div id="iforte_tm3_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
/
|
||||
<div id="iforte_tmr3_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="iforte_t1_v"></div>° <div class="iforte_tu"></div> / <div id="iforte_tm1_v"></div>° <div class="iforte_tu"></div> / <div id="iforte_tmr1_v"></div>° <div class="iforte_tu"></div>
|
||||
<div id="iforte_t1_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
/
|
||||
<div id="iforte_tm1_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
/
|
||||
<div id="iforte_tmr1_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="iforte_t2_v"></div>° <div class="iforte_tu"></div> / <div id="iforte_tm2_v"></div>° <div class="iforte_tu"></div> / <div id="iforte_tmr2_v"></div>° <div class="iforte_tu"></div>
|
||||
<div id="iforte_t2_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
/
|
||||
<div id="iforte_tm2_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
/
|
||||
<div id="iforte_tmr2_v"></div>
|
||||
°
|
||||
<div id="iforte_tu_v"></div>
|
||||
</li>
|
||||
</ul>
|
||||
<p>
|
||||
<small>current / maximum / resettable</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Wireless state <a class="cfg" onclick="open_modal(3);">
|
||||
<img src="../files/settings.svg">
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>
|
||||
Wireless state
|
||||
<a class="cfg" onclick="open_modal(3);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
</h2>
|
||||
<div class="box">
|
||||
<ul class="group">
|
||||
<li>State</li>
|
||||
<li>Signal strength</li>
|
||||
@@ -152,9 +234,9 @@
|
||||
<div id="iforte_lws_v">%</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Software versions</h2>
|
||||
<div class="box">
|
||||
<ul class="group">
|
||||
@@ -188,8 +270,8 @@
|
||||
<li>1.2</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Device state</h2>
|
||||
<div class="box">
|
||||
<ul class="group">
|
||||
@@ -200,45 +282,60 @@
|
||||
<div id="iforte_devs_v"></div>
|
||||
</li>
|
||||
</ul>
|
||||
<button class="btn btn-primary btn-block esm dn btn-success" value="0" style="display: inline-block;">Enter standby mode</button>
|
||||
<button
|
||||
class="btn btn-primary btn-block esm dn btn-success"
|
||||
value="0"
|
||||
style="display: inline-block"
|
||||
id="esm"
|
||||
>
|
||||
Enter standby mode
|
||||
</button>
|
||||
<div>Current RAINS status</div>
|
||||
<div>
|
||||
<small class="fl">WET</small>
|
||||
<small class="fr">DRY</small>
|
||||
</div>
|
||||
<div id="iforte_rai" class="rains">
|
||||
<div style="width: 63%;"></div>
|
||||
<div class="rains">
|
||||
<div id="iforte_rains_bar_current" style="width: 50%"></div>
|
||||
</div>
|
||||
<div>MAX WET/resettable</div>
|
||||
<div>
|
||||
<small class="fl">WET</small>
|
||||
<small class="fr">DRY</small>
|
||||
</div>
|
||||
<div id="iforte_rair" class="rains">
|
||||
<div style="width: 63%;"></div>
|
||||
<div class="rains">
|
||||
<div id="iforte_rains_bar_max" style="width: 50%"></div>
|
||||
</div>
|
||||
<button class="btn btn-primary btn-block mwr" value="0">MAX WET reset</button>
|
||||
<button class="btn btn-primary btn-block">MAX WET reset</button>
|
||||
<p>
|
||||
<small id="iforte_wrt">last reset: 2.3.2023 16:19:57</small>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 box-c">
|
||||
</div>
|
||||
<div class="col-12 box-c">
|
||||
<h2 id="sta_err">Status messages</h2>
|
||||
<div class="box">
|
||||
<li>This is a simulated REAP™ page for demo purposes. Some content might be different on real fixtures.</li>
|
||||
<li>
|
||||
This is a simulated REAP™ page for demo purposes. Some content
|
||||
might be different on real fixtures.
|
||||
</li>
|
||||
<li>Big thanks to Vincent BOUQUET for creating this simulator.</li>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="cfg-modal" class="modal fade" tabindex="-1" role="dialog">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="cfg-modal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<img src="../files/settings.svg">
|
||||
<img src="../files/settings.svg" />
|
||||
<h5 class="modal-title" id="m-t"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -248,209 +345,136 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
</div>
|
||||
<script>
|
||||
var a_m = -1;
|
||||
var m_t = ['DMX/RDM settings', 'Reset timers', 'Reset temperatures', 'Wireless settings', ];
|
||||
var m_t = [
|
||||
"DMX/RDM settings",
|
||||
"Reset timers",
|
||||
"Reset temperatures",
|
||||
"Wireless settings",
|
||||
];
|
||||
|
||||
function open_modal(i) {
|
||||
a_m = i;
|
||||
mhdr_status('');
|
||||
if (a_m < m_t.length) {
|
||||
$('#m-t').html(m_t[a_m])
|
||||
$("#m-t").html(m_t[a_m]);
|
||||
}
|
||||
$('.sb').unbind();
|
||||
$('#m-f').empty();
|
||||
$('#m-f').append(' <button type="button" class="btn btn-primary sb">Save</button>');
|
||||
if(a_m==0) $('#m-f').show();
|
||||
else $('#m-f').hide();
|
||||
var h='';if(a_m==0){
|
||||
h+=c_txt('dmxa','DMX address','Please put DMX address from 1 to 512');
|
||||
h+=c_opt('dmxp','DMX preset',[1],'Mode ',0,1,'');
|
||||
h+=c_opt('dmxi','DMX input',['wired','wireless','wireless XLR out'],'',0,1,'Can not set wireless input now!');
|
||||
h+=c_txt('rdmn','RDM label','Please insert label,max 32 characters')
|
||||
} else if(a_m==1){
|
||||
h+=c_btn('Power on time reset',0,' rh')
|
||||
} else if(a_m==2){
|
||||
h+=c_btn('LEDs temperature reset',0,' rt');
|
||||
h+=c_btn('PSU temperature reset',3,' rt');
|
||||
h+=c_btn('Driver temperature reset',1,' rt');
|
||||
h+=c_btn('Base temperature reset',2,' rt')
|
||||
} else if(a_m==3){
|
||||
h+=c_btn('Unlink Wireless module',0,' lwu')
|
||||
$(".sb").unbind();
|
||||
$("#m-f").empty();
|
||||
$("#m-f").append(
|
||||
'<button type="button" class="btn btn-primary sb">Save</button>'
|
||||
);
|
||||
if (a_m == 0) $("#m-f").show();
|
||||
else $("#m-f").hide();
|
||||
var h = "";
|
||||
if (a_m == 0) {
|
||||
h += c_txt(
|
||||
"iforte_dmxa",
|
||||
"DMX address",
|
||||
"Please put DMX address from 1 to 512"
|
||||
);
|
||||
h += c_opt("iforte_dmxp", "DMX preset", [2], "Mode ", 0, 1, "");
|
||||
h += c_opt(
|
||||
"iforte_dmxi",
|
||||
"DMX input",
|
||||
["wired", "wireless", "wireless XLR out"],
|
||||
"",
|
||||
0,
|
||||
1,
|
||||
"Can not set wireless input now!"
|
||||
);
|
||||
h += c_txt(
|
||||
"iforte_rdmn",
|
||||
"RDM label",
|
||||
"Please insert label,max 32 characters"
|
||||
);
|
||||
} else if (a_m == 1) {
|
||||
h += c_btn("Power on time reset", 0, "rh");
|
||||
} else if (a_m == 2) {
|
||||
h += c_btn("LEDs temperature reset", 0, "rt");
|
||||
h += c_btn("PSU temperature reset", 3, "rt");
|
||||
h += c_btn("Driver temperature reset", 1, "rt");
|
||||
h += c_btn("Base temperature reset", 2, "rt");
|
||||
} else if (a_m == 3) {
|
||||
h += c_btn("Unlink Wireless module", 0, "lwu");
|
||||
}
|
||||
|
||||
$('#m-b').html(h);
|
||||
// pers set
|
||||
$("#m-b").html(h);
|
||||
copy_form_values(1);
|
||||
$('#cfg-modal').modal();
|
||||
$('.sb').bind('click',function(){
|
||||
$("#cfg-modal").modal();
|
||||
$(".sb").bind("click", function () {
|
||||
loader(1);
|
||||
var par=['dmxa','dmxp','dmxi','rdmn'];
|
||||
do_ajax('/set_dmx',pv(par),function (json){
|
||||
if(json){
|
||||
if(json['status']==0){
|
||||
mhdr_status('suc');
|
||||
var par = [
|
||||
"iforte_dmxa",
|
||||
"iforte_dmxp",
|
||||
"iforte_dmxi",
|
||||
"iforte_rdmn",
|
||||
];
|
||||
do_ajax("/set_dmx", pv(par), function (json) {
|
||||
if (json) {
|
||||
if (json["status"] == 0) {
|
||||
copy_form_values(0);
|
||||
if(a_m==0){
|
||||
console.log(json['dmxf']);
|
||||
fill_values(json,['dmxf'])
|
||||
} ptit(json['pt']);
|
||||
close_modal()
|
||||
if (a_m == 0) {
|
||||
console.log(json["dmxf"]);
|
||||
fill_values(json, ["dmxf"]);
|
||||
}
|
||||
show_errors(json['status'],par);
|
||||
loader(0)
|
||||
ptit(json["pt"]);
|
||||
close_modal();
|
||||
}
|
||||
})
|
||||
show_errors(json["status"], par);
|
||||
loader(0);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.rh ').bind('click ',function(){
|
||||
// hours reset
|
||||
$(".rh ").bind("click ", function () {
|
||||
loader(1);
|
||||
do_ajax('/reset_hours',{
|
||||
index: $(this).attr('value')
|
||||
},function (json){
|
||||
if(json){
|
||||
mhdr_status('suc');
|
||||
fill_values(json,['hr0','hr1','hr2','hr3'])
|
||||
do_ajax(
|
||||
"/reset_hours",
|
||||
{
|
||||
index: $(this).attr("value"),
|
||||
},
|
||||
function (json) {
|
||||
if (json) {
|
||||
fill_values(json, ["hr0", "hr1", "hr2", "hr3"]);
|
||||
}
|
||||
loader(0)
|
||||
})
|
||||
loader(0);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$('.rt').bind('click',function(){
|
||||
// max temp reset
|
||||
$(".rt").bind("click", function () {
|
||||
loader(1);
|
||||
do_ajax('/reset_temps',{
|
||||
index: $(this).attr('value')
|
||||
},function (json){
|
||||
if(json){
|
||||
mhdr_status('suc');
|
||||
fill_values(json,['tmr0','tmr1','tmr2'])
|
||||
do_ajax(
|
||||
"/reset_temps",
|
||||
{
|
||||
index: $(this).attr("value"),
|
||||
},
|
||||
function (json) {
|
||||
if (json) {
|
||||
fill_values(json, ["tmr0", "tmr1", "tmr2"]);
|
||||
}
|
||||
loader(0)
|
||||
})
|
||||
loader(0);
|
||||
}
|
||||
);
|
||||
});
|
||||
|
||||
$('.lwu').bind('click',function(){
|
||||
// wireless unlink
|
||||
$(".lwu").bind("click", function () {
|
||||
loader(1);
|
||||
do_ajax('/lwm',{
|
||||
unlink:1
|
||||
},function (json){
|
||||
if(json){
|
||||
fill_values(json,['lwc','lws']);
|
||||
mhdr_status('suc');
|
||||
close_modal()
|
||||
}
|
||||
loader(0)
|
||||
})
|
||||
})
|
||||
close_modal();
|
||||
loader(0);
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
var emb=$('button.esm');
|
||||
emb.addClass('btn-success');
|
||||
function ems_btn(v){
|
||||
if(v==0){
|
||||
emb.removeClass('sa btn-warning').html('Enter standby mode').show()
|
||||
} else {
|
||||
emb.addClass('sa btn-warning').html('Escape standby mode').show()
|
||||
}
|
||||
}
|
||||
emb.click(function(){
|
||||
var run=true;
|
||||
var s_v=(emb.hasClass('sa') ? 0:1);
|
||||
if((s_v==1)&&!confirm('Are you sure you want to enter standby mode?')) run=false;
|
||||
if(run){
|
||||
do_ajax('/sbm',{
|
||||
s:s_v
|
||||
},function (json){
|
||||
ems_btn(json['sm']);
|
||||
fill_values(json,['devs'])
|
||||
})
|
||||
}
|
||||
});
|
||||
var bussy=0;
|
||||
function do_5s(){bussy|=(1 << 0);
|
||||
do_ajax('/lwm', {}, function(json) {
|
||||
if (json) {
|
||||
fill_values(json, ['lwc', 'lws'])
|
||||
}
|
||||
bussy &= ~(1 << 0)
|
||||
});
|
||||
bussy |= (1 << 1);
|
||||
do_ajax('/reset_temps', {}, function(json) {
|
||||
if (json) {
|
||||
fill_values(json, ['t0', 't1', 't2', 't3', 'tm0', 'tm1', 'tm2', 'tm3', 'tmr0', 'tmr1', 'tmr2', 'tmr3']);
|
||||
$('.tu').html(json['tu'])
|
||||
}
|
||||
bussy &= ~(1 << 1)
|
||||
});
|
||||
bussy |= (1 << 3);
|
||||
do_ajax('/reset_hours', {}, function(json) {
|
||||
if (json) {
|
||||
fill_values(json, ['h0', 'h1', 'h2', 'h3', 'hr0', 'hr1', 'hr2', 'hr3'])
|
||||
}
|
||||
bussy &= ~(1 << 3)
|
||||
});
|
||||
bussy |= (1 << 4);
|
||||
do_ajax('/devsta', {}, function(json) {
|
||||
if (json) {
|
||||
fill_values(json, ['devs']);
|
||||
$('#rai>div').css('width', json['rains']);
|
||||
$('#rair>div').css('width', json['maxw']);
|
||||
$('#wrt').html('last reset: ' + json['maxwt']);
|
||||
ems_btn(json['sm'])
|
||||
} else {
|
||||
fill_values({
|
||||
devs: 'disconnected'
|
||||
}, ['devs'])
|
||||
}
|
||||
bussy &= ~(1 << 4)
|
||||
});
|
||||
bussy |= (1 << 7);
|
||||
do_ajax('/errors', {}, function(json) {
|
||||
if (json) {
|
||||
if (json['err']) {
|
||||
if (json['err'].length) $('#sta_err').addClass('err');
|
||||
else $('#sta_err').removeClass('err');
|
||||
var html = '';
|
||||
for (i = 0; i < json['err'].length; i++) html += ' <li> ' + json['err'][i] + ' </li>';
|
||||
$('#err_v').html(html)
|
||||
}
|
||||
}
|
||||
bussy&=~(1 << 7)})
|
||||
}
|
||||
do_ajax('/status_i', {}, function(json) {
|
||||
if (json) {
|
||||
fill_values(json, ['dmxa', 'dmxp', 'dmxf', 'dmxi', 'pt', 'ip', 'mac', 'rdmu', 'rdmn']);
|
||||
ptit(json['pt']);
|
||||
$('.tu').html(json['tu'])
|
||||
}
|
||||
});
|
||||
do_ajax('/reset_hours', {}, function(json) {
|
||||
if (json) {
|
||||
fill_values(json, ['h0', 'h1', 'h2', 'h3', 'hr0', 'hr1', 'hr2', 'hr3'])
|
||||
}
|
||||
});
|
||||
do_ajax('/sw_ver', {}, function(json) {
|
||||
if (json) {
|
||||
$('#sw_vers li').each(function(i) {
|
||||
var v = json['vers'][i];
|
||||
$(this).html(v == 0 ? '-' : Math.floor(v / 10) + '.' + (v % 10))
|
||||
})
|
||||
}
|
||||
});
|
||||
do_5s();
|
||||
setInterval(function() {
|
||||
if (bussy == 0) do_5s()
|
||||
}, 5000);
|
||||
$('button.mwr').click(function() {
|
||||
do_ajax('/mwres', {}, function(json) {
|
||||
if (json) {
|
||||
$('#rair>div').css('width', json['maxw']);
|
||||
$('#wrt').html('last reset: ' + json['maxwt'])
|
||||
}
|
||||
})
|
||||
})
|
||||
// standby mode
|
||||
$("#esm").on("click", function () {
|
||||
toggleStandbyMode();
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,38 +1,70 @@
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1,shrink-to-fit=no">
|
||||
<link rel="stylesheet" href="../files/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="../files/layout.css">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta
|
||||
name="viewport"
|
||||
content="width=device-width,initial-scale=1,shrink-to-fit=no"
|
||||
/>
|
||||
<link rel="stylesheet" href="../files/bootstrap.min.css" />
|
||||
<link rel="stylesheet" href="../files/layout.css" />
|
||||
<script src="../files/jquery-3.3.1.min.js"></script>
|
||||
<script src="../files/popper.min.js"></script>
|
||||
<script src="../files/bootstrap.min.js"></script>
|
||||
<script src="./base.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
</head>
|
||||
<body>
|
||||
<nav class="navbar fixed-top navbar-expand-md navbar-dark bg-dark">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="./index.html"><img src="../files/robe_logo_white.svg"></a><button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbar"><span class="navbar-toggler-icon"></span></button>
|
||||
<a class="navbar-brand" href="./index.html"
|
||||
><img src="../files/robe_logo_white.svg" /></a
|
||||
><button
|
||||
class="navbar-toggler"
|
||||
type="button"
|
||||
data-toggle="collapse"
|
||||
data-target="#navbar"
|
||||
>
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbar">
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item"><a class="nav-link" href="./index.html">Status</a></li>
|
||||
<li class="nav-item active"><a class="nav-link" href="./personality.html">Personality</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="./logs.html">Logs</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="./sensors.html">RAINS logs</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="./discovery.html">Discovery</a></li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="./index.html">Status</a>
|
||||
</li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="./personality.html">Personality</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="./logs.html">Logs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="./sensors.html">RAINS logs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="./discovery.html">Discovery</a>
|
||||
</li>
|
||||
<li class="nav-item"><a class="nav-link" id="scfg">Settings</a></li>
|
||||
<li class="nav-item"><a class="nav-link" id="idnt"><img class="rdmi" src="../files/identify.svg"></a></li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" id="idnt"
|
||||
><img class="rdmi" src="../files/identify.svg"
|
||||
/></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
<div class="fixed-top text-center device-label" id="pth" onclick="window.location = ('../index.html')"></div>
|
||||
<div
|
||||
class="fixed-top text-center device-label"
|
||||
id="pth"
|
||||
onclick="window.location = ('../index.html')"
|
||||
></div>
|
||||
<div class="container-fluid in">
|
||||
<h1>Personality</h1>
|
||||
<div class="row" id="boxes">
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>DMX/RDM settings <a class="cfg" onclick="open_modal(0);">
|
||||
<img src="../files/settings.svg">
|
||||
<h2>
|
||||
DMX/RDM settings
|
||||
<a class="cfg" onclick="open_modal(0);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
@@ -59,8 +91,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Ethernet settings <a class="cfg" onclick="open_modal(1);">
|
||||
<img src="../files/settings.svg">
|
||||
<h2>
|
||||
Ethernet settings
|
||||
<a class="cfg" onclick="open_modal(1);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
@@ -95,8 +129,10 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Pan/Tilt settings <a class="cfg" onclick="open_modal(2);">
|
||||
<img src="../files/settings.svg">
|
||||
<h2>
|
||||
Pan/Tilt settings
|
||||
<a class="cfg" onclick="open_modal(2);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
@@ -125,13 +161,15 @@
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Blackout settings <a class="cfg" onclick="open_modal(3);">
|
||||
<img src="../files/settings.svg">
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>
|
||||
Blackout settings
|
||||
<a class="cfg" onclick="open_modal(3);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
</h2>
|
||||
<div class="box">
|
||||
<ul class="group">
|
||||
<li>Blackout DMC</li>
|
||||
</ul>
|
||||
@@ -157,14 +195,16 @@
|
||||
<div id="iforte_blprm_v"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Screen settings <a class="cfg" onclick="open_modal(4);">
|
||||
<img src="../files/settings.svg">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>
|
||||
Screen settings
|
||||
<a class="cfg" onclick="open_modal(4);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
</h2>
|
||||
<div class="box">
|
||||
<ul class="group">
|
||||
<li>Display intensity</li>
|
||||
<li>Screensaver delay</li>
|
||||
@@ -185,14 +225,16 @@
|
||||
<div id="iforte_dor_v"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Color settings <a class="cfg" onclick="open_modal(7);">
|
||||
<img src="../files/settings.svg">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>
|
||||
Color settings
|
||||
<a class="cfg" onclick="open_modal(7);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
</h2>
|
||||
<div class="box">
|
||||
<ul class="group">
|
||||
<li>Dimmer curve</li>
|
||||
</ul>
|
||||
@@ -201,34 +243,46 @@
|
||||
<div id="iforte_cdimc_v"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Date & time settings <a class="cfg" onclick="open_modal(5);">
|
||||
<img src="../files/settings.svg">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>
|
||||
Date & time settings
|
||||
<a class="cfg" onclick="open_modal(5);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
</h2>
|
||||
<div class="box">
|
||||
<ul class="group">
|
||||
<li>Date</li>
|
||||
<li>Time</li>
|
||||
</ul>
|
||||
<ul class="group vals" id="">
|
||||
<li>
|
||||
<div id="iforte_dtd_v"></div>.<div id="iforte_dtmo_v"></div>.<div id="iforte_dty_v"></div>
|
||||
<div id="iforte_dtd_v"></div>
|
||||
.
|
||||
<div id="iforte_dtmo_v"></div>
|
||||
.
|
||||
<div id="iforte_dty_v"></div>
|
||||
</li>
|
||||
<li>
|
||||
<div id="iforte_dth_v"></div>:<div id="iforte_dtmi_v"></div>:<div id="iforte_dts_v"></div>
|
||||
<div id="iforte_dth_v"></div>
|
||||
:
|
||||
<div id="iforte_dtmi_v"></div>
|
||||
:
|
||||
<div id="iforte_dts_v"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>Other settings <a class="cfg" onclick="open_modal(6);">
|
||||
<img src="../files/settings.svg">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c">
|
||||
<h2>
|
||||
Other settings
|
||||
<a class="cfg" onclick="open_modal(6);">
|
||||
<img src="../files/settings.svg" />
|
||||
</a>
|
||||
</h2>
|
||||
<div class="box">
|
||||
</h2>
|
||||
<div class="box">
|
||||
<ul class="group">
|
||||
<li>Follow spot mode</li>
|
||||
<li>LEDs output frequency (Hz)</li>
|
||||
@@ -257,22 +311,31 @@
|
||||
<div id="iforte_btns_v"></div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c" style="display: block;"><h2>Pressure test</h2><div class="box prst text-center"><span></span><span></span><span></span><button class="btn btn-success btn-block" id="pt_b">Start test</button></div></div>
|
||||
<div class="col-md-6 col-xl-4 box-c" style="display: block;"><h2>Pressure test</h2><div class="box prst text-center"><span></span><span class="ptok">OK</span><span></span><button class="btn btn-block btn-success" id="pt_b">Start test</button></div></div>
|
||||
<div class="col-md-6 col-xl-4 box-c" style="display: block;"><h2>Pressure test</h2><div class="box prst text-center"><span></span><span class="ptf">FAIL</span><span></span><button class="btn btn-block btn-success" id="pt_b">Start test</button></div></div>
|
||||
<div class="col-md-6 col-xl-4 box-c" style="display: block;"><h2>Pressure test</h2><div class="box prst text-center"><span>Measuring Pressure</span><span>Remaining Time 04:37</span><span>42 °C / delta 3.34 hPa</span><button class="btn btn-block btn-danger" id="pt_b">Stop test</button></div></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div id="cfg-modal" class="modal fade" tabindex="-1" role="dialog">
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 col-xl-4 box-c" style="display: block">
|
||||
<h2>Pressure test</h2>
|
||||
<div class="box prst text-center">
|
||||
<span id="pt-l1"></span><span id="pt-l2"></span><span id="pt-l3"></span><button class="btn btn-success btn-block"
|
||||
id="pt_b" onclick="pressureTest()">
|
||||
Start test
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="cfg-modal" class="modal fade" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<img src="../files/settings.svg">
|
||||
<img src="../files/settings.svg" />
|
||||
<h5 class="modal-title" id="m-t"></h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<button
|
||||
type="button"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
aria-label="Close"
|
||||
>
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -282,310 +345,292 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
</div>
|
||||
<script>
|
||||
var a_m = -1;
|
||||
var m_t = ['DMX/RDM settings', 'Ethernet settings', 'Pan/Tilt settings', 'Blackout settings', 'Screen settings', 'Date & time settings', 'Other settings', 'Color settings', 'Lamp settings', ];
|
||||
var addrs = ['set_dmx', 'eth_s', 'pt_s', 'bl_s', 'dis_s', 'ldt_s', 'oth_s', 'col_s', 'lamp_s', ];
|
||||
var m_t = [
|
||||
"DMX/RDM settings",
|
||||
"Ethernet settings",
|
||||
"Pan/Tilt settings",
|
||||
"Blackout settings",
|
||||
"Screen settings",
|
||||
"Date & time settings",
|
||||
"Other settings",
|
||||
"Color settings",
|
||||
];
|
||||
var addrs = [
|
||||
"set_dmx",
|
||||
"eth_s",
|
||||
"pt_s",
|
||||
"bl_s",
|
||||
"dis_s",
|
||||
"ldt_s",
|
||||
"oth_s",
|
||||
"col_s",
|
||||
];
|
||||
var params = [
|
||||
['iforte_dmxa', 'dmxp', 'dmxi', 'rdmn'],
|
||||
['emod', 'ee2d', 'eanu', 'emau', 'emas', 'esau'],
|
||||
['pr', 'tr', 'ptf', 'ptm', 'pte'],
|
||||
['bldmc', 'blptm', 'blprm', 'blgwm', 'bltim'],
|
||||
['dint', 'dsd', 'dtl', 'dor'],
|
||||
['dtd', 'dtmo', 'dty', 'dth', 'dtmi', 'dts'],
|
||||
['mics', 'fanm', 'tmpu', 'them', 'cpm', 'fannl', 'fsmo', 'btns', 'freq', 'freqa', 'gind', 'gwhm'],
|
||||
['ccri', 'cdimc', 'hpwrm', 'ccalm', 'cmixm', 'chrwh', 'thefs', 'whip83z'],
|
||||
['lonof', 'lpwr', 'ligde', 'llise', 'lonpon', 'lofvd', 'londp', 'lofdm'],
|
||||
["iforte_dmxa", "iforte_dmxp", "iforte_dmxi", "iforte_rdmn"],
|
||||
["iforte_emod", "iforte_ee2d", "iforte_eanu", "iforte_emau", "iforte_emas", "iforte_esau"],
|
||||
["iforte_pr", "iforte_tr", "iforte_ptf", "iforte_ptm", "iforte_pte"],
|
||||
["iforte_bldmc", "iforte_blptm", "iforte_blprm", "iforte_blgwm", "iforte_bltim"],
|
||||
["iforte_dint", "iforte_dsd", "iforte_dtl", "iforte_dor"],
|
||||
["iforte_dtd", "iforte_dtmo", "iforte_dty", "iforte_dth", "iforte_dtmi", "iforte_dts"],
|
||||
[
|
||||
"iforte_fanm",
|
||||
"iforte_tmpu",
|
||||
"iforte_cpm",
|
||||
"iforte_fannl",
|
||||
"iforte_fsmo",
|
||||
"iforte_btns",
|
||||
"iforte_freq",
|
||||
"iforte_freqa",
|
||||
"iforte_gind",
|
||||
"iforte_gwhm",
|
||||
],
|
||||
[
|
||||
"iforte_cdimc"
|
||||
]
|
||||
];
|
||||
var frq = 0;
|
||||
|
||||
function open_modal(i) {
|
||||
a_m = i;
|
||||
mhdr_status('');
|
||||
if (a_m < m_t.length) {
|
||||
$('#m-t').html(m_t[a_m])
|
||||
$("#m-t").html(m_t[a_m]);
|
||||
}
|
||||
$('.sb').unbind();
|
||||
$('#m-f').empty();
|
||||
$('#m-f').append('<button type="button" class="btn btn-primary sb">Save</button>');
|
||||
var off_on_l=['off','on'];
|
||||
var h='';
|
||||
if(a_m==0){
|
||||
h+=c_txt('dmxa','DMX address','Please put DMX address from 1 to 512');
|
||||
h+=c_opt('dmxp','DMX preset',[1],'Mode ',0,1,'');
|
||||
h+=c_opt('dmxi','DMX input',['wired','wireless','wireless XLR out'],'',0,1,'Can not set wireless input now!');
|
||||
h+=c_txt('rdmn','RDM label','Please insert label,max 32 characters')
|
||||
} else if(a_m==1){
|
||||
h+=c_rad('emod','Ethernet mode',['disable','ArtNet','gMA1','gMA2','sACN'],'','');
|
||||
h+=c_rad('ee2d','Ethernet to DMX',off_on_l,'','');
|
||||
h+=c_txt('eanu','ArtNet universe','Please put ArtNet universe from 0 to 255');
|
||||
h+=c_txt('emau','MANet I/II universe','Please put MANet I / II universe from 1 to 256 (64 for MANet I)');
|
||||
h+=c_txt('emas','MANet session ID','Please put MANet session ID from 1 to 32');
|
||||
h+=c_txt('esau','sACN universe','Please put sACN universe from 1 to 32000')
|
||||
} else if(a_m==2){
|
||||
h+='<div class="row">';
|
||||
h+=c_rad('pr','Pan reverse',off_on_l,'','col-6');
|
||||
h+=c_rad('tr','Tilt reverse',off_on_l,'','col-6');
|
||||
h+=c_rad('ptf','Pan / Tilt feedback',off_on_l,'','col-6');
|
||||
h+=c_rad('ptm','Pan / Tilt Mode',['speed','time'],'','col-6');
|
||||
h+=c_rad('pte','Pan / Tilt EMS',off_on_l,'','col-6');
|
||||
h+='</div>'
|
||||
} else if(a_m==3){
|
||||
h+=c_rad('bldmc','Blackout DMC',off_on_l,'','');
|
||||
h+='<h3>Active blackout while</h3>';
|
||||
h+=c_rad('blptm','Pan/Tilt moving',off_on_l,'','');
|
||||
h+=c_rad('blgwm','Gobo wheel moving',off_on_l,'','');
|
||||
h+=c_rad('blprm','Color wheel moving',off_on_l,'','')
|
||||
} else if(a_m==4){
|
||||
h+=c_opt('dint','Display intensity',[10],'',0,1,'');
|
||||
var dsd_dtl_l=['off','1 min','2 min','3 min','4 min','5 min','6 min','7 min','8 min','9 min','10 min'];
|
||||
h+=c_opt('dsd','Screensaver delay',dsd_dtl_l,'',0,0,'');
|
||||
h+=c_opt('dtl','Touchscreen lock',dsd_dtl_l,'',0,0,'');
|
||||
h+=c_rad('dor','Display orientation',['normal','inverted','auto'],'')
|
||||
} else if(a_m==5) {
|
||||
h+='<div class="row">';
|
||||
h+=c_txt('dtd','Day','','col-4');
|
||||
h+=c_txt('dtmo','Month','','col-4');
|
||||
h+=c_txt('dty','Year','','col-4');
|
||||
h+=c_txt('dth','Hour','','col-4');
|
||||
h+=c_txt('dtmi','Minute','','col-4');
|
||||
h+=c_txt('dts','Second','','col-4');
|
||||
h+='</div>';
|
||||
h+='<button class="btn btn-primary btn-block uldt">Use local date & time</button>'
|
||||
} else if(a_m==6){
|
||||
h+=c_opt('fsmo','Follow spot mode',['off','soft','medium','hard'],'',0,0,'');
|
||||
h+=c_rad('frqs','LEDs output frequency (Hz)',['300','600','1200','2400'],'','');
|
||||
h+='<div class="form-group">';
|
||||
h+='<label for="frqa" class="col-form-label">LEDs frequency adjust</label>';
|
||||
h+='<div class="row">';
|
||||
h+='<div class="col-7 col-sm-8"><input type="range" min="0" max="1663" class="form-control" id="frqa"></div>';
|
||||
h+='<div class="col-5 col-sm-4 mt06 text-right" id="frq_bv"></div>';
|
||||
h+='</div>';
|
||||
h+='</div>';
|
||||
h+=c_rad('fanm','Fan mode',['auto','high','quiet'],'','');
|
||||
h+='<div class="form-group" id="fannl_fg">';
|
||||
h+='<label for="fannl" class="col-form-label">Fan noise level</label>';
|
||||
h+='<div class="row">';
|
||||
h+='<div class="col-9 col-sm-10"><input type="range" min="0" max="100" class="form-control" id="fannl"></div>';
|
||||
h+='<div class="col-3 col-sm-2 mt06 text-right">100 %</div>';
|
||||
h+='</div>';
|
||||
h+='</div>';
|
||||
h+=c_opt('gind','Gobo indexing',['max. speed & shortcut','follow spd. & dir.','max. spd. & follow dir.'],'',0,0,'');
|
||||
h+=c_rad('tmpu','Temperature unit',['°C','°F'],'','');
|
||||
h+=c_rad('btns','Display buttons',off_on_l,'','')
|
||||
} else if(a_m==7){
|
||||
h+='<div class="row">';
|
||||
h+=c_rad('cdimc','Dimmer curve',['linear','square law'],'','col-6');
|
||||
h+=c_rad('hpwrm','High power mode',off_on_l,'','')
|
||||
} else if(a_m==8){
|
||||
h+=c_rad('lonof','Lamp status',off_on_l,'','');
|
||||
h+='<div class="form-group" id="ligde_fg"> ';
|
||||
h+='<label for="ligde" class="col-form-label">Lamp ignition delay</label>';
|
||||
h+='<div class="row">';
|
||||
h+='<div class="col-9 col-sm-10"><input type="range" min="0" max = "90" class="form-control" id="ligde"></div>';
|
||||
h+='<div class="col-3 col-sm-2 mt06 text-right"></div>';
|
||||
h+='</div>';
|
||||
h+='</div>';
|
||||
h+='<div class="row">';
|
||||
h+=c_rad('llise','Lamp light sensor',off_on_l,'','col-6');
|
||||
h+=c_rad('lonpon ','Lamp on power on',off_on_l,'','col-6');
|
||||
h+=c_rad('lofvd','Lamp off via DMX',off_on_l,'','col-6');
|
||||
h+=c_rad('londp','Lamp on if DMX present',off_on_l,'','col-6');
|
||||
h+=c_rad('lofdm ','Lamp off if DMX missing',off_on_l,'','col-6');
|
||||
h+='</div>'
|
||||
$(".sb").unbind();
|
||||
$("#m-f").empty();
|
||||
$("#m-f").append(
|
||||
'<button type="button" class="btn btn-primary sb">Save</button>'
|
||||
);
|
||||
var off_on_l = ["off", "on"];
|
||||
var h = "";
|
||||
if (a_m == 0) {
|
||||
h += c_txt(
|
||||
"iforte_dmxa",
|
||||
"DMX address",
|
||||
"Please put DMX address from 1 to 512"
|
||||
);
|
||||
h += c_opt("iforte_dmxp", "DMX preset", [2], "Mode ", 0, 1, "");
|
||||
h += c_opt(
|
||||
"iforte_dmxi",
|
||||
"DMX input",
|
||||
["wired", "wireless", "wireless XLR out"],
|
||||
"",
|
||||
0,
|
||||
1,
|
||||
"Can not set wireless input now!"
|
||||
);
|
||||
h += c_txt(
|
||||
"iforte_rdmn",
|
||||
"RDM label",
|
||||
"Please insert label,max 32 characters"
|
||||
);
|
||||
} else if (a_m == 1) {
|
||||
h += c_rad(
|
||||
"iforte_emod",
|
||||
"Ethernet mode",
|
||||
["disable", "ArtNet", "gMA1", "gMA2", "sACN"],
|
||||
"",
|
||||
""
|
||||
);
|
||||
h += c_rad("iforte_ee2d", "Ethernet to DMX", off_on_l, "", "");
|
||||
h += c_txt(
|
||||
"iforte_eanu",
|
||||
"ArtNet universe",
|
||||
"Please put ArtNet universe from 0 to 255"
|
||||
);
|
||||
h += c_txt(
|
||||
"iforte_emau",
|
||||
"MANet I/II universe",
|
||||
"Please put MANet I / II universe from 1 to 256 (64 for MANet I)"
|
||||
);
|
||||
h += c_txt(
|
||||
"iforte_emas",
|
||||
"MANet session ID",
|
||||
"Please put MANet session ID from 1 to 32"
|
||||
);
|
||||
h += c_txt(
|
||||
"iforte_esau",
|
||||
"sACN universe",
|
||||
"Please put sACN universe from 1 to 32000"
|
||||
);
|
||||
} else if (a_m == 2) {
|
||||
h += c_rad("iforte_pr", "Pan reverse", off_on_l, "", "");
|
||||
h += c_rad("iforte_tr", "Tilt reverse", off_on_l, "", "");
|
||||
h += c_rad("iforte_ptf", "Pan / Tilt feedback", off_on_l, "", "");
|
||||
h += c_rad("iforte_ptm", "Pan / Tilt Mode", ["speed", "time"], "", "");
|
||||
h += c_rad("iforte_pte", "Pan / Tilt EMS", off_on_l, "", "");
|
||||
} else if (a_m == 3) {
|
||||
h += c_rad("iforte_bldmc", "Blackout DMC", off_on_l, "", "");
|
||||
h += "<h3>Active blackout while</h3>";
|
||||
h += c_rad("iforte_blptm", "Pan/Tilt moving", off_on_l, "", "");
|
||||
h += c_rad("iforte_blgwm", "Gobo wheel moving", off_on_l, "", "");
|
||||
h += c_rad("iforte_blprm", "Color wheel moving", off_on_l, "", "");
|
||||
} else if (a_m == 4) {
|
||||
h += c_opt("iforte_dint", "Display intensity", [10], "", 0, 1, "");
|
||||
var dsd_dtl_l = [
|
||||
"off",
|
||||
"1 min",
|
||||
"2 min",
|
||||
"3 min",
|
||||
"4 min",
|
||||
"5 min",
|
||||
"6 min",
|
||||
"7 min",
|
||||
"8 min",
|
||||
"9 min",
|
||||
"10 min",
|
||||
];
|
||||
h += c_opt("iforte_dsd", "Screensaver delay", dsd_dtl_l, "", 0, 0, "");
|
||||
h += c_opt("iforte_dtl", "Touchscreen lock", dsd_dtl_l, "", 0, 0, "");
|
||||
h += c_rad(
|
||||
"iforte_dor",
|
||||
"Display orientation",
|
||||
["normal", "inverted", "auto"],
|
||||
""
|
||||
);
|
||||
} else if (a_m == 5) {
|
||||
h += '<div class="row">';
|
||||
h += c_txt("iforte_dtd", "Day", "", "col-4");
|
||||
h += c_txt("iforte_dtmo", "Month", "", "col-4");
|
||||
h += c_txt("iforte_dty", "Year", "", "col-4");
|
||||
h += c_txt("iforte_dth", "Hour", "", "col-4");
|
||||
h += c_txt("iforte_dtmi", "Minute", "", "col-4");
|
||||
h += c_txt("iforte_dts", "Second", "", "col-4");
|
||||
h += "</div>";
|
||||
h +=
|
||||
'<button class="btn btn-primary btn-block uldt">Use local date & time</button>';
|
||||
} else if (a_m == 6) {
|
||||
h += c_opt(
|
||||
"iforte_fsmo",
|
||||
"Follow spot mode",
|
||||
["off", "soft", "medium", "hard"],
|
||||
"",
|
||||
0,
|
||||
0,
|
||||
""
|
||||
);
|
||||
h += c_rad(
|
||||
"iforte_frqs",
|
||||
"LEDs output frequency (Hz)",
|
||||
["300", "600", "1200", "2400"],
|
||||
"",
|
||||
""
|
||||
);
|
||||
h += '<div class="form-group">';
|
||||
h +=
|
||||
'<label for="iforte_frqa" class="col-form-label">LEDs frequency adjust</label>';
|
||||
h += '<div class="row">';
|
||||
h +=
|
||||
'<div class="col-7 col-sm-8"><input type="range" min="0" max="1663" class="form-control" id="iforte_frqa"></div>';
|
||||
h += '<div class="col-5 col-sm-4 mt06 text-right" id="iforte_frq_bv"></div>';
|
||||
h += "</div>";
|
||||
h += "</div>";
|
||||
h += c_rad("iforte_fanm", "Fan mode", ["auto", "high", "quiet"], "", "");
|
||||
h += '<div class="form-group" id="iforte_fannl_fg">';
|
||||
h +=
|
||||
'<label for="iforte_fannl" class="col-form-label">Fan noise level</label>';
|
||||
h += '<div class="row">';
|
||||
h +=
|
||||
'<div class="col-9 col-sm-10"><input type="range" min="0" max="100" class="form-control" id="iforte_fannl"></div>';
|
||||
h += '<div class="col-3 col-sm-2 mt06 text-right">100 %</div>';
|
||||
h += "</div>";
|
||||
h += "</div>";
|
||||
h += c_opt(
|
||||
"iforte_gind",
|
||||
"Gobo indexing",
|
||||
[
|
||||
"max. speed & shortcut",
|
||||
"follow spd. & dir.",
|
||||
"max. spd. & follow dir.",
|
||||
],
|
||||
"",
|
||||
0,
|
||||
0,
|
||||
""
|
||||
);
|
||||
h += c_rad("iforte_tmpu", "Temperature unit", ["°C", "°F"], "", "");
|
||||
h += c_rad("iforte_btns", "Display buttons", off_on_l, "", "");
|
||||
} else if (a_m == 7) {
|
||||
h += c_rad("iforte_cdimc", "Dimmer curve", ["linear", "square law"], "", "");
|
||||
}
|
||||
|
||||
$('#m-b').html(h);
|
||||
$('#m-f').show();
|
||||
$("#m-b").html(h);
|
||||
$("#m-f").show();
|
||||
copy_form_values(1);
|
||||
if(a_m==8){
|
||||
if($('#ligde_v').html()=='off'){
|
||||
$('#ligde').val(0)}
|
||||
}
|
||||
$('#cfg-modal').modal();
|
||||
$('.sb').bind('click',function(){
|
||||
$("#cfg-modal").modal();
|
||||
$(".sb").bind("click", function () {
|
||||
loader(1);
|
||||
var p_add='';
|
||||
if(a_m==6){
|
||||
p_add='&frq='+frq
|
||||
var p_add = "";
|
||||
if (a_m == 6) {
|
||||
p_add = "&frq=" + frq;
|
||||
}
|
||||
do_ajax(addrs[a_m],pv(params[a_m])+p_add,function (json){
|
||||
if(json){
|
||||
if(json['status']==0){
|
||||
mhdr_status('suc');
|
||||
do_ajax(addrs[a_m], pv(params[a_m]) + p_add, function (json) {
|
||||
if (json) {
|
||||
if (json["status"] == 0) {
|
||||
copy_form_values(0);
|
||||
if(a_m==0){
|
||||
fill_values(json,['dmxf']);
|
||||
ptit(json['pt'])
|
||||
} else if(a_m==6){
|
||||
if(json['fanm']=='quiet'){
|
||||
$('#themq').show();
|
||||
if (a_m == 0) {
|
||||
ptit(json["pt"]);
|
||||
} else if (a_m == 6) {
|
||||
if (json["iforte_fanm"] == "quiet") {
|
||||
$("#iforte_themq").show();
|
||||
} else {
|
||||
$('#themq').hide();
|
||||
$("#iforte_themq").hide();
|
||||
}
|
||||
$('#frqs_v').html(frq_s(frq))
|
||||
} else if(a_m==8){
|
||||
if($('#ligde').val()==0) {
|
||||
$('#ligde_v').html('off')
|
||||
$("#iforte_frqs_v").html(iforte_frq_s(frq));
|
||||
}
|
||||
close_modal();
|
||||
}
|
||||
close_modal()
|
||||
show_errors(json["status"], params[a_m]);
|
||||
loader(0);
|
||||
}
|
||||
show_errors(json['status'],params[a_m]);loader(0)
|
||||
}
|
||||
})
|
||||
});
|
||||
if(a_m==5){
|
||||
$('.uldt').bind('click',function(){
|
||||
var date=new Date();
|
||||
$('#dtd').val(date.getDate());
|
||||
$('#dtmo').val(date.getMonth()+1);
|
||||
$('#dty').val(date.getFullYear());
|
||||
$('#dth').val(('0'+date.getHours()).slice(-2));
|
||||
$('#dtmi').val(('0'+date.getMinutes()).slice(-2));
|
||||
$('#dts').val(('0'+date.getSeconds()).slice(-2))
|
||||
})
|
||||
} else if(a_m==6){
|
||||
$('#fannl').on('input change',function(){
|
||||
$(this).parent().next().html($(this).val()+'%')
|
||||
});
|
||||
$('#fannl').change();
|
||||
$('input[name=fanm]').on('change',function(){
|
||||
if($('input[name=fanm]:checked').val()==2) {
|
||||
$('#fannl_fg').show();
|
||||
if (a_m == 5) {
|
||||
$(".uldt").bind("click", function () {
|
||||
var date = new Date();
|
||||
$("#iforte_dtd").val(date.getDate());
|
||||
$("#iforte_dtmo").val(date.getMonth() + 1);
|
||||
$("#iforte_dty").val(date.getFullYear());
|
||||
$("#iforte_dth").val(("0" + date.getHours()).slice(-2));
|
||||
$("#iforte_dtmi").val(("0" + date.getMinutes()).slice(-2));
|
||||
$("#iforte_dts").val(("0" + date.getSeconds()).slice(-2));
|
||||
});
|
||||
} else if (a_m == 6) {
|
||||
$("#iforte_fannl").on("input change", function () {
|
||||
$(this)
|
||||
.parent()
|
||||
.next()
|
||||
.html($(this).val() + "%");
|
||||
});
|
||||
$("#iforte_fannl").change();
|
||||
$("input[name=iforte_fanm]").on("change", function () {
|
||||
if ($("input[name=iforte_fanm]:checked").val() == 2) {
|
||||
$("#iforte_fannl_fg").show();
|
||||
} else {
|
||||
$('#fannl_fg').hide()
|
||||
$("#iforte_fannl_fg").hide();
|
||||
}
|
||||
});
|
||||
$('input[name=fanm]').change();
|
||||
$('input[name=frqs]').eq(frq>>12).attr('checked','checked');
|
||||
$('#frqa').val(frq & 0xfff);
|
||||
$('input[name=frqs]').on('change',function(){
|
||||
frq=$('input[name=frqs]:checked').val() << 12; frq |= 0x340;
|
||||
$('#frqa').val(0x340);
|
||||
$('#frq_bv').html(frq_s(frq) + ' Hz')
|
||||
$("input[name=iforte_fanm]").change();
|
||||
$("input[name=iforte_frqs]")
|
||||
.eq(frq >> 12)
|
||||
.attr("checked", "checked");
|
||||
$("#iforte_frqa").val(frq & 0xfff);
|
||||
$("input[name=iforte_frqs]").on("change", function () {
|
||||
frq = $("input[name=iforte_frqs]:checked").val() << 12;
|
||||
frq |= 0x340;
|
||||
$("#iforte_frqa").val(0x340);
|
||||
$("#iforte_frq_bv").html(iforte_frq_s(frq) + " Hz");
|
||||
});
|
||||
$('#frqa').on('input change', function() {
|
||||
$("#iforte_frqa").on("input change", function () {
|
||||
frq &= 0xf000;
|
||||
frq |= $('#frqa').val();
|
||||
$('#frq_bv').html(frq_s(frq) + ' Hz')
|
||||
frq |= $("#iforte_frqa").val();
|
||||
$("#iforte_frq_bv").html(iforte_frq_s(frq) + " Hz");
|
||||
});
|
||||
$('#frqa').change()
|
||||
}
|
||||
else if (a_m == 8) {
|
||||
$('#ligde').on('input change', function() {
|
||||
var o = $(this).parent().next();
|
||||
if ($(this).val() == 0) o.html('off');
|
||||
else o.html($(this).val() + 's')
|
||||
});
|
||||
$('#ligde').change()
|
||||
$("#iforte_frqa").change();
|
||||
}
|
||||
}
|
||||
|
||||
function frq_s(frq) {
|
||||
var f = 360000000000;
|
||||
var k = (0x700) - (frq & 0xfff);
|
||||
var arr = 465 + ((k >> 8) & 0x0f);
|
||||
var x = k & 0xff;
|
||||
f = f * (1 << (frq >> 12)) / (arr * (256 - x) + (arr + 1) * (x));
|
||||
return Math.floor(f / 10000) + '.' + ('0000' + Math.floor(f % 10000)).slice(-4)
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
var bussy = false;
|
||||
|
||||
function do_1s() {
|
||||
bussy = true;
|
||||
do_ajax('/ldt_s', {}, function(json) {
|
||||
if (json) {
|
||||
fill_values(json, ['dtd', 'dtmo', 'dty', 'dth', 'dtmi', 'dts'])
|
||||
}
|
||||
bussy = false
|
||||
})
|
||||
}
|
||||
do_ajax('/status_i', {}, function(json) {
|
||||
if (json) {
|
||||
fill_values(json, ['dmxa', 'dmxp', 'dmxf', 'dmxi', 'pt', 'rdmn']);
|
||||
ptit(json['pt'])
|
||||
}
|
||||
});
|
||||
for (var i in addrs) {
|
||||
if (i == 0) continue;
|
||||
do_ajax('/' + addrs[i], {}, function(json, i) {
|
||||
if (json) {
|
||||
fill_values(json, params[i]);
|
||||
if (i == 6) {
|
||||
if (json['fanm'] == 'quiet') $('#themq').show();
|
||||
frq = json['frq'];
|
||||
$('#frqs_v').html(frq_s(frq))
|
||||
} else if (i == 8) {
|
||||
if (json['ligde'] == 0) $('#ligde_v').html('off')
|
||||
}
|
||||
}
|
||||
}, i)
|
||||
}
|
||||
do_1s();
|
||||
var pt_d = 5;
|
||||
var pt_t = pt_t;
|
||||
var ptl = $('.box.prst span');
|
||||
var pt_b = $('#pt_b');
|
||||
|
||||
function press_w(json) {
|
||||
if (!json) return;
|
||||
if (json[' ts '] == 1) {
|
||||
pt_d = 1;
|
||||
ptl.eq(0).html(json['l1']);
|
||||
ptl.eq(1).removeAttr('class').html(json['l2'].replace('\u007f', '°'));
|
||||
ptl.eq(2).html(json['l3'].replace('\u007f', '°'));
|
||||
if (pt_b.hasClass('btn-success')) {
|
||||
pt_b.toggleClass('btn-danger btn-success');
|
||||
pt_b.html('Stop test')
|
||||
}
|
||||
} else {
|
||||
pt_d = 5;
|
||||
if (pt_b.hasClass('btn-danger')) {
|
||||
pt_b.toggleClass('btn-danger btn-success');
|
||||
pt_b.html('Start test');
|
||||
if (json['res'] > 0) {
|
||||
ptl.eq(0).html('');
|
||||
ptl.eq(2).html('');
|
||||
if (json['res'] == 1) ptl.eq(1).addClass('ptok').html('OK');
|
||||
else ptl.eq(1).addClass('ptf').html('FAIL')
|
||||
} else if (json['ts'] == 0) ptl.html('')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function press_t() {
|
||||
pt_t++;
|
||||
if (pt_t < pt_d) return;
|
||||
pt_t = 0;
|
||||
do_ajax('/prst', {}, function(json) {
|
||||
press_w(json)
|
||||
})
|
||||
}
|
||||
$('#pt_b').click(function() {
|
||||
var b = 1;
|
||||
if (pt_b.hasClass('btn-danger')) b = 2;
|
||||
else pt_d = 1;
|
||||
var run = true;
|
||||
if (!confirm('Are you sure you want to ' + (b == 1 ? 'run' : 'cancel') + ' a pressure test?')) run = false;
|
||||
if (run) {
|
||||
do_ajax('/prst', 'btn=' + b, function(json) {});
|
||||
setTimeout(function() {
|
||||
do_ajax('/prst', {}, function(json) {
|
||||
press_w(json)
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
});
|
||||
setInterval(function() {
|
||||
if (!bussy) do_1s();
|
||||
press_t()
|
||||
}, 1000);
|
||||
press_t()
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
Reference in New Issue
Block a user