Skip to content

Commit

Permalink
- Remove USERMOD_VL53L0X_GESTURES from _XL to stay below 100% (well 9…
Browse files Browse the repository at this point in the history
…9.9% !!!!)

- Fix compile errors in bme280 and PIR_sensor_switch
  • Loading branch information
ewoudwijma committed Jun 28, 2023
1 parent d3115d1 commit 0ea42f3
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -952,7 +952,7 @@ build_flags_XL =
-D USERMOD_BME280
-D USERMOD_DHT
; -D USERMOD_SHT ;; experimental
-D USERMOD_VL53L0X_GESTURES
; -D USERMOD_VL53L0X_GESTURES ;WLEDMM: removed to stay below 100%!!
-D WLED_ENABLE_PIXART
-D USERMOD_ANIMARTRIX ; WLEDMM usermod: CC BY-NC 3.0 licensed effects by Stefan Petrick

Expand Down
2 changes: 2 additions & 0 deletions usermods/BME280_v2/usermod_bme280.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class UsermodBME280 : public Usermod
#ifdef ESP8266
//uint8_t RST_PIN = 16; // Uncoment for Heltec WiFi-Kit-8
#endif
int8_t ioPin[2] = {i2c_scl, i2c_sda}; // I2C pins: SCL, SDA...defaults to Arch hardware pins but overridden at setup() //WLEDMM
bool initDone = false;

// BME280 sensor settings
Expand Down Expand Up @@ -185,6 +186,7 @@ class UsermodBME280 : public Usermod
public:
void setup()
{
//WLEDMM
bool HW_Pins_Used = (ioPin[0]==i2c_scl && ioPin[1]==i2c_sda); // note whether architecture-based hardware SCL/SDA pins used
//PinOwner po = PinOwner::UM_BME280; // defaults to being pinowner for SCL/SDA pins // WLEDMM not needed
PinManagerPinType pins[2] = { { ioPin[0], true }, { ioPin[1], true } }; // allocate pins
Expand Down
10 changes: 3 additions & 7 deletions usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,7 @@ class PIRsensorSwitch : public Usermod
*/
void addToConfig(JsonObject &root);

void appendConfigData()
{
oappend(SET_F("addHB('PIRsensorSwitch');"));

oappend(SET_F("addInfo('PIRsensorSwitch:HA-discovery',1,'HA=Home Assistant');")); // 0 is field type, 1 is actual field
oappend(SET_F("addInfo('PIRsensorSwitch:notifications',1,'Periodic WS updates');")); // 0 is field type, 1 is actual field
}
void appendConfigData();

/**
* restore the changeable values
Expand Down Expand Up @@ -487,6 +481,8 @@ void PIRsensorSwitch::addToConfig(JsonObject &root)

void PIRsensorSwitch::appendConfigData()
{
oappend(SET_F("addHB('PIRsensorSwitch');"));

oappend(SET_F("addInfo('PIRsensorSwitch:HA-discovery',1,'HA=Home Assistant');")); // 0 is field type, 1 is actual field
oappend(SET_F("addInfo('PIRsensorSwitch:notifications',1,'Periodic WS updates');")); // 0 is field type, 1 is actual field
oappend(SET_F("addInfo('PIRsensorSwitch:override',1,'Cancel timer on change');")); // 0 is field type, 1 is actual field
Expand Down

0 comments on commit 0ea42f3

Please sign in to comment.