5
0
mirror of https://github.com/ArduPilot/ardupilot synced 2025-01-09 09:28:31 -04:00

AP_Notify: RCOutputRGBLed: remove cork()

cork()/push() will be called in the vehicle code.

The issue that led to this fix was as follows:
- on a Linux board (Navio 2) usage of this class didn't yield any PWM on
  the expected outputs on Rover (Copter and Plane worked as expected)

After dicsussion at  rover code was changed (541538f) to use make
proper use of SRV_Channels API.

This fix is also the consequence of the discussion. TL;DR: the output is
only done when commanded by the vehicle.
This commit is contained in:
Georgii Staroselskii 2017-06-14 15:34:26 +03:00 committed by Lucas De Marchi
parent eed08fb8cd
commit 0203b4c1b1

View File

@ -69,13 +69,6 @@ bool RCOutputRGBLed::hw_set_rgb(uint8_t red, uint8_t green, uint8_t blue)
hal.rcout->set_freq(mask, freq_motor);
}
/*
* Not calling push() to have a better performance on RCOutput's that
* implements cork()/push(), so this changes will be committed together
* with the motors.
*/
hal.rcout->cork();
uint16_t usec_duty = usec_period * red / _led_bright;
SRV_Channels::set_output_pwm_chan(_red_channel, usec_duty);