Skip to content

Commit

Permalink
btn: key0 should override key
Browse files Browse the repository at this point in the history
#1772 (comment)
> 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.
  • Loading branch information
mcspr authored Apr 7, 2020
1 parent 92bdf21 commit 945652f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/espurna/button.ino
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ void _buttonConfigure() {
// TODO: compatibility proxy, fetch global key before indexed
template<typename T>
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() {
Expand Down

0 comments on commit 945652f

Please sign in to comment.