-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSpectrum2.h
More file actions
38 lines (36 loc) · 919 Bytes
/
Spectrum2.h
File metadata and controls
38 lines (36 loc) · 919 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <Arduino.h>
#include <FastLED.h>
#include "Visualization.h"
#include <algorithm> // std::sort
class Spectrum2 : public Visualization {
private :
uint16_t rowOffset;
uint16_t length;
bool invert;
float density;
float threshold;
float peak;
float totalMagnitudeMovingAverage;
float lowPassPeakMovingAverage;
float lowPassTroughMovingAverage;
float lowPassMovingAverage;
uint_fast32_t loggingTimestamp = 0;
bool fill;
void displayRow(uint8_t y, CRGB color);
uint8_t lowPassCount = 4;
public :
Spectrum2(uint16_t columns,
uint16_t rows,
uint16_t rowOffset,
uint16_t length,
uint8_t hue,
uint8_t saturation,
bool invert,
bool fill,
CRGB * leds,
uint8_t drift = 64);
void display(float * intensity);
float getDensity();
void setDensity(float density);
float getMagnitude();
};