Skip to content

Commit

Permalink
fixing code smells
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Feb 4, 2024
1 parent f509c8d commit 3fd1443
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions src/main/java/ru/r2cloud/jradio/Ax100BeaconSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,26 @@

public class Ax100BeaconSource<T extends Beacon> extends BeaconSource<T> {

private static final String DEFAULT_SYNCWORD = "10010011000010110101000111011110";

private static final Logger LOG = LoggerFactory.getLogger(Ax100BeaconSource.class);

private final Class<T> clazz;

public Ax100BeaconSource(ByteInput input, Class<T> clazz) {
this(input, 512, "10010011000010110101000111011110", clazz, false, true, true);
this(input, 512, DEFAULT_SYNCWORD, clazz, false, true, true);
}

public Ax100BeaconSource(ByteInput input, int beaconSizeBytes, Class<T> clazz) {
this(input, beaconSizeBytes, "10010011000010110101000111011110", clazz, false, true, true);
this(input, beaconSizeBytes, DEFAULT_SYNCWORD, clazz, false, true, true);
}

public Ax100BeaconSource(ByteInput input, int beaconSizeBytes, Class<T> clazz, boolean forceViterbi, boolean forceScrambler, boolean forceReedSolomon) {
this(input, beaconSizeBytes, "10010011000010110101000111011110", clazz, forceViterbi, forceScrambler, forceReedSolomon);
this(input, beaconSizeBytes, DEFAULT_SYNCWORD, clazz, forceViterbi, forceScrambler, forceReedSolomon);
}

public Ax100BeaconSource(ByteInput input, int beaconSizeBytes, String accessCode, Class<T> clazz, boolean forceViterbi, boolean forceScrambler, boolean forceReedSolomon) {
super(new AX100Decoder(new CorrelateSyncword(input, 6, Collections.singleton(accessCode), (beaconSizeBytes + 3) * 8), forceViterbi, forceScrambler, forceReedSolomon));
public Ax100BeaconSource(ByteInput input, int beaconSizeBytes, String syncword, Class<T> clazz, boolean forceViterbi, boolean forceScrambler, boolean forceReedSolomon) {
super(new AX100Decoder(new CorrelateSyncword(input, 6, Collections.singleton(syncword), (beaconSizeBytes + 3) * 8), forceViterbi, forceScrambler, forceReedSolomon));
this.clazz = clazz;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class TelemetryStatus {
private long drpMachAction;
private long drpMachState;
private long drpMachPayloads;
private long drpMachStep;;
private long drpMachStep;

public TelemetryStatus() {
// do nothing
Expand Down

0 comments on commit 3fd1443

Please sign in to comment.