From 63d57c4aff57018d1058d1b3a6b638e69ba00fa4 Mon Sep 17 00:00:00 2001 From: Michael Oborne Date: Tue, 23 Jan 2024 10:22:26 +1100 Subject: [PATCH] px4uploader: extf crc exclude padding --- ExtLibs/px4uploader/Firmware.cs | 2 +- build - debug.bat | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 build - debug.bat diff --git a/ExtLibs/px4uploader/Firmware.cs b/ExtLibs/px4uploader/Firmware.cs index 6f521a4826..975abb6484 100644 --- a/ExtLibs/px4uploader/Firmware.cs +++ b/ExtLibs/px4uploader/Firmware.cs @@ -178,7 +178,7 @@ public int crc(int padlen) public int extf_crc(int padlen) { - uint state = __crc32(extf_imagebyte, 0); + uint state = __crc32(extf_imagebyte.Take(padlen).ToArray(), 0); return (int)state; } diff --git a/build - debug.bat b/build - debug.bat new file mode 100644 index 0000000000..073e05a559 --- /dev/null +++ b/build - debug.bat @@ -0,0 +1,10 @@ + +set PATH=%PATH%;C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin;C:\Program Files (x86)\Microsoft Visual Studio\2019\Preview\MSBuild\Current\Bin;C:\Program Files (x86)\Microsoft Visual Studio\Preview\Community\MSBuild\15.0\Bin;C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin + +del bin\release\MissionPlannerBeta.zip + +.nuget\nuget.exe restore MissionPlanner.sln + +MSBuild.exe MissionPlanner.sln /restore /m /p:Configuration=Debug /verbosity:n + +pause \ No newline at end of file