From d7738a0a6f62a7b1c7985688d9bad6dfa86e9134 Mon Sep 17 00:00:00 2001 From: Piotr Wilkon Date: Thu, 31 Aug 2023 21:02:42 +0200 Subject: [PATCH] duplicate protection bug --- CHANGELOG.md | 9 +++++++++ F103C8T6_DIGI_USB.xml | 2 +- Src/common.c | 2 +- Src/digipeater.c | 4 ++-- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e0df1dc..76fe1c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +# 1.3.2 (2023-08-31) +## New features +* none +## Bug fixes +* Duplicate protection was not working properly +## Other +* none +## Known bugs +* none # 1.3.1 (2023-08-30) ## New features * none diff --git a/F103C8T6_DIGI_USB.xml b/F103C8T6_DIGI_USB.xml index cf0913b..a09e329 100644 --- a/F103C8T6_DIGI_USB.xml +++ b/F103C8T6_DIGI_USB.xml @@ -12,7 +12,7 @@ F103C8T6_DIGI_USB - JTAG + SWD ST-Link stm32f103c8tx diff --git a/Src/common.c b/Src/common.c index b7b3aa4..5fea23c 100644 --- a/Src/common.c +++ b/Src/common.c @@ -32,7 +32,7 @@ struct _GeneralConfig GeneralConfig = .kissMonitor = 0, }; -const char versionString[] = "VP-Digi v. 1.3.1\r\nThe open-source standalone APRS digipeater controller and KISS TNC\r\n"; +const char versionString[] = "VP-Digi v. 1.3.2\r\nThe open-source standalone APRS digipeater controller and KISS TNC\r\n"; static uint64_t pow10i(uint16_t exp) { diff --git a/Src/digipeater.c b/Src/digipeater.c index 8cbce4b..f167048 100644 --- a/Src/digipeater.c +++ b/Src/digipeater.c @@ -324,7 +324,7 @@ void DigiDigipeat(uint8_t *frame, uint16_t len) //calculate frame "hash" uint32_t hash = Crc32(CRC32_INIT, frame, 14); //use destination and source address, skip path - hash = Crc32(hash, &frame[t + 1], len - t); //continue through all remaining data + hash = Crc32(hash, &frame[t + 1], len - t - 1); //continue through all remaining data if(DigiConfig.viscous) //viscous-delay enabled on any slot { @@ -463,7 +463,7 @@ void DigiStoreDeDupe(uint8_t *buf, uint16_t size) deDupeCount %= DEDUPE_SIZE; deDupe[deDupeCount].hash = hash; - deDupe[deDupeCount].timeLimit = SysTickGet() + (DigiConfig.dupeTime * 10 / SYSTICK_INTERVAL); + deDupe[deDupeCount].timeLimit = SysTickGet() + (DigiConfig.dupeTime * 1000 / SYSTICK_INTERVAL); deDupeCount++; }