[rcpilot-cvs] src/rcpilot/tests TelData.java,1.4,1.5
Status: Beta
Brought to you by:
mjpawlowsky
|
From: <mjp...@us...> - 2004-03-09 20:58:54
|
Update of /cvsroot/rcpilot/src/rcpilot/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27708 Modified Files: TelData.java Log Message: Changed monitoring to turn on AX.25 instead. Index: TelData.java =================================================================== RCS file: /cvsroot/rcpilot/src/rcpilot/tests/TelData.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TelData.java 8 Mar 2004 15:31:19 -0000 1.4 --- TelData.java 9 Mar 2004 20:33:34 -0000 1.5 *************** *** 37,41 **** JMenuItem agw_connect_item = new JMenuItem("AGWPE Connect"); JMenuItem agw_port_info_item = new JMenuItem("AGWPE Port Info"); ! JMenuItem agwMonitorItem = new JMenuItem("On AGWPE Monitor"); JMenuItem agwRegCallItem = new JMenuItem("Register Call Sign"); JMenuItem sendTelItem = new JMenuItem("Send Telemetry Data"); --- 37,41 ---- JMenuItem agw_connect_item = new JMenuItem("AGWPE Connect"); JMenuItem agw_port_info_item = new JMenuItem("AGWPE Port Info"); ! JMenuItem agwMonitorItem = new JMenuItem("On AX.25"); JMenuItem agwRegCallItem = new JMenuItem("Register Call Sign"); JMenuItem sendTelItem = new JMenuItem("Send Telemetry Data"); *************** *** 45,51 **** JMenu fileMenu = new JMenu("File"); JMenu helpMenu = new JMenu("Help"); ! private static int agw_monitor_status = 0; ! public static int debugLevel = 1; ! private static int agw_port = 0; Container cp; --- 45,57 ---- JMenu fileMenu = new JMenu("File"); JMenu helpMenu = new JMenu("Help"); ! ! public static int debugLevel = 1; ! private static int agw_port = 0; ! ! // Raw AX.25 frame request from AGEPE ! // 0 = OFF ! // 1 = ON ! private static int agw_ax25_status = 0; ! Container cp; *************** *** 152,156 **** agwMonitorItem.addActionListener(new ActionListener() ! {public void actionPerformed(ActionEvent e){monitorAGW();}}); fileMenu.add(agwMonitorItem); --- 158,162 ---- agwMonitorItem.addActionListener(new ActionListener() ! {public void actionPerformed(ActionEvent e){getRawAX25();}}); fileMenu.add(agwMonitorItem); *************** *** 284,302 **** ! void monitorAGW(){ toLog("send monitor request"); Packet pkt = new Packet(this, Packet.SEND, null, null); // get an empty send packet ! pkt.setDataKind((int)'m'); // set the type pkt.setPort(0); - pkt.setCallTo(null); - pkt.setCallFrom(null); try { remote.send(pkt); ! if (agw_monitor_status == 0){ ! agw_monitor_status = 1; ! agwMonitorItem.setText("Off AGWPE Monitor"); } else { ! agwMonitorItem.setText("On AGWPE Monitor"); ! agw_monitor_status = 0; } }catch(Exception e){ --- 290,306 ---- ! void getRawAX25(){ toLog("send monitor request"); Packet pkt = new Packet(this, Packet.SEND, null, null); // get an empty send packet ! pkt.setDataKind((byte)'k'); // set the type pkt.setPort(0); try { remote.send(pkt); ! if (agw_ax25_status == 0){ ! agw_ax25_status = 1; ! agwMonitorItem.setText("Off AX.25"); } else { ! agwMonitorItem.setText("On AX.25"); ! agw_ax25_status = 0; } }catch(Exception e){ *************** *** 309,314 **** void regCall(){ ! byte[] from = {'G','R','O','U','N','D'}; ! toLog("send register call sign GROUND"); Packet pkt = new Packet(this, Packet.SEND, null, null); // get an empty send packet pkt.setDataKind('X'); --- 313,318 ---- void regCall(){ ! byte[] from = {'V','E','2','M','U','D','-','1'}; ! toLog("send register call sign VE2MUD-1"); Packet pkt = new Packet(this, Packet.SEND, null, null); // get an empty send packet pkt.setDataKind('X'); *************** *** 321,329 **** } } ! void agwConnect(){ byte[] from = {'V','E','2','M','U','D'}; ! byte[] to = {'G','R','O','U','N','D'}; ! toLog("send register call sign GROUND"); Packet pkt = new Packet(this, Packet.SEND, null, null); // get an empty send packet pkt.setDataKind('C'); --- 325,334 ---- } } ! ! void agwConnect(){ byte[] from = {'V','E','2','M','U','D'}; ! byte[] to = {'V','E','2','M','U','D', '-','1'}; ! toLog("Connect From VE2MUD To VE2MUD-1"); Packet pkt = new Packet(this, Packet.SEND, null, null); // get an empty send packet pkt.setDataKind('C'); *************** *** 340,345 **** void sendTelData(){ ! byte[] from = {'V','E','2','M','U','D'}; ! byte[] to = {'G','R','O','U','N','D'}; toLog("send telemetry data"); ByteBuffer buf = ByteBuffer.allocateDirect(1024); --- 345,350 ---- void sendTelData(){ ! byte[] from = {'V','E','2','M','U','D', '-', '1'}; ! byte[] to = {'B','E','A','C','O','N'}; toLog("send telemetry data"); ByteBuffer buf = ByteBuffer.allocateDirect(1024); *************** *** 479,484 **** case Packet.CLOSED: startItem.setText("Connect"); ! agwMonitorItem.setText("On AGWPE Monitor"); ! agw_monitor_status = 0; setStatus("Disconnected"); remote = null; --- 484,489 ---- case Packet.CLOSED: startItem.setText("Connect"); ! agwMonitorItem.setText("On AX.25"); ! agw_ax25_status = 0; setStatus("Disconnected"); remote = null; |