platformio / platformio-core

Your Gateway to Embedded Software Development Excellence :alien:
https://platformio.org
Apache License 2.0
7.94k stars 792 forks source link

xdrv_05_irremote_full.ino:557:13: error: 'class IRsend' has no member named 'sendGC' irsend->sendGC(GC, count+1); #4314

Closed jpier123 closed 2 years ago

jpier123 commented 2 years ago

Configuration

Operating system: Tasmota

PlatformIO Version (platformio --version): PlatformIO Core, version 6.0.2

Description of problem

I'm faceing problem when compilig the BIN file with #define USE_IR_REMOTE_FULL parameter included in user_config_override.h. Terminal indicates problem inside xdrv_05_irremote_full.ino libary. Location:557:13: Error description: 'class IRsend' has no member named 'sendGC' irsend->sendGC(GC, count+1);

xdrv_05_irremote_full.ino libary potential source of the problem:

// // Send Global Cache commands // // Input: // p: token for strtok_r() // count: number of commas in parameters, i.e. it contains count+1 values // repeat: number of repeats (0 means no repeat) // uint32_t IrRemoteSendGC(char pp, uint32_t count, uint32_t repeat) { // IRsend gc,1000,2000,2000,1000 uint16_t GC[count+1]; for (uint32_t i = 0; i <= count; i++) { GC[i] = strtol(strtok_r(nullptr, ",", pp), nullptr, 0); if (!GC[i]) { return IE_INVALID_RAWDATA; } } if (!IR_RCV_WHILE_SENDING && (irrecv != nullptr)) { irrecv->disableIRIn(); } for (uint32_t r = 0; r <= repeat; r++) { irsend->sendGC(GC, count+1);** } if (!IR_RCV_WHILE_SENDING && (irrecv != nullptr)) { irrecv->enableIRIn(); } return IE_NO_ERROR; }

//

Steps to Reproduce

user_config_override.h edited with below:

define USE_IR_REMOTE_FULL // Support all IR protocols from IRremoteESP8266

Actual Results

/workspace/Tasmota/tasmota/xdrv_05_irremote_full.ino: In function 'uint32_t IrRemoteSendGC(char**, uint32_t, uint32_t)': /workspace/Tasmota/tasmota/xdrv_05_irremote_full.ino:557:13: error: 'class IRsend' has no member named 'sendGC' irsend->sendGC(GC, count+1); ^

Expected Results

If problems with PlatformIO Build System:

The content of platformio.ini:

; PlatformIO Project Configuration File
;
;   Build options: build flags, source filter, extra scripting
;   Upload options: custom port, speed and extra flags
;   Library options: dependencies, extra library storages
;
; Please visit documentation for the other options and examples
; http://docs.platformio.org/en/stable/projectconf.html
;
; *********************************************************************
; *** Selection of Tasmota build variant is done with VSC
; *** alternatively can be done in: platformio_override.ini
; *** See example: platformio_override_sample.ini
; *********************************************************************

[platformio]
description                 = Provide ESP8266 / ESP32 based devices with Web, MQTT and OTA firmware
src_dir                     = tasmota
lib_dir                     = lib/default
boards_dir                  = boards
build_cache_dir             = .cache
extra_configs               = platformio_tasmota32.ini
                              platformio_tasmota_env.ini
                              platformio_tasmota_env32.ini
                              platformio_override.ini
                              platformio_tasmota_cenv.ini

[common]
platform                    = ${core.platform}
platform_packages           = ${core.platform_packages}
framework                   = arduino
board                       = esp8266_1M
board_build.filesystem      = littlefs
custom_unpack_dir           = unpacked_littlefs
build_unflags               = ${core.build_unflags}
build_flags                 = ${core.build_flags}
monitor_speed               = 115200
monitor_port                = COM5
; *** Upload Serial reset method for Wemos and NodeMCU
upload_resetmethod          = nodemcu
upload_port                 = COM5
extra_scripts               = ${esp_defaults.extra_scripts}
lib_ldf_mode                = chain
lib_compat_mode             = strict
shared_libdeps_dir          = lib
lib_extra_dirs              =
                              lib/lib_basic
                              lib/lib_i2c
                              lib/lib_display
                              lib/lib_ssl
                              lib/lib_audio
                              lib/lib_rf
                              lib/lib_div

