mirror of
https://github.com/wled/WLED.git
synced 2025-07-15 06:46:34 +00:00
Fixing stairway usermod and adding buildflags
This commit is contained in:
parent
aa24e5d284
commit
2d30535b69
@ -1,5 +1,13 @@
|
|||||||
### Stairway lighting
|
# Stairway lighting
|
||||||
|
|
||||||
|
## Install
|
||||||
|
Add the buildflag `-D USERMOD_STAIRCASE_WIPE` to your enviroment to activate it.
|
||||||
|
|
||||||
|
### Configuration
|
||||||
|
`-D STAIRCASE_WIPE_OFF`
|
||||||
|
<br>Have the LEDs wipe off instead of fading out
|
||||||
|
|
||||||
|
## Description
|
||||||
Quick usermod to accomplish something similar to [this video](https://www.youtube.com/watch?v=NHkju5ncC4A).
|
Quick usermod to accomplish something similar to [this video](https://www.youtube.com/watch?v=NHkju5ncC4A).
|
||||||
|
|
||||||
This usermod enables you to add a lightstrip alongside or on the steps of a staircase.
|
This usermod enables you to add a lightstrip alongside or on the steps of a staircase.
|
||||||
|
@ -19,10 +19,12 @@ class StairwayWipeUsermod : public Usermod {
|
|||||||
unsigned long timeStaticStart = 0;
|
unsigned long timeStaticStart = 0;
|
||||||
uint16_t previousUserVar0 = 0;
|
uint16_t previousUserVar0 = 0;
|
||||||
|
|
||||||
|
//moved to buildflag
|
||||||
//comment this out if you want the turn off effect to be just fading out instead of reverse wipe
|
//comment this out if you want the turn off effect to be just fading out instead of reverse wipe
|
||||||
#define STAIRCASE_WIPE_OFF
|
//#define STAIRCASE_WIPE_OFF
|
||||||
public:
|
public:
|
||||||
|
void setup() {
|
||||||
|
}
|
||||||
void loop() {
|
void loop() {
|
||||||
//userVar0 (U0 in HTTP API):
|
//userVar0 (U0 in HTTP API):
|
||||||
//has to be set to 1 if movement is detected on the PIR that is the same side of the staircase as the ESP8266
|
//has to be set to 1 if movement is detected on the PIR that is the same side of the staircase as the ESP8266
|
||||||
@ -84,7 +86,7 @@ class StairwayWipeUsermod : public Usermod {
|
|||||||
|
|
||||||
uint16_t getId()
|
uint16_t getId()
|
||||||
{
|
{
|
||||||
return USERMOD_ID_EXAMPLE;
|
return USERMOD_ID_STAIRWAY_WIPE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -172,8 +172,9 @@
|
|||||||
#define USERMOD_ID_WIREGUARD 41 //Usermod "wireguard.h"
|
#define USERMOD_ID_WIREGUARD 41 //Usermod "wireguard.h"
|
||||||
#define USERMOD_ID_INTERNAL_TEMPERATURE 42 //Usermod "usermod_internal_temperature.h"
|
#define USERMOD_ID_INTERNAL_TEMPERATURE 42 //Usermod "usermod_internal_temperature.h"
|
||||||
#define USERMOD_ID_LDR_DUSK_DAWN 43 //Usermod "usermod_LDR_Dusk_Dawn_v2.h"
|
#define USERMOD_ID_LDR_DUSK_DAWN 43 //Usermod "usermod_LDR_Dusk_Dawn_v2.h"
|
||||||
#define USERMOD_ID_ANIMARTRIX 44 //Usermod "usermod_v2_animartrix.h"
|
#define USERMOD_ID_STAIRWAY_WIPE 44 //Usermod "stairway-wipe-usermod-v2.h"
|
||||||
#define USERMOD_ID_HTTP_PULL_LIGHT_CONTROL 45 //usermod "usermod_v2_HttpPullLightControl.h"
|
#define USERMOD_ID_ANIMARTRIX 45 //Usermod "usermod_v2_animartrix.h"
|
||||||
|
#define USERMOD_ID_HTTP_PULL_LIGHT_CONTROL 46 //usermod "usermod_v2_HttpPullLightControl.h"
|
||||||
|
|
||||||
//Access point behavior
|
//Access point behavior
|
||||||
#define AP_BEHAVIOR_BOOT_NO_CONN 0 //Open AP when no connection after boot
|
#define AP_BEHAVIOR_BOOT_NO_CONN 0 //Open AP when no connection after boot
|
||||||
|
@ -166,7 +166,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USERMOD_ANIMARTRIX
|
#ifdef USERMOD_ANIMARTRIX
|
||||||
#include "../usermods/usermod_v2_animartrix/usermod_v2_animartrix.h"
|
#include "../usermods/usermod_v2_animartrix/usermod_v2_animartrix.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USERMOD_INTERNAL_TEMPERATURE
|
#ifdef USERMOD_INTERNAL_TEMPERATURE
|
||||||
@ -194,15 +194,19 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USERMOD_MPU6050_IMU
|
#ifdef USERMOD_MPU6050_IMU
|
||||||
#include "../usermods/mpu6050_imu/usermod_mpu6050_imu.h"
|
#include "../usermods/mpu6050_imu/usermod_mpu6050_imu.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USERMOD_MPU6050_IMU
|
#ifdef USERMOD_MPU6050_IMU
|
||||||
#include "../usermods/mpu6050_imu/usermod_gyro_surge.h"
|
#include "../usermods/mpu6050_imu/usermod_gyro_surge.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USERMOD_LDR_DUSK_DAWN
|
#ifdef USERMOD_LDR_DUSK_DAWN
|
||||||
#include "../usermods/LDR_Dusk_Dawn_v2/usermod_LDR_Dusk_Dawn_v2.h"
|
#include "../usermods/LDR_Dusk_Dawn_v2/usermod_LDR_Dusk_Dawn_v2.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef USERMOD_STAIRCASE_WIPE
|
||||||
|
#include "../usermods/stairway_wipe_basic/stairway-wipe-usermod-v2.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void registerUsermods()
|
void registerUsermods()
|
||||||
@ -397,4 +401,8 @@ void registerUsermods()
|
|||||||
#ifdef USERMOD_LDR_DUSK_DAWN
|
#ifdef USERMOD_LDR_DUSK_DAWN
|
||||||
usermods.add(new LDR_Dusk_Dawn_v2());
|
usermods.add(new LDR_Dusk_Dawn_v2());
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USERMOD_STAIRCASE_WIPE
|
||||||
|
usermods.add(new StairwayWipeUsermod());
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user