mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-27 21:13:35 +08:00
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:
committed by
Daniel Agar
parent
d2145917e7
commit
ad0de67df7
@@ -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},
|
||||||
|
|||||||
Reference in New Issue
Block a user