[tasmota]
; *** Settings here do NOT affect firmware building ***
; Uncomment if you do NOT want gzipped map file(s)
;disable_map_gz = 1
; Uncomment and specify a folder where to place the map file(s) (default set to folder build_output)
;map_dir = /tmp/map_files/
; Uncomment if you do NOT want additionally gzipped firmware file(s)
;disable_bin_gz = 1
; Uncomment and specify a folder where to place the firmware file(s) (default set to folder build_output)
;bin_dir = /tmp/bin_files/

[scripts_defaults]
extra_scripts               = pio-tools/strip-floats.py
                              pio-tools/name-firmware.py
                              pio-tools/gzip-firmware.py
                              pio-tools/override_copy.py
                              pio-tools/download_fs.py

[esp_defaults]
extra_scripts               = ${scripts_defaults.extra_scripts}
; *** remove undesired all warnings
build_unflags               = -Wall
;                              -mtarget-align
                              -Wdeprecated-declarations
build_flags                 = -DCORE_DEBUG_LEVEL=0
                              -Wl,-Map,firmware.map
                              -Wno-deprecated-declarations
;                              -mno-target-align
                              -mtarget-align
                              -free
                              -fipa-pta
                              -Wreturn-type
; *********************************************************************
; *** Use custom settings from file user_config_override.h
                              -DUSE_CONFIG_OVERRIDE
; *********************************************************************

[esp82xx_defaults]
build_flags                 = ${esp_defaults.build_flags}
                              -DNDEBUG
                              -DFP_IN_IROM
                              -DBEARSSL_SSL_BASIC
                              ; NONOSDK22x_190703 = 2.2.2-dev(38a443e)
                              -DPIO_FRAMEWORK_ARDUINO_ESPRESSIF_SDK22x_190703
                              -DPIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH_LOW_FLASH
                              ; VTABLES in Flash
                              -DVTABLES_IN_FLASH
                              ; remove the 4-bytes alignment for PSTR()
                              -DPSTR_ALIGN=1
                              ; restrict to minimal mime-types
                              -DMIMETYPE_MINIMAL
                              ; uncomment the following to enable TLS with 4096 RSA certificates
                              ;-DUSE_4K_RSA

[core]
; *** Esp8266 Tasmota modified Arduino core based on core 2.7.4. Added Backport for PWM selection
platform                    = https://github.com/tasmota/platform-espressif8266/releases/download/v2.7.4.9/platform-espressif8266-2.7.4.9.zip
platform_packages           =
build_unflags               = ${esp_defaults.build_unflags}
build_flags                 = ${esp82xx_defaults.build_flags}
; *** Use ONE of the two PWM variants. Tasmota default is Locked PWM
                              ;-DWAVEFORM_LOCKED_PHASE
                              -DWAVEFORM_LOCKED_PWM

Source file to reproduce issue:

/*
  user_config_override.h - user configuration overrides my_user_config.h for Tasmota

platformio run -e tasmota
*/

#ifndef _USER_CONFIG_OVERRIDE_H_
#define _USER_CONFIG_OVERRIDE_H_

#undef CODE_IMAGE_STR
//#define CODE_IMAGE_STR "Custom_Sensors&Display"
#define CODE_IMAGE_STR "Thermostat_Sensors_IR&Display"

