mirror of
https://github.com/wled/WLED.git
synced 2025-07-22 18:26:32 +00:00
Merge pull request #4163 from willmmiles/fix-oappend-merge
Fix oappend merge on 8266 (SET_F to F)
This commit is contained in:
commit
6dc2c680c5
@ -91,14 +91,14 @@ void appendGPIOinfo(Print& settingsScript) {
|
|||||||
settingsScript.print(F("];"));
|
settingsScript.print(F("];"));
|
||||||
|
|
||||||
// add reserved (unusable) pins
|
// add reserved (unusable) pins
|
||||||
settingsScript.print(SET_F("d.rsvd=["));
|
settingsScript.print(F("d.rsvd=["));
|
||||||
for (unsigned i = 0; i < WLED_NUM_PINS; i++) {
|
for (unsigned i = 0; i < WLED_NUM_PINS; i++) {
|
||||||
if (!PinManager::isPinOk(i, false)) { // include readonly pins
|
if (!PinManager::isPinOk(i, false)) { // include readonly pins
|
||||||
settingsScript.print(i); settingsScript.print(",");
|
settingsScript.print(i); settingsScript.print(",");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifdef WLED_ENABLE_DMX
|
#ifdef WLED_ENABLE_DMX
|
||||||
settingsScript.print(SET_F("2,")); // DMX hardcoded pin
|
settingsScript.print(F("2,")); // DMX hardcoded pin
|
||||||
#endif
|
#endif
|
||||||
#if defined(WLED_DEBUG) && !defined(WLED_DEBUG_HOST)
|
#if defined(WLED_DEBUG) && !defined(WLED_DEBUG_HOST)
|
||||||
settingsScript.printf_P(PSTR(",%d"),hardwareTX); // debug output (TX) pin
|
settingsScript.printf_P(PSTR(",%d"),hardwareTX); // debug output (TX) pin
|
||||||
@ -113,36 +113,36 @@ void appendGPIOinfo(Print& settingsScript) {
|
|||||||
switch (ethernetBoards[ethernetType].eth_clk_mode) {
|
switch (ethernetBoards[ethernetType].eth_clk_mode) {
|
||||||
case ETH_CLOCK_GPIO0_IN:
|
case ETH_CLOCK_GPIO0_IN:
|
||||||
case ETH_CLOCK_GPIO0_OUT:
|
case ETH_CLOCK_GPIO0_OUT:
|
||||||
settingsScript.print(SET_F("0"));
|
settingsScript.print(F("0"));
|
||||||
break;
|
break;
|
||||||
case ETH_CLOCK_GPIO16_OUT:
|
case ETH_CLOCK_GPIO16_OUT:
|
||||||
settingsScript.print(SET_F("16"));
|
settingsScript.print(F("16"));
|
||||||
break;
|
break;
|
||||||
case ETH_CLOCK_GPIO17_OUT:
|
case ETH_CLOCK_GPIO17_OUT:
|
||||||
settingsScript.print(SET_F("17"));
|
settingsScript.print(F("17"));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
settingsScript.print(SET_F("];")); // rsvd
|
settingsScript.print(F("];")); // rsvd
|
||||||
|
|
||||||
// add info for read-only GPIO
|
// add info for read-only GPIO
|
||||||
settingsScript.print(SET_F("d.ro_gpio=["));
|
settingsScript.print(F("d.ro_gpio=["));
|
||||||
bool firstPin = true;
|
bool firstPin = true;
|
||||||
for (unsigned i = 0; i < WLED_NUM_PINS; i++) {
|
for (unsigned i = 0; i < WLED_NUM_PINS; i++) {
|
||||||
if (PinManager::isReadOnlyPin(i)) {
|
if (PinManager::isReadOnlyPin(i)) {
|
||||||
// No comma before the first pin
|
// No comma before the first pin
|
||||||
if (!firstPin) settingsScript.print(SET_F(","));
|
if (!firstPin) settingsScript.print(F(","));
|
||||||
settingsScript.print(i);
|
settingsScript.print(i);
|
||||||
firstPin = false;
|
firstPin = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
settingsScript.print(SET_F("];"));
|
settingsScript.print(F("];"));
|
||||||
|
|
||||||
// add info about max. # of pins
|
// add info about max. # of pins
|
||||||
settingsScript.print(SET_F("d.max_gpio="));
|
settingsScript.print(F("d.max_gpio="));
|
||||||
settingsScript.print(WLED_NUM_PINS);
|
settingsScript.print(WLED_NUM_PINS);
|
||||||
settingsScript.print(SET_F(";"));
|
settingsScript.print(F(";"));
|
||||||
}
|
}
|
||||||
|
|
||||||
//get values for settings form in javascript
|
//get values for settings form in javascript
|
||||||
@ -263,7 +263,7 @@ void getSettingsJS(byte subPage, Print& settingsScript)
|
|||||||
|
|
||||||
appendGPIOinfo(settingsScript);
|
appendGPIOinfo(settingsScript);
|
||||||
|
|
||||||
settingsScript.print(SET_F("d.ledTypes=")); settingsScript.print(BusManager::getLEDTypesJSONString().c_str()); settingsScript.print(";");
|
settingsScript.print(F("d.ledTypes=")); settingsScript.print(BusManager::getLEDTypesJSONString().c_str()); settingsScript.print(";");
|
||||||
|
|
||||||
// set limits
|
// set limits
|
||||||
settingsScript.printf_P(PSTR("bLimits(%d,%d,%d,%d,%d,%d,%d,%d);"),
|
settingsScript.printf_P(PSTR("bLimits(%d,%d,%d,%d,%d,%d,%d,%d);"),
|
||||||
@ -501,7 +501,7 @@ void getSettingsJS(byte subPage, Print& settingsScript)
|
|||||||
#endif
|
#endif
|
||||||
printSetFormValue(settingsScript,PSTR("BD"),serialBaud);
|
printSetFormValue(settingsScript,PSTR("BD"),serialBaud);
|
||||||
#ifndef WLED_ENABLE_ADALIGHT
|
#ifndef WLED_ENABLE_ADALIGHT
|
||||||
settingsScript.print(SET_F("toggle('Serial);"));
|
settingsScript.print(F("toggle('Serial);"));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user