Browse Source

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]
release/1.12
Martin Povišer 4 years ago committed by Daniel Agar
parent
commit
ad0de67df7
  1. 4
      src/drivers/dshot/dshot.cpp

4
src/drivers/dshot/dshot.cpp

@ -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},

Loading…
Cancel
Save