mirror of https://github.com/ArduPilot/ardupilot
SRV_Channel: check for rcout serial for blheli support
This commit is contained in:
parent
fde092a246
commit
d54d3351de
|
@ -449,9 +449,11 @@ private:
|
|||
AP_SBusOut sbus;
|
||||
static AP_SBusOut *sbus_ptr;
|
||||
|
||||
#if HAL_SUPPORT_RCOUT_SERIAL
|
||||
// support for BLHeli protocol
|
||||
AP_BLHeli blheli;
|
||||
static AP_BLHeli *blheli_ptr;
|
||||
#endif
|
||||
static uint16_t disabled_mask;
|
||||
|
||||
SRV_Channel obj_channels[NUM_SERVO_CHANNELS];
|
||||
|
|
|
@ -167,7 +167,9 @@ void SRV_Channels::enable_aux_servos()
|
|||
}
|
||||
}
|
||||
|
||||
#if HAL_SUPPORT_RCOUT_SERIAL
|
||||
blheli_ptr->update();
|
||||
#endif
|
||||
}
|
||||
|
||||
/// enable output channels using a channel mask
|
||||
|
|
|
@ -28,7 +28,11 @@ SRV_Channel *SRV_Channels::channels;
|
|||
SRV_Channels *SRV_Channels::instance;
|
||||
AP_Volz_Protocol *SRV_Channels::volz_ptr;
|
||||
AP_SBusOut *SRV_Channels::sbus_ptr;
|
||||
|
||||
#if HAL_SUPPORT_RCOUT_SERIAL
|
||||
AP_BLHeli *SRV_Channels::blheli_ptr;
|
||||
#endif
|
||||
|
||||
uint16_t SRV_Channels::disabled_mask;
|
||||
|
||||
bool SRV_Channels::disabled_passthrough;
|
||||
|
@ -124,9 +128,11 @@ const AP_Param::GroupInfo SRV_Channels::var_info[] = {
|
|||
// @Path: ../AP_SBusOut/AP_SBusOut.cpp
|
||||
AP_SUBGROUPINFO(sbus, "_SBUS_", 20, SRV_Channels, AP_SBusOut),
|
||||
|
||||
#if HAL_SUPPORT_RCOUT_SERIAL
|
||||
// @Group: _BLH_
|
||||
// @Path: ../AP_BLHeli/AP_BLHeli.cpp
|
||||
AP_SUBGROUPINFO(blheli, "_BLH_", 21, SRV_Channels, AP_BLHeli),
|
||||
#endif
|
||||
|
||||
AP_GROUPEND
|
||||
};
|
||||
|
@ -149,7 +155,9 @@ SRV_Channels::SRV_Channels(void)
|
|||
|
||||
volz_ptr = &volz;
|
||||
sbus_ptr = &sbus;
|
||||
#if HAL_SUPPORT_RCOUT_SERIAL
|
||||
blheli_ptr = &blheli;
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -217,4 +225,9 @@ void SRV_Channels::push()
|
|||
|
||||
// give sbus library a chance to update
|
||||
sbus_ptr->update();
|
||||
|
||||
#if HAL_SUPPORT_RCOUT_SERIAL
|
||||
// give blheli telemetry a chance to update
|
||||
blheli_ptr->update_telemetry();
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue