From 7b7299557a13973d62cc4653d940c008d62fd4ef Mon Sep 17 00:00:00 2001 From: Alexander Hedges Date: Mon, 22 Apr 2024 17:14:49 +0200 Subject: [PATCH] Remove wrong 0x from error message The message contains base 10 integers, not hexadecimal. --- generator/mavgen_javascript.py | 2 +- generator/mavgen_javascript_stable.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/generator/mavgen_javascript.py b/generator/mavgen_javascript.py index e482f47bb..79dbcfb1d 100644 --- a/generator/mavgen_javascript.py +++ b/generator/mavgen_javascript.py @@ -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... diff --git a/generator/mavgen_javascript_stable.py b/generator/mavgen_javascript_stable.py index aed7c3b00..27dcea3ba 100644 --- a/generator/mavgen_javascript_stable.py +++ b/generator/mavgen_javascript_stable.py @@ -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);