New esp8266_4MB_max entry to test usermods / i2c
pio.ini: add esp8266_4MB_max with pir, dallas, relay games (to test IMU) addHB: use string literal instead of var appendConfigData to um multirelay
This commit is contained in:
@@ -414,7 +414,7 @@ class Animated_Staircase : public Usermod {
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
oappend(SET_F("addHB('staircase');"));
|
||||
|
||||
//oappend(SET_F("dd=addDropdown('staircase','selectfield');"));
|
||||
//oappend(SET_F("addOption(dd,'1st value',0);"));
|
||||
|
||||
@@ -226,7 +226,7 @@ public:
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
oappend(SET_F("addHB('BH1750');");
|
||||
// WLEDMM this usermod can ONLY use HW_I2C - so always use globals
|
||||
//oappend(SET_F("addInfo('BH1750:pin[]',0,'','I2C SCL');"));
|
||||
//oappend(SET_F("rOption('BH1750:pin[]',0,'use global (")); oappendi(i2c_scl); oappend(")',-1);");
|
||||
|
||||
@@ -401,7 +401,7 @@ public:
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
oappend(SET_F("addHB('BME280/BMP280');"));
|
||||
|
||||
oappend(SET_F("addInfo('BME280/BMP280:pin[]',0,'','I2C/SPI CLK');"));
|
||||
oappend(SET_F("disableRO('BME280/BMP280:pin[]',0);"));
|
||||
|
||||
@@ -378,7 +378,7 @@ class UsermodBattery : public Usermod
|
||||
|
||||
void appendConfigData()
|
||||
{
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
oappend(SET_F("addHB('Battery');"));
|
||||
|
||||
oappend(SET_F("addInfo('Battery:min-voltage', 1, 'v');"));
|
||||
oappend(SET_F("addInfo('Battery:max-voltage', 1, 'v');"));
|
||||
|
||||
@@ -414,7 +414,7 @@ public:
|
||||
|
||||
void appendConfigData()
|
||||
{
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
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
|
||||
|
||||
@@ -287,9 +287,9 @@ class PWMFanUsermod : public Usermod {
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
oappend(SET_F("addHB('PWM-fan');"));
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* addToConfig() can be used to add custom persistent settings to the cfg.json file in the "um" (usermod) object.
|
||||
* It will be called by WLED when settings are actually saved (for example, LED settings are saved)
|
||||
|
||||
@@ -306,7 +306,7 @@ class UsermodTemperature : public Usermod {
|
||||
//}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
oappend(SET_F("addHB('Temperature');"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -303,7 +303,7 @@ class BobLightUsermod : public Usermod {
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
oappend(SET_F("addHB('BobLight');"));
|
||||
|
||||
//oappend(SET_F("dd=addDropdown('usermod','selectfield');"));
|
||||
//oappend(SET_F("addOption(dd,'1st value',0);"));
|
||||
|
||||
@@ -571,6 +571,11 @@ class MultiRelay : public Usermod {
|
||||
DEBUG_PRINTLN(F("MultiRelay config saved."));
|
||||
}
|
||||
|
||||
void appendConfigData()
|
||||
{
|
||||
oappend(SET_F("addHB('MultiRelay');"));
|
||||
}
|
||||
|
||||
/**
|
||||
* restore the changeable values
|
||||
* readFromConfig() is called before setup() to populate properties from values stored in cfg.json
|
||||
|
||||
@@ -205,7 +205,7 @@ class AutoSaveUsermod : public Usermod {
|
||||
}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
oappend(SET_F("addHB('Autosave');"));
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
@@ -1044,7 +1044,7 @@ class FourLineDisplayUsermod : public Usermod {
|
||||
//}
|
||||
|
||||
void appendConfigData() {
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
oappend(SET_F("addHB('4LineDisplay');"));
|
||||
|
||||
oappend(SET_F("dd=addDropdown('4LineDisplay','type');"));
|
||||
oappend(SET_F("addOption(dd,'None',0);"));
|
||||
|
||||
@@ -264,6 +264,7 @@ class Frame3D {
|
||||
points.push_back(voxel);
|
||||
}
|
||||
void drawLineXYZ(Voxel from, Voxel to, uint32_t col) {
|
||||
//causes crash on ESP8266: StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores, maybe not enough free heap
|
||||
for (float x=MIN(from.x, to.x); x<=MAX(from.x, to.x); x+=.05)
|
||||
for (float y=MIN(from.y, to.y); y<=MAX(from.y, to.y); y+=.05)
|
||||
for (float z=MIN(from.z, to.z); z<=MAX(from.z, to.z); z+=.05)
|
||||
@@ -329,9 +330,9 @@ class GamesUsermod : public Usermod {
|
||||
strip.addEffect(255, &mode_pongGame, _data_FX_MODE_PONGGAME);
|
||||
#ifdef USERMOD_MPU6050_IMU
|
||||
IMU = (MPU6050Driver *)usermods.lookup(USERMOD_ID_IMU);
|
||||
#ifdef WLED_DEBUG
|
||||
// #ifdef WLED_DEBUG
|
||||
strip.addEffect(255, &mode_IMUTest, _data_FX_MODE_IMUTest);
|
||||
#endif
|
||||
// #endif
|
||||
#endif
|
||||
strip.addEffect(255, &mode_3DIMUCube, _data_FX_MODE_3DIMUCube); //works also without IMU
|
||||
}
|
||||
|
||||
@@ -872,7 +872,7 @@ public:
|
||||
//WLEDMM: add appendConfigData
|
||||
void appendConfigData()
|
||||
{
|
||||
oappend(SET_F("addHB('")); oappend(_name); oappend("');");
|
||||
oappend(SET_F("addHB('Rotary-Encoder');"));
|
||||
|
||||
#ifdef ENCODER_DT_PIN
|
||||
oappend(SET_F("xOption('Rotary-Encoder:DT-pin',1,' ⎌',")); oappendi(ENCODER_DT_PIN); oappend(");");
|
||||
|
||||
Reference in New Issue
Block a user