#define USE_IR_REMOTE_FULL                     // Support all IR protocols from IRremoteESP8266
#define DECODE_AIRTON   false
#define DECODE_AIRWELL  false
#define DECODE_AIWA_RC_T501 false
#define DECODE_AMCOR    false
#define DECODE_ARGO false
#define DECODE_ARRIS    false
#define DECODE_BOSE false
#define DECODE_CARRIER_AC   false
#define DECODE_CARRIER_AC40 false
#define DECODE_CARRIER_AC64 false
#define DECODE_COOLIX   false
#define DECODE_COOLIX48 false
#define DECODE_CORONA_AC    false
#define DECODE_DAIKIN   false
#define DECODE_DAIKIN128    false
#define DECODE_DAIKIN152    false
#define DECODE_DAIKIN160    false
#define DECODE_DAIKIN176    false
#define DECODE_DAIKIN2  false
#define DECODE_DAIKIN216    false
#define DECODE_DAIKIN64 false
#define DECODE_DELONGHI_AC  false
#define DECODE_DENON    false
#define DECODE_DISH false
#define DECODE_DOSHISHA false
#define DECODE_ECOCLIM  false
#define DECODE_ELECTRA_AC   false
#define DECODE_ELITESCREENS false
#define DECODE_EPSON    false
#define DECODE_FUJITSU_AC   false
#define DECODE_GICABLE  false
#define DECODE_GLOBALCACHE  false
#define DECODE_GOODWEATHER  false
#define DECODE_GREE true
#define DECODE_HAIER_AC false
#define DECODE_HAIER_AC176  false
#define DECODE_HAIER_AC_YRW02   false
#define DECODE_HITACHI_AC   false
#define DECODE_HITACHI_AC1  false
#define DECODE_HITACHI_AC2  false
#define DECODE_HITACHI_AC264    false
#define DECODE_HITACHI_AC296    false
#define DECODE_HITACHI_AC3  false
#define DECODE_HITACHI_AC344    false
#define DECODE_HITACHI_AC424    false
#define DECODE_INAX false
#define DECODE_JVC  false
#define DECODE_KELON    false
#define DECODE_KELON168 false
#define DECODE_KELVINATOR   false
#define DECODE_LASERTAG false
#define DECODE_LEGOPF   false
#define DECODE_LG   false
#define DECODE_LUTRON   false
#define DECODE_MAGIQUEST    false
#define DECODE_METZ false
#define DECODE_MIDEA    false
#define DECODE_MIDEA24  false
#define DECODE_MILESTAG2    false
#define DECODE_MIRAGE   false
#define DECODE_MITSUBISHI   false
#define DECODE_MITSUBISHI112    false
#define DECODE_MITSUBISHI136    false
#define DECODE_MITSUBISHI2  false
#define DECODE_MITSUBISHIHEAVY  false
#define DECODE_MITSUBISHI_AC    false
#define DECODE_MULTIBRACKETS    false
#define DECODE_MWM  false
#define DECODE_NEC  false
#define DECODE_NEOCLIMA false
#define DECODE_NIKAI    false
#define DECODE_PANASONIC    false
#define DECODE_PANASONIC_AC false
#define DECODE_PANASONIC_AC32   false
#define DECODE_PIONEER  false
#define DECODE_PRONTO   false
#define DECODE_RAW  false
#define DECODE_RC5  false
#define DECODE_RC6  false
#define DECODE_RCMM false
#define DECODE_RHOSS    false
#define DECODE_SAMSUNG  false
#define DECODE_SAMSUNG36    false
#define DECODE_SAMSUNG_AC   false
#define DECODE_SANYO    false
#define DECODE_SANYO_AC false
#define DECODE_SANYO_AC88   false
#define DECODE_SHARP    false
#define DECODE_SHARP_AC false
#define DECODE_SHERWOOD false
#define DECODE_SONY false
#define DECODE_SYMPHONY false
#define DECODE_TCL112AC false
#define DECODE_TECHNIBEL_AC false
#define DECODE_TECO false
#define DECODE_TEKNOPOINT   false
#define DECODE_TOSHIBA_AC   false
#define DECODE_TRANSCOLD    false
#define DECODE_TROTEC   false
#define DECODE_TROTEC_3550  false
#define DECODE_TRUMA    false
#define DECODE_VESTEL_AC    false
#define DECODE_VOLTAS   false
#define DECODE_WHIRLPOOL_AC false
#define DECODE_WHYNTER  false
#define DECODE_XMP  false
#define DECODE_ZEPEAL   false

