diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index d4c38f479..b8c42350d 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -2385,10 +2385,11 @@ void GpioSwitchPinMode(uint8_t index) if (pin[GPIO_SWT1 +index] < 99) { // pinMode(pin[GPIO_SWT1 +index], (16 == pin[GPIO_SWT1 +index]) ? INPUT_PULLDOWN_16 : bitRead(switch_no_pullup, index) ? INPUT : INPUT_PULLUP); - uint8_t no_pullup = bitRead(switch_no_pullup, index); + uint8_t no_pullup = bitRead(switch_no_pullup, index); // 0 = INPUT_PULLUP, 1 = INPUT if (no_pullup) { if (SHELLY2 == Settings.module) { - no_pullup = (Settings.switchmode[index] < PUSHBUTTON); + // Switchmodes : TOGGLE, FOLLOW, FOLLOW_INV, PUSHBUTTON, PUSHBUTTON_INV, PUSHBUTTONHOLD, PUSHBUTTONHOLD_INV, PUSHBUTTON_TOGGLE, MAX_SWITCH_OPTION + no_pullup = (Settings.switchmode[index] < PUSHBUTTON); // INPUT on TOGGLE, FOLLOW and FOLLOW_INV. INPUT_PULLUP on anything else } } pinMode(pin[GPIO_SWT1 +index], (16 == pin[GPIO_SWT1 +index]) ? INPUT_PULLDOWN_16 : (no_pullup) ? INPUT : INPUT_PULLUP); diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index 627cebc52..35781290a 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -1321,8 +1321,10 @@ void HandleInformation() #endif // USE_DISCOVERY func += F("}1}2 "); // Empty line - func += F("}1" D_ESP_CHIP_ID "}2"); func += String(ESP.getChipId()); - func += F("}1" D_FLASH_CHIP_ID "}2"); func += String(ESP.getFlashChipId()); + snprintf_P(stopic, sizeof(stopic), PSTR(" (0x%X)"), ESP.getChipId()); + func += F("}1" D_ESP_CHIP_ID "}2"); func += String(ESP.getChipId()); func += stopic; + snprintf_P(stopic, sizeof(stopic), PSTR(" (0x%X)"), ESP.getFlashChipId()); + func += F("}1" D_FLASH_CHIP_ID "}2"); func += String(ESP.getFlashChipId()); func += stopic; func += F("}1" D_FLASH_CHIP_SIZE "}2"); func += String(ESP.getFlashChipRealSize() / 1024); func += F("kB"); func += F("}1" D_PROGRAM_FLASH_SIZE "}2"); func += String(ESP.getFlashChipSize() / 1024); func += F("kB"); func += F("}1" D_PROGRAM_SIZE "}2"); func += String(ESP.getSketchSize() / 1024); func += F("kB");