AP_ESC_Telem: ensure that EDTv2 only gets logged when telemetry is available

This commit is contained in:
Andy Piper 2024-12-09 17:35:19 +00:00
parent 6e263532c8
commit a52c375643
1 changed files with 42 additions and 42 deletions

View File

@ -758,7 +758,6 @@ void AP_ESC_Telem::update()
telemdata.power_percentage);
}
#endif //AP_EXTENDED_ESC_TELEM_ENABLED
}
#if AP_EXTENDED_DSHOT_TELEM_V2_ENABLED
// Write an EDTv2 message, if there is any update
@ -806,6 +805,7 @@ void AP_ESC_Telem::update()
#endif // AP_EXTENDED_DSHOT_TELEM_V2_ENABLED
}
}
}
#endif // HAL_LOGGING_ENABLED
const uint32_t now_us = AP_HAL::micros();