Skip to content

Commit 7ae1200

Browse files
committed
Minor fixes
1 parent b91e8db commit 7ae1200

File tree

7 files changed

+11
-14
lines changed

7 files changed

+11
-14
lines changed

Animations/rbWave.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class RbWave : public Animation
2525
if (step == HSV2RGB_SMOOTH_RANGE * 2 / 3)
2626
step = 0;
2727

28+
FastLEDManager.delay(5);
2829
FastLEDManager.show();
2930
}
3031

Animations/rgbWave.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@ class RgbWave : public Animation
2929
if (step == HSV2RGB_SMOOTH_RANGE)
3030
step = 0;
3131

32-
delay(5);
33-
32+
FastLEDManager.delay(5);
3433
FastLEDManager.show();
3534
}
3635
};

FastLEDManager.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ void FastLEDManagerClass::delay(uint16_t ms)
132132
unsigned long start = micros();
133133
while (micros() - start < 1000.0 * ms * pow(Config.speed - 255, 2) / 16384)
134134
{
135+
show();
135136
handleESPEssentials();
136137
Fade::handle();
137138
WebSocket::socket.loop();

FastLEDManager.ino

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
#include <ESPEssentials.h>
88

9-
#define NUM_LEDS 6
9+
#define NUM_LEDS 100
1010
#define LIGHTSTRIP_PIN 5
1111

1212

@@ -22,9 +22,10 @@ void setup()
2222

2323
// FastLEDManager.enableCycleButton(4);
2424
// FastLEDManager.enablePotentiometer(5);
25-
// FastLEDManager.setDither(0);
26-
// FastLEDManager.setTemperature(Tungsten100W);
27-
// FastLEDManager.setBrightness(255);
25+
26+
FastLEDManager.setDither(0);
27+
FastLEDManager.setTemperature(Tungsten100W);
28+
FastLEDManager.setBrightness(255);
2829
}
2930

3031
void loop()

Spectroscope.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ CRGB color_1, color_2 = CRGB::Red;
1616
void updateSpectroscope(uint8_t *arr, bool isSymmetrical)
1717
{
1818
Fade::stop();
19-
if (FastLEDManager.currentAnimation)
20-
FastLEDManager.stop();
19+
FastLEDManager.stop();
2120

2221
// Spectrum
2322
for (uint8_t i = 0; i < 16; i++)
@@ -47,6 +46,7 @@ void updateSpectroscope(uint8_t *arr, bool isSymmetrical)
4746
current_led++;
4847
}
4948
}
49+
FastLEDManager.show();
5050
}
5151

5252
} // namespace Spectroscope

WebSocket.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,8 @@
1616
namespace WebSocket
1717
{
1818

19-
/// Websocket instance used for communication with web interface
2019
WebSocketsServer socket = WebSocketsServer(81);
2120

22-
/// Number of active websocket connections
23-
uint8_t connectionCount = 0;
24-
2521
void initialize()
2622
{
2723
socket.begin();
@@ -38,12 +34,10 @@ void handle(uint8_t id, WStype_t type, uint8_t *payload, size_t length)
3834
{
3935
case WStype_DISCONNECTED:
4036
Config.save();
41-
connectionCount--;
4237
PRINTF("[%u] Disconnected!\n", id);
4338
break;
4439
case WStype_CONNECTED:
4540
{
46-
connectionCount++;
4741
IPAddress ip = socket.remoteIP(id);
4842
PRINTF("[%u] Connected from %d.%d.%d.%d url: %s\n", id, ip[0], ip[1], ip[2], ip[3], payload);
4943
}

WebSocket.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
namespace WebSocket
77
{
88

9+
/// Websocket instance used for communication with web interface
910
extern WebSocketsServer socket;
1011

1112
/// Initialize the websocket instance

0 commit comments

Comments
 (0)