From 4b74684ffeb3d2c22b0817829a22fd83fe2308b7 Mon Sep 17 00:00:00 2001 From: Bryan Biedenkapp Date: Thu, 23 Mar 2023 14:12:23 -0400 Subject: [PATCH] fix issue where DVM was incorrectly indexing network and site IDs for DMR; --- src/dmr/DMRUtils.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/dmr/DMRUtils.h b/src/dmr/DMRUtils.h index 84c159a0..afd31a65 100644 --- a/src/dmr/DMRUtils.h +++ b/src/dmr/DMRUtils.h @@ -58,8 +58,8 @@ namespace dmr /// Helper to test and clamp a DMR site ID. static uint32_t siteId(uint32_t id, uint8_t siteModel) { - if (id == 0U) { // clamp to 1 - id = 1U; + if (id > 0U) { + id--; } switch (siteModel) @@ -100,10 +100,6 @@ namespace dmr /// Helper to test and clamp a DMR network ID. static uint32_t netId(uint32_t id, uint8_t siteModel) { - if (id == 0U) { // clamp to 1 - id = 1U; - } - switch (siteModel) { case SITE_MODEL_TINY: {