From 945652f806a770389c4962bec13dea9c38d400c4 Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Wed, 8 Apr 2020 02:41:09 +0300 Subject: [PATCH] btn: key0 should override key https://github.com/xoseperez/espurna/pull/1772#issuecomment-609847420 > Without the patch btnRepDel overrides every btnRepDel0, btnRepDel1 etc., btnRepDel0 read second, then hard-coded value. With the patch btnRepDel0 is read first, then btnRepDel, then hard-coded value. Indexed key can only be set via settings upload or in terminal, WebUI can change only the global override setting. Allow more 'specific' key to override global setting. --- code/espurna/button.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/espurna/button.ino b/code/espurna/button.ino index ff311352..7f5b7796 100644 --- a/code/espurna/button.ino +++ b/code/espurna/button.ino @@ -490,7 +490,7 @@ void _buttonConfigure() { // TODO: compatibility proxy, fetch global key before indexed template unsigned long _buttonGetSetting(const char* key, unsigned char index, T default_value) { - return getSetting(key, getSetting({key, index}, default_value)); + return getSetting({key, index}, getSetting(key, default_value)); } void buttonSetup() {