[IR] [Build] Enable IR device selection

This commit is contained in:
Ton Huisman
2022-08-07 15:50:23 +02:00
parent 91c2719d12
commit 3e26dc4fc5
6 changed files with 304 additions and 0 deletions
+1
View File
@@ -61,3 +61,4 @@ dist/Espressif_flash_download_tool_v3.8.5/dl_temp/bin_tmp/
dist/Espressif_flash_download_tool_v3.8.5/dl_temp/_temp_by_dltool/
dist/Espressif_flash_download_tool_v3.8.5/configure/esp32/spi_download.conf
src/CustomIR.h
+3
View File
@@ -98,6 +98,8 @@ build_flags = ${esp32_base.build_flags}
-DCOLLECTION_USE_RTTTL
lib_deps = ${esp32_base.lib_deps}
LittleFS
extra_scripts = ${esp32_base.extra_scripts}
pre:tools/pio/ir_build_check.py
@@ -140,6 +142,7 @@ lib_ignore = ${esp32_always.lib_ignore}
HeatpumpIR
extra_scripts = ${esp32_base.extra_scripts}
pre:tools/pio/pre_custom_esp32.py
pre:tools/pio/ir_build_check.py
[env:normal_ESP32_4M316k]
+1
View File
@@ -54,6 +54,7 @@ lib_ignore = ${esp32_always.lib_ignore}
HeatpumpIR
extra_scripts = ${esp32s2_common.extra_scripts}
pre:tools/pio/pre_custom_esp32.py
pre:tools/pio/ir_build_check.py
+10
View File
@@ -53,6 +53,7 @@ lib_ignore = ESP32_ping
Adafruit Motor Shield V2 Library
Adafruit_ST77xx
extra_scripts = ${esp8266_custom_common.extra_scripts}
pre:tools/pio/ir_build_check.py
@@ -118,6 +119,7 @@ lib_ignore = ESP32_ping
Adafruit Motor Shield V2 Library
Adafruit_ST77xx
extra_scripts = ${esp8266_custom_common.extra_scripts}
pre:tools/pio/ir_build_check.py
; TD-er: Disabled as it will no longer fit
@@ -430,6 +432,8 @@ lib_ignore = ${ir.lib_ignore}
build_flags = ${minimal_ir_extended.build_flags}
${esp8266_1M.build_flags}
build_unflags = ${esp8266_1M_OTA.build_unflags} -DPLUGIN_BUILD_NORMAL_IR
extra_scripts = ${esp8266_1M.extra_scripts}
pre:tools/pio/ir_build_check.py
; Minimal IR: 4096k version --------------------------
@@ -443,6 +447,8 @@ platform_packages = ${ir.platform_packages}
lib_ignore = ${ir.lib_ignore}
build_flags = ${minimal_ir_extended.build_flags}
${esp8266_4M1M.build_flags}
extra_scripts = ${esp8266_4M1M.extra_scripts}
pre:tools/pio/ir_build_check.py
; 4M flash, 2M SPIFFS
[env:minimal_IRext_ESP8266_4M2M]
@@ -452,6 +458,8 @@ platform_packages = ${ir.platform_packages}
lib_ignore = ${ir.lib_ignore}
build_flags = ${minimal_ir_extended.build_flags}
${esp8266_4M2M.build_flags}
extra_scripts = ${esp8266_4M2M.extra_scripts}
pre:tools/pio/ir_build_check.py
; NORMAL IR: 4096k version --------------------------
@@ -466,6 +474,8 @@ lib_ignore = ${ir.lib_ignore}
build_flags = ${normal_ir_extended_no_rx.build_flags}
${esp8266_4M2M.build_flags}
-DLIMIT_BUILD_SIZE
extra_scripts = ${esp8266_4M2M.extra_scripts}
pre:tools/pio/ir_build_check.py
+272
View File
@@ -0,0 +1,272 @@
#ifndef _CUSTOM_IR_H
#define _CUSTOM_IR_H
/**
* Custom_IR-sample.h
* Usage:
* - Copy this file to CustomIR.h (CustomIR.h is excluded from Git, so don't try to commit that)
* - Change the supported list of IR devices by commenting/uncommenting options that DISABLE a device when UNcommented
*/
// *** This file must be updated adding new supported devices when updating IRreceive8266 library ***
// Set flags to enable (1) or disable (0) the DECODE_ and/or SEND_ feature for a specific IR device
// To limit ESPEasy build-size you can disable DECODE_ or SEND_ flags for devices not needed
// #define DECODE_RAW 0 // RAW support should be left to default unless explicitly disabled via P016_P035_USE_RAW_RAW2
// #define SEND_RAW 0
// Standard: Use defaults for up to library version 2.8.2
// Change as desired after copying CustomIR-sample.h to CustomIR.h
// #define DECODE_RC5 0
// #define SEND_RC5 0
// #define DECODE_RC6 0
// #define SEND_RC6 0
// #define DECODE_NEC 0
// #define SEND_NEC 0
// #define DECODE_SONY 0
// #define SEND_SONY 0
// #define DECODE_PANASONIC 0
// #define SEND_PANASONIC 0
// #define DECODE_JVC 0
// #define SEND_JVC 0
// #define DECODE_SAMSUNG 0
// #define SEND_SAMSUNG 0
// #define DECODE_WHYNTER 0
// #define SEND_WHYNTER 0
// #define DECODE_AIWA_RC_T501 0
// #define SEND_AIWA_RC_T501 0
// #define DECODE_LG 0
// #define SEND_LG 0
// #define DECODE_SANYO 0
// #define SEND_SANYO 0
// #define DECODE_MITSUBISHI 0
// #define SEND_MITSUBISHI 0
// #define DECODE_DISH 0
// #define SEND_DISH 0
// #define DECODE_SHARP 0
// #define SEND_SHARP 0
// #define DECODE_COOLIX 0
// #define SEND_COOLIX 0
// #define DECODE_DAIKIN 0
// #define SEND_DAIKIN 0
// #define DECODE_DENON 0
// #define SEND_DENON 0
// #define DECODE_KELVINATOR 0
// #define SEND_KELVINATOR 0
// #define DECODE_SHERWOOD 0
// #define SEND_SHERWOOD 0
// #define DECODE_MITSUBISHI_AC 0
// #define SEND_MITSUBISHI_AC 0
// #define DECODE_RCMM 0
// #define SEND_RCMM 0
// #define DECODE_SANYO_LC7461 0
// #define SEND_SANYO_LC7461 0
// #define DECODE_RC5X 0
// #define SEND_RC5X 0
// #define DECODE_GREE 0
// #define SEND_GREE 0
// #define DECODE_PRONTO 0
// #define SEND_PRONTO 0
// #define DECODE_NEC_LIKE 0
// #define SEND_NEC_LIKE 0
// #define DECODE_ARGO 0
// #define SEND_ARGO 0
// #define DECODE_TROTEC 0
// #define SEND_TROTEC 0
// #define DECODE_NIKAI 0
// #define SEND_NIKAI 0
// #define DECODE_GLOBALCACHE 0
// #define SEND_GLOBALCACHE 0
// #define DECODE_TOSHIBA_AC 0
// #define SEND_TOSHIBA_AC 0
// #define DECODE_FUJITSU_AC 0
// #define SEND_FUJITSU_AC 0
// #define DECODE_MIDEA 0
// #define SEND_MIDEA 0
// #define DECODE_MAGIQUEST 0
// #define SEND_MAGIQUEST 0
// #define DECODE_LASERTAG 0
// #define SEND_LASERTAG 0
// #define DECODE_CARRIER_AC 0
// #define SEND_CARRIER_AC 0
// #define DECODE_HAIER_AC 0
// #define SEND_HAIER_AC 0
// #define DECODE_MITSUBISHI2 0
// #define SEND_MITSUBISHI2 0
// #define DECODE_HITACHI_AC 0
// #define SEND_HITACHI_AC 0
// #define DECODE_HITACHI_AC1 0
// #define SEND_HITACHI_AC1 0
// #define DECODE_HITACHI_AC2 0
// #define SEND_HITACHI_AC2 0
// #define DECODE_GICABLE 0
// #define SEND_GICABLE 0
// #define DECODE_HAIER_AC_YRW02 0
// #define SEND_HAIER_AC_YRW02 0
// #define DECODE_WHIRLPOOL_AC 0
// #define SEND_WHIRLPOOL_AC 0
// #define DECODE_SAMSUNG_AC 0
// #define SEND_SAMSUNG_AC 0
// #define DECODE_LUTRON 0
// #define SEND_LUTRON 0
// #define DECODE_ELECTRA_AC 0
// #define SEND_ELECTRA_AC 0
// #define DECODE_PANASONIC_AC 0
// #define SEND_PANASONIC_AC 0
// #define DECODE_PIONEER 0
// #define SEND_PIONEER 0
// #define DECODE_LG2 0
// #define SEND_LG2 0
// #define DECODE_MWM 0
// #define SEND_MWM 0
// #define DECODE_DAIKIN2 0
// #define SEND_DAIKIN2 0
// #define DECODE_VESTEL_AC 0
// #define SEND_VESTEL_AC 0
// #define DECODE_TECO 0
// #define SEND_TECO 0
// #define DECODE_SAMSUNG36 0
// #define SEND_SAMSUNG36 0
// #define DECODE_TCL112AC 0
// #define SEND_TCL112AC 0
// #define DECODE_LEGOPF 0
// #define SEND_LEGOPF 0
// #define DECODE_MITSUBISHI_HEAVY_88 0
// #define SEND_MITSUBISHI_HEAVY_88 0
// #define DECODE_MITSUBISHI_HEAVY_152 0
// #define SEND_MITSUBISHI_HEAVY_152 0
// #define DECODE_DAIKIN216 0
// #define SEND_DAIKIN216 0
// #define DECODE_SHARP_AC 0
// #define SEND_SHARP_AC 0
// #define DECODE_GOODWEATHER 0
// #define SEND_GOODWEATHER 0
// #define DECODE_INAX 0
// #define SEND_INAX 0
// #define DECODE_DAIKIN160 0
// #define SEND_DAIKIN160 0
// #define DECODE_NEOCLIMA 0
// #define SEND_NEOCLIMA 0
// #define DECODE_DAIKIN176 0
// #define SEND_DAIKIN176 0
// #define DECODE_DAIKIN128 0
// #define SEND_DAIKIN128 0
// #define DECODE_AMCOR 0
// #define SEND_AMCOR 0
// #define DECODE_DAIKIN152 0
// #define SEND_DAIKIN152 0
// #define DECODE_MITSUBISHI136 0
// #define SEND_MITSUBISHI136 0
// #define DECODE_MITSUBISHI112 0
// #define SEND_MITSUBISHI112 0
// #define DECODE_HITACHI_AC424 0
// #define SEND_HITACHI_AC424 0
// #define DECODE_SONY_38K 0
// #define SEND_SONY_38K 0
// #define DECODE_EPSON 0
// #define SEND_EPSON 0
// #define DECODE_SYMPHONY 0
// #define SEND_SYMPHONY 0
// #define DECODE_HITACHI_AC3 0
// #define SEND_HITACHI_AC3 0
// #define DECODE_DAIKIN64 0
// #define SEND_DAIKIN64 0
// #define DECODE_AIRWELL 0
// #define SEND_AIRWELL 0
// #define DECODE_DELONGHI_AC 0
// #define SEND_DELONGHI_AC 0
// #define DECODE_DOSHISHA 0
// #define SEND_DOSHISHA 0
// #define DECODE_MULTIBRACKETS 0
// #define SEND_MULTIBRACKETS 0
// #define DECODE_CARRIER_AC40 0
// #define SEND_CARRIER_AC40 0
// #define DECODE_CARRIER_AC64 0
// #define SEND_CARRIER_AC64 0
// #define DECODE_HITACHI_AC344 0
// #define SEND_HITACHI_AC344 0
// #define DECODE_CORONA_AC 0
// #define SEND_CORONA_AC 0
// #define DECODE_MIDEA24 0
// #define SEND_MIDEA24 0
// #define DECODE_ZEPEAL 0
// #define SEND_ZEPEAL 0
// #define DECODE_SANYO_AC 0
// #define SEND_SANYO_AC 0
// #define DECODE_VOLTAS 0
// #define SEND_VOLTAS 0
// #define DECODE_METZ 0
// #define SEND_METZ 0
// #define DECODE_TRANSCOLD 0
// #define SEND_TRANSCOLD 0
// #define DECODE_TECHNIBEL_AC 0
// #define SEND_TECHNIBEL_AC 0
// #define DECODE_MIRAGE 0
// #define SEND_MIRAGE 0
// #define DECODE_ELITESCREENS 0
// #define SEND_ELITESCREENS 0
// #define DECODE_PANASONIC_AC32 0
// #define SEND_PANASONIC_AC32 0
// #define DECODE_MILESTAG2 0
// #define SEND_MILESTAG2 0
// #define DECODE_ECOCLIM 0
// #define SEND_ECOCLIM 0
// #define DECODE_XMP 0
// #define SEND_XMP 0
// #define DECODE_TRUMA 0
// #define SEND_TRUMA 0
// #define DECODE_HAIER_AC176 0
// #define SEND_HAIER_AC176 0
// #define DECODE_TEKNOPOINT 0
// #define SEND_TEKNOPOINT 0
// #define DECODE_KELON 0
// #define SEND_KELON 0
// #define DECODE_TROTEC_3550 0
// #define SEND_TROTEC_3550 0
// #define DECODE_SANYO_AC88 0
// #define SEND_SANYO_AC88 0
// #define DECODE_BOSE 0
// #define SEND_BOSE 0
// #define DECODE_ARRIS 0
// #define SEND_ARRIS 0
// #define DECODE_RHOSS 0
// #define SEND_RHOSS 0
// #define DECODE_AIRTON 0
// #define SEND_AIRTON 0
// #define DECODE_COOLIX48 0
// #define SEND_COOLIX48 0
// ATTENTION: DISABLE new devices from library version 2.8.2 and newer by default to save ESPEasy .bin size
// When extending this list: Add both the DECODE_ and SEND_ defines per new device!
// Version 2.8.2 added devices:
#define DECODE_HITACHI_AC264 0
#define SEND_HITACHI_AC264 0
#define DECODE_KELON168 0
#define SEND_KELON168 0
#define DECODE_HITACHI_AC296 0
#define SEND_HITACHI_AC296 0
#define DECODE_DAIKIN200 0
#define SEND_DAIKIN200 0
#define DECODE_HAIER_AC160 0
#define SEND_HAIER_AC160 0
#define DECODE_CARRIER_AC128 0
#define SEND_CARRIER_AC128 0
#define DECODE_TOTO 0
#define SEND_TOTO 0
#define DECODE_CLIMABUTLER 0
#define SEND_CLIMABUTLER 0
#define DECODE_TCL96AC 0
#define SEND_TCL96AC 0
#define DECODE_BOSCH144 0
#define SEND_BOSCH144 0
#define DECODE_SANYO_AC152 0
#define SEND_SANYO_AC152 0
#define DECODE_DAIKIN312 0
#define SEND_DAIKIN312 0
// Version 2.x.y added devices:
#endif // ifndef _CUSTOM_IR_H
+17
View File
@@ -0,0 +1,17 @@
Import("env")
import os
# Check for IR and IRext builds and use a Custom-IR.h file if available, uses Custom-IR-sample.h for defaults
pioenv = env['PIOENV']
# print("***** PIOENV: ",pioenv)
if "_IR_" in pioenv or "_IRext_" in pioenv:
if os.path.isfile('src/CustomIR.h'):
print("\n\u001b[35m *** CustomIR.h build detected. Create a clean build after changes to CustomIR.h *** \u001b[0m\n")
ir_defines=["-include src/CustomIR.h"]
env.Append(BUILD_FLAGS=ir_defines)
else:
if os.path.isfile('src/CustomIR-sample.h'):
print(" IR build detected. Using CustomIR-sample.h for defaults.")
ir_defines=["-include src/CustomIR-sample.h"] # Use as default settings
env.Append(BUILD_FLAGS=ir_defines)