Browse Source

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.
mcspr-patch-1
Max Prokhorov 4 years ago
committed by GitHub
parent
commit
945652f806
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      code/espurna/button.ino

+ 1
- 1
code/espurna/button.ino View File

@ -490,7 +490,7 @@ void _buttonConfigure() {
// TODO: compatibility proxy, fetch global key before indexed // TODO: compatibility proxy, fetch global key before indexed
template<typename T> template<typename T>
unsigned long _buttonGetSetting(const char* key, unsigned char index, T default_value) { 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() { void buttonSetup() {


Loading…
Cancel
Save