commit
74bbc71ce6
@ -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
|
||||||
|
@ -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
|
||||||
|
@ -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},
|
||||||
@ -432,6 +433,7 @@ void rcmd_execute(const uint8_t cmd[], const uint8_t cmdlength) {
|
|||||||
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user