From 5db2aa1c61243e46c765dddece042b68e1712ca3 Mon Sep 17 00:00:00 2001 From: elral <3263285+elral@users.noreply.github.com> Date: Sun, 12 May 2024 08:18:26 +0200 Subject: [PATCH 1/3] fixed warning during compile for custom devices --- src/MF_CustomDevice/CustomDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MF_CustomDevice/CustomDevice.cpp b/src/MF_CustomDevice/CustomDevice.cpp index fc80876c..5b6a9312 100644 --- a/src/MF_CustomDevice/CustomDevice.cpp +++ b/src/MF_CustomDevice/CustomDevice.cpp @@ -97,9 +97,9 @@ namespace CustomDevice { for (uint8_t i = 0; i < customDeviceRegistered; ++i) { if (state) - customDevice[i].set(MESSAGEID_POWERSAVINGMODE, "1"); + customDevice[i].set(MESSAGEID_POWERSAVINGMODE, (char*)"1"); else - customDevice[i].set(MESSAGEID_POWERSAVINGMODE, "0"); + customDevice[i].set(MESSAGEID_POWERSAVINGMODE, (char*)"0"); } } From a599fc9689e753797f9dc1655331c72cbb1080b8 Mon Sep 17 00:00:00 2001 From: elral <3263285+elral@users.noreply.github.com> Date: Thu, 23 May 2024 21:50:40 +0200 Subject: [PATCH 2/3] use macro F() to fix warning --- src/MF_CustomDevice/CustomDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MF_CustomDevice/CustomDevice.cpp b/src/MF_CustomDevice/CustomDevice.cpp index 5b6a9312..27d4826a 100644 --- a/src/MF_CustomDevice/CustomDevice.cpp +++ b/src/MF_CustomDevice/CustomDevice.cpp @@ -97,9 +97,9 @@ namespace CustomDevice { for (uint8_t i = 0; i < customDeviceRegistered; ++i) { if (state) - customDevice[i].set(MESSAGEID_POWERSAVINGMODE, (char*)"1"); + customDevice[i].set(MESSAGEID_POWERSAVINGMODE, F("1")); else - customDevice[i].set(MESSAGEID_POWERSAVINGMODE, (char*)"0"); + customDevice[i].set(MESSAGEID_POWERSAVINGMODE, F("0")); } } From 2dc6d33670a6807aa199090dd0fd588504524321 Mon Sep 17 00:00:00 2001 From: elral <3263285+elral@users.noreply.github.com> Date: Thu, 23 May 2024 21:59:13 +0200 Subject: [PATCH 3/3] Revert "use macro F() to fix warning" This reverts commit a599fc9689e753797f9dc1655331c72cbb1080b8. --- src/MF_CustomDevice/CustomDevice.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/MF_CustomDevice/CustomDevice.cpp b/src/MF_CustomDevice/CustomDevice.cpp index 27d4826a..5b6a9312 100644 --- a/src/MF_CustomDevice/CustomDevice.cpp +++ b/src/MF_CustomDevice/CustomDevice.cpp @@ -97,9 +97,9 @@ namespace CustomDevice { for (uint8_t i = 0; i < customDeviceRegistered; ++i) { if (state) - customDevice[i].set(MESSAGEID_POWERSAVINGMODE, F("1")); + customDevice[i].set(MESSAGEID_POWERSAVINGMODE, (char*)"1"); else - customDevice[i].set(MESSAGEID_POWERSAVINGMODE, F("0")); + customDevice[i].set(MESSAGEID_POWERSAVINGMODE, (char*)"0"); } }