mirror of
https://github.com/wled/WLED.git
synced 2025-07-12 05:16:31 +00:00
Loading cfg.json without wsec.json
Bugfix for BudOnOff.
This commit is contained in:
parent
a766ddbebc
commit
cce54f3bb7
@ -504,7 +504,7 @@ class BusOnOff : public Bus {
|
|||||||
|
|
||||||
uint8_t currentPin = bc.pins[0];
|
uint8_t currentPin = bc.pins[0];
|
||||||
if (!pinManager.allocatePin(currentPin, true, PinOwner::BusOnOff)) {
|
if (!pinManager.allocatePin(currentPin, true, PinOwner::BusOnOff)) {
|
||||||
deallocatePins(); return;
|
return;
|
||||||
}
|
}
|
||||||
_pin = currentPin; //store only after allocatePin() succeeds
|
_pin = currentPin; //store only after allocatePin() succeeds
|
||||||
pinMode(_pin, OUTPUT);
|
pinMode(_pin, OUTPUT);
|
||||||
@ -540,7 +540,7 @@ class BusOnOff : public Bus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void cleanup() {
|
void cleanup() {
|
||||||
deallocatePins();
|
pinManager.deallocatePin(_pin, PinOwner::BusOnOff);
|
||||||
}
|
}
|
||||||
|
|
||||||
~BusOnOff() {
|
~BusOnOff() {
|
||||||
@ -550,10 +550,6 @@ class BusOnOff : public Bus {
|
|||||||
private:
|
private:
|
||||||
uint8_t _pin = 255;
|
uint8_t _pin = 255;
|
||||||
uint8_t _data = 0;
|
uint8_t _data = 0;
|
||||||
|
|
||||||
void deallocatePins() {
|
|
||||||
pinManager.deallocatePin(_pin, PinOwner::BusOnOff);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -689,6 +685,8 @@ class BusManager {
|
|||||||
busses[numBusses] = new BusNetwork(bc);
|
busses[numBusses] = new BusNetwork(bc);
|
||||||
} else if (IS_DIGITAL(bc.type)) {
|
} else if (IS_DIGITAL(bc.type)) {
|
||||||
busses[numBusses] = new BusDigital(bc, numBusses, colorOrderMap);
|
busses[numBusses] = new BusDigital(bc, numBusses, colorOrderMap);
|
||||||
|
} else if (bc.type == TYPE_ONOFF) {
|
||||||
|
busses[numBusses] = new BusOnOff(bc);
|
||||||
} else {
|
} else {
|
||||||
busses[numBusses] = new BusPwm(bc);
|
busses[numBusses] = new BusPwm(bc);
|
||||||
}
|
}
|
||||||
|
@ -540,8 +540,8 @@ void deserializeConfigFromFS() {
|
|||||||
if (!success) { //if file does not exist, try reading from EEPROM
|
if (!success) { //if file does not exist, try reading from EEPROM
|
||||||
#ifdef WLED_ADD_EEPROM_SUPPORT
|
#ifdef WLED_ADD_EEPROM_SUPPORT
|
||||||
deEEPSettings();
|
deEEPSettings();
|
||||||
#endif
|
|
||||||
return;
|
return;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!requestJSONBufferLock(1)) return;
|
if (!requestJSONBufferLock(1)) return;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2209141
|
#define VERSION 2209161
|
||||||
|
|
||||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user