Browse Source

Changed settings keys for RFBridge codes

fastled
Xose Pérez 7 years ago
parent
commit
f2cb77180c
1 changed files with 3 additions and 3 deletions
  1. +3
    -3
      code/espurna/rfbridge.ino

+ 3
- 3
code/espurna/rfbridge.ino View File

@ -264,13 +264,13 @@ void _rfbMqttCallback(unsigned int type, const char * topic, const char * payloa
void rfbStore(unsigned char id, bool status, const char * code) {
DEBUG_MSG_P(PSTR("[RFBRIDGE] Storing %d-%s => '%s'\n"), id, status ? "ON" : "OFF", code);
char key[8] = {0};
snprintf_P(key, sizeof(key), PSTR("rfb%d%s"), id, status ? "on" : "off");
snprintf_P(key, sizeof(key), PSTR("rfb%s%d"), status ? "ON" : "OFF", id);
setSetting(key, code);
}
String rfbRetrieve(unsigned char id, bool status) {
char key[8] = {0};
snprintf_P(key, sizeof(key), PSTR("rfb%d%s"), id, status ? "on" : "off");
snprintf_P(key, sizeof(key), PSTR("rfb%s%d"), status ? "ON" : "OFF", id);
return getSetting(key);
}
@ -295,7 +295,7 @@ void rfbLearn(unsigned char id, bool status) {
void rfbForget(unsigned char id, bool status) {
char key[8] = {0};
snprintf_P(key, sizeof(key), PSTR("rfb%d%s"), id, status ? "on" : "off");
snprintf_P(key, sizeof(key), PSTR("rfb%s%d"), status ? "ON" : "OFF", id);
delSetting(key);
// Websocket update


Loading…
Cancel
Save