';
@@ -407,7 +343,7 @@ function c_dt(n,t,e,c,it) {
}
function c_fsens(i,t,u) {
-
+
var html = '';
html += '
';
-
+
return html;
}
\ No newline at end of file
diff --git a/iforte/index.html b/iforte/index.html
index 42eff57..24e47f2 100644
--- a/iforte/index.html
+++ b/iforte/index.html
@@ -12,7 +12,9 @@
-
Device status
@@ -245,66 +247,136 @@
}
$('.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')}$('#m-b').html(h);copy_form_values(1);$('#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 ');copy_form_values(0);if(a_m==0){console.log(json['
- dmxf ']);fill_values(json,['
- dmxf '])}ptit(json['
- pt ']);close_modal()}show_errors(json['
- status '],par);loader(0)}})});$('.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 '])}loader(0)})});$('.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 '])}loader(0)})});$('.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)})})}$(document).ready(function(){$('
- h1 ').html('
- Device status ');var boxes='
- ';boxes+=box(m_t[0],0,[['
- ',['
- DMX address; dmxa ','
- DMX preset; dmxp; < li > < div id = "dmxp_v" > - < /div> < small id = "dmxf_v" > < /small> < /li>','DMX input;dmxi',' < li class = "mt-2" > IP address < /li>;;; < li class = "mt-2" > < div id = "ip_v" > - < /div> < /li>','MAC address;mac',' < li class = "mt-2" > RDM UID < /li>;;; < li class = "mt-2" > < div id = "rdmu_v" > - < /div> < /li>','RDM label;rdmn',]],]);var lot_ta='';lot_ta=' < ul class = "group" > < li > LED on time total < /li> < li > LED on time adaptive < /li> < /ul>',lot_ta+=' < ul class = "group vals" > < li > < div id = "h1_v" > - < /div>h < /li> < li > < div id = "hr1_v" > - < /div>h < /li> < /ul>',boxes+=box('Device times',1,[['',[' < li > Power on time < /li>;;; < li > < div id = "h0_v" > - < /div>h / < div id = "hr0_v" > - < /div>h < /li>',]],],' < p > < small > total / resettable < /small> < /p>'+lot_ta);boxes+=box('Device temperatures',2,[['',[' < li > LEDs < /li>;;; < li > < div id = "t0_v" > - < /div>&DG < div class = "tu" > < /div> / < div id = "tm0_v" > - < /div>&DG < div class = "tu" > < /div> / < div id = "tmr0_v" > - < /div>&DG < div class = "tu" > < /div> < /li>',' < li > PSU < /li>;;; < li > < div id = "t3_v" > - < /div>&DG < div class = "tu" > < /div> / < div id = "tm3_v" > - < /div>&DG < div class = "tu" > < /div> / < div id = "tmr3_v" > - < /div>&DG < div class = "tu" > < /div> < /li>',' < li > Driver < /li>;;; < li > < div id = "t1_v" > - < /div>&DG < div class = "tu" > < /div> / < div id = "tm1_v" > - < /div>&DG < div class = "tu" > < /div> / < div id = "tmr1_v" > - < /div>&DG < div class = "tu" > < /div> < /li>',' < li > Base < /li>;;; < li > < div id = "t2_v" > - < /div>&DG < div class = "tu" > < /div> / < div id = "tm2_v" > - < /div>&DG < div class = "tu" > < /div> / < div id = "tmr2_v" > - < /div>&DG < div class = "tu" > < /div> < /li>',]],],' < p > < small > current / maximum / resettable < /small> < /p>');boxes+=box('Wireless state',3,[['',['State;lwc','Signal strength;lws',]],]);boxes+=box('Software versions',-1,[['',['Display System','Module M','Module L1','Module L2','Module O','Module F-A','Module F-B','Module G1','Module G2','Module P','Module C1','Module C2','Module DL',]],],'','sw_vers');boxes+=box('Device state',-1,[['',['Device status;devs',]],],c_btn('',0,' esm dn')+' < div > Current RAINS status < /div> < div > < small class = "fl" > WET < /small> < small class = "fr" > DRY < /small> < /div> < div id = "rai"
- class = "rains" > < div > < /div> < /div> < div > MAX WET / resettable < /div> < div > < small class = "fl" > WET < /small> < small class = "fr" > DRY < /small> < /div> < div id = "rair"
- class = "rains" > < div > < /div> < /div>'+c_btn('MAX WET reset',0,' mwr')+' < p > < small id = "wrt" > < /small> < /p>');boxes+=' < div class = "col-12 box-c" > ';boxes+=' < h2 id = "sta_err" > Status messages < /h2>';boxes+=' < div class = "box" > ';boxes+=' < ul class = "group"
- id = "err_v" > ';boxes+=' < /ul>';boxes+=' < /div>';boxes+=' < /div>';$('#boxes').html(boxes);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);
+ $('#m-f').append(' ');
+ 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')
+ }
+
+ $('#m-b').html(h);
+ copy_form_values(1);
+ $('#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');
+ copy_form_values(0);
+ if(a_m==0){
+ console.log(json['dmxf']);
+ fill_values(json,['dmxf'])
+ } ptit(json['pt']);
+ close_modal()
+ }
+ show_errors(json['status'],par);
+ loader(0)
+ }
+ })
+ });
+
+ $('.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'])
+ }
+ loader(0)
+ })
+ });
+
+ $('.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'])
+ }
+ loader(0)
+ })
+ });
+
+ $('.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)
+ })
+ })
+ }
+
+ $(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 << 0)
});
- bussy |= (1 < < 1);
+ 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 << 1)
});
- bussy |= (1 < < 3);
+ 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 << 3)
});
- bussy |= (1 < < 4);
+ bussy |= (1 << 4);
do_ajax('/devsta', {}, function(json) {
if (json) {
fill_values(json, ['devs']);
@@ -317,18 +389,20 @@
devs: 'disconnected'
}, ['devs'])
}
- bussy &= ~(1 < < 4)
+ bussy &= ~(1 << 4)
});
- bussy |= (1 < < 7);
+ 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)
- })
+ for (i = 0; i < json['err'].length; i++) html += '
' + json['err'][i] + ' ';
+ $('#err_v').html(html)
+ }
+ }
+ bussy&=~(1 << 7)})
}
do_ajax('/status_i', {}, function(json) {
if (json) {