Skip to content

Commit

Permalink
first igate impl
Browse files Browse the repository at this point in the history
  • Loading branch information
damico committed Dec 8, 2023
1 parent adb6c0e commit 93641e7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 22 deletions.
13 changes: 0 additions & 13 deletions .classpath
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,5 @@
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
<attribute name="test" value="true"/>
<attribute name="optional" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>
14 changes: 12 additions & 2 deletions src/main/java/org/jdamico/javax25/PacketHandlerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*/
package org.jdamico.javax25;

import java.util.Date;

import org.jdamico.javax25.ax25.Packet;
import org.jdamico.javax25.ax25.PacketHandler;
import org.jdamico.javax25.soundcard.Soundcard;
Expand All @@ -28,15 +30,23 @@ public class PacketHandlerImpl implements PacketHandler {

public void handlePacket(byte[] bytes) {

String data = Packet.format(bytes);

if(Soundcard.jTextArea == null) {
System.out.println("Packet ====>>>>" +Packet.format(bytes));
System.out.println("Packet ====>>>>" +data);



}else {

String lines = Soundcard.jTextArea.getText();
if(lines.length() > 80000) lines = "Cleaning log...\n";
Soundcard.jTextArea.setText(lines+Packet.format(bytes)+"\n");
Soundcard.jTextArea.setText(lines+data+"\n");
}

if(Soundcard.receivedPackedMap != null) {
Date now = new Date();
Soundcard.receivedPackedMap.put(now.getTime(), data);
}

return;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,14 @@
*/
package org.jdamico.javax25.ax25;

import java.util.Arrays;

import javax.swing.JTextArea;

import org.jdamico.javax25.soundcard.Soundcard;
import java.util.Map;

public class Afsk1200Demodulator
extends PacketDemodulator
//implements HalfduplexSoundcardClient
{
private float[] td_filter;

private float[] td_filter;
private float[] cd_filter;

private int rate_index;
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/jdamico/javax25/soundcard/Soundcard.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
//import java.util.Arrays;
//import java.util.Properties;
import java.util.List;
import java.util.Map;

import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioSystem;
Expand All @@ -45,7 +46,7 @@ public class Soundcard {

public static JTextArea jTextArea = null;
public static JLabel audioLevelValue = null;

public static Map<Long, String> receivedPackedMap;
public static boolean running = true;

private int rate;
Expand Down

0 comments on commit 93641e7

Please sign in to comment.