Skip to content

Commit

Permalink
make default brushless prop test PWM ratio configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
ntamas committed Aug 26, 2021
1 parent bfe3b0e commit 18ce20d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/modules/src/health.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,16 @@

#include "static_mem.h"

#ifndef DEFAULT_PROP_TEST_PWM_RATIO
# define DEFAULT_PROP_TEST_PWM_RATIO 0
#endif

#define PROPTEST_NBR_OF_VARIANCE_VALUES 100

static bool startPropTest = false;
static bool startBatTest = false;

static uint16_t propTestPWMRatio = 0;
static uint16_t propTestPWMRatio = DEFAULT_PROP_TEST_PWM_RATIO;

static uint32_t i = 0;
NO_DMA_CCM_SAFE_ZERO_INIT static float accX[PROPTEST_NBR_OF_VARIANCE_VALUES];
Expand Down
2 changes: 2 additions & 0 deletions tools/make/config.mk.example
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@
# CFLAGS += -DSTART_DISARMED
# IDLE motor drive when armed, 0 = 0%, 65535 = 100% (the motors runs as long as the Crazyflie is armed)
# CFLAGS += -DDEFAULT_IDLE_THRUST=5000
# Default PWM ratio to use when testing the propellers
# CFLAGS += -DDEFAULT_PROP_TEST_PWM_RATIO=10000

## Lighthouse handling
# If lighthouse will need to act as a ground truth (so not entered in the kalman filter)
Expand Down

0 comments on commit 18ce20d

Please sign in to comment.