mirror of
https://github.com/wled/WLED.git
synced 2025-04-23 14:27:18 +00:00
bug fix
This commit is contained in:
parent
c942345453
commit
9bb979f2e8
@ -272,7 +272,7 @@ unsigned *PinManagerClass::getReadOnlyPins()
|
||||
#ifdef READ_ONLY_PINS
|
||||
static unsigned readOnlyPins[] = {READ_ONLY_PINS};
|
||||
#else
|
||||
static unsigned readOnlyPins[] = 255;
|
||||
static unsigned readOnlyPins[] = {255};
|
||||
#endif
|
||||
return readOnlyPins;
|
||||
}
|
||||
@ -280,7 +280,7 @@ unsigned *PinManagerClass::getReadOnlyPins()
|
||||
bool PinManagerClass::isReadOnlyPin(byte gpio)
|
||||
{
|
||||
const unsigned* pins = PinManagerClass::getReadOnlyPins();
|
||||
const unsigned numPins = sizeof(pins) / sizeof(pins[0]);
|
||||
const unsigned numPins = (sizeof *pins) / (sizeof pins[0]);
|
||||
|
||||
for (unsigned i = 0; i < numPins; i++) {
|
||||
if (pins[i] == gpio) {
|
||||
|
@ -192,7 +192,7 @@ void appendGPIOinfo() {
|
||||
// add info for read-only GPIO
|
||||
oappend(SET_F("d.ro_gpio=["));
|
||||
const unsigned* readOnlyPins = pinManager.getReadOnlyPins();
|
||||
const unsigned numReadOnlyPins = ((sizeof readOnlyPins) / (sizeof readOnlyPins[0]));
|
||||
const unsigned numReadOnlyPins = (sizeof *readOnlyPins) / (sizeof readOnlyPins[0]);
|
||||
for (unsigned i = 0; i < numReadOnlyPins; i++) {
|
||||
// Ignore 255
|
||||
if (readOnlyPins[i] <= WLED_NUM_PINS) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user