mirror of
https://github.com/wled/WLED.git
synced 2025-07-27 04:36:33 +00:00
Fix ESP32
This commit is contained in:
parent
d02bf37167
commit
aeb3f2b018
@ -8,6 +8,7 @@
|
|||||||
#include "const.h"
|
#include "const.h"
|
||||||
#include "pin_manager.h"
|
#include "pin_manager.h"
|
||||||
#include "bus_wrapper.h"
|
#include "bus_wrapper.h"
|
||||||
|
#include <Arduino.h>
|
||||||
|
|
||||||
//parent class of BusDigital and BusPwm
|
//parent class of BusDigital and BusPwm
|
||||||
class Bus {
|
class Bus {
|
||||||
@ -97,7 +98,9 @@ class BusDigital : public Bus {
|
|||||||
|
|
||||||
void setBrightness(uint8_t b) {
|
void setBrightness(uint8_t b) {
|
||||||
//Fix for turning off onboard LED breaking bus
|
//Fix for turning off onboard LED breaking bus
|
||||||
|
#ifdef LED_BUILTIN
|
||||||
if (_bri == 0 && b > 0 && (_pins[0] == LED_BUILTIN || _pins[1] == LED_BUILTIN)) PolyBus::begin(_busPtr, _iType);
|
if (_bri == 0 && b > 0 && (_pins[0] == LED_BUILTIN || _pins[1] == LED_BUILTIN)) PolyBus::begin(_busPtr, _iType);
|
||||||
|
#endif
|
||||||
_bri = b;
|
_bri = b;
|
||||||
PolyBus::setBrightness(_busPtr, _iType, b);
|
PolyBus::setBrightness(_busPtr, _iType, b);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user