kopia lustrzana https://github.com/Aircoookie/WLED
Small improvements
Settings cosmetic changes (spaces, smaller pin inputs, moved analog legend to wiki) Uncommented STATUSPIN code (still defined out by default) Removed adalight pin 3 lock Added define for PSRAMpull/1977/head
rodzic
7685f9b73d
commit
85489458d8
|
@ -80,7 +80,6 @@
|
|||
}
|
||||
//returns mem usage
|
||||
function getMem(type, len, p0) {
|
||||
//len = parseInt(len);
|
||||
if (type < 32) {
|
||||
if (maxM < 10000 && p0==3) { //8266 DMA uses 5x the mem
|
||||
if (type > 29) return len*20; //RGBW
|
||||
|
@ -280,7 +279,7 @@ Reverse (rotated 180°): <input type="checkbox" name="CV${i}">
|
|||
var c = gId("btns").innerHTML;
|
||||
var bt = "BT" + i;
|
||||
var be = "BE" + i;
|
||||
c += `Button ${i} pin: <input type="number" min="-1" max="40" name="${bt}" onchange="UI()" value="${p}">`;
|
||||
c += `Button ${i} pin: <input type="number" min="-1" max="40" name="${bt}" onchange="UI()" style="width:35px" value="${p}"> `;
|
||||
c += `<select name="${be}">`
|
||||
c += `<option value="0" ${t==0?"selected":""}>Disabled</option>`;
|
||||
c += `<option value="2" ${t==2?"selected":""}>Pushbutton</option>`;
|
||||
|
@ -349,7 +348,7 @@ Reverse (rotated 180°): <input type="checkbox" name="CV${i}">
|
|||
</div><hr style="width:260px">
|
||||
<div id="btns"></div>
|
||||
Touch threshold: <input type="number" min="0" max="100" name="TT" required><br>
|
||||
IR pin: <input type="number" min="-1" max="40" name="IR" onchange="UI()"><select name="IT">
|
||||
IR pin: <input type="number" min="-1" max="40" name="IR" onchange="UI()" style="width:35px"> <select name="IT">
|
||||
<option value="0">Remote disabled</option>
|
||||
<option value="1">24-key RGB</option>
|
||||
<option value="2">24-key with CT</option>
|
||||
|
@ -358,10 +357,9 @@ Reverse (rotated 180°): <input type="checkbox" name="CV${i}">
|
|||
<option value="5">21-key RGB</option>
|
||||
<option value="6">6-key black</option>
|
||||
<option value="7">9-key red</option>
|
||||
<option value="8">JSON remote</option>
|
||||
</select><span style="cursor: pointer;" onclick="off('IR')"> ×</span><br>
|
||||
<a href="https://github.com/Aircoookie/WLED/wiki/Infrared-Control" target="_blank">IR info</a><br>
|
||||
Relay pin: <input type="number" min="-1" max="40" name="RL" onchange="UI()"> invert <input type="checkbox" name="RM"><span style="cursor: pointer;" onclick="off('RL')"> ×</span><br>
|
||||
Relay pin: <input type="number" min="-1" max="40" name="RL" onchange="UI()" style="width:35px"> Invert <input type="checkbox" name="RM"><span style="cursor: pointer;" onclick="off('RL')"> ×</span><br>
|
||||
<hr style="width:260px">
|
||||
<h3>Defaults</h3>
|
||||
Turn LEDs on after power up/reset: <input type="checkbox" name="BO"><br>
|
||||
|
|
|
@ -178,15 +178,7 @@
|
|||
<tbody>
|
||||
</tbody>
|
||||
</table>
|
||||
<div>For analog button set <i>duble</i> to:
|
||||
<ul>
|
||||
<li>250=global brightness</li>
|
||||
<li>249=effect speed</li>
|
||||
<li>248=effect intensity</li>
|
||||
<li>247=palette</li>
|
||||
<li>0..32=segment X opacity</li>
|
||||
</ul>
|
||||
</div>
|
||||
<a href="https://github.com/Aircoookie/WLED/wiki/Macros#analog-button" target="_blank">Analog Button setup</a>
|
||||
<h3>Time-controlled presets</h3>
|
||||
<div style="display: inline-block">
|
||||
<table id="TMT">
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -279,7 +279,7 @@ void WLED::loop()
|
|||
DEBUG_PRINT(F("Runtime: ")); DEBUG_PRINTLN(millis());
|
||||
DEBUG_PRINT(F("Unix time: ")); DEBUG_PRINTLN(now());
|
||||
DEBUG_PRINT(F("Free heap: ")); DEBUG_PRINTLN(ESP.getFreeHeap());
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
|
||||
if (psramFound()) {
|
||||
DEBUG_PRINT(F("Total PSRAM: ")); DEBUG_PRINT(ESP.getPsramSize()/1024); DEBUG_PRINTLN("kB");
|
||||
DEBUG_PRINT(F("Free PSRAM: ")); DEBUG_PRINT(ESP.getFreePsram()/1024); DEBUG_PRINTLN("kB");
|
||||
|
@ -328,7 +328,7 @@ void WLED::setup()
|
|||
DEBUG_PRINTLN(ESP.getFreeHeap());
|
||||
registerUsermods();
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
|
||||
if (psramFound()) {
|
||||
pinManager.allocatePin(16); // GPIO16 reserved for SPI RAM
|
||||
pinManager.allocatePin(17); // GPIO17 reserved for SPI RAM
|
||||
|
@ -360,18 +360,11 @@ void WLED::setup()
|
|||
|
||||
DEBUG_PRINTLN(F("Reading config"));
|
||||
deserializeConfigFromFS();
|
||||
/*
|
||||
|
||||
#if STATUSLED
|
||||
bool lStatusLed = false;
|
||||
for (uint8_t i=0; i<strip.numStrips; i++) {
|
||||
if (strip.getStripPin(i)==STATUSLED) {
|
||||
lStatusLed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!lStatusLed) pinMode(STATUSLED, OUTPUT);
|
||||
if (!pinManager.isPinAllocated(STATUSLED)) pinMode(STATUSLED, OUTPUT);
|
||||
#endif
|
||||
*/
|
||||
|
||||
DEBUG_PRINTLN(F("Initializing strip"));
|
||||
beginStrip();
|
||||
|
||||
|
@ -385,14 +378,11 @@ void WLED::setup()
|
|||
WiFi.onEvent(WiFiEvent);
|
||||
#endif
|
||||
|
||||
#ifdef WLED_ENABLE_ADALIGHT // reserve GPIO3 (RX) pin for ADALight
|
||||
#ifdef WLED_ENABLE_ADALIGHT
|
||||
if (!pinManager.isPinAllocated(3)) {
|
||||
Serial.println(F("Ada"));
|
||||
pinManager.allocatePin(3,false);
|
||||
} else {
|
||||
DEBUG_PRINTLN(F("ADALight disabled due to GPIO3 being used."));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// generate module IDs
|
||||
escapedMac = WiFi.macAddress();
|
||||
|
@ -714,13 +704,8 @@ void WLED::handleConnection()
|
|||
|
||||
void WLED::handleStatusLED()
|
||||
{
|
||||
/*
|
||||
#if STATUSLED
|
||||
for (uint8_t s=0; s<strip.numStrips; s++) {
|
||||
if (strip.getStripPin(s)==STATUSLED) {
|
||||
return; // pin used for strip
|
||||
}
|
||||
}
|
||||
if (pinManager.isPinAllocated(STATUSLED)) return; //lower priority if something else uses the same pin
|
||||
|
||||
ledStatusType = WLED_CONNECTED ? 0 : 2;
|
||||
if (mqttEnabled && ledStatusType != 2) // Wi-Fi takes presendence over MQTT
|
||||
|
@ -740,5 +725,4 @@ void WLED::handleStatusLED()
|
|||
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
// The following is a construct to enable code to compile without it.
|
||||
// There is a code thet will still not use PSRAM though:
|
||||
// AsyncJsonResponse is a derived class that implements DynamicJsonDocument (AsyncJson-v6.h)
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
|
||||
struct PSRAM_Allocator {
|
||||
void* allocate(size_t size) {
|
||||
if (psramFound()) return ps_malloc(size); // use PSRAM if it exists
|
||||
|
|
|
@ -286,30 +286,11 @@ void getSettingsJS(byte subPage, char* dest)
|
|||
#ifdef WLED_ENABLE_DMX
|
||||
oappend(SET_F(",2")); // DMX hardcoded pin
|
||||
#endif
|
||||
#ifdef WLED_ENABLE_ADALIGHT
|
||||
// inform settings page that pin 3 is used by ADALights if not aleready used by strip (previous setup)
|
||||
// NOTE: this will prohibit pin 3 use on new installs
|
||||
{
|
||||
bool pin3used = false;
|
||||
for (uint8_t s=0; s < busses.getNumBusses(); s++) {
|
||||
Bus* bus = busses.getBus(s);
|
||||
uint8_t pins[5];
|
||||
uint8_t nPins = bus->getPins(pins);
|
||||
for (uint8_t i = 0; i < nPins; i++) {
|
||||
if (pins[i] == 3) {
|
||||
pin3used = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (pin3used) break;
|
||||
}
|
||||
if (!pin3used && pinManager.isPinAllocated(3)) oappend(SET_F(",3")); // ADALight (RX) pin
|
||||
}
|
||||
#endif
|
||||
//Adalight / Serial in requires pin 3 to be unused. However, Serial input can not be prevented by WLED
|
||||
#ifdef WLED_DEBUG
|
||||
oappend(SET_F(",1")); // debug output (TX) pin
|
||||
#endif
|
||||
#ifdef ARDUINO_ARCH_ESP32
|
||||
#if defined(ARDUINO_ARCH_ESP32) && defined(WLED_USE_PSRAM)
|
||||
if (psramFound()) oappend(SET_F(",16,17")); // GPIO16 & GPIO17 reserved for SPI RAM
|
||||
#endif
|
||||
//TODO: add reservations for Ethernet shield pins
|
||||
|
|
Ładowanie…
Reference in New Issue