diff --git a/src/dsp/gain/ComplexAutomaticGainControl.java b/src/dsp/gain/ComplexAutomaticGainControl.java index 4ecbb2ad..c5896016 100644 --- a/src/dsp/gain/ComplexAutomaticGainControl.java +++ b/src/dsp/gain/ComplexAutomaticGainControl.java @@ -105,8 +105,8 @@ public class ComplexAutomaticGainControl implements Listener, private static final double AGC_OUT_SCALE = 0.7; /* Keep max input and output the same */ - private static final double MAX_AMPLITUDE = 32767.0; //1.0; - private static final double MAX_MANUAL_AMPLITUDE = 32767.0; //1.0; + private static final double MAX_AMPLITUDE = 1.0; + private static final double MAX_MANUAL_AMPLITUDE = 1.0; /* Specifies AGC manual gain in dB if AGC is not active ( 0 to 100 dB) */ private static final double MANUAL_GAIN = 0.0; diff --git a/src/module/decode/DecoderFactory.java b/src/module/decode/DecoderFactory.java index 4eed26cd..459aad25 100644 --- a/src/module/decode/DecoderFactory.java +++ b/src/module/decode/DecoderFactory.java @@ -83,6 +83,7 @@ import module.decode.state.TrafficChannelManager; import module.decode.tait.Tait1200Decoder; import module.decode.tait.Tait1200DecoderPanel; import module.decode.tait.Tait1200DecoderState; +import module.demodulate.am.AMDemodulatorModule; import module.demodulate.fm.FMDemodulatorModule; import org.slf4j.Logger; @@ -192,8 +193,10 @@ public class DecoderFactory switch( decodeConfig.getDecoderType() ) { case AM: + modules.add( new AMDemodulatorModule() ); modules.add( new AMDecoder( decodeConfig ) ); modules.add( new AlwaysUnsquelchedDecoderState( DecoderType.AM, channelName ) ); + modules.add( new AudioModule( recordAudio, REMOVE_DC ) ); break; case NBFM: modules.add( new AudioModule( recordAudio, NO_REMOVE_DC ) ); diff --git a/src/module/decode/am/AMDecoder.java b/src/module/decode/am/AMDecoder.java index abb99314..8b407b67 100644 --- a/src/module/decode/am/AMDecoder.java +++ b/src/module/decode/am/AMDecoder.java @@ -27,8 +27,6 @@ public class AMDecoder extends PrimaryDecoder public AMDecoder( DecodeConfiguration config ) { super( config ); - - //TODO: wire in the am decoder pieces } @Override diff --git a/src/module/decode/am/AMDecoderPanel.java b/src/module/decode/am/AMDecoderPanel.java index 0e97505e..cae8326d 100644 --- a/src/module/decode/am/AMDecoderPanel.java +++ b/src/module/decode/am/AMDecoderPanel.java @@ -19,6 +19,7 @@ package module.decode.am; import javax.swing.JLabel; +import net.miginfocom.swing.MigLayout; import module.decode.state.ChangedAttribute; import module.decode.state.DecoderPanel; import module.decode.state.DecoderState; @@ -41,7 +42,12 @@ public class AMDecoderPanel extends DecoderPanel public void init() { + super.init(); + + setLayout( new MigLayout( "insets 0 0 0 0", "[grow,fill]", "[]0[]0[]") ); + mProtocol.setFont( mFontDecoder ); + mProtocol.setForeground( mColorLabelDecoder ); add( mProtocol, "wrap" ); } diff --git a/src/module/demodulate/am/AMDemodulatorModule.java b/src/module/demodulate/am/AMDemodulatorModule.java index d9a77292..716c6677 100644 --- a/src/module/demodulate/am/AMDemodulatorModule.java +++ b/src/module/demodulate/am/AMDemodulatorModule.java @@ -58,7 +58,7 @@ public class AMDemodulatorModule extends Module public AMDemodulatorModule() { mIQFilter = new ComplexFIRFilter_CB_CB( FilterFactory.getLowPass( - SAMPLE_RATE, 6500, 73, WindowType.HAMMING ), 1.0f ); + SAMPLE_RATE, 5000, 73, WindowType.HAMMING ), 1.0f ); mDemodulator = new AMDemodulator_CB( 500.0f ); mIQFilter.setListener( mDemodulator );