dshot: fix build error

Fixes

  src/drivers/dshot/dshot.cpp:1408:9: error: declaration of
  'struct DShotOutput::custom_command(int, char**)::Command' shadows
  a previous local [-Werror=shadow]
This commit is contained in:
Martin Povišer
2020-11-02 13:52:42 -05:00
committed by Daniel Agar
parent d2145917e7
commit ad0de67df7
+2 -2
View File
@@ -1405,13 +1405,13 @@ int DShotOutput::custom_command(int argc, char *argv[])
} }
} }
struct Command { struct VerbCommand {
const char *name; const char *name;
dshot_command_t command; dshot_command_t command;
int num_repetitions; int num_repetitions;
}; };
constexpr Command commands[] = { constexpr VerbCommand commands[] = {
{"reverse", DShot_cmd_spin_direction_reversed, 10}, {"reverse", DShot_cmd_spin_direction_reversed, 10},
{"normal", DShot_cmd_spin_direction_normal, 10}, {"normal", DShot_cmd_spin_direction_normal, 10},
{"save", DShot_cmd_save_settings, 10}, {"save", DShot_cmd_save_settings, 10},