rcommand code sanitization

This commit is contained in:
Verkehrsrot 2019-08-31 18:37:36 +02:00
parent 1d2c79133f
commit ac2f67e98f
2 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@
typedef struct {
const uint8_t opcode;
void (*func)(uint8_t []);
uint8_t params;
const uint8_t params;
const bool store;
} cmd_t;

View File

@ -332,7 +332,7 @@ void set_flush(uint8_t val[]) {
// format: opcode, function, #bytes params,
// flag (true = do make settings persistent / false = don't)
//
cmd_t table[] = {
static cmd_t table[] = {
{0x01, set_rssi, 1, true}, {0x02, set_countmode, 1, true},
{0x03, set_gps, 1, true}, {0x04, set_display, 1, true},
{0x05, set_lorasf, 1, true}, {0x06, set_lorapower, 1, true},
@ -349,7 +349,7 @@ cmd_t table[] = {
{0x85, get_bme, 0, false}, {0x86, get_time, 0, false},
{0x87, set_time, 0, false}, {0x99, set_flush, 0, false}};
const uint8_t cmdtablesize =
static const uint8_t cmdtablesize =
sizeof(table) / sizeof(table[0]); // number of commands in command table
// check and execute remote command