Skip to content

Commit d7d5172

Browse files
authored
Merge pull request #439 from dbambus/main
Few Fixes
2 parents 921df47 + fc2546b commit d7d5172

File tree

7 files changed

+21
-61
lines changed

7 files changed

+21
-61
lines changed

include/Transitiontypes/Transition.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -927,8 +927,8 @@ uint16_t Transition::transitionMatrixRain() {
927927
}
928928
}
929929
float progress = static_cast<float>(phase) / static_cast<float>(frames);
930-
for (col = 0; col < usedUhrType->rowsWordMatrix(); col++) {
931-
for (row = 0; row < usedUhrType->colsWordMatrix(); row++) {
930+
for (col = 0; col < usedUhrType->colsWordMatrix(); col++) {
931+
for (row = 0; row < usedUhrType->rowsWordMatrix(); row++) {
932932
fadeColor =
933933
fadeColor.LinearBlend(old[row][col], act[row][col], progress);
934934
rainColor = rain[col].get(row);

include/Uhr.h

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -287,21 +287,19 @@ enum ClockType {
287287
};
288288

289289
enum Icons {
290-
WLAN100 = 0,
291-
WLAN60 = 1,
292-
WLAN30 = 2,
293-
FIRE_1 = 3,
294-
FIRE_2 = 4,
295-
FIRE_3 = 5,
296-
FIRE_4 = 6,
297-
FIRE_5 = 7,
298-
FIRE_6 = 8,
299-
HEART = 9,
300-
SMILEY = 10,
301-
NOTE = 11,
302-
SNOW = 12,
303-
MAIL = 13,
304-
BELL = 14,
305-
STOP = 15,
306-
STBY = 16,
290+
WLAN100,
291+
FIRE_1,
292+
FIRE_2,
293+
FIRE_3,
294+
FIRE_4,
295+
FIRE_5,
296+
FIRE_6,
297+
HEART,
298+
SMILEY,
299+
NOTE,
300+
SNOW,
301+
MAIL,
302+
BELL,
303+
STOP,
304+
STBY,
307305
};

include/clockWork.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,6 @@ class ClockWork {
7373
void initBootLedBlink();
7474
void initBootLedSweep(uint32_t delay);
7575
void initBootShowIp(const char *buf);
76-
void initBootWifiSignalStrength(int strength);
7776

7877
//------------------------------------------------------------------------------
7978
// Loop Functions

include/clockWork.hpp

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -203,10 +203,10 @@ void ClockWork::scrollingText(const char *buf) {
203203
led.show();
204204

205205
i++;
206-
if (i > pgm_read_byte(&(fontWidth[normalSizeASCII]))) {
206+
if (i >= pgm_read_byte(&(fontWidth[normalSizeASCII]))) {
207207
i = 0;
208208
ii++;
209-
if (ii > strlen(buf)) {
209+
if (ii >= strlen(buf)) {
210210
ii = 0;
211211
}
212212
}
@@ -316,18 +316,6 @@ void ClockWork::initBootShowIp(const char *buf) {
316316

317317
//------------------------------------------------------------------------------
318318

319-
void ClockWork::initBootWifiSignalStrength(int strength) {
320-
if (strength <= 100) {
321-
led.setIcon(WLAN100);
322-
} else if (strength <= 60) {
323-
led.setIcon(WLAN60);
324-
} else if (strength <= 30) {
325-
led.setIcon(WLAN30);
326-
}
327-
}
328-
329-
//------------------------------------------------------------------------------
330-
331319
void ClockWork::initBootLedBlink() {
332320
for (uint8_t row = 0; row < usedUhrType->rowsWordMatrix(); row++) {
333321
frontMatrix[row] ^= num32BitWithOnesAccordingToColumns();

include/icons.h

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -15,28 +15,6 @@ const uint16_t grafik_11x10[][11] PROGMEM = {
1515
0b00000100000, // 8 88: . . . . . 0 . . . . . : 98
1616
0b00000000000}, // 9 109: . . . . . . . . . . . : 99
1717

18-
{0b00000000000, // 0 WLAN60 0: . . . . . . . . . . . : 10
19-
0b00000000000, // 1 21: . . . . . . . . . . . : 11
20-
0b00000000000, // 2 22: . . . . . . . . . . . : 32
21-
0b00011111000, // 3 43: . . . 0 0 0 0 0 . . . : 33
22-
0b00111111100, // 4 44: . . 0 0 0 0 0 0 0 . . : 54
23-
0b00100000100, // 5 65: . . 0 . . . . . 0 . . : 55
24-
0b00000100000, // 6 66: . . . . . 0 . . . . . : 76
25-
0b00001110000, // 7 87: . . . . 0 0 0 . . . . : 77
26-
0b00000100000, // 8 88: . . . . . 0 . . . . . : 98
27-
0b00000000000}, // 9 109: . . . . . . . . . . . : 99
28-
29-
{0b00000000000, // 0 WLAN30 0: . . . . . . . . . . . : 10
30-
0b00000000000, // 1 21: . . . . . . . . . . . : 11
31-
0b00000000000, // 2 22: . . . . . . . . . . . : 32
32-
0b00000000000, // 3 43: . . . . . . . . . . . : 33
33-
0b00000000000, // 4 44: . . . . . . . . . . . : 54
34-
0b00000000000, // 5 65: . . . . . . . . . . . : 55
35-
0b00000100000, // 6 66: . . . . . 0 . . . . . : 76
36-
0b00001110000, // 7 87: . . . . 0 0 0 . . . . : 77
37-
0b00000100000, // 8 88: . . . . . 0 . . . . . : 98
38-
0b00000000000}, // 9 109: . . . . . . . . . . . : 99
39-
4018
{0b00000000000, // 0 FIRE1 0: . . . . . . . . . . . : 10
4119
0b00000000000, // 1 21: . . . . . . . . . . . : 11
4220
0b00000000000, // 2 22: . . . . . . . . . . . : 32

platformio.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ monitor_filters = esp8266_exception_decoder
2222
lib_deps =
2323
makuna/NeoPixelBus@^2.7.6
2424
bblanchon/ArduinoJson@^6.17.2
25-
links2004/WebSockets@^2.2.1
25+
links2004/WebSockets@2.4.1
2626
adafruit/RTClib@^1.11.2
2727
knolleary/PubSubClient@^2.8.0
2828
https://github.com/tzapu/WiFiManager#v2.0.17

src/Wortuhr.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,14 +314,11 @@ void setup() {
314314
//-------------------------------------
315315

316316
if (G.bootShowWifi) {
317-
clockWork.initBootWifiSignalStrength(0);
317+
led.setIcon(WLAN100);
318318
}
319319
network.setup(G.hostname);
320320
int strength = network.getQuality();
321321
Serial.printf("Signal strength: %i\n", strength);
322-
if (G.bootShowWifi) {
323-
clockWork.initBootWifiSignalStrength(strength);
324-
}
325322
wifiStart();
326323
configTime(0, 0, G.timeserver);
327324
setenv("TZ", TZ_Europe_Berlin, true);

0 commit comments

Comments
 (0)