Skip to content

Commit

Permalink
Change allowed number of skip bits
Browse files Browse the repository at this point in the history
  • Loading branch information
John-Wiens committed Sep 24, 2024
1 parent 52b2f0a commit 89b819c
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public static String stripDot2Header(String hexString, String payload_start_flag
* Otherwise, returns just the payload.
*/
public static byte[] stripDot3Header(byte[] packet, HashMap<String, String> msgStartFlags) {

String hexString = HexUtils.toHexString(packet);
String hexPacketParsed = "";

Expand Down Expand Up @@ -145,11 +146,9 @@ public static int findValidStartFlagLocation(String hexString, String startFlag)
int index = hexString.indexOf(startFlag);

// If the message has a header, make sure not to missidentify the message by the header
// Maximum Header Length is 17 Bytes: https://www.researchgate.net/figure/WAVE-Short-Message-format-Reproduced-by-permission_fig6_224242297
// At 2 Hex Chars per byte that is a maximum length of 38

if(index == 0 || index == -1){
return -1;
return index;
}
else{
index = hexString.indexOf(startFlag,4);
Expand Down

0 comments on commit 89b819c

Please sign in to comment.