Skip to content

Commit

Permalink
Add RPM Limiter to baseline build (betaflight#13190)
Browse files Browse the repository at this point in the history
* Fix function name

* Add RPM Limiter to baseline build
  • Loading branch information
KarateBrot authored and Eike Ahmels committed Jan 22, 2024
1 parent 49f9160 commit 1ba6dd3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/main/flight/mixer.c
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ static void applyRpmLimiter(mixerRuntime_t *mixer)
{
static float prevError = 0.0f;
static float i = 0.0f;
const float unsmoothedAverageRpm = getDshotAverageRpm();
const float unsmoothedAverageRpm = getDshotRpmAverage();
const float averageRpm = pt1FilterApply(&mixer->averageRpmFilter, unsmoothedAverageRpm);
const float error = averageRpm - mixer->rpmLimiterRpmLimit;

Expand Down
6 changes: 5 additions & 1 deletion src/main/target/common_pre.h
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,10 @@

#endif // USE_TELEMETRY

#ifdef USE_DSHOT_TELEMETRY
#define USE_RPM_LIMIT
#endif

#define USE_BATTERY_CONTINUE
#define USE_DASHBOARD
#define USE_EMFAT_AUTORUN
Expand Down Expand Up @@ -253,7 +257,7 @@
#define USE_RANGEFINDER_HCSR04
#define USE_RANGEFINDER_TF

#endif
#endif // TARGET_FLASH_SIZE > 512

#endif // !defined(CLOUD_BUILD)

Expand Down

0 comments on commit 1ba6dd3

Please sign in to comment.