From 68f4509843789338938eef0aa5043bf5bdeb303e Mon Sep 17 00:00:00 2001 From: polloka Date: Mon, 27 Jun 2022 21:46:26 +0200 Subject: [PATCH] og farbschema --- firmware/src/applications/beat_detect.cpp | 17 ++++++----------- firmware/src/applications/fackel.cpp | 4 ++-- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/firmware/src/applications/beat_detect.cpp b/firmware/src/applications/beat_detect.cpp index 6c76964..80d3732 100644 --- a/firmware/src/applications/beat_detect.cpp +++ b/firmware/src/applications/beat_detect.cpp @@ -6,7 +6,7 @@ #include "zauberstab.h" #undef NUM_LEDS -#define NUM_LEDS 45 +#define NUM_LEDS 48 #define SAMPLING_FREQUENCY_BP 40 // number of energy chunks per second #define SAMPLING_FREQUENCY_CONTROL \ @@ -113,7 +113,6 @@ void BeatDetectApp::loop() if (micros() - last_us_bp > sampling_period_bp) { - n_samples = 0; last_us_bp = micros(); // energy_fil += (energy - energy_fil) * 0.01; @@ -132,8 +131,6 @@ void BeatDetectApp::loop() // y_fil[i] += (abs(y[i]) - y_fil[i]) * 0.005; //linie der // scheitelpunkte - - } @@ -183,16 +180,14 @@ void BeatDetectApp::loop() for (int i = 0; i < NUM_LEDS; i++) { - //leds[i].g = get_value(i, pos_target_filtered); - //leds[i].r = get_value(i, pos_target_filtered + 2); - //leds[i].b = get_value(i, pos_target_filtered - 2); - leds[i].g = get_value(i, pos_target_filtered); - leds[i].r = 0; //get_value(i, pos_target_filtered + 2); - leds[i].g = get_value(i, pos_target_filtered + 2); - leds[i].r = 0;//get_value(i, pos_target_filtered + 2); + leds[i].r = get_value(i, pos_target_filtered + 2); leds[i].b = get_value(i, pos_target_filtered - 2); + //leds[i].g = get_value(i, pos_target_filtered); + //leds[i].g = get_value(i, pos_target_filtered + 2); + //leds[i].b = get_value(i, pos_target_filtered - 2); + } FastLED.show(); } diff --git a/firmware/src/applications/fackel.cpp b/firmware/src/applications/fackel.cpp index 318d843..13c7ed6 100644 --- a/firmware/src/applications/fackel.cpp +++ b/firmware/src/applications/fackel.cpp @@ -95,8 +95,8 @@ void FackelApp::init() for (int i = 0; i < 128; i++) { uint8_t r, g, b; - //hsl_to_rgb(i / 5, 255, i * 2 > 128 ? 128 : i * 2, &r, &g, &b); - hsl_to_rgb(i / 5 + 180, 255, i * 2 > 128 ? 128 : i * 2, &r, &g, &b); + hsl_to_rgb(i / 5, 255, i * 2 > 128 ? 128 : i * 2, &r, &g, &b); + //hsl_to_rgb(i / 5 + 180, 255, i * 2 > 128 ? 128 : i * 2, &r, &g, &b); g = g == 1 ? 0 : g; b = b == 1 ? 0 : b; palette[i].r = r;