From f2cb77180c274c7f23f0a9cb5d6d2bc1f6bab692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sat, 26 Aug 2017 17:08:54 +0200 Subject: [PATCH] Changed settings keys for RFBridge codes --- code/espurna/rfbridge.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/espurna/rfbridge.ino b/code/espurna/rfbridge.ino index eaaa15b1..59039915 100644 --- a/code/espurna/rfbridge.ino +++ b/code/espurna/rfbridge.ino @@ -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