#define SEND_AIRTON false
#define SEND_AIRWELL    false
#define SEND_AIWA_RC_T501   false
#define SEND_AMCOR  false
#define SEND_ARGO   false
#define SEND_ARRIS  false
#define SEND_BOSE   false
#define SEND_CARRIER_AC false
#define SEND_CARRIER_AC40   false
#define SEND_CARRIER_AC64   false
#define SEND_COOLIX false
#define SEND_COOLIX48   false
#define SEND_CORONA_AC  false
#define SEND_DAIKIN false
#define SEND_DAIKIN128  false
#define SEND_DAIKIN152  false
#define SEND_DAIKIN160  false
#define SEND_DAIKIN176  false
#define SEND_DAIKIN2    false
#define SEND_DAIKIN216  false
#define SEND_DAIKIN64   false
#define SEND_DELONGHI_AC    false
#define SEND_DENON  false
#define SEND_DISH   false
#define SEND_DOSHISHA   false
#define SEND_ECOCLIM    false
#define SEND_ELECTRA_AC false
#define SEND_ELITESCREENS   false
#define SEND_EPSON  false
#define SEND_FUJITSU_AC false
#define SEND_GICABLE    false
#define SEND_GLOBALCACHE    false
#define SEND_GOODWEATHER    false
#define SEND_GREE   true
#define SEND_HAIER_AC   false
#define SEND_HAIER_AC176    false
#define SEND_HAIER_AC_YRW02 false
#define SEND_HITACHI_AC false
#define SEND_HITACHI_AC1    false
#define SEND_HITACHI_AC2    false
#define SEND_HITACHI_AC264  false
#define SEND_HITACHI_AC296  false
#define SEND_HITACHI_AC3    false
#define SEND_HITACHI_AC344  false
#define SEND_HITACHI_AC424  false
#define SEND_INAX   false
#define SEND_JVC    false
#define SEND_KELON  false
#define SEND_KELON168   false
#define SEND_KELVINATOR false
#define SEND_LASERTAG   false
#define SEND_LEGOPF false
#define SEND_LG false
#define SEND_LUTRON false
#define SEND_MAGIQUEST  false
#define SEND_METZ   false
#define SEND_MIDEA  false
#define SEND_MIDEA24    false
#define SEND_MILESTAG2  false
#define SEND_MIRAGE false
#define SEND_MITSUBISHI false
#define SEND_MITSUBISHI112  false
#define SEND_MITSUBISHI136  false
#define SEND_MITSUBISHI2    false
#define SEND_MITSUBISHIHEAVY    false
#define SEND_MITSUBISHI_AC  false
#define SEND_MULTIBRACKETS  false
#define SEND_MWM    false
#define SEND_NEC    false
#define SEND_NEOCLIMA   false
#define SEND_NIKAI  false
#define SEND_PANASONIC  false
#define SEND_PANASONIC_AC   false
#define SEND_PANASONIC_AC32 false
#define SEND_PIONEER    false
#define SEND_PRONTO false
#define SEND_RAW    false
#define SEND_RC5    false
#define SEND_RC6    false
#define SEND_RCMM   false
#define SEND_RHOSS  false
#define SEND_SAMSUNG    false
#define SEND_SAMSUNG36  false
#define SEND_SAMSUNG_AC false
#define SEND_SANYO  false
#define SEND_SANYO_AC   false
#define SEND_SANYO_AC88 false
#define SEND_SHARP  false
#define SEND_SHARP_AC   false
#define SEND_SHERWOOD   false
#define SEND_SONY   false
#define SEND_SYMPHONY   false
#define SEND_TCL112AC   false
#define SEND_TECHNIBEL_AC   false
#define SEND_TECO   false
#define SEND_TEKNOPOINT false
#define SEND_TOSHIBA_AC false
#define SEND_TRANSCOLD  false
#define SEND_TROTEC false
#define SEND_TROTEC_3550    false
#define SEND_TRUMA  false
#define SEND_VESTEL_AC  false
#define SEND_VOLTAS false
#define SEND_WHIRLPOOL_AC   false
#define SEND_WHYNTER    false
#define SEND_XMP    false
#define SEND_ZEPEAL false

