From 7edc6062967bafeef41fb9bfb35d2c961259ee9a Mon Sep 17 00:00:00 2001 From: Jacob Dahl Date: Thu, 15 Jan 2026 13:51:22 -0900 Subject: [PATCH] don't use DSHOT_TEL_CFG directly in code since it is autogenerated only if a board has serial config --- src/drivers/dshot/DShot.cpp | 9 +++------ src/drivers/dshot/DShot.h | 3 +-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/drivers/dshot/DShot.cpp b/src/drivers/dshot/DShot.cpp index 72edca059e..5e85e9a8ff 100644 --- a/src/drivers/dshot/DShot.cpp +++ b/src/drivers/dshot/DShot.cpp @@ -71,7 +71,6 @@ int DShot::init() { update_params(); - _serial_telemetry_enabled = _param_dshot_tel_cfg.get(); _bdshot_edt_enabled = _param_dshot_bidir_edt.get(); if (initialize_dshot()) { @@ -1001,16 +1000,14 @@ void DShot::init_telemetry(const char *device, bool swap_rxtx) return; } - if (!_serial_telemetry_enabled) { - PX4_ERR("serial telemetry not enabled"); - return; - } - if (_telemetry.init(device, swap_rxtx) != PX4_OK) { PX4_ERR("telemetry init failed"); return; } + // Enable serial telemetry now that we've successfully initialized + _serial_telemetry_enabled = true; + // Initialize ESC settings handlers based on ESC type ESCType esc_type = static_cast(_param_dshot_esc_type.get()); _telemetry.initSettingsHandlers(esc_type, _output_mask); diff --git a/src/drivers/dshot/DShot.h b/src/drivers/dshot/DShot.h index c3e6092f02..540d839d64 100644 --- a/src/drivers/dshot/DShot.h +++ b/src/drivers/dshot/DShot.h @@ -231,7 +231,6 @@ private: (ParamInt) _param_dshot_3d_dead_h, (ParamInt) _param_dshot_3d_dead_l, (ParamInt) _param_mot_pole_count, - (ParamBool) _param_dshot_bidir_edt, - (ParamBool) _param_dshot_tel_cfg + (ParamBool) _param_dshot_bidir_edt ) };