diff --git a/lib/controller/dash/node_3.js b/lib/controller/dash/node_3.js index 3187334..a17ba5f 100644 --- a/lib/controller/dash/node_3.js +++ b/lib/controller/dash/node_3.js @@ -43,7 +43,7 @@ layout: 'hbox', items:[{ id: 'cp_radar_%%%NODEID%%%', - html: '
kook
' }], buttons:[{ text: 'Cancel', @@ -2159,11 +2216,13 @@ function showMaskEditor( fromDevTool, DevType, NodeID ){ MIW: cMapImageWidth, //MSF: deviceMapScaling, MSHX: deviceMapLeftShift, - MSHY: deviceMapTopShift + MSHY: deviceMapTopShift, + DSTD: 0 }, success: function( response, opts ){ var data = Ext.decode(response.responseText); hideMaskEditor(); + load2DMasks( NodeID ); }, failure: failureAJAXFunction }); @@ -2199,6 +2258,73 @@ function showMaskEditor( fromDevTool, DevType, NodeID ){ }; }; +function loadMaskDraw( a ){ + + Ext.Ajax.request({ + url: '/lib/controller/getDeviceDraw.php', + params: { + UID: =$UserID;?>, + SID: '=$Session;?>', + NID: a + }, + success: function( response, opts ){ + var data = Ext.decode(response.responseText); + if( data.count > 0 ){ + //draws_2d[a] = data.data; + var csvg = document.getElementById( 'draw_svg_me' ); + + if( csvg != undefined ){ + var draw = csvg.getElementById( "draw" ); + if( draw != null ) csvg.removeChild( draw ); + + var p2 = 2.0*Math.PI; + var so = -10 * p2 / 360.0; + + var bBox = csvg.getBBox(); + var newpath = document.createElementNS('http://www.w3.org/2000/svg', "polygon"); + var ak = 2.0*Math.PI/draws_2d[a].length; + var cpx = bBox.width / 2.0; + var cpy = bBox.height / 2.0; + var max = 1024; + //switch( drawZoomLevels[a] ){ + // case 50: max = 512; break; + // case 25: max = 256; break; + // case 12: max = 128; break; + //}; + var rk = bBox.width / ( max * 2 ); + var pp = ''; + var jj = ''; + for( i=0;iONLINE/Data Incomplete
'); break; + case 1: Ext.getCmp('dev_online').update('ONLINE/Synced
'); break; + case 2: Ext.getCmp('dev_online').update('ONLINE/Data Not Applyed
'); break; + }; + } else { + switch( data.data_status ){ + case 0: Ext.getCmp('dev_online').update('OFFLINE/Data Incomplete
'); break; + case 1: Ext.getCmp('dev_online').update('OFFLINE/Synced
'); break; + case 2: Ext.getCmp('dev_online').update('OFFLINE/Data Not Applyed
'); break; + }; + }; + Ext.getCmp('dev_name').setValue( data.name ); + Ext.getCmp('serial_num').setValue( data.serial ); + Ext.getCmp('version_id').setValue( data.version ); + Ext.getCmp('device_id').setValue( data.device_id ); + Ext.getCmp('com_spd').setValue( data.com_spd ); + Ext.getCmp('max_range').setValue( data.max_range ); + Ext.getCmp('base_shift').setValue( data.base_shift ); + Ext.getCmp('com_spd').setValue( data.uart_speed ); + Ext.getCmp('mlrf_offset').setValue( data.m_offset ); + Ext.getCmp('slrf_offset').setValue( data.s_offset ); + Ext.getCmp('mlrf_delta').setValue( data.m_delta ); + Ext.getCmp('slrf_delta').setValue( data.s_delta ); + Ext.getCmp('mlrf_width').setValue( data.m_width ); + Ext.getCmp('slrf_width').setValue( data.s_width ); + Ext.getCmp('mlrf_order').setValue( data.m_order ); + Ext.getCmp('slrf_order').setValue( data.s_order ); + Ext.getCmp('mlrf_sst').setValue( data.m_sst ); + Ext.getCmp('slrf_sst').setValue( data.s_sst ); + Ext.getCmp('mlrf_flip').setValue( data.m_flip ); + Ext.getCmp('slrf_flip').setValue( data.s_flip ); + Ext.getCmp('mlrf_sun').setValue( data.m_sun ); + Ext.getCmp('slrf_sun').setValue( data.s_sun ); + }; + }, + failure: failureAJAXFunction + }); +}; + +function loadFullLRF2D2Data( NodeID ){ + + if( LRF2D2_st_win == null ) return; + + Ext.Ajax.request({ + url: '/lib/controller/getSettingsLRF.php', + params: { + NID: NodeID, + UID: '=$CUser->Data['id'];?>', + SID: '=$Session;?>', + }, + success: function( response, opts ){ + if( LRF2D2_st_win!= null ){ + var data = Ext.decode(response.responseText); + if( data.online ){ + switch( data.data_status ){ + case 0: Ext.getCmp('LRF2D2_dev_status').update('ONLINE/Data Incomplete
'); break; + case 1: Ext.getCmp('LRF2D2_dev_status').update('ONLINE/Synced
'); break; + case 2: Ext.getCmp('LRF2D2_dev_status').update('ONLINE/Data Not Applyed
'); break; + }; + } else { + switch( data.data_status ){ + case 0: Ext.getCmp('LRF2D2_dev_status').update('OFFLINE/Data Incomplete
'); break; + case 1: Ext.getCmp('LRF2D2_dev_status').update('OFFLINE/Synced
'); break; + case 2: Ext.getCmp('LRF2D2_dev_status').update('OFFLINE/Data Not Applyed
'); break; + }; + }; + Ext.getCmp('LRF2D2_name').setValue( data.name ); + Ext.getCmp('LRF2D2_serial_num').setValue( data.serial ); + Ext.getCmp('LRF2D2_version_id').setValue( data.version ); + Ext.getCmp('LRF2D2_device_id').setValue( data.device_id ); + Ext.getCmp('LRF2D2_com_spd').setValue( data.com_spd ); + Ext.getCmp('LRF2D2_max_range').setValue( data.max_range ); + Ext.getCmp('LRF2D2_base_shift').setValue( data.base_shift ); + Ext.getCmp('LRF2D2_com_spd').setValue( data.uart_speed ); + Ext.getCmp('mlrf_offset').setValue( data.master_profile.offset ); + Ext.getCmp('slrf_offset').setValue( data.slave_profile.offset ); + Ext.getCmp('mlrf_delta').setValue( data.master_profile.delta ); + Ext.getCmp('slrf_delta').setValue( data.slave_profile.delta ); + Ext.getCmp('mlrf_width').setValue( data.master_profile.width ); + Ext.getCmp('slrf_width').setValue( data.slave_profile.width ); + Ext.getCmp('mlrf_order').setValue( data.master_profile.order ); + Ext.getCmp('slrf_order').setValue( data.slave_profile.order ); + Ext.getCmp('mlrf_sst').setValue( data.master_profile.sst ); + Ext.getCmp('slrf_sst').setValue( data.slave_profile.sst ); + Ext.getCmp('mlrf_flip').setValue( data.master_profile.flip ); + Ext.getCmp('slrf_flip').setValue( data.slave_profile.flip ); + Ext.getCmp('mlrf_sun').setValue( data.master_profile.sun ); + Ext.getCmp('slrf_sun').setValue( data.slave_profile.sun ); + }; + }, + failure: failureAJAXFunction + }); +}; + +function LRF1D2_settings(){ + if( LRF1D2_st_win == null ){ + LRF1D2_st_win = new Ext.Window({ + title: 'Sensor Settings', + modal: true, + width: 800, + height: 600, + closeAction: 'hide', + items:{ + xtype: 'tabpanel', + activeTab: 0, + items:[{ + title: 'General Settings', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 3 + }, + items:[{ + html: 'Status', + frame: false, + border: false + },{ + html: 'ONLINE
', + id: 'dev_online', + frame: false, + border: false + },{},{ + html: 'Device Title', + frame: false, + border: false + },{ + xtype: 'field', + id: 'dev_name', + readOnly: false, + value: 'KOKO' + },{},{ + html: 'Serial Number', + frame: false, + border: false + },{ + xtype: 'field', + id: 'serial_num', + readOnly: true, + value: '1212' + },{},{ + html: 'Version ID', + frame: false, + border: false + },{ + xtype: 'field', + id: 'version_id', + readOnly: true, + value: 'LiberManDA122' + },{},{ + html: 'Device Adress', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'device_id' + },{ + xtype: 'button', + id: 'upddiBTN', + text: 'Update Device Address', + handler: function(){ + Ext.Msg.show({ + title:'Update Device Address?', + msg: 'Are you sure to do so?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'upddiBTN', + icon: Ext.MessageBox.QUESTION + }); + } + },{ + html: 'Device COM Speed', + frame: false, + border: false + },{ + xtype: 'combo', + id: 'com_spd', + editable: false, + typeAhead: true, + triggerAction: 'all', + width: '100%', + lazyRender:true, + mode: 'local', + store: new Ext.data.ArrayStore({ + id: 0, + fields: ['mySPD', 'displayText' ], + data: [[4800,'4800'],[9600,'9600'],[14400,'14400'],[19200,'19200'],[38400, '38400'],[56000,'56000'],[57600,'57600'],[115200,'115200']] + }), + valueField: 'mySPD', + displayField: 'displayText' + },{ + xtype: 'button', + id: 'updspBTN', + text: 'Set Device Speed', + handler: function(){ + Ext.Msg.show({ + title:'Update Device Speed?', + msg: 'Are you sure to do so?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'upddiBTN', + icon: Ext.MessageBox.QUESTION + }); + } + },{ + html: 'Detection Maximal Range', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'max_range', + readOnly: true, + value: '1212' + },{},{ + html: 'Base Shift', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'base_shift', + readOnly: true, + value: '1212' + },{}] + },{ + title: 'Mantenence', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 2 + }, + items:[{ + html: 'Restart Device', + frame: false, + border: false + },{ + xtype: 'button', + id: 'rstBTN', + text: 'Full Reset', + handler: function(){ + Ext.Msg.show({ + title:'Reset Device?', + msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'rstBTN', + icon: Ext.MessageBox.QUESTION + }); + } + }] + },{ + title: 'Detection Settings', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 4 + }, + items:[{ + html: 'Master Offset', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_offset', + name: 'mlrf_offset', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 60', + maxValue: 60, + minText: 'No Negative Values Allowed', + minValue: 0, + },{ + html: 'Slave Offset', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_offset', + name: 'slrf_offset', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 60', + maxValue: 60, + minText: 'No Negative Values Allowed', + minValue: 0, + },{ + html: 'Master Delta', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_delta', + name: 'mlrf_delta', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 320', + maxValue: 320, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Delta', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_delta', + name: 'slrf_delta', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 320', + maxValue: 320, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Master Width', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_width', + name: 'mlrf_width', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 1800 - 16000', + maxValue: 16000, + minText: 'The Range is: 1800 - 16000', + minValue: 1800 + },{ + html: 'Slave Width', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_width', + name: 'slrf_width', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 1800 - 16000', + maxValue: 16000, + minText: 'The Range is: 1800 - 16000', + minValue: 1800 + },{ + html: 'Master Order', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_order', + name: 'mlrf_order', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 10', + maxValue: 10, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Order', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_order', + name: 'slrf_order', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 10', + maxValue: 10, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Master SST', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_sst', + name: 'mlrf_sst', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave SST', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_sst', + name: 'slrf_sst', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Mastr Flip', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_flip', + name: 'mlrf_flip', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 8 - 128', + maxValue: 128, + minText: 'The Range is: 8 - 128', + minValue: 8 + },{ + html: 'Slave Flip', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_flip', + name: 'slrf_flip', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 8 - 128', + maxValue: 128, + minText: 'The Range is: 8 - 128', + minValue: 8 + },{ + html: 'Master Sun', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_sun', + name: 'mlrf_sun', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Sun', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_sun', + name: 'slrf_sun', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + }] + },{ + title: 'Embed Options' + },{ + title: 'Target Width Table' + }] + } + }); + }; + LRF1D2_st_win.show(); + loadFullLRF1D2Data( SelectedNodeID ); +}; + +function LRF2D2_settings(){ + if( LRF2D2_st_win == null ){ + LRF2D2_st_win = new Ext.Window({ + title: 'Sensor Settings', + modal: true, + width: 800, + height: 600, + closeAction: 'hide', + items:{ + xtype: 'tabpanel', + activeTab: 0, + items:[{ + title: 'General Settings', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 3 + }, + items:[{ + html: 'Status', + frame: false, + border: false + },{ + html: 'ONLINE
', + id: 'LRF2D2_dev_status', + frame: false, + border: false + },{},{ + html: 'Device Title', + frame: false, + border: false + },{ + xtype: 'field', + id: 'LRF2D2_name', + readOnly: false, + value: '' + },{},{ + html: 'Serial Number', + frame: false, + border: false + },{ + xtype: 'field', + id: 'LRF2D2_serial_num', + readOnly: true, + value: '1212' + },{},{ + html: 'Version ID', + frame: false, + border: false + },{ + xtype: 'field', + id: 'LRF2D2_version_id', + readOnly: true, + value: 'LiberManDA122' + },{},{ + html: 'Device Adress', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'LRF2D2_device_id' + },{ + xtype: 'button', + text: 'Update Device Address', + handler: function(){ + Ext.Msg.show({ + title:'Update Device Address?', + msg: 'Are you sure to do so?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'upddiBTN', + icon: Ext.MessageBox.QUESTION + }); + } + },{ + html: 'Device COM Speed', + frame: false, + border: false + },{ + xtype: 'combo', + id: 'LRF2D2_com_spd', + editable: false, + typeAhead: true, + triggerAction: 'all', + width: '100%', + lazyRender:true, + mode: 'local', + store: new Ext.data.ArrayStore({ + id: 0, + fields: ['mySPD', 'displayText' ], + data: [[4800,'4800'],[9600,'9600'],[14400,'14400'],[19200,'19200'],[38400, '38400'],[56000,'56000'],[57600,'57600'],[115200,'115200']] + }), + valueField: 'mySPD', + displayField: 'displayText' + },{ + xtype: 'button', + text: 'Set Device Speed', + handler: function(){ + Ext.Msg.show({ + title:'Update Device Speed?', + msg: 'Are you sure to do so?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'upddiBTN', + icon: Ext.MessageBox.QUESTION + }); + } + },{ + html: 'Detection Maximal Range', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'LRF2D2_max_range', + readOnly: false, + value: '1212' + },{},{ + html: 'Base Shift', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'LRF2D2_base_shift', + readOnly: false, + value: '1212' + },{ + xtype: 'button', + text: 'Update Base Shift', + handler: function(){ + var bash = Ext.getCmp('LRF2D2_base_shift').getValue(); + Ext.Ajax.request({ + url: '/lib/controller/updateLrfSettings_baseshift.php', + params: { + NID: SelectedNodeID, + UID: '=$CUser->Data['id'];?>', + SID: '=$Session;?>', + PID: 0, + BASH: bash + }, + success: function( response, opts ){ + loadFullLRF2D2Data( SelectedNodeID ); + }, + failure: failureAJAXFunction + }); + } + }] + },{ + title: 'Detection Settings', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 4 + }, + items:[{ + html: 'Master Offset', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_offset', + name: 'mlrf_offset', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 60', + maxValue: 60, + minText: 'No Negative Values Allowed', + minValue: 0, + },{ + html: 'Slave Offset', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_offset', + name: 'slrf_offset', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 60', + maxValue: 60, + minText: 'No Negative Values Allowed', + minValue: 0, + },{ + html: 'Master Delta', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_delta', + name: 'mlrf_delta', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 320', + maxValue: 320, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Delta', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_delta', + name: 'slrf_delta', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 320', + maxValue: 320, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Master Width', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_width', + name: 'mlrf_width', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 1800 - 16000', + maxValue: 16000, + minText: 'The Range is: 1800 - 16000', + minValue: 1800 + },{ + html: 'Slave Width', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_width', + name: 'slrf_width', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 1800 - 16000', + maxValue: 16000, + minText: 'The Range is: 1800 - 16000', + minValue: 1800 + },{ + html: 'Master Order', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_order', + name: 'mlrf_order', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 10', + maxValue: 10, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Order', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_order', + name: 'slrf_order', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 10', + maxValue: 10, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Master SST', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_sst', + name: 'mlrf_sst', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave SST', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_sst', + name: 'slrf_sst', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Mastr Flip', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_flip', + name: 'mlrf_flip', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 8 - 128', + maxValue: 128, + minText: 'The Range is: 8 - 128', + minValue: 8 + },{ + html: 'Slave Flip', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_flip', + name: 'slrf_flip', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 8 - 128', + maxValue: 128, + minText: 'The Range is: 8 - 128', + minValue: 8 + },{ + html: 'Master Sun', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_sun', + name: 'mlrf_sun', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Sun', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_sun', + name: 'slrf_sun', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + xtype: 'button', + text: 'Update Detection Settings', + width: '100%', + colspan: 4, + handler: function(){ + var MOFS=Ext.getCmp('mlrf_offset').getValue(); + var MDEL=Ext.getCmp('mlrf_delta').getValue(); + var MWIT=Ext.getCmp('mlrf_width').getValue(); + var MORD=Ext.getCmp('mlrf_order').getValue(); + var MSST=Ext.getCmp('mlrf_sst').getValue(); + var MFLP=Ext.getCmp('mlrf_flip').getValue(); + var MSUN=Ext.getCmp('mlrf_sun').getValue(); + var SOFS=Ext.getCmp('slrf_offset').getValue(); + var SDEL=Ext.getCmp('slrf_delta').getValue(); + var SWIT=Ext.getCmp('slrf_width').getValue(); + var SORD=Ext.getCmp('slrf_order').getValue(); + var SSST=Ext.getCmp('slrf_sst').getValue(); + var SFLP=Ext.getCmp('slrf_flip').getValue(); + var SSUN=Ext.getCmp('slrf_sun').getValue(); + Ext.Ajax.request({ + url: '/lib/controller/updateDetecttionProfile.php', + params: { + NID: SelectedNodeID, + UID: '=$CUser->Data['id'];?>', + SID: '=$Session;?>', + PID: 0, + MOFS: MOFS, + MDEL: MDEL, + MWIT: MWIT, + MORD: MORD, + MSST: MSST, + MFLP: MFLP, + MSUN: MSUN, + SOFS: SOFS, + SDEL: SDEL, + SWIT: SWIT, + SORD: SORD, + SSST: SSST, + SFLP: SFLP, + SSUN: SSUN + }, + success: function( response, opts ){ + loadFullLRF2D2Data( SelectedNodeID ); + }, + failure: failureAJAXFunction + }); + } + }] + },{ + title: 'Embed Options' + },{ + title: 'Target Width Table' + },{ + title: 'Mantenence', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 2 + }, + items:[{ + html: 'Restart Device', + frame: false, + border: false + },{ + xtype: 'button', + id: 'rstBTN', + text: 'Full Reset', + handler: function(){ + Ext.Msg.show({ + title:'Reset Device?', + msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'rstBTN', + icon: Ext.MessageBox.QUESTION + }); + } + }] + }] + } + }); + }; + LRF2D2_st_win.show(); + loadFullLRF2D2Data( SelectedNodeID ); +}; + +function LRF16D3_settings(){ +}; + +var currentResolveDeviceNode = 0; +var ResolveDeviceNodeWin = null; + +function resolveDeviceMistmatch( NodeID ){ + currentResolveDeviceNode = NodeID; + if( ResolveDeviceNodeWin == null ){ + ResolveDeviceNodeWin = new Ext.Window({ + title: '=$Labels->GetLabel('_WDEV_MISTMATCH_');?>', + modal: true, + width: 500, + height: 200, + closeAction: 'hide', + items:[{ + xtype: 'spacer', + style: { + marginTop: '13px' + }, + html: 'kook
' + }], + buttons:[{ + text: 'Cancel', + handler: function(){ + hideMaskEditor(); + } + },{ + text:'Save Mask and Close', + handler: function(){ + var serial = MaskProject.exportJSON(); + Ext.Ajax.request({ + url: '/lib/controller/uploadDeviceMask.php', + params: { + NID: NodeID, + UID: '=$CUser->Data['id'];?>', + SID: '=$Session;?>', + MID: cMaskID, + LID: 0, + MDTA: serial, + MIH: cMapImageHeight, + MIW: cMapImageWidth, + //MSF: deviceMapScaling, + MSHX: deviceMapLeftShift, + MSHY: deviceMapTopShift + }, + success: function( response, opts ){ + var data = Ext.decode(response.responseText); + hideMaskEditor(); + }, + failure: failureAJAXFunction + }); + } + }] + }); + }; + MEPanel.doLayout(); + //if( MaskProject == null ){ + var canvas = document.getElementById('mask_canvas'); + paper.settings.handleSize = 10; + MaskProject = new paper.Project( canvas ); + //canvas.addEventListener( 'mousemove', onMaskMouseMove ); + canvas.addEventListener( 'mousedown', onMaskMouseDown ); + //canvas.addEventListener( 'mouseup', onMaskMouseUp ); + //canvas.addEventListener( 'mousedrag', onMaskMouseMove ); + //}; + cMaskID = 0; + loadDeviceMask( NodeID, cMaskID ); + }; + //maskEditorDiv = $('#container').get(0); + //var maskEditorDiv = document.getElementById( id ); //Ext.getCmp( id ); + if( maskEditorDiv.requestFullscreen ){ + maskEditorDiv.requestFullscreen(); + }else if( maskEditorDiv.mozRequestFullScreen ){ + maskEditorDiv.mozRequestFullScreen(); + }else if( maskEditorDiv.webkitRequestFullscreen ){ + maskEditorDiv.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT); + }else if( maskEditorDiv.msRequestFullscreen ){ + maskEditorDiv.msRequestFullscreen(); + }; + document.addEventListener( 'fullscreenchange', handleFSMaskEditorClose ); + }; +}; + +function loadMaskDraw( a ){ + + Ext.Ajax.request({ + url: '/lib/controller/getDeviceDraw.php', + params: { + UID: =$UserID;?>, + SID: '=$Session;?>', + NID: a + }, + success: function( response, opts ){ + var data = Ext.decode(response.responseText); + if( data.count > 0 ){ + //draws_2d[a] = data.data; + var csvg = document.getElementById( 'draw_svg_me' ); + + if( csvg != undefined ){ + var draw = csvg.getElementById( "draw" ); + if( draw != null ) csvg.removeChild( draw ); + + var p2 = 2.0*Math.PI; + var so = -10 * p2 / 360.0; + + var bBox = csvg.getBBox(); + var newpath = document.createElementNS('http://www.w3.org/2000/svg', "polygon"); + var ak = 2.0*Math.PI/draws_2d[a].length; + var cpx = bBox.width / 2.0; + var cpy = bBox.height / 2.0; + var max = 1024; + //switch( drawZoomLevels[a] ){ + // case 50: max = 512; break; + // case 25: max = 256; break; + // case 12: max = 128; break; + //}; + var rk = bBox.width / ( max * 2 ); + var pp = ''; + var jj = ''; + for( i=0;iONLINE/Data Incomplete
'); break; + case 1: Ext.getCmp('dev_online').update('ONLINE/Synced
'); break; + case 2: Ext.getCmp('dev_online').update('ONLINE/Data Not Applyed
'); break; + }; + } else { + switch( data.data_status ){ + case 0: Ext.getCmp('dev_online').update('OFFLINE/Data Incomplete
'); break; + case 1: Ext.getCmp('dev_online').update('OFFLINE/Synced
'); break; + case 2: Ext.getCmp('dev_online').update('OFFLINE/Data Not Applyed
'); break; + }; + }; + Ext.getCmp('dev_name').setValue( data.name ); + Ext.getCmp('serial_num').setValue( data.serial ); + Ext.getCmp('version_id').setValue( data.version ); + Ext.getCmp('device_id').setValue( data.device_id ); + Ext.getCmp('com_spd').setValue( data.com_spd ); + Ext.getCmp('max_range').setValue( data.max_range ); + Ext.getCmp('base_shift').setValue( data.base_shift ); + Ext.getCmp('com_spd').setValue( data.uart_speed ); + Ext.getCmp('mlrf_offset').setValue( data.m_offset ); + Ext.getCmp('slrf_offset').setValue( data.s_offset ); + Ext.getCmp('mlrf_delta').setValue( data.m_delta ); + Ext.getCmp('slrf_delta').setValue( data.s_delta ); + Ext.getCmp('mlrf_width').setValue( data.m_width ); + Ext.getCmp('slrf_width').setValue( data.s_width ); + Ext.getCmp('mlrf_order').setValue( data.m_order ); + Ext.getCmp('slrf_order').setValue( data.s_order ); + Ext.getCmp('mlrf_sst').setValue( data.m_sst ); + Ext.getCmp('slrf_sst').setValue( data.s_sst ); + Ext.getCmp('mlrf_flip').setValue( data.m_flip ); + Ext.getCmp('slrf_flip').setValue( data.s_flip ); + Ext.getCmp('mlrf_sun').setValue( data.m_sun ); + Ext.getCmp('slrf_sun').setValue( data.s_sun ); + }; + }, + failure: failureAJAXFunction + }); +}; + +function loadFullLRF2D2Data( NodeID ){ + + if( LRF2D2_st_win == null ) return; + + Ext.Ajax.request({ + url: '/lib/controller/getSettingsLRF.php', + params: { + NID: NodeID, + UID: '=$CUser->Data['id'];?>', + SID: '=$Session;?>', + }, + success: function( response, opts ){ + if( LRF2D2_st_win!= null ){ + var data = Ext.decode(response.responseText); + if( data.online ){ + switch( data.data_status ){ + case 0: Ext.getCmp('LRF2D2_dev_status').update('ONLINE/Data Incomplete
'); break; + case 1: Ext.getCmp('LRF2D2_dev_status').update('ONLINE/Synced
'); break; + case 2: Ext.getCmp('LRF2D2_dev_status').update('ONLINE/Data Not Applyed
'); break; + }; + } else { + switch( data.data_status ){ + case 0: Ext.getCmp('LRF2D2_dev_status').update('OFFLINE/Data Incomplete
'); break; + case 1: Ext.getCmp('LRF2D2_dev_status').update('OFFLINE/Synced
'); break; + case 2: Ext.getCmp('LRF2D2_dev_status').update('OFFLINE/Data Not Applyed
'); break; + }; + }; + Ext.getCmp('LRF2D2_name').setValue( data.name ); + Ext.getCmp('LRF2D2_serial_num').setValue( data.serial ); + Ext.getCmp('LRF2D2_version_id').setValue( data.version ); + Ext.getCmp('LRF2D2_device_id').setValue( data.device_id ); + Ext.getCmp('LRF2D2_com_spd').setValue( data.com_spd ); + Ext.getCmp('LRF2D2_max_range').setValue( data.max_range ); + Ext.getCmp('LRF2D2_base_shift').setValue( data.base_shift ); + Ext.getCmp('LRF2D2_com_spd').setValue( data.uart_speed ); + Ext.getCmp('mlrf_offset').setValue( data.master_profile.offset ); + Ext.getCmp('slrf_offset').setValue( data.slave_profile.offset ); + Ext.getCmp('mlrf_delta').setValue( data.master_profile.delta ); + Ext.getCmp('slrf_delta').setValue( data.slave_profile.delta ); + Ext.getCmp('mlrf_width').setValue( data.master_profile.width ); + Ext.getCmp('slrf_width').setValue( data.slave_profile.width ); + Ext.getCmp('mlrf_order').setValue( data.master_profile.order ); + Ext.getCmp('slrf_order').setValue( data.slave_profile.order ); + Ext.getCmp('mlrf_sst').setValue( data.master_profile.sst ); + Ext.getCmp('slrf_sst').setValue( data.slave_profile.sst ); + Ext.getCmp('mlrf_flip').setValue( data.master_profile.flip ); + Ext.getCmp('slrf_flip').setValue( data.slave_profile.flip ); + Ext.getCmp('mlrf_sun').setValue( data.master_profile.sun ); + Ext.getCmp('slrf_sun').setValue( data.slave_profile.sun ); + }; + }, + failure: failureAJAXFunction + }); +}; + +function LRF1D2_settings(){ + if( LRF1D2_st_win == null ){ + LRF1D2_st_win = new Ext.Window({ + title: 'Sensor Settings', + modal: true, + width: 800, + height: 600, + closeAction: 'hide', + items:{ + xtype: 'tabpanel', + activeTab: 0, + items:[{ + title: 'General Settings', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 3 + }, + items:[{ + html: 'Status', + frame: false, + border: false + },{ + html: 'ONLINE
', + id: 'dev_online', + frame: false, + border: false + },{},{ + html: 'Device Title', + frame: false, + border: false + },{ + xtype: 'field', + id: 'dev_name', + readOnly: false, + value: 'KOKO' + },{},{ + html: 'Serial Number', + frame: false, + border: false + },{ + xtype: 'field', + id: 'serial_num', + readOnly: true, + value: '1212' + },{},{ + html: 'Version ID', + frame: false, + border: false + },{ + xtype: 'field', + id: 'version_id', + readOnly: true, + value: 'LiberManDA122' + },{},{ + html: 'Device Adress', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'device_id' + },{ + xtype: 'button', + id: 'upddiBTN', + text: 'Update Device Address', + handler: function(){ + Ext.Msg.show({ + title:'Update Device Address?', + msg: 'Are you sure to do so?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'upddiBTN', + icon: Ext.MessageBox.QUESTION + }); + } + },{ + html: 'Device COM Speed', + frame: false, + border: false + },{ + xtype: 'combo', + id: 'com_spd', + editable: false, + typeAhead: true, + triggerAction: 'all', + width: '100%', + lazyRender:true, + mode: 'local', + store: new Ext.data.ArrayStore({ + id: 0, + fields: ['mySPD', 'displayText' ], + data: [[4800,'4800'],[9600,'9600'],[14400,'14400'],[19200,'19200'],[38400, '38400'],[56000,'56000'],[57600,'57600'],[115200,'115200']] + }), + valueField: 'mySPD', + displayField: 'displayText' + },{ + xtype: 'button', + id: 'updspBTN', + text: 'Set Device Speed', + handler: function(){ + Ext.Msg.show({ + title:'Update Device Speed?', + msg: 'Are you sure to do so?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'upddiBTN', + icon: Ext.MessageBox.QUESTION + }); + } + },{ + html: 'Detection Maximal Range', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'max_range', + readOnly: true, + value: '1212' + },{},{ + html: 'Base Shift', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'base_shift', + readOnly: true, + value: '1212' + },{}] + },{ + title: 'Mantenence', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 2 + }, + items:[{ + html: 'Restart Device', + frame: false, + border: false + },{ + xtype: 'button', + id: 'rstBTN', + text: 'Full Reset', + handler: function(){ + Ext.Msg.show({ + title:'Reset Device?', + msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'rstBTN', + icon: Ext.MessageBox.QUESTION + }); + } + }] + },{ + title: 'Detection Settings', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 4 + }, + items:[{ + html: 'Master Offset', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_offset', + name: 'mlrf_offset', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 60', + maxValue: 60, + minText: 'No Negative Values Allowed', + minValue: 0, + },{ + html: 'Slave Offset', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_offset', + name: 'slrf_offset', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 60', + maxValue: 60, + minText: 'No Negative Values Allowed', + minValue: 0, + },{ + html: 'Master Delta', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_delta', + name: 'mlrf_delta', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 320', + maxValue: 320, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Delta', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_delta', + name: 'slrf_delta', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 320', + maxValue: 320, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Master Width', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_width', + name: 'mlrf_width', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 1800 - 16000', + maxValue: 16000, + minText: 'The Range is: 1800 - 16000', + minValue: 1800 + },{ + html: 'Slave Width', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_width', + name: 'slrf_width', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 1800 - 16000', + maxValue: 16000, + minText: 'The Range is: 1800 - 16000', + minValue: 1800 + },{ + html: 'Master Order', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_order', + name: 'mlrf_order', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 10', + maxValue: 10, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Order', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_order', + name: 'slrf_order', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 10', + maxValue: 10, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Master SST', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_sst', + name: 'mlrf_sst', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave SST', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_sst', + name: 'slrf_sst', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Mastr Flip', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_flip', + name: 'mlrf_flip', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 8 - 128', + maxValue: 128, + minText: 'The Range is: 8 - 128', + minValue: 8 + },{ + html: 'Slave Flip', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_flip', + name: 'slrf_flip', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 8 - 128', + maxValue: 128, + minText: 'The Range is: 8 - 128', + minValue: 8 + },{ + html: 'Master Sun', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_sun', + name: 'mlrf_sun', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Sun', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_sun', + name: 'slrf_sun', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + }] + },{ + title: 'Embed Options' + },{ + title: 'Target Width Table' + }] + } + }); + }; + LRF1D2_st_win.show(); + loadFullLRF1D2Data( SelectedNodeID ); +}; + +function LRF2D2_settings(){ + if( LRF2D2_st_win == null ){ + LRF2D2_st_win = new Ext.Window({ + title: 'Sensor Settings', + modal: true, + width: 800, + height: 600, + closeAction: 'hide', + items:{ + xtype: 'tabpanel', + activeTab: 0, + items:[{ + title: 'General Settings', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 3 + }, + items:[{ + html: 'Status', + frame: false, + border: false + },{ + html: 'ONLINE
', + id: 'LRF2D2_dev_status', + frame: false, + border: false + },{},{ + html: 'Device Title', + frame: false, + border: false + },{ + xtype: 'field', + id: 'LRF2D2_name', + readOnly: false, + value: '' + },{},{ + html: 'Serial Number', + frame: false, + border: false + },{ + xtype: 'field', + id: 'LRF2D2_serial_num', + readOnly: true, + value: '1212' + },{},{ + html: 'Version ID', + frame: false, + border: false + },{ + xtype: 'field', + id: 'LRF2D2_version_id', + readOnly: true, + value: 'LiberManDA122' + },{},{ + html: 'Device Adress', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'LRF2D2_device_id' + },{ + xtype: 'button', + text: 'Update Device Address', + handler: function(){ + Ext.Msg.show({ + title:'Update Device Address?', + msg: 'Are you sure to do so?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'upddiBTN', + icon: Ext.MessageBox.QUESTION + }); + } + },{ + html: 'Device COM Speed', + frame: false, + border: false + },{ + xtype: 'combo', + id: 'LRF2D2_com_spd', + editable: false, + typeAhead: true, + triggerAction: 'all', + width: '100%', + lazyRender:true, + mode: 'local', + store: new Ext.data.ArrayStore({ + id: 0, + fields: ['mySPD', 'displayText' ], + data: [[4800,'4800'],[9600,'9600'],[14400,'14400'],[19200,'19200'],[38400, '38400'],[56000,'56000'],[57600,'57600'],[115200,'115200']] + }), + valueField: 'mySPD', + displayField: 'displayText' + },{ + xtype: 'button', + text: 'Set Device Speed', + handler: function(){ + Ext.Msg.show({ + title:'Update Device Speed?', + msg: 'Are you sure to do so?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'upddiBTN', + icon: Ext.MessageBox.QUESTION + }); + } + },{ + html: 'Detection Maximal Range', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'LRF2D2_max_range', + readOnly: false, + value: '1212' + },{},{ + html: 'Base Shift', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'LRF2D2_base_shift', + readOnly: false, + value: '1212' + },{ + xtype: 'button', + text: 'Update Base Shift', + handler: function(){ + var bash = Ext.getCmp('LRF2D2_base_shift').getValue(); + Ext.Ajax.request({ + url: '/lib/controller/updateLrfSettings_baseshift.php', + params: { + NID: SelectedNodeID, + UID: '=$CUser->Data['id'];?>', + SID: '=$Session;?>', + PID: 0, + BASH: bash + }, + success: function( response, opts ){ + loadFullLRF2D2Data( SelectedNodeID ); + }, + failure: failureAJAXFunction + }); + } + }] + },{ + title: 'Detection Settings', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 4 + }, + items:[{ + html: 'Master Offset', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_offset', + name: 'mlrf_offset', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 60', + maxValue: 60, + minText: 'No Negative Values Allowed', + minValue: 0, + },{ + html: 'Slave Offset', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_offset', + name: 'slrf_offset', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 60', + maxValue: 60, + minText: 'No Negative Values Allowed', + minValue: 0, + },{ + html: 'Master Delta', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_delta', + name: 'mlrf_delta', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 320', + maxValue: 320, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Delta', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_delta', + name: 'slrf_delta', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 320', + maxValue: 320, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Master Width', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_width', + name: 'mlrf_width', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 1800 - 16000', + maxValue: 16000, + minText: 'The Range is: 1800 - 16000', + minValue: 1800 + },{ + html: 'Slave Width', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_width', + name: 'slrf_width', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 1800 - 16000', + maxValue: 16000, + minText: 'The Range is: 1800 - 16000', + minValue: 1800 + },{ + html: 'Master Order', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_order', + name: 'mlrf_order', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 10', + maxValue: 10, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Order', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_order', + name: 'slrf_order', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 10', + maxValue: 10, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Master SST', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_sst', + name: 'mlrf_sst', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave SST', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_sst', + name: 'slrf_sst', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Mastr Flip', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_flip', + name: 'mlrf_flip', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 8 - 128', + maxValue: 128, + minText: 'The Range is: 8 - 128', + minValue: 8 + },{ + html: 'Slave Flip', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_flip', + name: 'slrf_flip', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 8 - 128', + maxValue: 128, + minText: 'The Range is: 8 - 128', + minValue: 8 + },{ + html: 'Master Sun', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'mlrf_sun', + name: 'mlrf_sun', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + html: 'Slave Sun', + frame: false, + border: false + },{ + xtype: 'numberfield', + id: 'slrf_sun', + name: 'slrf_sun', + allowBlank: false, + allowDecimals: false, + maxText: 'The Range is: 0 - 100', + maxValue: 100, + minText: 'No Negative Values Allowed', + minValue: 0 + },{ + xtype: 'button', + text: 'Update Detection Settings', + width: '100%', + colspan: 4, + handler: function(){ + var MOFS=Ext.getCmp('mlrf_offset').getValue(); + var MDEL=Ext.getCmp('mlrf_delta').getValue(); + var MWIT=Ext.getCmp('mlrf_width').getValue(); + var MORD=Ext.getCmp('mlrf_order').getValue(); + var MSST=Ext.getCmp('mlrf_sst').getValue(); + var MFLP=Ext.getCmp('mlrf_flip').getValue(); + var MSUN=Ext.getCmp('mlrf_sun').getValue(); + var SOFS=Ext.getCmp('slrf_offset').getValue(); + var SDEL=Ext.getCmp('slrf_delta').getValue(); + var SWIT=Ext.getCmp('slrf_width').getValue(); + var SORD=Ext.getCmp('slrf_order').getValue(); + var SSST=Ext.getCmp('slrf_sst').getValue(); + var SFLP=Ext.getCmp('slrf_flip').getValue(); + var SSUN=Ext.getCmp('slrf_sun').getValue(); + Ext.Ajax.request({ + url: '/lib/controller/updateDetecttionProfile.php', + params: { + NID: SelectedNodeID, + UID: '=$CUser->Data['id'];?>', + SID: '=$Session;?>', + PID: 0, + MOFS: MOFS, + MDEL: MDEL, + MWIT: MWIT, + MORD: MORD, + MSST: MSST, + MFLP: MFLP, + MSUN: MSUN, + SOFS: SOFS, + SDEL: SDEL, + SWIT: SWIT, + SORD: SORD, + SSST: SSST, + SFLP: SFLP, + SSUN: SSUN + }, + success: function( response, opts ){ + loadFullLRF2D2Data( SelectedNodeID ); + }, + failure: failureAJAXFunction + }); + } + }] + },{ + title: 'Embed Options' + },{ + title: 'Target Width Table' + },{ + title: 'Mantenence', + xtype: 'form', + layout: 'table', + defaults: { + bodyStyle:'padding:20px' + }, + layoutConfig: { + columns: 2 + }, + items:[{ + html: 'Restart Device', + frame: false, + border: false + },{ + xtype: 'button', + id: 'rstBTN', + text: 'Full Reset', + handler: function(){ + Ext.Msg.show({ + title:'Reset Device?', + msg: 'You are closing a tab that has unsaved changes. Would you like to save your changes?', + buttons: Ext.Msg.YESNOCANCEL, + //fn: processResult, + animEl: 'rstBTN', + icon: Ext.MessageBox.QUESTION + }); + } + }] + }] + } + }); + }; + LRF2D2_st_win.show(); + loadFullLRF2D2Data( SelectedNodeID ); +}; + +function LRF16D3_settings(){ +}; + +var currentResolveDeviceNode = 0; +var ResolveDeviceNodeWin = null; + +function resolveDeviceMistmatch( NodeID ){ + currentResolveDeviceNode = NodeID; + if( ResolveDeviceNodeWin == null ){ + ResolveDeviceNodeWin = new Ext.Window({ + title: '=$Labels->GetLabel('_WDEV_MISTMATCH_');?>', + modal: true, + width: 500, + height: 200, + closeAction: 'hide', + items:[{ + xtype: 'spacer', + style: { + marginTop: '13px' + }, + html: '