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: {