diff --git a/include/rcommand.h b/include/rcommand.h index 696a23d2..8149d668 100644 --- a/include/rcommand.h +++ b/include/rcommand.h @@ -25,7 +25,6 @@ typedef struct { const uint8_t opcode; void (*func)(uint8_t[]); const uint8_t params; - const bool store; } cmd_t; // Struct for remote command processing queue diff --git a/src/corona.cpp b/src/corona.cpp index a8dd85a4..bd20fb17 100644 --- a/src/corona.cpp +++ b/src/corona.cpp @@ -5,6 +5,10 @@ // (c) by Kaspar Metz // modified for use in the Paxcounter by AQ +#if (COUNT_ENS) && !(BLECOUNTER) +#warning ENS-Counter needs Bluetooth, but Bluetooth compile option is disabled +#endif + #if (COUNT_ENS) // Local logging tag diff --git a/src/rcommand.cpp b/src/rcommand.cpp index 1f36b113..d39ba1f3 100644 --- a/src/rcommand.cpp +++ b/src/rcommand.cpp @@ -381,6 +381,7 @@ void set_saveconfig(uint8_t val[]) { // assign previously defined functions to set of numeric remote commands // format: {opcode, function, number of function arguments} + static const cmd_t table[] = { {0x01, set_rssi, 1}, {0x02, set_countmode, 1}, {0x03, set_gps, 1}, {0x04, set_display, 1}, @@ -429,9 +430,10 @@ void rcmd_execute(const uint8_t cmd[], const uint8_t cmdlength) { "Remote command x%02X called with missing parameter(s), " "skipped", table[i].opcode); - break; // command found -> exit table lookup loop - } // end of command validation - } // end of command table lookup loop + break; // command found -> exit table lookup loop + } // end of command validation + } // end of command table lookup loop + if (i < 0) { // command not found -> exit parser ESP_LOGI(TAG, "Unknown remote command x%02X, ignored", cmd[cursor]); break;