From 91e758f66f9b2e2ee94cb331474d72c5f099cc7b Mon Sep 17 00:00:00 2001 From: cschwinne Date: Wed, 18 Aug 2021 02:10:40 +0200 Subject: [PATCH] Fixed JSON IR remote not working with codes greater than 0xFFFFFF (fixes #2135) --- CHANGELOG.md | 5 +++++ wled00/ir.cpp | 8 ++++++-- wled00/wled.h | 2 +- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57578a06..1b3ad8d0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ ### Builds after release 0.12.0 +#### Build 2108180 + +- Fixed JSON IR remote not working with codes greater than 0xFFFFFF (fixes #2135) +- Fixed transition 0 edge case + #### Build 2108170 - Added application level pong websockets reply (#2139) diff --git a/wled00/ir.cpp b/wled00/ir.cpp index 4a45e666..30dae3db 100644 --- a/wled00/ir.cpp +++ b/wled00/ir.cpp @@ -161,7 +161,11 @@ void decodeIR(uint32_t code) } lastValidCode = 0; irTimesRepeated = 0; if (decodeIRCustom(code)) return; - if (code > 0xFFFFFF) return; //invalid code + if (irEnabled == 8) { // any remote configurable with ir.json file + decodeIRJson(code); + return; + } + if (code > 0xFFFFFF) return; //invalid code switch (irEnabled) { case 1: if (code > 0xF80000) { @@ -178,7 +182,7 @@ void decodeIR(uint32_t code) // "VOL +" controls effect, "VOL -" controls colour/palette, "MUTE" // sets bright plain white case 7: decodeIR9(code); break; - case 8: decodeIRJson(code); break; // any remote configurable with ir.json file + //case 8: return; // ir.json file, handled above switch statement default: return; } diff --git a/wled00/wled.h b/wled00/wled.h index 8a28e37d..df83c66f 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2108170 +#define VERSION 2108180 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG