Add CustomEffects as usermod: step 1: c compiles
- Only C part, it only compiles - UI to be done - Needs to be tested
This commit is contained in:
@@ -634,6 +634,8 @@ typedef struct Segment {
|
||||
} segment;
|
||||
//static int segSize = sizeof(Segment);
|
||||
|
||||
#define floatNull -32768 //WLEDSR Custom Effects
|
||||
|
||||
// main "strip" class
|
||||
class WS2812FX { // 96 bytes
|
||||
typedef uint16_t (*mode_ptr)(void); // pointer to mode function
|
||||
@@ -898,6 +900,12 @@ class WS2812FX { // 96 bytes
|
||||
|
||||
void
|
||||
estimateCurrentAndLimitBri(void);
|
||||
|
||||
public:
|
||||
//WLEDSR Custom Effects
|
||||
float arti_external_function(uint8_t function, float par1 = floatNull, float par2 = floatNull, float par3 = floatNull, float par4 = floatNull, float par5 = floatNull);
|
||||
float arti_get_external_variable(uint8_t variable, float par1 = floatNull, float par2 = floatNull, float par3 = floatNull);
|
||||
void arti_set_external_variable(float value, uint8_t variable, float par1 = floatNull, float par2 = floatNull, float par3 = floatNull);
|
||||
};
|
||||
|
||||
extern const char JSON_mode_names[];
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
#define USERMOD_ID_SI7021_MQTT_HA 29 //Usermod "usermod_si7021_mqtt_ha.h"
|
||||
#define USERMOD_ID_BME280 30 //Usermod "usermod_bme280.h
|
||||
#define USERMOD_ID_AUDIOREACTIVE 31 //Usermod "audioreactive.h"
|
||||
#define USERMOD_ID_CUSTOMEFFECTS 32 //Usermod "usermod_v2_customeffects.h"
|
||||
|
||||
//Access point behavior
|
||||
#define AP_BEHAVIOR_BOOT_NO_CONN 0 //Open AP when no connection after boot
|
||||
|
||||
@@ -139,6 +139,10 @@
|
||||
#include "../usermods/audioreactive/audio_reactive.h"
|
||||
#endif
|
||||
|
||||
#ifdef USERMOD_CUSTOMEFFECTS
|
||||
#include "../usermods/customeffects/usermod_v2_customeffects.h"
|
||||
#endif
|
||||
|
||||
void registerUsermods()
|
||||
{
|
||||
/*
|
||||
@@ -265,4 +269,9 @@ void registerUsermods()
|
||||
#endif
|
||||
usermods.add(new AudioReactive());
|
||||
#endif
|
||||
|
||||
#ifdef USERMOD_CUSTOMEFFECTS
|
||||
usermods.add(new CustomEffectsUserMod());
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user