Skip to content

Commit

Permalink
Remove wrong 0x from error message
Browse files Browse the repository at this point in the history
The message contains base 10 integers, not hexadecimal.
  • Loading branch information
alehed authored and tridge committed Apr 26, 2024
1 parent dcd3964 commit 7b72995
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion generator/mavgen_javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,7 @@ def generate_mavlink_class(outf, msgs, xml):
var messageChecksum2 = ${MAVHEAD}.x25Crc([decoder.crc_extra], messageChecksum);
if ( receivedChecksum != messageChecksum2 ) {
throw new Error('invalid MAVLink CRC in msgID ' +msgId+ ', got 0x' + receivedChecksum + ' checksum, calculated payload checksum as 0x'+messageChecksum2 );
throw new Error('invalid MAVLink CRC in msgID ' +msgId+ ', got ' + receivedChecksum + ' checksum, calculated payload checksum as '+messageChecksum2 );
}
// now check the signature...
Expand Down
2 changes: 1 addition & 1 deletion generator/mavgen_javascript_stable.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ def generate_mavlink_class(outf, msgs, xml):
messageChecksum = ${MAVHEAD}.x25Crc([decoder.crc_extra], messageChecksum);
if ( receivedChecksum != messageChecksum ) {
throw new Error('invalid MAVLink CRC in msgID ' +msgId+ ', got 0x' + receivedChecksum + ' checksum, calculated payload checksum as 0x'+messageChecksum );
throw new Error('invalid MAVLink CRC in msgID ' +msgId+ ', got ' + receivedChecksum + ' checksum, calculated payload checksum as '+messageChecksum );
}
var paylen = jspack.CalcLength(decoder.format);
Expand Down

0 comments on commit 7b72995

Please sign in to comment.