Browse Source

HAL_SITL: obey enable mask for output channels

master
Andrew Tridgell 8 years ago
parent
commit
117974ef0f
  1. 2
      libraries/AP_HAL_SITL/RCOutput.cpp

2
libraries/AP_HAL_SITL/RCOutput.cpp

@ -45,7 +45,7 @@ void RCOutput::disable_ch(uint8_t ch) @@ -45,7 +45,7 @@ void RCOutput::disable_ch(uint8_t ch)
void RCOutput::write(uint8_t ch, uint16_t period_us)
{
if (ch < SITL_NUM_CHANNELS) {
if (ch < SITL_NUM_CHANNELS && (_enable_mask & (1U<<ch))) {
if (_corked) {
_pending[ch] = period_us;
} else {

Loading…
Cancel
Save