fix issue where DVM was incorrectly indexing network and site IDs for DMR;

pull/24/head
Bryan Biedenkapp 3 years ago
parent 97e3b68da0
commit 4b74684ffe

@ -58,8 +58,8 @@ namespace dmr
/// <summary>Helper to test and clamp a DMR site ID.</summary> /// <summary>Helper to test and clamp a DMR site ID.</summary>
static uint32_t siteId(uint32_t id, uint8_t siteModel) static uint32_t siteId(uint32_t id, uint8_t siteModel)
{ {
if (id == 0U) { // clamp to 1 if (id > 0U) {
id = 1U; id--;
} }
switch (siteModel) switch (siteModel)
@ -100,10 +100,6 @@ namespace dmr
/// <summary>Helper to test and clamp a DMR network ID.</summary> /// <summary>Helper to test and clamp a DMR network ID.</summary>
static uint32_t netId(uint32_t id, uint8_t siteModel) static uint32_t netId(uint32_t id, uint8_t siteModel)
{ {
if (id == 0U) { // clamp to 1
id = 1U;
}
switch (siteModel) { switch (siteModel) {
case SITE_MODEL_TINY: case SITE_MODEL_TINY:
{ {

Loading…
Cancel
Save

Powered by TurnKey Linux.