Merge pull request #711 from cyberman54/development

Development
This commit is contained in:
Verkehrsrot 2021-01-07 10:38:38 +01:00 committed by GitHub
commit 74bbc71ce6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 4 deletions

View File

@ -25,7 +25,6 @@ typedef struct {
const uint8_t opcode; const uint8_t opcode;
void (*func)(uint8_t[]); void (*func)(uint8_t[]);
const uint8_t params; const uint8_t params;
const bool store;
} cmd_t; } cmd_t;
// Struct for remote command processing queue // Struct for remote command processing queue

View File

@ -5,6 +5,10 @@
// (c) by Kaspar Metz // (c) by Kaspar Metz
// modified for use in the Paxcounter by AQ // 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) #if (COUNT_ENS)
// Local logging tag // Local logging tag

View File

@ -381,6 +381,7 @@ void set_saveconfig(uint8_t val[]) {
// assign previously defined functions to set of numeric remote commands // assign previously defined functions to set of numeric remote commands
// format: {opcode, function, number of function arguments} // format: {opcode, function, number of function arguments}
static const cmd_t table[] = { static const cmd_t table[] = {
{0x01, set_rssi, 1}, {0x02, set_countmode, 1}, {0x01, set_rssi, 1}, {0x02, set_countmode, 1},
{0x03, set_gps, 1}, {0x04, set_display, 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), " "Remote command x%02X called with missing parameter(s), "
"skipped", "skipped",
table[i].opcode); table[i].opcode);
break; // command found -> exit table lookup loop break; // command found -> exit table lookup loop
} // end of command validation } // end of command validation
} // end of command table lookup loop } // end of command table lookup loop
if (i < 0) { // command not found -> exit parser if (i < 0) { // command not found -> exit parser
ESP_LOGI(TAG, "Unknown remote command x%02X, ignored", cmd[cursor]); ESP_LOGI(TAG, "Unknown remote command x%02X, ignored", cmd[cursor]);
break; break;