aboutsummaryrefslogtreecommitdiff
path: root/src/main.cpp
diff options
context:
space:
mode:
authoruser@node5.net <user@node5.net>2026-01-11 20:32:24 +0100
committeruser@node5.net <user@node5.net>2026-01-11 20:32:24 +0100
commit413ab2a69e4f01098a6e3cf0c8f1b38c408c7cf1 (patch)
tree787050698870c938a06985ca27b0c30e9cfb3264 /src/main.cpp
parent43b77046137cf76d2fd465c9e4b330622b177503 (diff)
Reformat
Remove undesired remidial whitespace
Diffstat (limited to 'src/main.cpp')
-rw-r--r--src/main.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/src/main.cpp b/src/main.cpp
index 2f2691c..2668406 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -30,7 +30,7 @@ typedef enum : uint8_t {
seg_g = 1<<6
} segments;
-//
+//
uint8_t symbols[] = {
/* 0 */ seg_a | seg_b | seg_c | seg_d | seg_e | seg_f, // 00111111
/* 1 */ seg_b | seg_c, // 00000110
@@ -105,7 +105,7 @@ void display_symbols(uint8_t *symbols_mask) {
if (brightness == max_brightness) {
on_state[led_raw_index] = turn_on;
}
-
+
// Increment segment counter used with bit mask comparison by bitshifting
seg_counter = seg_counter<<1;
}
@@ -167,6 +167,7 @@ void play_animation(uint8_t *animation, int animation_size, int segment_delay) {
// Check the time, and display it on the clock
void update_clock() {
// Set hue to a value derived from the time of day, doing 1 loop per day
+ /*
int hour = CopenhagenTime.dateTime("G").toInt();
int minute = CopenhagenTime.dateTime("i").toInt();
int minute_of_day = (hour * 60) + minute;
@@ -176,11 +177,12 @@ void update_clock() {
Serial.println(minute_of_day);
Serial.println("Hue:");
Serial.println(hue);
+ */
// Format the time as a 4-digit integer
int timeInt = CopenhagenTime.dateTime("Hi").toInt(); // Sadly string format
display_number(timeInt);
- //hue++; // Increment HSV hue
+ //hue++; // Increment HSV hue
}
void setup() {
@@ -192,7 +194,7 @@ void setup() {
FastLED.clear();
Serial.begin(9600);
-
+
setServer(NTP_SERVER);
WiFi.setHostname(HOSTNAME);
@@ -206,10 +208,10 @@ void setup() {
play_animation(spin_animation, sizeof(spin_animation), 100);
} else {
// Turn off all LEDs
- FastLED.clear();
+ FastLED.clear();
}
}
-
+
delay(100);
hue = 145;
@@ -224,7 +226,7 @@ void setup() {
Serial.println("UTC: " + UTC.dateTime());
CopenhagenTime.setLocation("Europe/Copenhagen");
Serial.println("Copenhagen time: " + CopenhagenTime.dateTime());
-
+
update_clock();
}
@@ -251,12 +253,9 @@ void loop() {
// Only update on each hole minute to avoid flickering
int seconds = CopenhagenTime.dateTime("s").toInt();
int minutes = CopenhagenTime.dateTime("i").toInt();
-
// Minute changed
update_clock();
-
hue++;
events();
}
-