Merge pull request #8589 from halfbakery/cleanup_undocumented_switch_debounce_feature

Make a previously undocumented switch debouncing feature clean and official
This commit is contained in:
Theo Arends 2020-05-31 16:37:54 +02:00 committed by GitHub
commit e4e9a39c79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -82,8 +82,8 @@ void SwitchProbe(void)
if (uptime < 4) { return; } // Block GPIO for 4 seconds after poweron to workaround Wemos D1 / Obi RTS circuit
uint8_t state_filter = Settings.switch_debounce / SWITCH_PROBE_INTERVAL; // 5, 10, 15
uint8_t force_high = (Settings.switch_debounce % 50) &1; // 51, 101, 151 etc
uint8_t force_low = (Settings.switch_debounce % 50) &2; // 52, 102, 152 etc
uint8_t force_high = (Settings.switch_debounce % 10) &1; // 51, 101, 151 etc
uint8_t force_low = (Settings.switch_debounce % 10) &2; // 52, 102, 152 etc
for (uint32_t i = 0; i < MAX_SWITCHES; i++) {
if (PinUsed(GPIO_SWT1, i)) {