Skip to content

Commit

Permalink
Removed some unessaary code
Browse files Browse the repository at this point in the history
  • Loading branch information
dbambus committed Aug 27, 2024
1 parent f92891e commit 1f7449b
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 56 deletions.
32 changes: 15 additions & 17 deletions include/Uhr.h
Original file line number Diff line number Diff line change
Expand Up @@ -287,21 +287,19 @@ enum ClockType {
};

enum Icons {
WLAN100 = 0,
WLAN60 = 1,
WLAN30 = 2,
FIRE_1 = 3,
FIRE_2 = 4,
FIRE_3 = 5,
FIRE_4 = 6,
FIRE_5 = 7,
FIRE_6 = 8,
HEART = 9,
SMILEY = 10,
NOTE = 11,
SNOW = 12,
MAIL = 13,
BELL = 14,
STOP = 15,
STBY = 16,
WLAN100,
FIRE_1,
FIRE_2,
FIRE_3,
FIRE_4,
FIRE_5,
FIRE_6,
HEART,
SMILEY,
NOTE,
SNOW,
MAIL,
BELL,
STOP,
STBY,
};
1 change: 0 additions & 1 deletion include/clockWork.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ class ClockWork {
void initBootLedBlink();
void initBootLedSweep(uint32_t delay);
void initBootShowIp(const char *buf);
void initBootWifiSignalStrength(int strength);

//------------------------------------------------------------------------------
// Loop Functions
Expand Down
12 changes: 0 additions & 12 deletions include/clockWork.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -316,18 +316,6 @@ void ClockWork::initBootShowIp(const char *buf) {

//------------------------------------------------------------------------------

void ClockWork::initBootWifiSignalStrength(int strength) {
if (strength <= 100) {
led.setIcon(WLAN100);
} else if (strength <= 60) {
led.setIcon(WLAN60);
} else if (strength <= 30) {
led.setIcon(WLAN30);
}
}

//------------------------------------------------------------------------------

void ClockWork::initBootLedBlink() {
for (uint8_t row = 0; row < usedUhrType->rowsWordMatrix(); row++) {
frontMatrix[row] ^= num32BitWithOnesAccordingToColumns();
Expand Down
22 changes: 0 additions & 22 deletions include/icons.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,28 +15,6 @@ const uint16_t grafik_11x10[][11] PROGMEM = {
0b00000100000, // 8 88: . . . . . 0 . . . . . : 98
0b00000000000}, // 9 109: . . . . . . . . . . . : 99

{0b00000000000, // 0 WLAN60 0: . . . . . . . . . . . : 10
0b00000000000, // 1 21: . . . . . . . . . . . : 11
0b00000000000, // 2 22: . . . . . . . . . . . : 32
0b00011111000, // 3 43: . . . 0 0 0 0 0 . . . : 33
0b00111111100, // 4 44: . . 0 0 0 0 0 0 0 . . : 54
0b00100000100, // 5 65: . . 0 . . . . . 0 . . : 55
0b00000100000, // 6 66: . . . . . 0 . . . . . : 76
0b00001110000, // 7 87: . . . . 0 0 0 . . . . : 77
0b00000100000, // 8 88: . . . . . 0 . . . . . : 98
0b00000000000}, // 9 109: . . . . . . . . . . . : 99

{0b00000000000, // 0 WLAN30 0: . . . . . . . . . . . : 10
0b00000000000, // 1 21: . . . . . . . . . . . : 11
0b00000000000, // 2 22: . . . . . . . . . . . : 32
0b00000000000, // 3 43: . . . . . . . . . . . : 33
0b00000000000, // 4 44: . . . . . . . . . . . : 54
0b00000000000, // 5 65: . . . . . . . . . . . : 55
0b00000100000, // 6 66: . . . . . 0 . . . . . : 76
0b00001110000, // 7 87: . . . . 0 0 0 . . . . : 77
0b00000100000, // 8 88: . . . . . 0 . . . . . : 98
0b00000000000}, // 9 109: . . . . . . . . . . . : 99

{0b00000000000, // 0 FIRE1 0: . . . . . . . . . . . : 10
0b00000000000, // 1 21: . . . . . . . . . . . : 11
0b00000000000, // 2 22: . . . . . . . . . . . : 32
Expand Down
5 changes: 1 addition & 4 deletions src/Wortuhr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,14 +314,11 @@ void setup() {
//-------------------------------------

if (G.bootShowWifi) {
clockWork.initBootWifiSignalStrength(0);
led.setIcon(WLAN100);
}
network.setup(G.hostname);
int strength = network.getQuality();
Serial.printf("Signal strength: %i\n", strength);
if (G.bootShowWifi) {
clockWork.initBootWifiSignalStrength(strength);
}
wifiStart();
configTime(0, 0, G.timeserver);
setenv("TZ", TZ_Europe_Berlin, true);
Expand Down

0 comments on commit 1f7449b

Please sign in to comment.