Skip to content

Commit 6fd19e9

Browse files
authored
Merge pull request #1535 from bitcraze/Aris/Arming
Arming and Idle Thrust updates
2 parents 6532d38 + dfece58 commit 6fd19e9

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

docs/functional-areas/supervisor/arming.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Auto arming is configured at compile time through the `CONFIG_MOTORS_REQUIRE_ARM
2929

3030
## Idle thrust
3131

32-
The motors are used to indicate to the pilot that the system is armed and ready to fly. Motors runs at idle thrust when
32+
The motors are used to indicate to the pilot that the system is armed and ready to fly. Motors run at idle thrust when
3333
the supervisor is in a state where flight is enabled.
3434

3535
Note that the default

src/modules/src/Kconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,15 @@ config MOTORS_REQUIRE_ARMING
165165
When enabled, system must be armed to be able to take off. Arming can
166166
be done in several ways, e.g. though cfclient or external transmitter.
167167

168+
config MOTORS_DEFAULT_IDLE_THRUST
169+
int "Idle thrust for the armed motors"
170+
depends on MOTORS_REQUIRE_ARMING
171+
range 0 15000
172+
default 7000
173+
help
174+
Sets the baseline motor power level when they are armed. Setting this
175+
value above 7000 may cause the platform to move unintentionally, while
176+
setting it too low might not provide enough power to spin the motors.
168177

169178
config MOTORS_DEFAULT_PROP_TEST_PWM_RATIO
170179
int "Override default PWM ratio to use during motor tests"

src/platform/interface/platform_defaults.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,3 +215,12 @@
215215
#ifndef HEALTH_PROPELLER_TEST_THRESHOLD
216216
#define HEALTH_PROPELLER_TEST_THRESHOLD 0.0f
217217
#endif
218+
219+
// For safety, when the BigQuad deck is enabled, the user should
220+
// know when the platform is ready to fly.
221+
#ifdef CONFIG_DECK_BIGQUAD
222+
#define CONFIG_MOTORS_REQUIRE_ARMING 1
223+
#ifndef CONFIG_MOTORS_DEFAULT_IDLE_THRUST
224+
#define CONFIG_MOTORS_DEFAULT_IDLE_THRUST 7000
225+
#endif
226+
#endif

src/platform/interface/platform_defaults_cf2.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,3 @@
163163
#define PID_POS_VEL_Y_MAX 1.0f
164164
#define PID_POS_VEL_Z_MAX 1.0f
165165

166-
#if defined(CONFIG_DECK_BIGQUAD) && defined(MOTORS_REQUIRE_ARMING)
167-
#define CONFIG_MOTORS_DEFAULT_IDLE_THRUST 7000
168-
#endif

src/platform/interface/platform_defaults_cf21bl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,3 @@
134134
#define PID_POS_VEL_Y_MAX 1.0f
135135
#define PID_POS_VEL_Z_MAX 1.0f
136136

137-
#define CONFIG_MOTORS_DEFAULT_IDLE_THRUST 7000

0 commit comments

Comments
 (0)