Add hex to flash info

This commit is contained in:
Theo Arends 2018-11-07 18:43:44 +01:00
parent 4a21d3270d
commit 61985ca16b
2 changed files with 7 additions and 4 deletions

View File

@ -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);

View File

@ -1321,8 +1321,10 @@ void HandleInformation()
#endif // USE_DISCOVERY
func += F("}1}2&nbsp;"); // 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");