Skip to content

Commit

Permalink
Fixed colorwheel
Browse files Browse the repository at this point in the history
  • Loading branch information
Aircoookie committed Mar 7, 2019
1 parent 7274541 commit 0166dfe
Show file tree
Hide file tree
Showing 7 changed files with 1,213 additions and 1,208 deletions.
2 changes: 1 addition & 1 deletion wled00/NpbWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#elif LEDPIN == 3
#define PIXELMETHOD NeoEsp8266Dma800KbpsMethod
#else
#define PIXELMETHOD NeoEsp8266BitBangWs2813Method
#define PIXELMETHOD NeoEsp8266BitBang800KbpsMethod
#pragma message "Software BitBang will be used because of your selected LED pin. This may cause flicker. Use GPIO 2 or 3 for best results."
#endif
#endif
Expand Down
5 changes: 2 additions & 3 deletions wled00/data/index_mobile.htm
Original file line number Diff line number Diff line change
Expand Up @@ -540,13 +540,12 @@
}
d.getElementById('sxs').value = i.sx;
d.getElementById('ixs').value = i.ix;

recv =1;
uB();
})
.catch(function () {
e3.innerHTML=e;
})
recv =1;
uB();
}

function EC(eurl){
Expand Down
2,394 changes: 1,197 additions & 1,197 deletions wled00/html_mobile.h

Large diffs are not rendered by default.

8 changes: 6 additions & 2 deletions wled00/wled00.ino
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@


//version code in format yymmddb (b = daily build)
#define VERSION 1903071
#define VERSION 1903072
char versionString[] = "0.8.4-dev";


Expand Down Expand Up @@ -471,7 +471,11 @@ void serveMessage(AsyncWebServerRequest*,uint16_t,String,String,byte);
void reset()
{
briT = 0;
delay(250); //enough time to send response to client
long dly = millis();
while(millis() - dly < 250)
{
yield(); //enough time to send response to client
}
setAllLeds();
DEBUG_PRINTLN("MODULE RESET");
ESP.restart();
Expand Down
4 changes: 3 additions & 1 deletion wled00/wled03_set.ino
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
aOtaEnabled = request->hasArg("AO");
}
}
saveSettingsToEEPROM();
if (subPage != 6 || !doReboot) saveSettingsToEEPROM(); //do not save if factory reset
if (subPage == 2) strip.init(useRGBW,ledCount,skipFirstLed);
if (subPage == 4) alexaInit();
}
Expand Down Expand Up @@ -465,6 +465,7 @@ bool handleSet(AsyncWebServerRequest *request, String req)
updateVal(&req, "FP=", &effectPalette, 0, strip.getPaletteCount()-1);

//set hue polling light: 0 -off
#ifndef WLED_DISABLE_HUESYNC
pos = req.indexOf("HP=");
if (pos > 0) {
int id = getNumVal(&req, pos);
Expand All @@ -476,6 +477,7 @@ bool handleSet(AsyncWebServerRequest *request, String req)
huePollingEnabled = false;
}
}
#endif

//set default control mode (0 - RGB, 1 - HSB)
pos = req.indexOf("MD=");
Expand Down
6 changes: 3 additions & 3 deletions wled00/wled04_file.ino
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void handleSerial()
if (!realtimeActive && bri == 0) strip.setBrightness(briLast);
arlsLock(realtimeTimeoutMs);

delay(1);
yield();
byte hi = Serial.read();
byte ledc = Serial.read();
byte chk = Serial.read();
Expand All @@ -24,9 +24,9 @@ void handleSerial()
{
while (Serial.peek()<0) //no data yet available
{
delay(1);
yield();
to++;
if (to>5) {strip.show(); return;} //unexpected end of transmission
if (to>15) {strip.show(); return;} //unexpected end of transmission
}
to = 0;
sc[j] = Serial.read();
Expand Down
2 changes: 1 addition & 1 deletion wled00/wled18_server.ino
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ void initServer()

server.on("/settings/sec", HTTP_POST, [](AsyncWebServerRequest *request){
handleSettingsSet(request, 6);
serveMessage(request, 200,"Security settings saved.","Rebooting now, please wait ~10 seconds...",129);
if (!doReboot) serveMessage(request, 200,"Security settings saved.","Rebooting now, please wait ~10 seconds...",129);
doReboot = true;
});

Expand Down

0 comments on commit 0166dfe

Please sign in to comment.