mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 01:05:27 +03:00
Use the cached value of useDshotTelemetry to ensure consistent runtime use if dshot_bidir is changed (#13589)
This commit is contained in:
parent
54377940e0
commit
565de1b68b
11 changed files with 19 additions and 20 deletions
|
@ -267,7 +267,7 @@ typedef int (*getEscRpmOrFreqFnPtr)(int i);
|
|||
static int getEscRpm(int i)
|
||||
{
|
||||
#ifdef USE_DSHOT_TELEMETRY
|
||||
if (motorConfig()->dev.useDshotTelemetry) {
|
||||
if (useDshotTelemetry) {
|
||||
return lrintf(getDshotRpm(i));
|
||||
}
|
||||
#endif
|
||||
|
@ -2064,7 +2064,7 @@ void osdAddActiveElements(void)
|
|||
#endif // GPS
|
||||
|
||||
#if defined(USE_DSHOT_TELEMETRY) || defined(USE_ESC_SENSOR)
|
||||
if ((featureIsEnabled(FEATURE_ESC_SENSOR)) || (motorConfig()->dev.useDshotTelemetry)) {
|
||||
if ((featureIsEnabled(FEATURE_ESC_SENSOR)) || useDshotTelemetry) {
|
||||
osdAddActiveElement(OSD_ESC_TMP);
|
||||
osdAddActiveElement(OSD_ESC_RPM);
|
||||
osdAddActiveElement(OSD_ESC_RPM_FREQ);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue