mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-22 02:17:36 +08:00
don't use DSHOT_TEL_CFG directly in code since it is autogenerated only if a board has serial config
This commit is contained in:
@@ -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<ESCType>(_param_dshot_esc_type.get());
|
||||
_telemetry.initSettingsHandlers(esc_type, _output_mask);
|
||||
|
||||
@@ -231,7 +231,6 @@ private:
|
||||
(ParamInt<px4::params::DSHOT_3D_DEAD_H>) _param_dshot_3d_dead_h,
|
||||
(ParamInt<px4::params::DSHOT_3D_DEAD_L>) _param_dshot_3d_dead_l,
|
||||
(ParamInt<px4::params::MOT_POLE_COUNT>) _param_mot_pole_count,
|
||||
(ParamBool<px4::params::DSHOT_BIDIR_EDT>) _param_dshot_bidir_edt,
|
||||
(ParamBool<px4::params::DSHOT_TEL_CFG>) _param_dshot_tel_cfg
|
||||
(ParamBool<px4::params::DSHOT_BIDIR_EDT>) _param_dshot_bidir_edt
|
||||
)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user