Skip to content

Commit

Permalink
Fix blackbox_device in CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
borisbstyle committed Nov 25, 2015
1 parent 052e7f6 commit 449999d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/main/io/serial_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,11 @@ static const char * const lookupTableGimbalMode[] = {
"NORMAL", "MIXTILT"
};

static const char * const lookupTableBlackboxDevice[] = {
"SERIAL", "SPIFLASH"
};


static const char * const lookupTablePidController[] = {
"UNUSED", "MWREWRITE", "LUX"
};
Expand Down Expand Up @@ -377,6 +382,9 @@ typedef enum {
#ifdef GPS
TABLE_GPS_PROVIDER,
TABLE_GPS_SBAS_MODE,
#endif
#ifdef BLACKBOX
TABLE_BLACKBOX_DEVICE,
#endif
TABLE_CURRENT_SENSOR,
TABLE_GIMBAL_MODE,
Expand All @@ -395,6 +403,7 @@ static const lookupTableEntry_t lookupTables[] = {
{ lookupTableGPSProvider, sizeof(lookupTableGPSProvider) / sizeof(char *) },
{ lookupTableGPSSBASMode, sizeof(lookupTableGPSSBASMode) / sizeof(char *) },
#endif
{ lookupTableBlackboxDevice, sizeof(lookupTableBlackboxDevice) / sizeof(char *) },
{ lookupTableCurrentSensor, sizeof(lookupTableCurrentSensor) / sizeof(char *) },
{ lookupTableGimbalMode, sizeof(lookupTableGimbalMode) / sizeof(char *) },
{ lookupTablePidController, sizeof(lookupTablePidController) / sizeof(char *) },
Expand Down Expand Up @@ -664,7 +673,7 @@ const clivalue_t valueTable[] = {
#ifdef BLACKBOX
{ "blackbox_rate_num", VAR_UINT8 | MASTER_VALUE, &masterConfig.blackbox_rate_num, .config.minmax = { 1, 32 } },
{ "blackbox_rate_denom", VAR_UINT8 | MASTER_VALUE, &masterConfig.blackbox_rate_denom, .config.minmax = { 1, 32 } },
{ "blackbox_device", VAR_UINT8 | MASTER_VALUE, &masterConfig.blackbox_device, .config.lookup = { TABLE_OFF_ON } },
{ "blackbox_device", VAR_UINT8 | MASTER_VALUE | MODE_LOOKUP, &masterConfig.blackbox_device, .config.lookup = { TABLE_BLACKBOX_DEVICE } },
#endif

{ "beeper_off_flags", VAR_UINT32 | MASTER_VALUE, &masterConfig.beeper_off.flags, .config.minmax = {BEEPER_OFF_FLAGS_MIN, BEEPER_OFF_FLAGS_MAX }},
Expand Down

0 comments on commit 449999d

Please sign in to comment.