diff --git a/usermods/Animated_Staircase/Animated_Staircase.h b/usermods/Animated_Staircase/Animated_Staircase.h index cdf0490c..b4065a4e 100644 --- a/usermods/Animated_Staircase/Animated_Staircase.h +++ b/usermods/Animated_Staircase/Animated_Staircase.h @@ -414,7 +414,7 @@ class Animated_Staircase : public Usermod { } void appendConfigData() { - oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');"); + oappend(SET_F("addHB('")); oappend(_name); oappend("');"); //oappend(SET_F("dd=addDropdown('staircase','selectfield');")); //oappend(SET_F("addOption(dd,'1st value',0);")); diff --git a/usermods/BH1750_v2/usermod_bh1750.h b/usermods/BH1750_v2/usermod_bh1750.h index bd1f0cf9..135c6c0a 100644 --- a/usermods/BH1750_v2/usermod_bh1750.h +++ b/usermods/BH1750_v2/usermod_bh1750.h @@ -226,7 +226,7 @@ public: } void appendConfigData() { - oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');"); + oappend(SET_F("addHB('")); oappend(_name); oappend("');"); // 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);"); diff --git a/usermods/Battery/usermod_v2_Battery.h b/usermods/Battery/usermod_v2_Battery.h index 77142d72..5c4f2795 100644 --- a/usermods/Battery/usermod_v2_Battery.h +++ b/usermods/Battery/usermod_v2_Battery.h @@ -378,7 +378,7 @@ class UsermodBattery : public Usermod void appendConfigData() { - oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');"); + oappend(SET_F("addHB('")); oappend(_name); oappend("');"); oappend(SET_F("addInfo('Battery:min-voltage', 1, 'v');")); oappend(SET_F("addInfo('Battery:max-voltage', 1, 'v');")); diff --git a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h index c282dcfa..5518005e 100644 --- a/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h +++ b/usermods/PIR_sensor_switch/usermod_PIR_sensor_switch.h @@ -414,7 +414,7 @@ public: void appendConfigData() { - oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');"); + oappend(SET_F("addHB('")); oappend(_name); oappend("');"); 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 diff --git a/usermods/Temperature/usermod_temperature.h b/usermods/Temperature/usermod_temperature.h index f1f851b0..c0c7ef4e 100644 --- a/usermods/Temperature/usermod_temperature.h +++ b/usermods/Temperature/usermod_temperature.h @@ -306,7 +306,7 @@ class UsermodTemperature : public Usermod { //} void appendConfigData() { - oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');"); + oappend(SET_F("addHB('")); oappend(_name); oappend("');"); } /** diff --git a/usermods/boblight/boblight.h b/usermods/boblight/boblight.h index 22f0be83..557da187 100644 --- a/usermods/boblight/boblight.h +++ b/usermods/boblight/boblight.h @@ -303,7 +303,7 @@ class BobLightUsermod : public Usermod { } void appendConfigData() { - oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');"); + oappend(SET_F("addHB('")); oappend(_name); oappend("');"); //oappend(SET_F("dd=addDropdown('usermod','selectfield');")); //oappend(SET_F("addOption(dd,'1st value',0);")); diff --git a/usermods/usermod_v2_auto_save/usermod_v2_auto_save.h b/usermods/usermod_v2_auto_save/usermod_v2_auto_save.h index 8fc636fa..ea5eb2b0 100644 --- a/usermods/usermod_v2_auto_save/usermod_v2_auto_save.h +++ b/usermods/usermod_v2_auto_save/usermod_v2_auto_save.h @@ -205,7 +205,7 @@ class AutoSaveUsermod : public Usermod { } void appendConfigData() { - oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');"); + oappend(SET_F("addHB('")); oappend(_name); oappend("');"); } /* diff --git a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h index 02a57562..620d6238 100644 --- a/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h +++ b/usermods/usermod_v2_four_line_display_ALT/usermod_v2_four_line_display_ALT.h @@ -1044,7 +1044,7 @@ class FourLineDisplayUsermod : public Usermod { //} void appendConfigData() { - oappend(SET_F("addHB('")); oappend(SET_F(_name)); oappend("');"); + oappend(SET_F("addHB('")); oappend(_name); oappend("');"); oappend(SET_F("dd=addDropdown('4LineDisplay','type');")); oappend(SET_F("addOption(dd,'None',0);")); @@ -1082,7 +1082,7 @@ class FourLineDisplayUsermod : public Usermod { //WLEDMM add errorMessage to um settings if (strcmp(errorMessage, "") != 0) { - oappend(SET_F("addInfo('errorMessage', 0, 'error: ")); oappend(SET_F(errorMessage)); oappend("! Correct and reboot');"); + oappend(SET_F("addInfo('errorMessage', 0, 'error: ")); oappend(errorMessage); oappend("! Correct and reboot');"); } } diff --git a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h index a8a4cf2f..6500f0a7 100644 --- a/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h +++ b/usermods/usermod_v2_rotary_encoder_ui_ALT/usermod_v2_rotary_encoder_ui_ALT.h @@ -616,8 +616,8 @@ public: void changeCustom(uint8_t par, bool increase) { - uint8_t val = 0; #ifdef USERMOD_FOUR_LINE_DISPLAY + uint8_t val = 0; if (display && display->wakeDisplay()) { display->redraw(true); // Throw away wake up input @@ -629,11 +629,13 @@ public: if (applyToAll) { uint8_t id = strip.getFirstSelectedSegId(); Segment& sid = strip.getSegment(id); + #ifdef USERMOD_FOUR_LINE_DISPLAY switch (par) { case 3: val = sid.custom3 = max(min((increase ? sid.custom3+fadeAmount : sid.custom3-fadeAmount), 255), 0); break; case 2: val = sid.custom2 = max(min((increase ? sid.custom2+fadeAmount : sid.custom2-fadeAmount), 255), 0); break; default: val = sid.custom1 = max(min((increase ? sid.custom1+fadeAmount : sid.custom1-fadeAmount), 255), 0); break; } + #endif for (byte i=0; i