From fc36e5939becd3ed452c057913345aba7e054721 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20St=C3=A4ck?= Date: Fri, 9 Aug 2019 08:19:02 +0200 Subject: [PATCH] Add "magic" CRC value that skips verification (for testing purposes) --- NuEVI/settings.cpp | 2 +- NuEVI/settings.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/NuEVI/settings.cpp b/NuEVI/settings.cpp index 2403a97..0dbc1a8 100644 --- a/NuEVI/settings.cpp +++ b/NuEVI/settings.cpp @@ -310,7 +310,7 @@ bool receiveSysexSettings(const uint8_t* data, const uint16_t length) { uint32_t crc=midi32to28(crc32(data, checksum_pos)); uint32_t crc_rcv; memcpy(&crc_rcv, data+checksum_pos, 4); - if(crc != crc_rcv) { + if(crc != crc_rcv && crc_rcv != NO_CHECKSUM) { configShowMessage("Invalid checksum"); return false; } diff --git a/NuEVI/settings.h b/NuEVI/settings.h index 15fe0c6..32f64df 100644 --- a/NuEVI/settings.h +++ b/NuEVI/settings.h @@ -121,6 +121,7 @@ #define TRILL3_INTERVAL_FACTORY 4 #define DAC_MODE_FACTORY DAC_MODE_BREATH +#define NO_CHECKSUM 0x7F007F00 void readEEPROM(const bool factoryReset); void setBit(uint16_t &bitfield, const uint8_t pos, const uint16_t value);