diff --git a/Tools/AP_Periph/Parameters.cpp b/Tools/AP_Periph/Parameters.cpp index 7c11d51c36..83944fe6ba 100644 --- a/Tools/AP_Periph/Parameters.cpp +++ b/Tools/AP_Periph/Parameters.cpp @@ -307,7 +307,7 @@ const AP_Param::Info AP_Periph_FW::var_info[] = { // @RebootRequired: True GSCALAR(esc_pwm_type, "ESC_PWM_TYPE", 0), -#if HAL_WITH_ESC_TELEM +#if HAL_WITH_ESC_TELEM && !HAL_GCS_ENABLED // @Param: ESC_TELEM_PORT // @DisplayName: ESC Telemetry Serial Port // @Description: This is the serial port number where SERIALx_PROTOCOL will be set to ESC Telemetry diff --git a/Tools/AP_Periph/Parameters.h b/Tools/AP_Periph/Parameters.h index a5b9937ac0..14a2714bfc 100644 --- a/Tools/AP_Periph/Parameters.h +++ b/Tools/AP_Periph/Parameters.h @@ -106,7 +106,7 @@ public: #ifdef HAL_PERIPH_ENABLE_RC_OUT AP_Int8 esc_pwm_type; -#if HAL_WITH_ESC_TELEM +#if HAL_WITH_ESC_TELEM && !HAL_GCS_ENABLED AP_Int8 esc_telem_port; #endif #endif diff --git a/Tools/AP_Periph/rc_out.cpp b/Tools/AP_Periph/rc_out.cpp index 32427e135c..d50cee638b 100644 --- a/Tools/AP_Periph/rc_out.cpp +++ b/Tools/AP_Periph/rc_out.cpp @@ -31,9 +31,11 @@ void AP_Periph_FW::rcout_init() // start up with safety enabled. This disables the pwm output until we receive an packet from the rempte system hal.rcout->force_safety_on(); +#if HAL_WITH_ESC_TELEM && !HAL_GCS_ENABLED if (g.esc_telem_port >= 0) { serial_manager.set_protocol_and_baud(g.esc_telem_port, AP_SerialManager::SerialProtocol_ESCTelemetry, 115200); } +#endif SRV_Channels::init();