From 35b10372243a29a019e199dc3cc3525d243ba28d Mon Sep 17 00:00:00 2001 From: Felix Pankratz Date: Tue, 17 Dec 2024 15:52:20 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=203=20levels=20:3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 ++- nametag/src/supercomputer.cpp | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 6b1617c..cf92adf 100644 --- a/README.md +++ b/README.md @@ -10,10 +10,11 @@ Displays my name. Upper button changes visibility level, lower button changes display style. -|Style|Description|Visibility 0|Visibility 1|Visibility 1| +|Style|Description|Visibility 0|Visibility 1|Visibility 2| |--|--|--|--|--| |Rain|Matrix-style digital rain|No highlights|Overlay is highlighted|Highlights do not fade| |38C3|38C3 themed font and background|Show only "38C3"|Show only "Panki"|Rotating text with name and DECT extension| +|Supercomputer|Inspired by a [BigClive video](https://www.youtube.com/watch?v=7f8jgvvJe-Q)|Red only|Rainbow, inverted name|Rainbow name, no background| ### gifplayer diff --git a/nametag/src/supercomputer.cpp b/nametag/src/supercomputer.cpp index 9b8020b..f474b8a 100644 --- a/nametag/src/supercomputer.cpp +++ b/nametag/src/supercomputer.cpp @@ -41,8 +41,10 @@ void draw_supercomputer(MatrixPanel_I2S_DMA *matrix, Mode mode) { // rainbow float progress = (255.0 / PANEL_WIDTH) * x; uint8_t hue = ((int)round(progress) + rainbow_offset); - if (overlay[i / 8] & (1 << (7 - (i % 8)))){ + if (overlay[i / 8] & (1 << (7 - (i % 8)))) { hue -= 128; + } else if (mode == HighVis) { + continue; } CHSV hsv_color(hue, 255, 255 * cell_value(cells[i])); CRGB rgb; @@ -50,7 +52,5 @@ void draw_supercomputer(MatrixPanel_I2S_DMA *matrix, Mode mode) { matrix->drawPixel(x, y, matrix->color565(rgb.r, rgb.g, rgb.b)); } } - if (mode == HighVis) { - rainbow_offset++; - } + rainbow_offset++; }