FX: Usermod Temperature effect
This commit is contained in:
@@ -6483,11 +6483,6 @@ static const char _data_FX_MODE_2DWAVERLY[] PROGMEM = "Waverly@Amplification,Sen
|
||||
|
||||
#endif // WLED_DISABLE_2D
|
||||
|
||||
// float version of map()
|
||||
static float mapf(float x, float in_min, float in_max, float out_min, float out_max){
|
||||
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
|
||||
}
|
||||
|
||||
// Gravity struct requited for GRAV* effects
|
||||
typedef struct Gravity {
|
||||
int topLED;
|
||||
|
||||
@@ -378,6 +378,7 @@ uint16_t crc16(const unsigned char* data_p, size_t length);
|
||||
um_data_t* simulateSound(uint8_t simulationId);
|
||||
void enumerateLedmaps();
|
||||
uint8_t get_random_wheel_index(uint8_t pos);
|
||||
float mapf(float x, float in_min, float in_max, float out_min, float out_max);
|
||||
|
||||
// RAII guard class for the JSON Buffer lock
|
||||
// Modeled after std::lock_guard
|
||||
|
||||
@@ -612,3 +612,8 @@ uint8_t get_random_wheel_index(uint8_t pos) {
|
||||
}
|
||||
return r;
|
||||
}
|
||||
|
||||
// float version of map()
|
||||
float mapf(float x, float in_min, float in_max, float out_min, float out_max) {
|
||||
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user