1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-13 19:40:31 +03:00

Merge remote-tracking branch 'betaflight/master' into RP2350

This commit is contained in:
blckmn 2025-01-26 10:43:15 +11:00
commit ea31439824
3 changed files with 7 additions and 1 deletions

View file

@ -452,7 +452,7 @@ static void validateAndFixConfig(void)
motorConfigMutable()->dev.useContinuousUpdate = false; motorConfigMutable()->dev.useContinuousUpdate = false;
} }
#if defined(USE_DSHOT_TELEMETRY) #if defined(USE_DSHOT_TELEMETRY) && defined(USE_TIMER)
bool nChannelTimerUsed = false; bool nChannelTimerUsed = false;
for (unsigned i = 0; i < getMotorCount(); i++) { for (unsigned i = 0; i < getMotorCount(); i++) {
const ioTag_t tag = motorConfig()->dev.ioTags[i]; const ioTag_t tag = motorConfig()->dev.ioTags[i];

View file

@ -161,12 +161,16 @@ void initDshotTelemetry(const timeUs_t looptimeUs)
// erpmToHz is used by bidir dshot and ESC telemetry // erpmToHz is used by bidir dshot and ESC telemetry
erpmToHz = ERPM_PER_LSB / SECONDS_PER_MINUTE / (motorConfig()->motorPoleCount / 2.0f); erpmToHz = ERPM_PER_LSB / SECONDS_PER_MINUTE / (motorConfig()->motorPoleCount / 2.0f);
#ifdef USE_RPM_FILTER
if (motorConfig()->dev.useDshotTelemetry) { if (motorConfig()->dev.useDshotTelemetry) {
// init LPFs for RPM data // init LPFs for RPM data
for (unsigned i = 0; i < dshotMotorCount; i++) { for (unsigned i = 0; i < dshotMotorCount; i++) {
pt1FilterInit(&motorFreqLpf[i], pt1FilterGain(rpmFilterConfig()->rpm_filter_lpf_hz, looptimeUs * 1e-6f)); pt1FilterInit(&motorFreqLpf[i], pt1FilterGain(rpmFilterConfig()->rpm_filter_lpf_hz, looptimeUs * 1e-6f));
} }
} }
#else
UNUSED(looptimeUs);
#endif
} }
static uint32_t dshot_decode_eRPM_telemetry_value(uint16_t value) static uint32_t dshot_decode_eRPM_telemetry_value(uint16_t value)

View file

@ -59,6 +59,8 @@
#define TARGET_IO_PORTE 0xffff #define TARGET_IO_PORTE 0xffff
#define TARGET_IO_PORTF 0xffff #define TARGET_IO_PORTF 0xffff
#define TARGET_IO_PORTG 0xffff #define TARGET_IO_PORTG 0xffff
#define TARGET_IO_PORTH 0xffff
#define TARGET_IO_PORTI 0xffff
#define USE_I2C #define USE_I2C
#define I2C_FULL_RECONFIGURABILITY #define I2C_FULL_RECONFIGURABILITY