Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions libraries/AP_BLHeli/AP_BLHeli.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@
#include <AP_Common/AP_Common.h>
#include <AP_HAL/AP_HAL.h>

#ifndef HAVE_AP_BLHELI_SUPPORT
#define HAVE_AP_BLHELI_SUPPORT HAL_SUPPORT_RCOUT_SERIAL
#endif

#if HAL_SUPPORT_RCOUT_SERIAL
#if HAVE_AP_BLHELI_SUPPORT

#include <AP_ESC_Telem/AP_ESC_Telem_Backend.h>

Expand Down Expand Up @@ -295,4 +297,4 @@ class AP_BLHeli : public AP_ESC_Telem_Backend {
bool protocol_handler(uint8_t , AP_HAL::UARTDriver *);
};

#endif // HAL_SUPPORT_RCOUT_SERIAL
#endif // HAVE_AP_BLHELI_SUPPORT
2 changes: 1 addition & 1 deletion libraries/SRV_Channel/SRV_Channel.h
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ class SRV_Channels {
AP_RobotisServo robotis;
#endif

#if HAL_SUPPORT_RCOUT_SERIAL
#if HAVE_AP_BLHELI_SUPPORT
// support for BLHeli protocol
AP_BLHeli blheli;
#endif
Expand Down
2 changes: 1 addition & 1 deletion libraries/SRV_Channel/SRV_Channel_aux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ void SRV_Channels::enable_aux_servos()
// propagate channel masks to the ESCS
hal.rcout->update_channel_masks();

#if HAL_SUPPORT_RCOUT_SERIAL
#if HAVE_AP_BLHELI_SUPPORT
blheli.update();
#endif
}
Expand Down
6 changes: 3 additions & 3 deletions libraries/SRV_Channel/SRV_Channels.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ const AP_Param::GroupInfo SRV_Channels::var_info[] = {
AP_SUBGROUPINFO(sbus, "_SBUS_", 20, SRV_Channels, AP_SBusOut),
#endif

#if HAL_SUPPORT_RCOUT_SERIAL
#if HAVE_AP_BLHELI_SUPPORT
// @Group: _BLH_
// @Path: ../AP_BLHeli/AP_BLHeli.cpp
AP_SUBGROUPINFO(blheli, "_BLH_", 21, SRV_Channels, AP_BLHeli),
Expand Down Expand Up @@ -365,7 +365,7 @@ SRV_Channels::SRV_Channels(void)
void SRV_Channels::init(uint32_t motor_mask, AP_HAL::RCOutput::output_mode mode)
{
// initialize BLHeli late so that all of the masks it might setup don't get trodden on by motor initialization
#if HAL_SUPPORT_RCOUT_SERIAL
#if HAVE_AP_BLHELI_SUPPORT
blheli.init(motor_mask, mode);
#endif
#ifndef HAL_BUILD_AP_PERIPH
Expand Down Expand Up @@ -502,7 +502,7 @@ void SRV_Channels::push()
robotis.update();
#endif

#if HAL_SUPPORT_RCOUT_SERIAL
#if HAVE_AP_BLHELI_SUPPORT
// give blheli telemetry a chance to update
blheli.update_telemetry();
#endif
Expand Down
Loading