diff --git a/src/hm/Heuristic.h b/src/hm/Heuristic.h index cc42df4f..59c35aec 100644 --- a/src/hm/Heuristic.h +++ b/src/hm/Heuristic.h @@ -217,15 +217,12 @@ class Heuristic { } inline uint8_t id2Ch(uint8_t id) { - switch(id) { - case 0: return 3; - case 1: return 23; - case 2: return 40; - case 3: return 61; - case 4: return 75; - } - return 3; // standard + if (id < RF_MAX_CHANNEL_ID) + return mChList[id]; + else + return 3; // standard } + uint8_t mChList[RF_MAX_CHANNEL_ID] = {03, 23, 40, 61, 75}; };