hd-zero / hdzero-vtx

GNU General Public License v3.0
213 stars 43 forks source link

Set_Blue_LED_optimisation #189

Closed MartinHugh closed 6 months ago

MartinHugh commented 6 months ago

Rather than unconditionally setting or unsetting the LED, it first checks whether it is on or off

ligenxxxx commented 6 months ago

For freestyle v1/v2 VTX, the LED is controlled by the TC3587 chip. Each time configuring the LED through I2C takes much more time than driving the LED through IO, which will cause other functions in while(1) to not have enough time to run. So don't control the LED repeatedly in while(1).