Add button control when no relay configured

Add button control when no relay configured (#4682)
This commit is contained in:
Theo Arends 2019-03-11 18:18:47 +01:00
parent 58d075deff
commit 6c69b8d12d
2 changed files with 4 additions and 2 deletions

View File

@ -3,6 +3,7 @@
* Add support for sensor SCD30 (#5434) * Add support for sensor SCD30 (#5434)
* Add support for commands in sensor drivers * Add support for commands in sensor drivers
* Add 0x to IRRemote (SetOption29) and RCSwitch (SetOption28) received hexadecimal data (#5431) * Add 0x to IRRemote (SetOption29) and RCSwitch (SetOption28) received hexadecimal data (#5431)
* Add button control when no relay configured (#4682)
* *
* 6.4.1.20 20190304 * 6.4.1.20 20190304
* Changed webserver content handling from single String to small Chunks increasing RAM * Changed webserver content handling from single String to small Chunks increasing RAM

View File

@ -95,8 +95,9 @@ void ButtonHandler(void)
uint16_t loops_per_second = 1000 / Settings.button_debounce; uint16_t loops_per_second = 1000 / Settings.button_debounce;
char scmnd[20]; char scmnd[20];
uint8_t maxdev = (devices_present > MAX_KEYS) ? MAX_KEYS : devices_present; // uint8_t maxdev = (devices_present > MAX_KEYS) ? MAX_KEYS : devices_present;
for (uint8_t button_index = 0; button_index < maxdev; button_index++) { // for (uint8_t button_index = 0; button_index < maxdev; button_index++) {
for (uint8_t button_index = 0; button_index < MAX_KEYS; button_index++) {
button = NOT_PRESSED; button = NOT_PRESSED;
button_present = 0; button_present = 0;