/*****************************************************************************************************\
 * USAGE:
 *   To modify the stock configuration without changing the my_user_config.h file:
 *   (1) copy this file to "user_config_override.h" (It will be ignored by Git)
 *   (2) define your own settings below
 *
 ******************************************************************************************************
 * ATTENTION:
 *   - Changes to SECTION1 PARAMETER defines will only override flash settings if you change define CFG_HOLDER.
 *   - Expect compiler warnings when no ifdef/undef/endif sequence is used.
 *   - You still need to update my_user_config.h for major define USE_MQTT_TLS.
 *   - All parameters can be persistent changed online using commands via MQTT, WebConsole or Serial.
\*****************************************************************************************************/

/*
Examples :

// -- Master parameter control --------------------
#undef  CFG_HOLDER
#define CFG_HOLDER        4617                   // [Reset 1] Change this value to load SECTION1 configuration parameters to flash

// -- Setup your own Wifi settings  ---------------
#undef  STA_SSID1
#define STA_SSID1         "YourSSID"             // [Ssid1] Wifi SSID

#undef  STA_PASS1
#define STA_PASS1         "YourWifiPassword"     // [Password1] Wifi password

// -- Setup your own MQTT settings  ---------------
#undef  MQTT_HOST
#define MQTT_HOST         "your-mqtt-server.com" // [MqttHost]

#undef  MQTT_PORT
#define MQTT_PORT         1883                   // [MqttPort] MQTT port (10123 on CloudMQTT)

#undef  MQTT_USER
#define MQTT_USER         "YourMqttUser"         // [MqttUser] Optional user

#undef  MQTT_PASS
#define MQTT_PASS         "YourMqttPass"         // [MqttPassword] Optional password

// You might even pass some parameters from the command line ----------------------------
// Ie:  export PLATFORMIO_BUILD_FLAGS='-DUSE_CONFIG_OVERRIDE -DMY_IP="192.168.1.99" -DMY_GW="192.168.1.1" -DMY_DNS="192.168.1.1"'

#ifdef MY_IP
#undef  WIFI_IP_ADDRESS
#define WIFI_IP_ADDRESS     MY_IP                // Set to 0.0.0.0 for using DHCP or enter a static IP address
#endif

#ifdef MY_GW
#undef  WIFI_GATEWAY
#define WIFI_GATEWAY        MY_GW                // if not using DHCP set Gateway IP address
#endif

#ifdef MY_DNS
#undef  WIFI_DNS
#define WIFI_DNS            MY_DNS               // If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)
#endif

#ifdef MY_DNS2
#undef  WIFI_DNS2
#define WIFI_DNS2           MY_DNS2              // If not using DHCP set DNS IP address (might be equal to WIFI_GATEWAY)
#endif

// !!! Remember that your changes GOES AT THE BOTTOM OF THIS FILE right before the last #endif !!!
*/

#endif  // _USER_CONFIG_OVERRIDE_H_

Additional info

The cache is cleared all the time with:

pio run -t clean
pio system prune
rm -r .pio
rm -r .cache
ivankravets commented 2 years ago

See https://docs.platformio.org/en/latest/faq/ino-to-cpp.html