File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
src/main/java/aero/t2s/modes Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 11GROUP =aero.t2s
2- VERSION_NAME =0.2.3 -SNAPSHOT
2+ VERSION_NAME =0.2.4 -SNAPSHOT
33
44POM_ARTIFACT_ID =mode-s
55POM_NAME =Mode-S/ADS-B (1090Mhz)
Original file line number Diff line number Diff line change @@ -59,6 +59,12 @@ public void handle(final String input) {
5959 public DownlinkFormat handleSync (final String input ) {
6060 try {
6161 DownlinkFormat df = decoder .decode (toData (input ));
62+ if (df == null ) {
63+ // invalid packet (Mode A/C like *21D2; *0200; *0101;)
64+ LOGGER .debug ("DF Message could not be parsed: [{}]" , input );
65+ return null ;
66+ }
67+
6268 Track track = decoder .getTrack (df .getIcao ());
6369
6470 if (track == null ) {
@@ -83,7 +89,7 @@ public DownlinkFormat handleSync(final String input) {
8389 } catch (InvalidExtendedSquitterTypeCodeException | UnknownDownlinkFormatException e ) {
8490 LOGGER .error (e .getMessage ());
8591 } catch (Throwable throwable ) {
86- LOGGER .error ("Message could not be parsed: [" + input + "]" , throwable );
92+ LOGGER .error ("DF Message could not be parsed: [" + input + "]" , throwable );
8793 }
8894
8995 return null ;
You can’t perform that action at this time.
0 commit comments