diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 2c987308c..72d1ed9b5 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -66,19 +66,24 @@ Module | Description 42 Zengge WF017 | Zengge WF017 Wifi RGB(W) Led Controller 43 Sonoff Pow R2 | Sonoff Pow R2 Wifi Smart Switch with Energy Monitoring 44 Sonoff iFan02 | Sonoff iFan02 Wifi Smart Ceiling Fan with Light -45 BlitzWolf SHP2 | BlitzWolf BW-SHP2, BW-SHP6, HomeCube SP1, Gosund SP111 Wifi Smart Switch with Energy Monitoring +45 BlitzWolf SHP | BlitzWolf BW-SHP2, BW-SHP6, HomeCube SP1, Gosund SP111, Teckin SP22 Wifi Smart Switch with Energy Monitoring 46 Shelly 1 | Shelly 1 Open Source Wifi Relay Module 47 Shelly 2 | Shelly 2 Wifi 2-gang Relay Module with Energy Monitoring 48 Xiaomi Philips | Xiaomi Philips Wifi WW Led Bulb 49 Neo Coolcam | Neo Coolcam Wifi Smart Socket 50 ESP Switch | ESP Switch 4-gang Wifi Switch with Leds 51 OBI Socket | OBI Wifi Smart Socket -52 Teckin | Teckin SP20, SP22 Wifi Smart Switch with Energy Monitoring +52 Teckin | Teckin SP20 Wifi Smart Switch with Energy Monitoring 53 AplicWDP303075 | Aplic WDP 303075 CSL Wifi Smart Switch with Energy Monitoring 54 Tuya Dimmer | MIUO (and other Tuya based) Wifi Dimmer for Incandescent Lights and Led +55 Gosund SP1 v23 | Gosund SP1 v2.3 Wifi Smart Switch with Energy Monitoring +56 ARMTR Dimmer | ARMtronix Wifi dimmer for Incandescent Lights and Led +57 SK03 Outdoor | SK03 Outdoor Wifi Smart Switch with Energy Monitoring +58 PS-16-DZ | PS-16-DZ Wifi dimmer for Incandescent Lights and Led +59 Teckin US | Teckin US and ZooZee SA102 Wifi Smart Switch with Energy Monitoring ## Provided Binary Downloads -The following binary downloads have been compiled with ESP8266/Arduino library version **2.3.0** +The following binary downloads have been compiled with ESP8266/Arduino library core version **2.4.2** patched with the Alexa fix. - **sonoff-minimal.bin** = The Minimal version allows intermediate OTA uploads to support larger versions and does NOT change any persistent parameter. This version **should NOT be used for initial installation**. - **sonoff-classic.bin** = The Classic version allows **initial installation** using either WifiManager, Wps or SmartConfig. @@ -88,14 +93,12 @@ The following binary downloads have been compiled with ESP8266/Arduino library v - **sonoff-display.bin** = The Display version without Wps and SmartConfig configuration but adds display support. - **sonoff-knx.bin** = The Knx version without Wps and SmartConfig configuration and some other features but adds KNX support. -See [Tasmota ESP/Arduino library version related issues](https://github.com/arendst/Sonoff-Tasmota/wiki/Theo's-Tasmota-Tips#20180523---relation-tasmota-and-esp8266arduino-core-version) why these files are still released using ESP/Arduino library version v2.3.0. - ### Available Features and Sensors | Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | Remarks |--------------------------------|---------|-------|---------|--------|------|---------|-------- | ESP/Arduino lib v2.3.0 | 343k | 425k | 484k | 490k | 508k | 517k | -| ESP/Arduino lib v2.4.2 | 372k | 451k | 497k | 517k | 533k | 541k | No sleep +| ESP/Arduino lib v2.4.2 | 371k | 449k | 510k | 522k | 538k | 549k | | | | | | | | | | MY_LANGUAGE en-GB | x | x | x | x | x | x | | MQTT_LIBRARY_TYPE PUBSUBCLIENT | x | x | x | x | x | x | @@ -145,6 +148,7 @@ See [Tasmota ESP/Arduino library version related issues](https://github.com/aren | USE_CCS811 | - | - | - | - | - | - | | USE_MPU6050 | - | - | - | - | - | - | | USE_DS3231 | - | - | - | - | - | - | +| USE_MGC3130 | - | - | - | - | - | - | | | | | | | | | | Feature or Sensor | minimal | basic | classic | sonoff | knx | sensors | | USE_SPI | - | - | - | - | - | - | @@ -173,94 +177,67 @@ See [Tasmota ESP/Arduino library version related issues](https://github.com/aren | USE_RF_FLASH | - | - | - | x | x | x | | USE_TX20_WIND_SENSOR | - | - | - | x | x | x | | USE_RC_SWITCH | - | - | - | x | x | x | +| USE_RF_SENSOR | - | - | - | - | - | - | | USE_DISPLAY | - | - | - | - | - | - | ## Changelog -Version 6.3.0 20181030 - * Change web Configure Module GPIO drop down list order for better readability - * Change status JSON message providing more switch and retain information - * Change xsns_17_senseair.ino to use TasmotaModbus library - * Change MCP230xx driver - * Change PubSubClient Mqtt library to non-blocking EspEasy version - * Change energy monitoring using energy sensor driver modules - * Change Webserver page handler for easier extension (thx to Adrian Scillato) - * Change pinmode for no-pullup defined switches to pullup when configured as switchmode PUSHBUTTON (=3 and up) (#3896) - * Change default OTA Url to http://thehackbox.org/tasmota/release/sonoff.bin (#4170) - * Remove support for MQTT Client esp-mqtt-arduino by #define MQTT_LIBRARY_TYPE MQTT_ESPMQTTARDUINO - * Remove commands PowerCal, VoltageCal and CurrentCal as more functionality is provided by commands PowerSet, VoltageSet and CurrentSet - * Remove restart after ntpserver change and force NTP re-sync (#3890) - * Fix showing Period Power in energy threshold messages - * Fix header file execution order by renaming user_config.h to my_user_config.h - * Fix some TSL2561 driver issues (#3681) - * Fix KNX PA exception. Regression from 6.2.1 buffer overflow caused by subStr() (#3700, #3710) - * Fix setting and getting color temperature for Philips Hue emulation (#3733) - * Fix ButtonRetain to not use default topic for clearing retain messages (#3737) - * Fix syslog when emulation is selected (#2109, #3784) - * Fix rule trigger POWER1#STATE execution after restart and SetOption0 is 0 (#3856) - * Fix Home Assistant forced light discovery (#3908) - * Fix invalid configuration restores and decode_config.py crc error when savedata = 0 (#3918) - * Fix timer offset -00:00 causing 12:00 hour offset (#3923) - * Fix I2CScan invalid JSON error message (#3925) - * Fix exception when wrong Domoticz JSON message is received (#3963) - * Fix Sonoff Bridge RfRaw receive (#4080, #4085) - * Fix possible wifi connection error (#4044, #4083) - * Fix invalid JSON floating point result from nan (Not a Number) and inf (Infinity) into null (#4147) - * Fix rule mqtt#connected trigger when mqtt is disabled (#4149) - * Add support for LCD, Matrix, TFT and Oled displays - * Add support for Neo Coolcam Wifi Smart Power Plug - * Add support for Michael Haustein ESP Switch - * Add support for MQTT Client based on lwmqtt to be selected by #define MQTT_LIBRARY_TYPE MQTT_ARDUINOMQTT - * Add support for Neo Coolcam Wifi Smart Power Plug - * Add support for Michael Haustein ESP Switch - * Add support for MQTT Client based on lwmqtt to be selected by #define MQTT_LIBRARY_TYPE MQTT_ARDUINOMQTT - * Add support for DS3231 Real Time Clock - * Add support for HX711 Load Cell with optional web GUI scale interface to demonstrate easy GUI plug-in - * Add support for serial 8N2 communication to TasmotaModbus and TasmotaSerial libraries - * Add support for RF transceiving using library RcSwitch (#2702) - * Add support for Shelly 1 and Shelly 2 (#2789) - * Add support for La Crosse TX20 Anemometer (#2654, #3146) - * Add support for MP3 player using DFRobot RB-DFR-562 (#3723) - * Add Support for Xiaomi-Philips Bulbs (#3787) - * Add support for PCA9685 12bit 16pin hardware PWM driver (#3866) - * Add support for EXS Relay V5.0 (#3810) - * Add support for OBI Power Socket (#1988, #3944) - * Add support for Teckin Power Socket with Energy Monitoring (#3950) - * Add support for Pzem-003/017 DC Energy monitoring module (#3694) - * Add support for Pzem-014/016 AC Energy monitoring module (#3694) - * Add support for CSL Aplic WDP 303075 Power Socket with Energy Monitoring (#3991, #3996) - * Add support for Tuya Dimmer (#469, #4075) - * Add command Display to show all settings at once - * Add command SerialSend5 to send raw serial data like "A5074100545293" - * Add command WebRefresh 1000..10000 to control web page refresh in milliseconds. Default is 2345 - * Add command WeightRes 0..3 to control display of decimals for kilogram - * Add command RGBWWTable to support color calibration (#3933) - * Add command Reset 4 (reset to defaults but keep wifi params) and Reset 5 (as reset 4 and also erase flash) (#4061) - * Add command SetOption35 0..255 (seconds) to delay mDNS initialization to control possible Wifi connect problems - * Add command SetOption52 0/1 to control display of optional time offset from UTC in JSON messages (#3629, #3711) - * Add command SetOption53 0/1 to toggle gui display of Hostname and IP address (#1006, #2091) - * Add authentication to HTTP web pages - * Add decimals as input to commands PowerSet, VoltageSet and CurrentSet - * Add tools/decode-config.py by Norbert Richter to decode configuration data. See file for information - * Add define USE_DISPLAYS for selecting image sonoff-display - * Add define USE_BASIC for selecting image sonoff-basic without most sensors - * Add auto reload of main web page to some web restarts - * Add TasmotaModbus library as very basic modbus wrapper for TasmotaSerial - * Add more API callbacks and document API.md - * Add Apparent Power and Reactive Power to Energy Monitoring devices (#251) - * Add token %hostname% to command FullTopic (#3018) - * Add Wifi channel number to state message (#3664) - * Add user configurable GPIO02 and GPIO03 on H801 devices (#3692) - * Add toggle function RGBW lights (#3695, #3697) - * Add network information to display start screen (#3704) - * Add sleep to Nova Fitness SDS01X sensor (#2841, #3724, #3749) - * Add Analog input AD0 enabled to sonoff-sensors.bin (#3756, #3757) - * Add power value below 5W to Sonoff Pow R2 and S31 (#3745) - * Add RF Receiver control to module MagicHome to be used on Arilux LC10 (#3792) - * Add userid/password option to decode-status.py (#3796) - * Add delay after restart before processing rule sensor data (#3811) - * Add force_update to Home Assistant discovery (#3873) - * Add rule triggers SWITCH1#BOOT and POWER1#BOOT (#3904, #3910) - * Add Hebrew language file (#3960) - * Add TotalStartTime to Energy JSON message (#3971) - * Add whitespace removal from RfRaw and SerialSend5 (#4020) - * Add support for two BMP/BME sensors (#4195) +Version 6.4.0 20181217 + * Change GUI Configure Module by using AJAX for data fetch to cut page size (and memory use) by 40%. + In case of web page errors clear your browser cache or do Page Reload (F5 or Ctrl+R) + * Change enforcing flashmode dout but it is still mandatory + * Change bootcount update (being first) flash write to 10 seconds after restart + * Change display and epaper drivers + * Change command WebSend Host header field from IP address to hostname (#4331) + * Change log buffer size from 512 to 520 to accommodate http sensor data (#4354) + * Change default WIFI_CONFIG_TOOL from WIFI_WAIT to WIFI_RETRY in my_user_config.h (#4400) + * Change webgui refresh time delay for Save Settings and local OTA Upload (#4423) + * Change SR-04 driver to use NewPing library (#4488) + * Change MCP230xx driver to support interrupt retention over teleperiod (#4547) + * Change support for MPU6050 using DMP (#4581) + * Fix unintended function overload of WifiState + * Fix wifi connection errors using wifi disconnect and ESP.reset instead of ESP.restart + * Fix Sonoff Pow R2 and Sonoff S31 Serial interface hang caused by Sonoff Basic R2 driver delay implementation (and possibly core bug) + * Fix MQTT connection error after restart + * Fix wifi re-scan connection baseline + * Fix possible strncat buffer overflows + * Fix intermittent Pzem sensor energy overflow calculation error + * Fix shelly2 ghost switching caused by lack of pull-up inputs (#4255) + * Fix hardware serial pin configuration. To keep using hardware serial swap current Rx/Tx pin configuration only (#4280) + * Fix MqttRetry values above 255 seconds (#4424) + * Fix WifiManager functionality on initial installation (#4433) + * Fix ArduinoOTA for Core 2.5.0 (#4620) + * Add minutes to commands Timezone to allow all possible world timezones + * Add more strict checks for GPIO selections + * Add code image and optional commit number to version + * Add dynamic delay to main loop providing time for wifi background tasks + * Add additional start-up delay during initial wifi connection + * Add support for decoding Theo V2 sensors as documented on https://sidweb.nl using 434MHz RF sensor receiver + * Add support for decoding Alecto V2 sensors like ACH2010, WS3000 and DKW2012 weather stations using 868MHz RF sensor receiver + * Add user definition of defines WIFI_RSSI_THRESHOLD (default 10) and WIFI_RESCAN_MINUTES (default 44) + * Add command SetOption58 0/1 to enable IR raw data info in JSON message (#2116) + * Add command IRSend \|0,\,\,.. to allow raw data transmission (#2116) + * Add command SetOption56 0/1 to enable wifi network scan and select highest RSSI (#3173) + * Add command SetOption57 0/1 to enable wifi network re-scan every 44 minutes with a rssi threshold of 10 to select highest RSSI (#3173) + * Add default sleep 1 to sonoff-basic to lower energy consumption (#4217) + * Add wifi status to Tuya (#4221) + * Add delays to reduce CPU usage at boot time (#4233) + * Add command SetOption24 0/1 to select pressure unit as hPa or mmHg (#4241) + * Add optional hardware serial when GPIO13(Rx) and GPIO15(Tx) are selected removing hardware serial from GPIO01(Tx) and GPIO03(Rx) (#4288) + * Add support for Gosund SP1 v2.3 Power Socket with Energy Monitoring (#4297) + * Add support for Armtronix dimmers. See wiki for info (#4321) + * Add to command WebSend option to send a direct path when command starts with a slash (#4329) + * Add support for LG HVac and IrRemote (#4377) + * Add initial support for Hass sensor discovery (#4380) + * Add support for Fujitsu HVac and IrRemote (#4387) + * Add support for I2C MGC3130 Electric Field Effect sensor by Christian Baars (#3774, #4404) + * Add command CalcRes to set number of decimals (0 - 7) used in commands ADD, SUB, MULT and SCALE (#4420) + * Add CPU average load to state message (#4431) + * Add command SetOption59 0/1 to change state topic from tele/STATE to stat/RESULT (#4450) + * Add support for SM Smart Wifi Dimmer PS-16-DZ (#4465) + * Add support for Teckin US Power Socket with Energy Monitoring (#4481) + * Add command SetOption60 0/1 to select dynamic sleep (0) or sleep (1) (#4497) + * Add support for iFan02 Fanspeed in Domoticz using a selector (#4517) + * Add support for GPIO02 for newer Sonoff Basic (#4518) + * Add Announce Switches to MQTT Discovery (#4531) + * Add support for SDM220 (#3610) + * Add support for Manzoku Power Strip (#4590) diff --git a/arduino/version 2.4.0/boards.txt b/arduino/version 2.4.0/boards.txt deleted file mode 100644 index 1f6d47cc6..000000000 --- a/arduino/version 2.4.0/boards.txt +++ /dev/null @@ -1,3341 +0,0 @@ -# -# this file is script-generated and is likely to be overwritten by ./tools/boards.txt.py -# - -menu.BoardModel=Model -menu.UploadSpeed=Upload Speed -menu.UploadTool=Upload Using -menu.CpuFrequency=CPU Frequency -menu.CrystalFreq=Crystal Frequency -menu.FlashSize=Flash Size -menu.FlashMode=Flash Mode -menu.FlashFreq=Flash Frequency -menu.ResetMethod=Reset Method -menu.ESPModule=Module -menu.Debug=Debug port -menu.DebugLevel=Debug Level -menu.LwIPVariant=lwIP Variant -menu.led=Builtin Led - -############################################################## -generic.name=Generic ESP8266 Module -generic.build.board=ESP8266_GENERIC -generic.upload.tool=esptool -generic.upload.maximum_data_size=81920 -generic.upload.wait_for_upload_port=true -generic.serial.disableDTR=true -generic.serial.disableRTS=true -generic.build.mcu=esp8266 -generic.build.core=esp8266 -generic.build.variant=generic -generic.build.spiffs_pagesize=256 -generic.build.debug_port= -generic.build.debug_level= - -generic.menu.UploadTool.esptool=Serial -generic.menu.UploadTool.esptool.upload.tool=esptool -generic.menu.UploadTool.esptool.upload.verbose=-vv -generic.menu.UploadTool.espupload=OTA_upload -generic.menu.UploadTool.espupload.upload.tool=espupload - -generic.menu.CpuFrequency.80=80 MHz -generic.menu.CpuFrequency.80.build.f_cpu=80000000L -generic.menu.CpuFrequency.160=160 MHz -generic.menu.CpuFrequency.160.build.f_cpu=160000000L -generic.menu.ResetMethod.ck=ck -generic.menu.ResetMethod.ck.upload.resetmethod=ck -generic.menu.ResetMethod.nodemcu=nodemcu -generic.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -generic.menu.CrystalFreq.26=26 MHz -generic.menu.CrystalFreq.40=40 MHz -generic.menu.CrystalFreq.40.build.extra_flags=-DF_CRYSTAL=40000000 -DESP8266 -generic.menu.FlashFreq.40=40MHz -generic.menu.FlashFreq.40.build.flash_freq=40 -generic.menu.FlashFreq.80=80MHz -generic.menu.FlashFreq.80.build.flash_freq=80 -generic.menu.FlashMode.qio=QIO -generic.menu.FlashMode.qio.build.flash_mode=qio -generic.menu.FlashMode.qout=QOUT -generic.menu.FlashMode.qout.build.flash_mode=qout -generic.menu.FlashMode.dio=DIO -generic.menu.FlashMode.dio.build.flash_mode=dio -generic.menu.FlashMode.dout=DOUT -generic.menu.FlashMode.dout.build.flash_mode=dout -generic.menu.FlashSize.512K0=512K (no SPIFFS) -generic.menu.FlashSize.512K0.build.flash_size=512K -generic.menu.FlashSize.512K0.build.flash_ld=eagle.flash.512k0.ld -generic.menu.FlashSize.512K0.build.spiffs_pagesize=256 -generic.menu.FlashSize.512K0.upload.maximum_size=499696 -generic.menu.FlashSize.512K64=512K (64K SPIFFS) -generic.menu.FlashSize.512K64.build.flash_size=512K -generic.menu.FlashSize.512K64.build.flash_ld=eagle.flash.512k64.ld -generic.menu.FlashSize.512K64.build.spiffs_pagesize=256 -generic.menu.FlashSize.512K64.upload.maximum_size=434160 -generic.menu.FlashSize.512K64.build.spiffs_start=0x6B000 -generic.menu.FlashSize.512K64.build.spiffs_end=0x7B000 -generic.menu.FlashSize.512K64.build.spiffs_blocksize=4096 -generic.menu.FlashSize.512K128=512K (128K SPIFFS) -generic.menu.FlashSize.512K128.build.flash_size=512K -generic.menu.FlashSize.512K128.build.flash_ld=eagle.flash.512k128.ld -generic.menu.FlashSize.512K128.build.spiffs_pagesize=256 -generic.menu.FlashSize.512K128.upload.maximum_size=368624 -generic.menu.FlashSize.512K128.build.spiffs_start=0x5B000 -generic.menu.FlashSize.512K128.build.spiffs_end=0x7B000 -generic.menu.FlashSize.512K128.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M0=1M (no SPIFFS) -generic.menu.FlashSize.1M0.build.flash_size=1M -generic.menu.FlashSize.1M0.build.flash_ld=eagle.flash.1m0.ld -generic.menu.FlashSize.1M0.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M0.upload.maximum_size=1023984 -generic.menu.FlashSize.1M64=1M (64K SPIFFS) -generic.menu.FlashSize.1M64.build.flash_size=1M -generic.menu.FlashSize.1M64.build.flash_ld=eagle.flash.1m64.ld -generic.menu.FlashSize.1M64.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M64.upload.maximum_size=958448 -generic.menu.FlashSize.1M64.build.spiffs_start=0xEB000 -generic.menu.FlashSize.1M64.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M64.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M128=1M (128K SPIFFS) -generic.menu.FlashSize.1M128.build.flash_size=1M -generic.menu.FlashSize.1M128.build.flash_ld=eagle.flash.1m128.ld -generic.menu.FlashSize.1M128.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M128.upload.maximum_size=892912 -generic.menu.FlashSize.1M128.build.spiffs_start=0xDB000 -generic.menu.FlashSize.1M128.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M128.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M144=1M (144K SPIFFS) -generic.menu.FlashSize.1M144.build.flash_size=1M -generic.menu.FlashSize.1M144.build.flash_ld=eagle.flash.1m144.ld -generic.menu.FlashSize.1M144.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M144.upload.maximum_size=876528 -generic.menu.FlashSize.1M144.build.spiffs_start=0xD7000 -generic.menu.FlashSize.1M144.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M144.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M160=1M (160K SPIFFS) -generic.menu.FlashSize.1M160.build.flash_size=1M -generic.menu.FlashSize.1M160.build.flash_ld=eagle.flash.1m160.ld -generic.menu.FlashSize.1M160.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M160.upload.maximum_size=860144 -generic.menu.FlashSize.1M160.build.spiffs_start=0xD3000 -generic.menu.FlashSize.1M160.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M160.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M192=1M (192K SPIFFS) -generic.menu.FlashSize.1M192.build.flash_size=1M -generic.menu.FlashSize.1M192.build.flash_ld=eagle.flash.1m192.ld -generic.menu.FlashSize.1M192.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M192.upload.maximum_size=827376 -generic.menu.FlashSize.1M192.build.spiffs_start=0xCB000 -generic.menu.FlashSize.1M192.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M192.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M256=1M (256K SPIFFS) -generic.menu.FlashSize.1M256.build.flash_size=1M -generic.menu.FlashSize.1M256.build.flash_ld=eagle.flash.1m256.ld -generic.menu.FlashSize.1M256.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M256.upload.maximum_size=761840 -generic.menu.FlashSize.1M256.build.spiffs_start=0xBB000 -generic.menu.FlashSize.1M256.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M256.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M512=1M (512K SPIFFS) -generic.menu.FlashSize.1M512.build.flash_size=1M -generic.menu.FlashSize.1M512.build.flash_ld=eagle.flash.1m512.ld -generic.menu.FlashSize.1M512.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M512.upload.maximum_size=499696 -generic.menu.FlashSize.1M512.build.spiffs_start=0x7B000 -generic.menu.FlashSize.1M512.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M512.build.spiffs_blocksize=8192 -generic.menu.FlashSize.2M=2M (1M SPIFFS) -generic.menu.FlashSize.2M.build.flash_size=2M -generic.menu.FlashSize.2M.build.flash_ld=eagle.flash.2m.ld -generic.menu.FlashSize.2M.build.spiffs_pagesize=256 -generic.menu.FlashSize.2M.upload.maximum_size=1044464 -generic.menu.FlashSize.2M.build.spiffs_start=0x100000 -generic.menu.FlashSize.2M.build.spiffs_end=0x1FB000 -generic.menu.FlashSize.2M.build.spiffs_blocksize=8192 -generic.menu.FlashSize.4M1M=4M (1M SPIFFS) -generic.menu.FlashSize.4M1M.build.flash_size=4M -generic.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -generic.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -generic.menu.FlashSize.4M1M.upload.maximum_size=1044464 -generic.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -generic.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -generic.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -generic.menu.FlashSize.4M3M=4M (3M SPIFFS) -generic.menu.FlashSize.4M3M.build.flash_size=4M -generic.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -generic.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -generic.menu.FlashSize.4M3M.upload.maximum_size=1044464 -generic.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -generic.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -generic.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -generic.menu.FlashSize.8M7M=8M (7M SPIFFS) -generic.menu.FlashSize.8M7M.build.flash_size=8M -generic.menu.FlashSize.8M7M.build.flash_ld=eagle.flash.8m.ld -generic.menu.FlashSize.8M7M.build.spiffs_pagesize=256 -generic.menu.FlashSize.8M7M.upload.maximum_size=1044464 -generic.menu.FlashSize.8M7M.build.spiffs_start=0x100000 -generic.menu.FlashSize.8M7M.build.spiffs_end=0x7FB000 -generic.menu.FlashSize.8M7M.build.spiffs_blocksize=8192 -generic.menu.FlashSize.16M15M=16M (15M SPIFFS) -generic.menu.FlashSize.16M15M.build.flash_size=16M -generic.menu.FlashSize.16M15M.build.flash_ld=eagle.flash.16m.ld -generic.menu.FlashSize.16M15M.build.spiffs_pagesize=256 -generic.menu.FlashSize.16M15M.upload.maximum_size=1044464 -generic.menu.FlashSize.16M15M.build.spiffs_start=0x100000 -generic.menu.FlashSize.16M15M.build.spiffs_end=0xFFB000 -generic.menu.FlashSize.16M15M.build.spiffs_blocksize=8192 -generic.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -generic.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -generic.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -generic.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -generic.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -generic.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -generic.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -generic.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -generic.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -generic.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -generic.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -generic.menu.LwIPVariant.OpenSource=v1.4 Open Source -generic.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -generic.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -generic.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -generic.menu.Debug.Disabled=Disabled -generic.menu.Debug.Disabled.build.debug_port= -generic.menu.Debug.Serial=Serial -generic.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -generic.menu.Debug.Serial1=Serial1 -generic.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -generic.menu.DebugLevel.None____=None -generic.menu.DebugLevel.None____.build.debug_level= -generic.menu.DebugLevel.SSL=SSL -generic.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -generic.menu.DebugLevel.TLS_MEM=TLS_MEM -generic.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -generic.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -generic.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -generic.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -generic.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -generic.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -generic.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -generic.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -generic.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -generic.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -generic.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -generic.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -generic.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -generic.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -generic.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -generic.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -generic.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -generic.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.CORE=CORE -generic.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -generic.menu.DebugLevel.WIFI=WIFI -generic.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -generic.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -generic.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -generic.menu.DebugLevel.UPDATER=UPDATER -generic.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -generic.menu.DebugLevel.OTA=OTA -generic.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -generic.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -generic.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -generic.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -generic.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -generic.menu.UploadSpeed.115200=115200 -generic.menu.UploadSpeed.115200.upload.speed=115200 -generic.menu.UploadSpeed.9600=9600 -generic.menu.UploadSpeed.9600.upload.speed=9600 -generic.menu.UploadSpeed.57600=57600 -generic.menu.UploadSpeed.57600.upload.speed=57600 -generic.menu.UploadSpeed.230400.linux=230400 -generic.menu.UploadSpeed.230400.macosx=230400 -generic.menu.UploadSpeed.230400.upload.speed=230400 -generic.menu.UploadSpeed.256000.windows=256000 -generic.menu.UploadSpeed.256000.upload.speed=256000 -generic.menu.UploadSpeed.460800.linux=460800 -generic.menu.UploadSpeed.460800.macosx=460800 -generic.menu.UploadSpeed.460800.upload.speed=460800 -generic.menu.UploadSpeed.512000.windows=512000 -generic.menu.UploadSpeed.512000.upload.speed=512000 -generic.menu.UploadSpeed.921600=921600 -generic.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -esp8285.name=Generic ESP8285 Module -esp8285.build.board=ESP8266_ESP01 -esp8285.upload.tool=esptool -esp8285.upload.maximum_data_size=81920 -esp8285.upload.wait_for_upload_port=true -esp8285.serial.disableDTR=true -esp8285.serial.disableRTS=true -esp8285.build.mcu=esp8266 -esp8285.build.core=esp8266 -esp8285.build.variant=generic -esp8285.build.spiffs_pagesize=256 -esp8285.build.debug_port= -esp8285.build.debug_level= -esp8285.menu.CpuFrequency.80=80 MHz -esp8285.menu.CpuFrequency.80.build.f_cpu=80000000L -esp8285.menu.CpuFrequency.160=160 MHz -esp8285.menu.CpuFrequency.160.build.f_cpu=160000000L -esp8285.menu.ResetMethod.ck=ck -esp8285.menu.ResetMethod.ck.upload.resetmethod=ck -esp8285.menu.ResetMethod.nodemcu=nodemcu -esp8285.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -esp8285.menu.CrystalFreq.26=26 MHz -esp8285.menu.CrystalFreq.40=40 MHz -esp8285.menu.CrystalFreq.40.build.extra_flags=-DF_CRYSTAL=40000000 -DESP8266 -esp8285.build.flash_mode=dout -esp8285.build.flash_freq=40 -esp8285.menu.FlashSize.1M0=1M (no SPIFFS) -esp8285.menu.FlashSize.1M0.build.flash_size=1M -esp8285.menu.FlashSize.1M0.build.flash_ld=eagle.flash.1m0.ld -esp8285.menu.FlashSize.1M0.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M0.upload.maximum_size=1023984 -esp8285.menu.FlashSize.1M64=1M (64K SPIFFS) -esp8285.menu.FlashSize.1M64.build.flash_size=1M -esp8285.menu.FlashSize.1M64.build.flash_ld=eagle.flash.1m64.ld -esp8285.menu.FlashSize.1M64.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M64.upload.maximum_size=958448 -esp8285.menu.FlashSize.1M64.build.spiffs_start=0xEB000 -esp8285.menu.FlashSize.1M64.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M64.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M128=1M (128K SPIFFS) -esp8285.menu.FlashSize.1M128.build.flash_size=1M -esp8285.menu.FlashSize.1M128.build.flash_ld=eagle.flash.1m128.ld -esp8285.menu.FlashSize.1M128.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M128.upload.maximum_size=892912 -esp8285.menu.FlashSize.1M128.build.spiffs_start=0xDB000 -esp8285.menu.FlashSize.1M128.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M128.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M144=1M (144K SPIFFS) -esp8285.menu.FlashSize.1M144.build.flash_size=1M -esp8285.menu.FlashSize.1M144.build.flash_ld=eagle.flash.1m144.ld -esp8285.menu.FlashSize.1M144.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M144.upload.maximum_size=876528 -esp8285.menu.FlashSize.1M144.build.spiffs_start=0xD7000 -esp8285.menu.FlashSize.1M144.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M144.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M160=1M (160K SPIFFS) -esp8285.menu.FlashSize.1M160.build.flash_size=1M -esp8285.menu.FlashSize.1M160.build.flash_ld=eagle.flash.1m160.ld -esp8285.menu.FlashSize.1M160.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M160.upload.maximum_size=860144 -esp8285.menu.FlashSize.1M160.build.spiffs_start=0xD3000 -esp8285.menu.FlashSize.1M160.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M160.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M192=1M (192K SPIFFS) -esp8285.menu.FlashSize.1M192.build.flash_size=1M -esp8285.menu.FlashSize.1M192.build.flash_ld=eagle.flash.1m192.ld -esp8285.menu.FlashSize.1M192.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M192.upload.maximum_size=827376 -esp8285.menu.FlashSize.1M192.build.spiffs_start=0xCB000 -esp8285.menu.FlashSize.1M192.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M192.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M256=1M (256K SPIFFS) -esp8285.menu.FlashSize.1M256.build.flash_size=1M -esp8285.menu.FlashSize.1M256.build.flash_ld=eagle.flash.1m256.ld -esp8285.menu.FlashSize.1M256.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M256.upload.maximum_size=761840 -esp8285.menu.FlashSize.1M256.build.spiffs_start=0xBB000 -esp8285.menu.FlashSize.1M256.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M256.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M512=1M (512K SPIFFS) -esp8285.menu.FlashSize.1M512.build.flash_size=1M -esp8285.menu.FlashSize.1M512.build.flash_ld=eagle.flash.1m512.ld -esp8285.menu.FlashSize.1M512.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M512.upload.maximum_size=499696 -esp8285.menu.FlashSize.1M512.build.spiffs_start=0x7B000 -esp8285.menu.FlashSize.1M512.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M512.build.spiffs_blocksize=8192 -esp8285.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -esp8285.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -esp8285.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -esp8285.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -esp8285.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -esp8285.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -esp8285.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -esp8285.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -esp8285.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -esp8285.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -esp8285.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -esp8285.menu.LwIPVariant.OpenSource=v1.4 Open Source -esp8285.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -esp8285.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -esp8285.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -esp8285.menu.Debug.Disabled=Disabled -esp8285.menu.Debug.Disabled.build.debug_port= -esp8285.menu.Debug.Serial=Serial -esp8285.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -esp8285.menu.Debug.Serial1=Serial1 -esp8285.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -esp8285.menu.DebugLevel.None____=None -esp8285.menu.DebugLevel.None____.build.debug_level= -esp8285.menu.DebugLevel.SSL=SSL -esp8285.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -esp8285.menu.DebugLevel.TLS_MEM=TLS_MEM -esp8285.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -esp8285.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -esp8285.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -esp8285.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -esp8285.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -esp8285.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -esp8285.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -esp8285.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -esp8285.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -esp8285.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -esp8285.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -esp8285.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -esp8285.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -esp8285.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -esp8285.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -esp8285.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.CORE=CORE -esp8285.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -esp8285.menu.DebugLevel.WIFI=WIFI -esp8285.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -esp8285.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -esp8285.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -esp8285.menu.DebugLevel.UPDATER=UPDATER -esp8285.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -esp8285.menu.DebugLevel.OTA=OTA -esp8285.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -esp8285.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -esp8285.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -esp8285.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -esp8285.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -esp8285.menu.UploadSpeed.115200=115200 -esp8285.menu.UploadSpeed.115200.upload.speed=115200 -esp8285.menu.UploadSpeed.9600=9600 -esp8285.menu.UploadSpeed.9600.upload.speed=9600 -esp8285.menu.UploadSpeed.57600=57600 -esp8285.menu.UploadSpeed.57600.upload.speed=57600 -esp8285.menu.UploadSpeed.230400.linux=230400 -esp8285.menu.UploadSpeed.230400.macosx=230400 -esp8285.menu.UploadSpeed.230400.upload.speed=230400 -esp8285.menu.UploadSpeed.256000.windows=256000 -esp8285.menu.UploadSpeed.256000.upload.speed=256000 -esp8285.menu.UploadSpeed.460800.linux=460800 -esp8285.menu.UploadSpeed.460800.macosx=460800 -esp8285.menu.UploadSpeed.460800.upload.speed=460800 -esp8285.menu.UploadSpeed.512000.windows=512000 -esp8285.menu.UploadSpeed.512000.upload.speed=512000 -esp8285.menu.UploadSpeed.921600=921600 -esp8285.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -espduino.name=ESPDuino (ESP-13 Module) -espduino.build.board=ESP8266_ESP13 -espduino.build.variant=ESPDuino -espduino.menu.ResetMethod.v2=ESPduino-V2 -espduino.menu.ResetMethod.v2.upload.resetmethod=nodemcu -espduino.menu.ResetMethod.v1=ESPduino-V1 -espduino.menu.ResetMethod.v1.upload.resetmethod=ck -espduino.menu.UploadTool.esptool=Serial -espduino.menu.UploadTool.esptool.upload.tool=esptool -espduino.menu.UploadTool.esptool.upload.verbose=-vv -espduino.menu.UploadTool.espota=OTA -espduino.menu.UploadTool.espota.upload.tool=espota -espduino.upload.tool=esptool -espduino.upload.maximum_data_size=81920 -espduino.upload.wait_for_upload_port=true -espduino.serial.disableDTR=true -espduino.serial.disableRTS=true -espduino.build.mcu=esp8266 -espduino.build.core=esp8266 -espduino.build.spiffs_pagesize=256 -espduino.build.debug_port= -espduino.build.debug_level= -espduino.menu.CpuFrequency.80=80 MHz -espduino.menu.CpuFrequency.80.build.f_cpu=80000000L -espduino.menu.CpuFrequency.160=160 MHz -espduino.menu.CpuFrequency.160.build.f_cpu=160000000L -espduino.build.flash_mode=dio -espduino.build.flash_freq=40 -espduino.menu.FlashSize.4M1M=4M (1M SPIFFS) -espduino.menu.FlashSize.4M1M.build.flash_size=4M -espduino.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -espduino.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -espduino.menu.FlashSize.4M1M.upload.maximum_size=1044464 -espduino.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -espduino.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -espduino.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -espduino.menu.FlashSize.4M3M=4M (3M SPIFFS) -espduino.menu.FlashSize.4M3M.build.flash_size=4M -espduino.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -espduino.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -espduino.menu.FlashSize.4M3M.upload.maximum_size=1044464 -espduino.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -espduino.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -espduino.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -espduino.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -espduino.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -espduino.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -espduino.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -espduino.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -espduino.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -espduino.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -espduino.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -espduino.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -espduino.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -espduino.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -espduino.menu.LwIPVariant.OpenSource=v1.4 Open Source -espduino.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -espduino.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -espduino.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -espduino.menu.Debug.Disabled=Disabled -espduino.menu.Debug.Disabled.build.debug_port= -espduino.menu.Debug.Serial=Serial -espduino.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -espduino.menu.Debug.Serial1=Serial1 -espduino.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -espduino.menu.DebugLevel.None____=None -espduino.menu.DebugLevel.None____.build.debug_level= -espduino.menu.DebugLevel.SSL=SSL -espduino.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -espduino.menu.DebugLevel.TLS_MEM=TLS_MEM -espduino.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -espduino.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -espduino.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -espduino.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -espduino.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -espduino.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -espduino.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -espduino.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -espduino.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -espduino.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -espduino.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espduino.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -espduino.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -espduino.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -espduino.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espduino.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.CORE=CORE -espduino.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -espduino.menu.DebugLevel.WIFI=WIFI -espduino.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -espduino.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -espduino.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -espduino.menu.DebugLevel.UPDATER=UPDATER -espduino.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -espduino.menu.DebugLevel.OTA=OTA -espduino.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -espduino.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -espduino.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -espduino.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -espduino.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -espduino.menu.UploadSpeed.115200=115200 -espduino.menu.UploadSpeed.115200.upload.speed=115200 -espduino.menu.UploadSpeed.9600=9600 -espduino.menu.UploadSpeed.9600.upload.speed=9600 -espduino.menu.UploadSpeed.57600=57600 -espduino.menu.UploadSpeed.57600.upload.speed=57600 -espduino.menu.UploadSpeed.230400.linux=230400 -espduino.menu.UploadSpeed.230400.macosx=230400 -espduino.menu.UploadSpeed.230400.upload.speed=230400 -espduino.menu.UploadSpeed.256000.windows=256000 -espduino.menu.UploadSpeed.256000.upload.speed=256000 -espduino.menu.UploadSpeed.460800.linux=460800 -espduino.menu.UploadSpeed.460800.macosx=460800 -espduino.menu.UploadSpeed.460800.upload.speed=460800 -espduino.menu.UploadSpeed.512000.windows=512000 -espduino.menu.UploadSpeed.512000.upload.speed=512000 -espduino.menu.UploadSpeed.921600=921600 -espduino.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -huzzah.name=Adafruit HUZZAH ESP8266 -huzzah.build.board=ESP8266_ESP12 -huzzah.build.variant=adafruit -huzzah.upload.tool=esptool -huzzah.upload.maximum_data_size=81920 -huzzah.upload.wait_for_upload_port=true -huzzah.serial.disableDTR=true -huzzah.serial.disableRTS=true -huzzah.build.mcu=esp8266 -huzzah.build.core=esp8266 -huzzah.build.spiffs_pagesize=256 -huzzah.build.debug_port= -huzzah.build.debug_level= -huzzah.menu.CpuFrequency.80=80 MHz -huzzah.menu.CpuFrequency.80.build.f_cpu=80000000L -huzzah.menu.CpuFrequency.160=160 MHz -huzzah.menu.CpuFrequency.160.build.f_cpu=160000000L -huzzah.upload.resetmethod=nodemcu -huzzah.build.flash_mode=qio -huzzah.build.flash_freq=40 -huzzah.menu.FlashSize.4M1M=4M (1M SPIFFS) -huzzah.menu.FlashSize.4M1M.build.flash_size=4M -huzzah.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -huzzah.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -huzzah.menu.FlashSize.4M1M.upload.maximum_size=1044464 -huzzah.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -huzzah.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -huzzah.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -huzzah.menu.FlashSize.4M3M=4M (3M SPIFFS) -huzzah.menu.FlashSize.4M3M.build.flash_size=4M -huzzah.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -huzzah.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -huzzah.menu.FlashSize.4M3M.upload.maximum_size=1044464 -huzzah.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -huzzah.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -huzzah.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -huzzah.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -huzzah.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -huzzah.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -huzzah.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -huzzah.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -huzzah.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -huzzah.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -huzzah.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -huzzah.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -huzzah.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -huzzah.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -huzzah.menu.LwIPVariant.OpenSource=v1.4 Open Source -huzzah.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -huzzah.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -huzzah.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -huzzah.menu.Debug.Disabled=Disabled -huzzah.menu.Debug.Disabled.build.debug_port= -huzzah.menu.Debug.Serial=Serial -huzzah.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -huzzah.menu.Debug.Serial1=Serial1 -huzzah.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -huzzah.menu.DebugLevel.None____=None -huzzah.menu.DebugLevel.None____.build.debug_level= -huzzah.menu.DebugLevel.SSL=SSL -huzzah.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -huzzah.menu.DebugLevel.TLS_MEM=TLS_MEM -huzzah.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -huzzah.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -huzzah.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -huzzah.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -huzzah.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -huzzah.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -huzzah.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -huzzah.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -huzzah.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -huzzah.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -huzzah.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -huzzah.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -huzzah.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -huzzah.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -huzzah.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -huzzah.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.CORE=CORE -huzzah.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -huzzah.menu.DebugLevel.WIFI=WIFI -huzzah.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -huzzah.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -huzzah.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -huzzah.menu.DebugLevel.UPDATER=UPDATER -huzzah.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -huzzah.menu.DebugLevel.OTA=OTA -huzzah.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -huzzah.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -huzzah.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -huzzah.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -huzzah.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -huzzah.menu.UploadSpeed.115200=115200 -huzzah.menu.UploadSpeed.115200.upload.speed=115200 -huzzah.menu.UploadSpeed.9600=9600 -huzzah.menu.UploadSpeed.9600.upload.speed=9600 -huzzah.menu.UploadSpeed.57600=57600 -huzzah.menu.UploadSpeed.57600.upload.speed=57600 -huzzah.menu.UploadSpeed.230400.linux=230400 -huzzah.menu.UploadSpeed.230400.macosx=230400 -huzzah.menu.UploadSpeed.230400.upload.speed=230400 -huzzah.menu.UploadSpeed.256000.windows=256000 -huzzah.menu.UploadSpeed.256000.upload.speed=256000 -huzzah.menu.UploadSpeed.460800.linux=460800 -huzzah.menu.UploadSpeed.460800.macosx=460800 -huzzah.menu.UploadSpeed.460800.upload.speed=460800 -huzzah.menu.UploadSpeed.512000.windows=512000 -huzzah.menu.UploadSpeed.512000.upload.speed=512000 -huzzah.menu.UploadSpeed.921600=921600 -huzzah.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -espresso_lite_v1.name=ESPresso Lite 1.0 -espresso_lite_v1.build.board=ESP8266_ESPRESSO_LITE_V1 -espresso_lite_v1.build.variant=espresso_lite_v1 -espresso_lite_v1.upload.tool=esptool -espresso_lite_v1.upload.maximum_data_size=81920 -espresso_lite_v1.upload.wait_for_upload_port=true -espresso_lite_v1.serial.disableDTR=true -espresso_lite_v1.serial.disableRTS=true -espresso_lite_v1.build.mcu=esp8266 -espresso_lite_v1.build.core=esp8266 -espresso_lite_v1.build.spiffs_pagesize=256 -espresso_lite_v1.build.debug_port= -espresso_lite_v1.build.debug_level= -espresso_lite_v1.menu.CpuFrequency.80=80 MHz -espresso_lite_v1.menu.CpuFrequency.80.build.f_cpu=80000000L -espresso_lite_v1.menu.CpuFrequency.160=160 MHz -espresso_lite_v1.menu.CpuFrequency.160.build.f_cpu=160000000L -espresso_lite_v1.build.flash_mode=dio -espresso_lite_v1.build.flash_freq=40 -espresso_lite_v1.menu.FlashSize.4M1M=4M (1M SPIFFS) -espresso_lite_v1.menu.FlashSize.4M1M.build.flash_size=4M -espresso_lite_v1.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -espresso_lite_v1.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -espresso_lite_v1.menu.FlashSize.4M1M.upload.maximum_size=1044464 -espresso_lite_v1.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -espresso_lite_v1.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -espresso_lite_v1.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -espresso_lite_v1.menu.FlashSize.4M3M=4M (3M SPIFFS) -espresso_lite_v1.menu.FlashSize.4M3M.build.flash_size=4M -espresso_lite_v1.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -espresso_lite_v1.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -espresso_lite_v1.menu.FlashSize.4M3M.upload.maximum_size=1044464 -espresso_lite_v1.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -espresso_lite_v1.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -espresso_lite_v1.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -espresso_lite_v1.menu.ResetMethod.ck=ck -espresso_lite_v1.menu.ResetMethod.ck.upload.resetmethod=ck -espresso_lite_v1.menu.ResetMethod.nodemcu=nodemcu -espresso_lite_v1.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -espresso_lite_v1.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -espresso_lite_v1.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -espresso_lite_v1.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -espresso_lite_v1.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -espresso_lite_v1.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -espresso_lite_v1.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -espresso_lite_v1.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -espresso_lite_v1.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -espresso_lite_v1.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -espresso_lite_v1.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -espresso_lite_v1.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v1.menu.LwIPVariant.OpenSource=v1.4 Open Source -espresso_lite_v1.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -espresso_lite_v1.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v1.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -espresso_lite_v1.menu.Debug.Disabled=Disabled -espresso_lite_v1.menu.Debug.Disabled.build.debug_port= -espresso_lite_v1.menu.Debug.Serial=Serial -espresso_lite_v1.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -espresso_lite_v1.menu.Debug.Serial1=Serial1 -espresso_lite_v1.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -espresso_lite_v1.menu.DebugLevel.None____=None -espresso_lite_v1.menu.DebugLevel.None____.build.debug_level= -espresso_lite_v1.menu.DebugLevel.SSL=SSL -espresso_lite_v1.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -espresso_lite_v1.menu.DebugLevel.TLS_MEM=TLS_MEM -espresso_lite_v1.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -espresso_lite_v1.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -espresso_lite_v1.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.CORE=CORE -espresso_lite_v1.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -espresso_lite_v1.menu.DebugLevel.WIFI=WIFI -espresso_lite_v1.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -espresso_lite_v1.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -espresso_lite_v1.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -espresso_lite_v1.menu.DebugLevel.UPDATER=UPDATER -espresso_lite_v1.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -espresso_lite_v1.menu.DebugLevel.OTA=OTA -espresso_lite_v1.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -espresso_lite_v1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -espresso_lite_v1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -espresso_lite_v1.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -espresso_lite_v1.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -espresso_lite_v1.menu.UploadSpeed.115200=115200 -espresso_lite_v1.menu.UploadSpeed.115200.upload.speed=115200 -espresso_lite_v1.menu.UploadSpeed.9600=9600 -espresso_lite_v1.menu.UploadSpeed.9600.upload.speed=9600 -espresso_lite_v1.menu.UploadSpeed.57600=57600 -espresso_lite_v1.menu.UploadSpeed.57600.upload.speed=57600 -espresso_lite_v1.menu.UploadSpeed.230400.linux=230400 -espresso_lite_v1.menu.UploadSpeed.230400.macosx=230400 -espresso_lite_v1.menu.UploadSpeed.230400.upload.speed=230400 -espresso_lite_v1.menu.UploadSpeed.256000.windows=256000 -espresso_lite_v1.menu.UploadSpeed.256000.upload.speed=256000 -espresso_lite_v1.menu.UploadSpeed.460800.linux=460800 -espresso_lite_v1.menu.UploadSpeed.460800.macosx=460800 -espresso_lite_v1.menu.UploadSpeed.460800.upload.speed=460800 -espresso_lite_v1.menu.UploadSpeed.512000.windows=512000 -espresso_lite_v1.menu.UploadSpeed.512000.upload.speed=512000 -espresso_lite_v1.menu.UploadSpeed.921600=921600 -espresso_lite_v1.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -espresso_lite_v2.name=ESPresso Lite 2.0 -espresso_lite_v2.build.board=ESP8266_ESPRESSO_LITE_V2 -espresso_lite_v2.build.variant=espresso_lite_v2 -espresso_lite_v2.upload.tool=esptool -espresso_lite_v2.upload.maximum_data_size=81920 -espresso_lite_v2.upload.wait_for_upload_port=true -espresso_lite_v2.serial.disableDTR=true -espresso_lite_v2.serial.disableRTS=true -espresso_lite_v2.build.mcu=esp8266 -espresso_lite_v2.build.core=esp8266 -espresso_lite_v2.build.spiffs_pagesize=256 -espresso_lite_v2.build.debug_port= -espresso_lite_v2.build.debug_level= -espresso_lite_v2.menu.CpuFrequency.80=80 MHz -espresso_lite_v2.menu.CpuFrequency.80.build.f_cpu=80000000L -espresso_lite_v2.menu.CpuFrequency.160=160 MHz -espresso_lite_v2.menu.CpuFrequency.160.build.f_cpu=160000000L -espresso_lite_v2.build.flash_mode=dio -espresso_lite_v2.build.flash_freq=40 -espresso_lite_v2.menu.FlashSize.4M1M=4M (1M SPIFFS) -espresso_lite_v2.menu.FlashSize.4M1M.build.flash_size=4M -espresso_lite_v2.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -espresso_lite_v2.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -espresso_lite_v2.menu.FlashSize.4M1M.upload.maximum_size=1044464 -espresso_lite_v2.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -espresso_lite_v2.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -espresso_lite_v2.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -espresso_lite_v2.menu.FlashSize.4M3M=4M (3M SPIFFS) -espresso_lite_v2.menu.FlashSize.4M3M.build.flash_size=4M -espresso_lite_v2.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -espresso_lite_v2.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -espresso_lite_v2.menu.FlashSize.4M3M.upload.maximum_size=1044464 -espresso_lite_v2.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -espresso_lite_v2.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -espresso_lite_v2.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -espresso_lite_v2.menu.ResetMethod.ck=ck -espresso_lite_v2.menu.ResetMethod.ck.upload.resetmethod=ck -espresso_lite_v2.menu.ResetMethod.nodemcu=nodemcu -espresso_lite_v2.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -espresso_lite_v2.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -espresso_lite_v2.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -espresso_lite_v2.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -espresso_lite_v2.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -espresso_lite_v2.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -espresso_lite_v2.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -espresso_lite_v2.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -espresso_lite_v2.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -espresso_lite_v2.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -espresso_lite_v2.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -espresso_lite_v2.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v2.menu.LwIPVariant.OpenSource=v1.4 Open Source -espresso_lite_v2.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -espresso_lite_v2.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v2.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -espresso_lite_v2.menu.Debug.Disabled=Disabled -espresso_lite_v2.menu.Debug.Disabled.build.debug_port= -espresso_lite_v2.menu.Debug.Serial=Serial -espresso_lite_v2.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -espresso_lite_v2.menu.Debug.Serial1=Serial1 -espresso_lite_v2.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -espresso_lite_v2.menu.DebugLevel.None____=None -espresso_lite_v2.menu.DebugLevel.None____.build.debug_level= -espresso_lite_v2.menu.DebugLevel.SSL=SSL -espresso_lite_v2.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -espresso_lite_v2.menu.DebugLevel.TLS_MEM=TLS_MEM -espresso_lite_v2.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -espresso_lite_v2.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -espresso_lite_v2.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.CORE=CORE -espresso_lite_v2.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -espresso_lite_v2.menu.DebugLevel.WIFI=WIFI -espresso_lite_v2.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -espresso_lite_v2.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -espresso_lite_v2.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -espresso_lite_v2.menu.DebugLevel.UPDATER=UPDATER -espresso_lite_v2.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -espresso_lite_v2.menu.DebugLevel.OTA=OTA -espresso_lite_v2.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -espresso_lite_v2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -espresso_lite_v2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -espresso_lite_v2.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -espresso_lite_v2.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -espresso_lite_v2.menu.UploadSpeed.115200=115200 -espresso_lite_v2.menu.UploadSpeed.115200.upload.speed=115200 -espresso_lite_v2.menu.UploadSpeed.9600=9600 -espresso_lite_v2.menu.UploadSpeed.9600.upload.speed=9600 -espresso_lite_v2.menu.UploadSpeed.57600=57600 -espresso_lite_v2.menu.UploadSpeed.57600.upload.speed=57600 -espresso_lite_v2.menu.UploadSpeed.230400.linux=230400 -espresso_lite_v2.menu.UploadSpeed.230400.macosx=230400 -espresso_lite_v2.menu.UploadSpeed.230400.upload.speed=230400 -espresso_lite_v2.menu.UploadSpeed.256000.windows=256000 -espresso_lite_v2.menu.UploadSpeed.256000.upload.speed=256000 -espresso_lite_v2.menu.UploadSpeed.460800.linux=460800 -espresso_lite_v2.menu.UploadSpeed.460800.macosx=460800 -espresso_lite_v2.menu.UploadSpeed.460800.upload.speed=460800 -espresso_lite_v2.menu.UploadSpeed.512000.windows=512000 -espresso_lite_v2.menu.UploadSpeed.512000.upload.speed=512000 -espresso_lite_v2.menu.UploadSpeed.921600=921600 -espresso_lite_v2.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -phoenix_v1.name=Phoenix 1.0 -phoenix_v1.build.board=ESP8266_PHOENIX_V1 -phoenix_v1.build.variant=phoenix_v1 -phoenix_v1.upload.tool=esptool -phoenix_v1.upload.maximum_data_size=81920 -phoenix_v1.upload.wait_for_upload_port=true -phoenix_v1.serial.disableDTR=true -phoenix_v1.serial.disableRTS=true -phoenix_v1.build.mcu=esp8266 -phoenix_v1.build.core=esp8266 -phoenix_v1.build.spiffs_pagesize=256 -phoenix_v1.build.debug_port= -phoenix_v1.build.debug_level= -phoenix_v1.menu.CpuFrequency.80=80 MHz -phoenix_v1.menu.CpuFrequency.80.build.f_cpu=80000000L -phoenix_v1.menu.CpuFrequency.160=160 MHz -phoenix_v1.menu.CpuFrequency.160.build.f_cpu=160000000L -phoenix_v1.build.flash_mode=dio -phoenix_v1.build.flash_freq=40 -phoenix_v1.menu.FlashSize.4M1M=4M (1M SPIFFS) -phoenix_v1.menu.FlashSize.4M1M.build.flash_size=4M -phoenix_v1.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -phoenix_v1.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -phoenix_v1.menu.FlashSize.4M1M.upload.maximum_size=1044464 -phoenix_v1.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -phoenix_v1.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -phoenix_v1.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -phoenix_v1.menu.FlashSize.4M3M=4M (3M SPIFFS) -phoenix_v1.menu.FlashSize.4M3M.build.flash_size=4M -phoenix_v1.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -phoenix_v1.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -phoenix_v1.menu.FlashSize.4M3M.upload.maximum_size=1044464 -phoenix_v1.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -phoenix_v1.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -phoenix_v1.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -phoenix_v1.menu.ResetMethod.ck=ck -phoenix_v1.menu.ResetMethod.ck.upload.resetmethod=ck -phoenix_v1.menu.ResetMethod.nodemcu=nodemcu -phoenix_v1.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -phoenix_v1.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -phoenix_v1.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -phoenix_v1.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -phoenix_v1.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -phoenix_v1.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -phoenix_v1.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -phoenix_v1.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -phoenix_v1.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -phoenix_v1.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -phoenix_v1.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -phoenix_v1.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v1.menu.LwIPVariant.OpenSource=v1.4 Open Source -phoenix_v1.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -phoenix_v1.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v1.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -phoenix_v1.menu.Debug.Disabled=Disabled -phoenix_v1.menu.Debug.Disabled.build.debug_port= -phoenix_v1.menu.Debug.Serial=Serial -phoenix_v1.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -phoenix_v1.menu.Debug.Serial1=Serial1 -phoenix_v1.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -phoenix_v1.menu.DebugLevel.None____=None -phoenix_v1.menu.DebugLevel.None____.build.debug_level= -phoenix_v1.menu.DebugLevel.SSL=SSL -phoenix_v1.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -phoenix_v1.menu.DebugLevel.TLS_MEM=TLS_MEM -phoenix_v1.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -phoenix_v1.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -phoenix_v1.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -phoenix_v1.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -phoenix_v1.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -phoenix_v1.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -phoenix_v1.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -phoenix_v1.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -phoenix_v1.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -phoenix_v1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.CORE=CORE -phoenix_v1.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -phoenix_v1.menu.DebugLevel.WIFI=WIFI -phoenix_v1.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -phoenix_v1.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -phoenix_v1.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -phoenix_v1.menu.DebugLevel.UPDATER=UPDATER -phoenix_v1.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -phoenix_v1.menu.DebugLevel.OTA=OTA -phoenix_v1.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -phoenix_v1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -phoenix_v1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -phoenix_v1.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -phoenix_v1.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -phoenix_v1.menu.UploadSpeed.115200=115200 -phoenix_v1.menu.UploadSpeed.115200.upload.speed=115200 -phoenix_v1.menu.UploadSpeed.9600=9600 -phoenix_v1.menu.UploadSpeed.9600.upload.speed=9600 -phoenix_v1.menu.UploadSpeed.57600=57600 -phoenix_v1.menu.UploadSpeed.57600.upload.speed=57600 -phoenix_v1.menu.UploadSpeed.230400.linux=230400 -phoenix_v1.menu.UploadSpeed.230400.macosx=230400 -phoenix_v1.menu.UploadSpeed.230400.upload.speed=230400 -phoenix_v1.menu.UploadSpeed.256000.windows=256000 -phoenix_v1.menu.UploadSpeed.256000.upload.speed=256000 -phoenix_v1.menu.UploadSpeed.460800.linux=460800 -phoenix_v1.menu.UploadSpeed.460800.macosx=460800 -phoenix_v1.menu.UploadSpeed.460800.upload.speed=460800 -phoenix_v1.menu.UploadSpeed.512000.windows=512000 -phoenix_v1.menu.UploadSpeed.512000.upload.speed=512000 -phoenix_v1.menu.UploadSpeed.921600=921600 -phoenix_v1.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -phoenix_v2.name=Phoenix 2.0 -phoenix_v2.build.board=ESP8266_PHOENIX_V2 -phoenix_v2.build.variant=phoenix_v2 -phoenix_v2.upload.tool=esptool -phoenix_v2.upload.maximum_data_size=81920 -phoenix_v2.upload.wait_for_upload_port=true -phoenix_v2.serial.disableDTR=true -phoenix_v2.serial.disableRTS=true -phoenix_v2.build.mcu=esp8266 -phoenix_v2.build.core=esp8266 -phoenix_v2.build.spiffs_pagesize=256 -phoenix_v2.build.debug_port= -phoenix_v2.build.debug_level= -phoenix_v2.menu.CpuFrequency.80=80 MHz -phoenix_v2.menu.CpuFrequency.80.build.f_cpu=80000000L -phoenix_v2.menu.CpuFrequency.160=160 MHz -phoenix_v2.menu.CpuFrequency.160.build.f_cpu=160000000L -phoenix_v2.build.flash_mode=dio -phoenix_v2.build.flash_freq=40 -phoenix_v2.menu.FlashSize.4M1M=4M (1M SPIFFS) -phoenix_v2.menu.FlashSize.4M1M.build.flash_size=4M -phoenix_v2.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -phoenix_v2.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -phoenix_v2.menu.FlashSize.4M1M.upload.maximum_size=1044464 -phoenix_v2.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -phoenix_v2.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -phoenix_v2.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -phoenix_v2.menu.FlashSize.4M3M=4M (3M SPIFFS) -phoenix_v2.menu.FlashSize.4M3M.build.flash_size=4M -phoenix_v2.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -phoenix_v2.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -phoenix_v2.menu.FlashSize.4M3M.upload.maximum_size=1044464 -phoenix_v2.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -phoenix_v2.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -phoenix_v2.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -phoenix_v2.menu.ResetMethod.ck=ck -phoenix_v2.menu.ResetMethod.ck.upload.resetmethod=ck -phoenix_v2.menu.ResetMethod.nodemcu=nodemcu -phoenix_v2.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -phoenix_v2.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -phoenix_v2.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -phoenix_v2.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -phoenix_v2.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -phoenix_v2.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -phoenix_v2.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -phoenix_v2.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -phoenix_v2.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -phoenix_v2.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -phoenix_v2.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -phoenix_v2.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v2.menu.LwIPVariant.OpenSource=v1.4 Open Source -phoenix_v2.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -phoenix_v2.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v2.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -phoenix_v2.menu.Debug.Disabled=Disabled -phoenix_v2.menu.Debug.Disabled.build.debug_port= -phoenix_v2.menu.Debug.Serial=Serial -phoenix_v2.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -phoenix_v2.menu.Debug.Serial1=Serial1 -phoenix_v2.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -phoenix_v2.menu.DebugLevel.None____=None -phoenix_v2.menu.DebugLevel.None____.build.debug_level= -phoenix_v2.menu.DebugLevel.SSL=SSL -phoenix_v2.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -phoenix_v2.menu.DebugLevel.TLS_MEM=TLS_MEM -phoenix_v2.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -phoenix_v2.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -phoenix_v2.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -phoenix_v2.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -phoenix_v2.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -phoenix_v2.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -phoenix_v2.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -phoenix_v2.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -phoenix_v2.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -phoenix_v2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.CORE=CORE -phoenix_v2.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -phoenix_v2.menu.DebugLevel.WIFI=WIFI -phoenix_v2.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -phoenix_v2.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -phoenix_v2.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -phoenix_v2.menu.DebugLevel.UPDATER=UPDATER -phoenix_v2.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -phoenix_v2.menu.DebugLevel.OTA=OTA -phoenix_v2.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -phoenix_v2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -phoenix_v2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -phoenix_v2.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -phoenix_v2.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -phoenix_v2.menu.UploadSpeed.115200=115200 -phoenix_v2.menu.UploadSpeed.115200.upload.speed=115200 -phoenix_v2.menu.UploadSpeed.9600=9600 -phoenix_v2.menu.UploadSpeed.9600.upload.speed=9600 -phoenix_v2.menu.UploadSpeed.57600=57600 -phoenix_v2.menu.UploadSpeed.57600.upload.speed=57600 -phoenix_v2.menu.UploadSpeed.230400.linux=230400 -phoenix_v2.menu.UploadSpeed.230400.macosx=230400 -phoenix_v2.menu.UploadSpeed.230400.upload.speed=230400 -phoenix_v2.menu.UploadSpeed.256000.windows=256000 -phoenix_v2.menu.UploadSpeed.256000.upload.speed=256000 -phoenix_v2.menu.UploadSpeed.460800.linux=460800 -phoenix_v2.menu.UploadSpeed.460800.macosx=460800 -phoenix_v2.menu.UploadSpeed.460800.upload.speed=460800 -phoenix_v2.menu.UploadSpeed.512000.windows=512000 -phoenix_v2.menu.UploadSpeed.512000.upload.speed=512000 -phoenix_v2.menu.UploadSpeed.921600=921600 -phoenix_v2.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -nodemcu.name=NodeMCU 0.9 (ESP-12 Module) -nodemcu.build.board=ESP8266_NODEMCU -nodemcu.build.variant=nodemcu -nodemcu.upload.tool=esptool -nodemcu.upload.maximum_data_size=81920 -nodemcu.upload.wait_for_upload_port=true -nodemcu.serial.disableDTR=true -nodemcu.serial.disableRTS=true -nodemcu.build.mcu=esp8266 -nodemcu.build.core=esp8266 -nodemcu.build.spiffs_pagesize=256 -nodemcu.build.debug_port= -nodemcu.build.debug_level= -nodemcu.menu.CpuFrequency.80=80 MHz -nodemcu.menu.CpuFrequency.80.build.f_cpu=80000000L -nodemcu.menu.CpuFrequency.160=160 MHz -nodemcu.menu.CpuFrequency.160.build.f_cpu=160000000L -nodemcu.upload.resetmethod=nodemcu -nodemcu.build.flash_mode=qio -nodemcu.build.flash_freq=40 -nodemcu.menu.FlashSize.4M1M=4M (1M SPIFFS) -nodemcu.menu.FlashSize.4M1M.build.flash_size=4M -nodemcu.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -nodemcu.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -nodemcu.menu.FlashSize.4M1M.upload.maximum_size=1044464 -nodemcu.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -nodemcu.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -nodemcu.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -nodemcu.menu.FlashSize.4M3M=4M (3M SPIFFS) -nodemcu.menu.FlashSize.4M3M.build.flash_size=4M -nodemcu.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -nodemcu.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -nodemcu.menu.FlashSize.4M3M.upload.maximum_size=1044464 -nodemcu.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -nodemcu.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -nodemcu.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -nodemcu.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -nodemcu.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -nodemcu.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -nodemcu.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -nodemcu.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -nodemcu.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -nodemcu.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -nodemcu.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -nodemcu.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -nodemcu.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -nodemcu.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcu.menu.LwIPVariant.OpenSource=v1.4 Open Source -nodemcu.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -nodemcu.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcu.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -nodemcu.menu.Debug.Disabled=Disabled -nodemcu.menu.Debug.Disabled.build.debug_port= -nodemcu.menu.Debug.Serial=Serial -nodemcu.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -nodemcu.menu.Debug.Serial1=Serial1 -nodemcu.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -nodemcu.menu.DebugLevel.None____=None -nodemcu.menu.DebugLevel.None____.build.debug_level= -nodemcu.menu.DebugLevel.SSL=SSL -nodemcu.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -nodemcu.menu.DebugLevel.TLS_MEM=TLS_MEM -nodemcu.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -nodemcu.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -nodemcu.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -nodemcu.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -nodemcu.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -nodemcu.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -nodemcu.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -nodemcu.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -nodemcu.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -nodemcu.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -nodemcu.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -nodemcu.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -nodemcu.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -nodemcu.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -nodemcu.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -nodemcu.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.CORE=CORE -nodemcu.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -nodemcu.menu.DebugLevel.WIFI=WIFI -nodemcu.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -nodemcu.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -nodemcu.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -nodemcu.menu.DebugLevel.UPDATER=UPDATER -nodemcu.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -nodemcu.menu.DebugLevel.OTA=OTA -nodemcu.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -nodemcu.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -nodemcu.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -nodemcu.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -nodemcu.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -nodemcu.menu.UploadSpeed.115200=115200 -nodemcu.menu.UploadSpeed.115200.upload.speed=115200 -nodemcu.menu.UploadSpeed.9600=9600 -nodemcu.menu.UploadSpeed.9600.upload.speed=9600 -nodemcu.menu.UploadSpeed.57600=57600 -nodemcu.menu.UploadSpeed.57600.upload.speed=57600 -nodemcu.menu.UploadSpeed.230400.linux=230400 -nodemcu.menu.UploadSpeed.230400.macosx=230400 -nodemcu.menu.UploadSpeed.230400.upload.speed=230400 -nodemcu.menu.UploadSpeed.256000.windows=256000 -nodemcu.menu.UploadSpeed.256000.upload.speed=256000 -nodemcu.menu.UploadSpeed.460800.linux=460800 -nodemcu.menu.UploadSpeed.460800.macosx=460800 -nodemcu.menu.UploadSpeed.460800.upload.speed=460800 -nodemcu.menu.UploadSpeed.512000.windows=512000 -nodemcu.menu.UploadSpeed.512000.upload.speed=512000 -nodemcu.menu.UploadSpeed.921600=921600 -nodemcu.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -nodemcuv2.name=NodeMCU 1.0 (ESP-12E Module) -nodemcuv2.build.board=ESP8266_NODEMCU -nodemcuv2.build.variant=nodemcu -nodemcuv2.upload.tool=esptool -nodemcuv2.upload.maximum_data_size=81920 -nodemcuv2.upload.wait_for_upload_port=true -nodemcuv2.serial.disableDTR=true -nodemcuv2.serial.disableRTS=true -nodemcuv2.build.mcu=esp8266 -nodemcuv2.build.core=esp8266 -nodemcuv2.build.spiffs_pagesize=256 -nodemcuv2.build.debug_port= -nodemcuv2.build.debug_level= -nodemcuv2.menu.CpuFrequency.80=80 MHz -nodemcuv2.menu.CpuFrequency.80.build.f_cpu=80000000L -nodemcuv2.menu.CpuFrequency.160=160 MHz -nodemcuv2.menu.CpuFrequency.160.build.f_cpu=160000000L -nodemcuv2.upload.resetmethod=nodemcu -nodemcuv2.build.flash_mode=dio -nodemcuv2.build.flash_freq=40 -nodemcuv2.menu.FlashSize.4M1M=4M (1M SPIFFS) -nodemcuv2.menu.FlashSize.4M1M.build.flash_size=4M -nodemcuv2.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -nodemcuv2.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -nodemcuv2.menu.FlashSize.4M1M.upload.maximum_size=1044464 -nodemcuv2.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -nodemcuv2.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -nodemcuv2.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -nodemcuv2.menu.FlashSize.4M3M=4M (3M SPIFFS) -nodemcuv2.menu.FlashSize.4M3M.build.flash_size=4M -nodemcuv2.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -nodemcuv2.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -nodemcuv2.menu.FlashSize.4M3M.upload.maximum_size=1044464 -nodemcuv2.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -nodemcuv2.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -nodemcuv2.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -nodemcuv2.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -nodemcuv2.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -nodemcuv2.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -nodemcuv2.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -nodemcuv2.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -nodemcuv2.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -nodemcuv2.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -nodemcuv2.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -nodemcuv2.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -nodemcuv2.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -nodemcuv2.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcuv2.menu.LwIPVariant.OpenSource=v1.4 Open Source -nodemcuv2.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -nodemcuv2.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcuv2.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -nodemcuv2.menu.Debug.Disabled=Disabled -nodemcuv2.menu.Debug.Disabled.build.debug_port= -nodemcuv2.menu.Debug.Serial=Serial -nodemcuv2.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -nodemcuv2.menu.Debug.Serial1=Serial1 -nodemcuv2.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -nodemcuv2.menu.DebugLevel.None____=None -nodemcuv2.menu.DebugLevel.None____.build.debug_level= -nodemcuv2.menu.DebugLevel.SSL=SSL -nodemcuv2.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -nodemcuv2.menu.DebugLevel.TLS_MEM=TLS_MEM -nodemcuv2.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -nodemcuv2.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -nodemcuv2.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -nodemcuv2.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -nodemcuv2.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -nodemcuv2.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -nodemcuv2.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -nodemcuv2.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -nodemcuv2.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -nodemcuv2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.CORE=CORE -nodemcuv2.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -nodemcuv2.menu.DebugLevel.WIFI=WIFI -nodemcuv2.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -nodemcuv2.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -nodemcuv2.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -nodemcuv2.menu.DebugLevel.UPDATER=UPDATER -nodemcuv2.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -nodemcuv2.menu.DebugLevel.OTA=OTA -nodemcuv2.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -nodemcuv2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -nodemcuv2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -nodemcuv2.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -nodemcuv2.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -nodemcuv2.menu.UploadSpeed.115200=115200 -nodemcuv2.menu.UploadSpeed.115200.upload.speed=115200 -nodemcuv2.menu.UploadSpeed.9600=9600 -nodemcuv2.menu.UploadSpeed.9600.upload.speed=9600 -nodemcuv2.menu.UploadSpeed.57600=57600 -nodemcuv2.menu.UploadSpeed.57600.upload.speed=57600 -nodemcuv2.menu.UploadSpeed.230400.linux=230400 -nodemcuv2.menu.UploadSpeed.230400.macosx=230400 -nodemcuv2.menu.UploadSpeed.230400.upload.speed=230400 -nodemcuv2.menu.UploadSpeed.256000.windows=256000 -nodemcuv2.menu.UploadSpeed.256000.upload.speed=256000 -nodemcuv2.menu.UploadSpeed.460800.linux=460800 -nodemcuv2.menu.UploadSpeed.460800.macosx=460800 -nodemcuv2.menu.UploadSpeed.460800.upload.speed=460800 -nodemcuv2.menu.UploadSpeed.512000.windows=512000 -nodemcuv2.menu.UploadSpeed.512000.upload.speed=512000 -nodemcuv2.menu.UploadSpeed.921600=921600 -nodemcuv2.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -modwifi.name=Olimex MOD-WIFI-ESP8266(-DEV) -modwifi.build.board=MOD_WIFI_ESP8266 -modwifi.upload.tool=esptool -modwifi.upload.maximum_data_size=81920 -modwifi.upload.wait_for_upload_port=true -modwifi.serial.disableDTR=true -modwifi.serial.disableRTS=true -modwifi.build.mcu=esp8266 -modwifi.build.core=esp8266 -modwifi.build.variant=generic -modwifi.build.spiffs_pagesize=256 -modwifi.build.debug_port= -modwifi.build.debug_level= -modwifi.menu.CpuFrequency.80=80 MHz -modwifi.menu.CpuFrequency.80.build.f_cpu=80000000L -modwifi.menu.CpuFrequency.160=160 MHz -modwifi.menu.CpuFrequency.160.build.f_cpu=160000000L -modwifi.upload.resetmethod=ck -modwifi.build.flash_mode=qio -modwifi.build.flash_freq=40 -modwifi.menu.FlashSize.2M=2M (1M SPIFFS) -modwifi.menu.FlashSize.2M.build.flash_size=2M -modwifi.menu.FlashSize.2M.build.flash_ld=eagle.flash.2m.ld -modwifi.menu.FlashSize.2M.build.spiffs_pagesize=256 -modwifi.menu.FlashSize.2M.upload.maximum_size=1044464 -modwifi.menu.FlashSize.2M.build.spiffs_start=0x100000 -modwifi.menu.FlashSize.2M.build.spiffs_end=0x1FB000 -modwifi.menu.FlashSize.2M.build.spiffs_blocksize=8192 -modwifi.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -modwifi.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -modwifi.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -modwifi.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -modwifi.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -modwifi.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -modwifi.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -modwifi.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -modwifi.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -modwifi.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -modwifi.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -modwifi.menu.LwIPVariant.OpenSource=v1.4 Open Source -modwifi.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -modwifi.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -modwifi.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -modwifi.menu.Debug.Disabled=Disabled -modwifi.menu.Debug.Disabled.build.debug_port= -modwifi.menu.Debug.Serial=Serial -modwifi.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -modwifi.menu.Debug.Serial1=Serial1 -modwifi.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -modwifi.menu.DebugLevel.None____=None -modwifi.menu.DebugLevel.None____.build.debug_level= -modwifi.menu.DebugLevel.SSL=SSL -modwifi.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -modwifi.menu.DebugLevel.TLS_MEM=TLS_MEM -modwifi.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -modwifi.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -modwifi.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -modwifi.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -modwifi.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -modwifi.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -modwifi.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -modwifi.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -modwifi.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -modwifi.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -modwifi.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -modwifi.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -modwifi.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -modwifi.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -modwifi.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -modwifi.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.CORE=CORE -modwifi.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -modwifi.menu.DebugLevel.WIFI=WIFI -modwifi.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -modwifi.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -modwifi.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -modwifi.menu.DebugLevel.UPDATER=UPDATER -modwifi.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -modwifi.menu.DebugLevel.OTA=OTA -modwifi.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -modwifi.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -modwifi.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -modwifi.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -modwifi.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -modwifi.menu.UploadSpeed.115200=115200 -modwifi.menu.UploadSpeed.115200.upload.speed=115200 -modwifi.menu.UploadSpeed.9600=9600 -modwifi.menu.UploadSpeed.9600.upload.speed=9600 -modwifi.menu.UploadSpeed.57600=57600 -modwifi.menu.UploadSpeed.57600.upload.speed=57600 -modwifi.menu.UploadSpeed.230400.linux=230400 -modwifi.menu.UploadSpeed.230400.macosx=230400 -modwifi.menu.UploadSpeed.230400.upload.speed=230400 -modwifi.menu.UploadSpeed.256000.windows=256000 -modwifi.menu.UploadSpeed.256000.upload.speed=256000 -modwifi.menu.UploadSpeed.460800.linux=460800 -modwifi.menu.UploadSpeed.460800.macosx=460800 -modwifi.menu.UploadSpeed.460800.upload.speed=460800 -modwifi.menu.UploadSpeed.512000.windows=512000 -modwifi.menu.UploadSpeed.512000.upload.speed=512000 -modwifi.menu.UploadSpeed.921600=921600 -modwifi.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -thing.name=SparkFun ESP8266 Thing -thing.build.board=ESP8266_THING -thing.build.variant=thing -thing.upload.tool=esptool -thing.upload.maximum_data_size=81920 -thing.upload.wait_for_upload_port=true -thing.serial.disableDTR=true -thing.serial.disableRTS=true -thing.build.mcu=esp8266 -thing.build.core=esp8266 -thing.build.spiffs_pagesize=256 -thing.build.debug_port= -thing.build.debug_level= -thing.menu.CpuFrequency.80=80 MHz -thing.menu.CpuFrequency.80.build.f_cpu=80000000L -thing.menu.CpuFrequency.160=160 MHz -thing.menu.CpuFrequency.160.build.f_cpu=160000000L -thing.upload.resetmethod=ck -thing.build.flash_mode=qio -thing.build.flash_freq=40 -thing.menu.FlashSize.512K0=512K (no SPIFFS) -thing.menu.FlashSize.512K0.build.flash_size=512K -thing.menu.FlashSize.512K0.build.flash_ld=eagle.flash.512k0.ld -thing.menu.FlashSize.512K0.build.spiffs_pagesize=256 -thing.menu.FlashSize.512K0.upload.maximum_size=499696 -thing.menu.FlashSize.512K64=512K (64K SPIFFS) -thing.menu.FlashSize.512K64.build.flash_size=512K -thing.menu.FlashSize.512K64.build.flash_ld=eagle.flash.512k64.ld -thing.menu.FlashSize.512K64.build.spiffs_pagesize=256 -thing.menu.FlashSize.512K64.upload.maximum_size=434160 -thing.menu.FlashSize.512K64.build.spiffs_start=0x6B000 -thing.menu.FlashSize.512K64.build.spiffs_end=0x7B000 -thing.menu.FlashSize.512K64.build.spiffs_blocksize=4096 -thing.menu.FlashSize.512K128=512K (128K SPIFFS) -thing.menu.FlashSize.512K128.build.flash_size=512K -thing.menu.FlashSize.512K128.build.flash_ld=eagle.flash.512k128.ld -thing.menu.FlashSize.512K128.build.spiffs_pagesize=256 -thing.menu.FlashSize.512K128.upload.maximum_size=368624 -thing.menu.FlashSize.512K128.build.spiffs_start=0x5B000 -thing.menu.FlashSize.512K128.build.spiffs_end=0x7B000 -thing.menu.FlashSize.512K128.build.spiffs_blocksize=4096 -thing.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -thing.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -thing.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -thing.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -thing.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -thing.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -thing.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -thing.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -thing.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -thing.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -thing.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -thing.menu.LwIPVariant.OpenSource=v1.4 Open Source -thing.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -thing.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -thing.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -thing.menu.Debug.Disabled=Disabled -thing.menu.Debug.Disabled.build.debug_port= -thing.menu.Debug.Serial=Serial -thing.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -thing.menu.Debug.Serial1=Serial1 -thing.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -thing.menu.DebugLevel.None____=None -thing.menu.DebugLevel.None____.build.debug_level= -thing.menu.DebugLevel.SSL=SSL -thing.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -thing.menu.DebugLevel.TLS_MEM=TLS_MEM -thing.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -thing.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -thing.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -thing.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -thing.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -thing.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -thing.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -thing.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -thing.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -thing.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -thing.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -thing.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -thing.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -thing.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -thing.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -thing.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -thing.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -thing.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.CORE=CORE -thing.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -thing.menu.DebugLevel.WIFI=WIFI -thing.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -thing.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -thing.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -thing.menu.DebugLevel.UPDATER=UPDATER -thing.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -thing.menu.DebugLevel.OTA=OTA -thing.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -thing.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -thing.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -thing.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -thing.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -thing.menu.UploadSpeed.115200=115200 -thing.menu.UploadSpeed.115200.upload.speed=115200 -thing.menu.UploadSpeed.9600=9600 -thing.menu.UploadSpeed.9600.upload.speed=9600 -thing.menu.UploadSpeed.57600=57600 -thing.menu.UploadSpeed.57600.upload.speed=57600 -thing.menu.UploadSpeed.230400.linux=230400 -thing.menu.UploadSpeed.230400.macosx=230400 -thing.menu.UploadSpeed.230400.upload.speed=230400 -thing.menu.UploadSpeed.256000.windows=256000 -thing.menu.UploadSpeed.256000.upload.speed=256000 -thing.menu.UploadSpeed.460800.linux=460800 -thing.menu.UploadSpeed.460800.macosx=460800 -thing.menu.UploadSpeed.460800.upload.speed=460800 -thing.menu.UploadSpeed.512000.windows=512000 -thing.menu.UploadSpeed.512000.upload.speed=512000 -thing.menu.UploadSpeed.921600=921600 -thing.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -thingdev.name=SparkFun ESP8266 Thing Dev -thingdev.build.board=ESP8266_THING_DEV -thingdev.build.variant=thing -thingdev.upload.tool=esptool -thingdev.upload.maximum_data_size=81920 -thingdev.upload.wait_for_upload_port=true -thingdev.serial.disableDTR=true -thingdev.serial.disableRTS=true -thingdev.build.mcu=esp8266 -thingdev.build.core=esp8266 -thingdev.build.spiffs_pagesize=256 -thingdev.build.debug_port= -thingdev.build.debug_level= -thingdev.menu.CpuFrequency.80=80 MHz -thingdev.menu.CpuFrequency.80.build.f_cpu=80000000L -thingdev.menu.CpuFrequency.160=160 MHz -thingdev.menu.CpuFrequency.160.build.f_cpu=160000000L -thingdev.upload.resetmethod=nodemcu -thingdev.build.flash_mode=dio -thingdev.build.flash_freq=40 -thingdev.menu.FlashSize.512K0=512K (no SPIFFS) -thingdev.menu.FlashSize.512K0.build.flash_size=512K -thingdev.menu.FlashSize.512K0.build.flash_ld=eagle.flash.512k0.ld -thingdev.menu.FlashSize.512K0.build.spiffs_pagesize=256 -thingdev.menu.FlashSize.512K0.upload.maximum_size=499696 -thingdev.menu.FlashSize.512K64=512K (64K SPIFFS) -thingdev.menu.FlashSize.512K64.build.flash_size=512K -thingdev.menu.FlashSize.512K64.build.flash_ld=eagle.flash.512k64.ld -thingdev.menu.FlashSize.512K64.build.spiffs_pagesize=256 -thingdev.menu.FlashSize.512K64.upload.maximum_size=434160 -thingdev.menu.FlashSize.512K64.build.spiffs_start=0x6B000 -thingdev.menu.FlashSize.512K64.build.spiffs_end=0x7B000 -thingdev.menu.FlashSize.512K64.build.spiffs_blocksize=4096 -thingdev.menu.FlashSize.512K128=512K (128K SPIFFS) -thingdev.menu.FlashSize.512K128.build.flash_size=512K -thingdev.menu.FlashSize.512K128.build.flash_ld=eagle.flash.512k128.ld -thingdev.menu.FlashSize.512K128.build.spiffs_pagesize=256 -thingdev.menu.FlashSize.512K128.upload.maximum_size=368624 -thingdev.menu.FlashSize.512K128.build.spiffs_start=0x5B000 -thingdev.menu.FlashSize.512K128.build.spiffs_end=0x7B000 -thingdev.menu.FlashSize.512K128.build.spiffs_blocksize=4096 -thingdev.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -thingdev.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -thingdev.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -thingdev.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -thingdev.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -thingdev.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -thingdev.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -thingdev.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -thingdev.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -thingdev.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -thingdev.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -thingdev.menu.LwIPVariant.OpenSource=v1.4 Open Source -thingdev.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -thingdev.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -thingdev.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -thingdev.menu.Debug.Disabled=Disabled -thingdev.menu.Debug.Disabled.build.debug_port= -thingdev.menu.Debug.Serial=Serial -thingdev.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -thingdev.menu.Debug.Serial1=Serial1 -thingdev.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -thingdev.menu.DebugLevel.None____=None -thingdev.menu.DebugLevel.None____.build.debug_level= -thingdev.menu.DebugLevel.SSL=SSL -thingdev.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -thingdev.menu.DebugLevel.TLS_MEM=TLS_MEM -thingdev.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -thingdev.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -thingdev.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -thingdev.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -thingdev.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -thingdev.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -thingdev.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -thingdev.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -thingdev.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -thingdev.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -thingdev.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -thingdev.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -thingdev.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -thingdev.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -thingdev.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -thingdev.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.CORE=CORE -thingdev.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -thingdev.menu.DebugLevel.WIFI=WIFI -thingdev.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -thingdev.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -thingdev.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -thingdev.menu.DebugLevel.UPDATER=UPDATER -thingdev.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -thingdev.menu.DebugLevel.OTA=OTA -thingdev.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -thingdev.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -thingdev.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -thingdev.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -thingdev.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -thingdev.menu.UploadSpeed.115200=115200 -thingdev.menu.UploadSpeed.115200.upload.speed=115200 -thingdev.menu.UploadSpeed.9600=9600 -thingdev.menu.UploadSpeed.9600.upload.speed=9600 -thingdev.menu.UploadSpeed.57600=57600 -thingdev.menu.UploadSpeed.57600.upload.speed=57600 -thingdev.menu.UploadSpeed.230400.linux=230400 -thingdev.menu.UploadSpeed.230400.macosx=230400 -thingdev.menu.UploadSpeed.230400.upload.speed=230400 -thingdev.menu.UploadSpeed.256000.windows=256000 -thingdev.menu.UploadSpeed.256000.upload.speed=256000 -thingdev.menu.UploadSpeed.460800.linux=460800 -thingdev.menu.UploadSpeed.460800.macosx=460800 -thingdev.menu.UploadSpeed.460800.upload.speed=460800 -thingdev.menu.UploadSpeed.512000.windows=512000 -thingdev.menu.UploadSpeed.512000.upload.speed=512000 -thingdev.menu.UploadSpeed.921600=921600 -thingdev.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -esp210.name=SweetPea ESP-210 -esp210.build.board=ESP8266_ESP210 -esp210.upload.tool=esptool -esp210.upload.maximum_data_size=81920 -esp210.upload.wait_for_upload_port=true -esp210.serial.disableDTR=true -esp210.serial.disableRTS=true -esp210.build.mcu=esp8266 -esp210.build.core=esp8266 -esp210.build.variant=generic -esp210.build.spiffs_pagesize=256 -esp210.build.debug_port= -esp210.build.debug_level= -esp210.menu.CpuFrequency.80=80 MHz -esp210.menu.CpuFrequency.80.build.f_cpu=80000000L -esp210.menu.CpuFrequency.160=160 MHz -esp210.menu.CpuFrequency.160.build.f_cpu=160000000L -esp210.upload.resetmethod=ck -esp210.build.flash_mode=qio -esp210.build.flash_freq=40 -esp210.menu.FlashSize.4M1M=4M (1M SPIFFS) -esp210.menu.FlashSize.4M1M.build.flash_size=4M -esp210.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -esp210.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -esp210.menu.FlashSize.4M1M.upload.maximum_size=1044464 -esp210.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -esp210.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -esp210.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -esp210.menu.FlashSize.4M3M=4M (3M SPIFFS) -esp210.menu.FlashSize.4M3M.build.flash_size=4M -esp210.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -esp210.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -esp210.menu.FlashSize.4M3M.upload.maximum_size=1044464 -esp210.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -esp210.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -esp210.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -esp210.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -esp210.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -esp210.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -esp210.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -esp210.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -esp210.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -esp210.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -esp210.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -esp210.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -esp210.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -esp210.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -esp210.menu.LwIPVariant.OpenSource=v1.4 Open Source -esp210.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -esp210.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -esp210.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -esp210.menu.Debug.Disabled=Disabled -esp210.menu.Debug.Disabled.build.debug_port= -esp210.menu.Debug.Serial=Serial -esp210.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -esp210.menu.Debug.Serial1=Serial1 -esp210.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -esp210.menu.DebugLevel.None____=None -esp210.menu.DebugLevel.None____.build.debug_level= -esp210.menu.DebugLevel.SSL=SSL -esp210.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -esp210.menu.DebugLevel.TLS_MEM=TLS_MEM -esp210.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -esp210.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -esp210.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -esp210.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -esp210.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -esp210.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -esp210.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -esp210.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -esp210.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -esp210.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -esp210.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -esp210.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -esp210.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -esp210.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -esp210.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -esp210.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.CORE=CORE -esp210.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -esp210.menu.DebugLevel.WIFI=WIFI -esp210.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -esp210.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -esp210.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -esp210.menu.DebugLevel.UPDATER=UPDATER -esp210.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -esp210.menu.DebugLevel.OTA=OTA -esp210.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -esp210.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -esp210.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -esp210.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -esp210.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -esp210.menu.UploadSpeed.57600=57600 -esp210.menu.UploadSpeed.57600.upload.speed=57600 -esp210.menu.UploadSpeed.9600=9600 -esp210.menu.UploadSpeed.9600.upload.speed=9600 -esp210.menu.UploadSpeed.115200=115200 -esp210.menu.UploadSpeed.115200.upload.speed=115200 -esp210.menu.UploadSpeed.230400.linux=230400 -esp210.menu.UploadSpeed.230400.macosx=230400 -esp210.menu.UploadSpeed.230400.upload.speed=230400 -esp210.menu.UploadSpeed.256000.windows=256000 -esp210.menu.UploadSpeed.256000.upload.speed=256000 -esp210.menu.UploadSpeed.460800.linux=460800 -esp210.menu.UploadSpeed.460800.macosx=460800 -esp210.menu.UploadSpeed.460800.upload.speed=460800 -esp210.menu.UploadSpeed.512000.windows=512000 -esp210.menu.UploadSpeed.512000.upload.speed=512000 -esp210.menu.UploadSpeed.921600=921600 -esp210.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -d1_mini.name=WeMos D1 R2 & mini -d1_mini.build.board=ESP8266_WEMOS_D1MINI -d1_mini.build.variant=d1_mini -d1_mini.upload.tool=esptool -d1_mini.upload.maximum_data_size=81920 -d1_mini.upload.wait_for_upload_port=true -d1_mini.serial.disableDTR=true -d1_mini.serial.disableRTS=true -d1_mini.build.mcu=esp8266 -d1_mini.build.core=esp8266 -d1_mini.build.spiffs_pagesize=256 -d1_mini.build.debug_port= -d1_mini.build.debug_level= -d1_mini.menu.CpuFrequency.80=80 MHz -d1_mini.menu.CpuFrequency.80.build.f_cpu=80000000L -d1_mini.menu.CpuFrequency.160=160 MHz -d1_mini.menu.CpuFrequency.160.build.f_cpu=160000000L -d1_mini.upload.resetmethod=nodemcu -d1_mini.build.flash_mode=dio -d1_mini.build.flash_freq=40 -d1_mini.menu.FlashSize.4M1M=4M (1M SPIFFS) -d1_mini.menu.FlashSize.4M1M.build.flash_size=4M -d1_mini.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -d1_mini.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -d1_mini.menu.FlashSize.4M1M.upload.maximum_size=1044464 -d1_mini.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -d1_mini.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -d1_mini.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -d1_mini.menu.FlashSize.4M3M=4M (3M SPIFFS) -d1_mini.menu.FlashSize.4M3M.build.flash_size=4M -d1_mini.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -d1_mini.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -d1_mini.menu.FlashSize.4M3M.upload.maximum_size=1044464 -d1_mini.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -d1_mini.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -d1_mini.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -d1_mini.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -d1_mini.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -d1_mini.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -d1_mini.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -d1_mini.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -d1_mini.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -d1_mini.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -d1_mini.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -d1_mini.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -d1_mini.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -d1_mini.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini.menu.LwIPVariant.OpenSource=v1.4 Open Source -d1_mini.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -d1_mini.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -d1_mini.menu.Debug.Disabled=Disabled -d1_mini.menu.Debug.Disabled.build.debug_port= -d1_mini.menu.Debug.Serial=Serial -d1_mini.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -d1_mini.menu.Debug.Serial1=Serial1 -d1_mini.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -d1_mini.menu.DebugLevel.None____=None -d1_mini.menu.DebugLevel.None____.build.debug_level= -d1_mini.menu.DebugLevel.SSL=SSL -d1_mini.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -d1_mini.menu.DebugLevel.TLS_MEM=TLS_MEM -d1_mini.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -d1_mini.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -d1_mini.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -d1_mini.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -d1_mini.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -d1_mini.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -d1_mini.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -d1_mini.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -d1_mini.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -d1_mini.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -d1_mini.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -d1_mini.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -d1_mini.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -d1_mini.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.CORE=CORE -d1_mini.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -d1_mini.menu.DebugLevel.WIFI=WIFI -d1_mini.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -d1_mini.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -d1_mini.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -d1_mini.menu.DebugLevel.UPDATER=UPDATER -d1_mini.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -d1_mini.menu.DebugLevel.OTA=OTA -d1_mini.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -d1_mini.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -d1_mini.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -d1_mini.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -d1_mini.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -d1_mini.menu.UploadSpeed.921600=921600 -d1_mini.menu.UploadSpeed.921600.upload.speed=921600 -d1_mini.menu.UploadSpeed.9600=9600 -d1_mini.menu.UploadSpeed.9600.upload.speed=9600 -d1_mini.menu.UploadSpeed.57600=57600 -d1_mini.menu.UploadSpeed.57600.upload.speed=57600 -d1_mini.menu.UploadSpeed.115200=115200 -d1_mini.menu.UploadSpeed.115200.upload.speed=115200 -d1_mini.menu.UploadSpeed.230400.linux=230400 -d1_mini.menu.UploadSpeed.230400.macosx=230400 -d1_mini.menu.UploadSpeed.230400.upload.speed=230400 -d1_mini.menu.UploadSpeed.256000.windows=256000 -d1_mini.menu.UploadSpeed.256000.upload.speed=256000 -d1_mini.menu.UploadSpeed.460800.linux=460800 -d1_mini.menu.UploadSpeed.460800.macosx=460800 -d1_mini.menu.UploadSpeed.460800.upload.speed=460800 -d1_mini.menu.UploadSpeed.512000.windows=512000 -d1_mini.menu.UploadSpeed.512000.upload.speed=512000 - -############################################################## -d1_mini_pro.name=WeMos D1 mini Pro -d1_mini_pro.build.board=ESP8266_WEMOS_D1MINIPRO -d1_mini_pro.build.variant=d1_mini -d1_mini_pro.upload.tool=esptool -d1_mini_pro.upload.maximum_data_size=81920 -d1_mini_pro.upload.wait_for_upload_port=true -d1_mini_pro.serial.disableDTR=true -d1_mini_pro.serial.disableRTS=true -d1_mini_pro.build.mcu=esp8266 -d1_mini_pro.build.core=esp8266 -d1_mini_pro.build.spiffs_pagesize=256 -d1_mini_pro.build.debug_port= -d1_mini_pro.build.debug_level= -d1_mini_pro.menu.CpuFrequency.80=80 MHz -d1_mini_pro.menu.CpuFrequency.80.build.f_cpu=80000000L -d1_mini_pro.menu.CpuFrequency.160=160 MHz -d1_mini_pro.menu.CpuFrequency.160.build.f_cpu=160000000L -d1_mini_pro.upload.resetmethod=nodemcu -d1_mini_pro.build.flash_mode=dio -d1_mini_pro.build.flash_freq=40 -d1_mini_pro.menu.FlashSize.16M15M=16M (15M SPIFFS) -d1_mini_pro.menu.FlashSize.16M15M.build.flash_size=16M -d1_mini_pro.menu.FlashSize.16M15M.build.flash_ld=eagle.flash.16m.ld -d1_mini_pro.menu.FlashSize.16M15M.build.spiffs_pagesize=256 -d1_mini_pro.menu.FlashSize.16M15M.upload.maximum_size=1044464 -d1_mini_pro.menu.FlashSize.16M15M.build.spiffs_start=0x100000 -d1_mini_pro.menu.FlashSize.16M15M.build.spiffs_end=0xFFB000 -d1_mini_pro.menu.FlashSize.16M15M.build.spiffs_blocksize=8192 -d1_mini_pro.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -d1_mini_pro.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -d1_mini_pro.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -d1_mini_pro.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -d1_mini_pro.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -d1_mini_pro.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -d1_mini_pro.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -d1_mini_pro.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -d1_mini_pro.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -d1_mini_pro.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -d1_mini_pro.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_pro.menu.LwIPVariant.OpenSource=v1.4 Open Source -d1_mini_pro.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -d1_mini_pro.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_pro.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -d1_mini_pro.menu.Debug.Disabled=Disabled -d1_mini_pro.menu.Debug.Disabled.build.debug_port= -d1_mini_pro.menu.Debug.Serial=Serial -d1_mini_pro.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -d1_mini_pro.menu.Debug.Serial1=Serial1 -d1_mini_pro.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -d1_mini_pro.menu.DebugLevel.None____=None -d1_mini_pro.menu.DebugLevel.None____.build.debug_level= -d1_mini_pro.menu.DebugLevel.SSL=SSL -d1_mini_pro.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -d1_mini_pro.menu.DebugLevel.TLS_MEM=TLS_MEM -d1_mini_pro.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -d1_mini_pro.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -d1_mini_pro.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -d1_mini_pro.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -d1_mini_pro.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.CORE=CORE -d1_mini_pro.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -d1_mini_pro.menu.DebugLevel.WIFI=WIFI -d1_mini_pro.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -d1_mini_pro.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -d1_mini_pro.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -d1_mini_pro.menu.DebugLevel.UPDATER=UPDATER -d1_mini_pro.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -d1_mini_pro.menu.DebugLevel.OTA=OTA -d1_mini_pro.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -d1_mini_pro.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -d1_mini_pro.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -d1_mini_pro.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -d1_mini_pro.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -d1_mini_pro.menu.UploadSpeed.921600=921600 -d1_mini_pro.menu.UploadSpeed.921600.upload.speed=921600 -d1_mini_pro.menu.UploadSpeed.9600=9600 -d1_mini_pro.menu.UploadSpeed.9600.upload.speed=9600 -d1_mini_pro.menu.UploadSpeed.57600=57600 -d1_mini_pro.menu.UploadSpeed.57600.upload.speed=57600 -d1_mini_pro.menu.UploadSpeed.115200=115200 -d1_mini_pro.menu.UploadSpeed.115200.upload.speed=115200 -d1_mini_pro.menu.UploadSpeed.230400.linux=230400 -d1_mini_pro.menu.UploadSpeed.230400.macosx=230400 -d1_mini_pro.menu.UploadSpeed.230400.upload.speed=230400 -d1_mini_pro.menu.UploadSpeed.256000.windows=256000 -d1_mini_pro.menu.UploadSpeed.256000.upload.speed=256000 -d1_mini_pro.menu.UploadSpeed.460800.linux=460800 -d1_mini_pro.menu.UploadSpeed.460800.macosx=460800 -d1_mini_pro.menu.UploadSpeed.460800.upload.speed=460800 -d1_mini_pro.menu.UploadSpeed.512000.windows=512000 -d1_mini_pro.menu.UploadSpeed.512000.upload.speed=512000 - -############################################################## -d1_mini_lite.name=Wemos D1 mini Lite -d1_mini_lite.build.board=ESP8266_WEMOS_D1MINILITE -d1_mini_lite.build.variant=d1_mini -d1_mini_lite.upload.tool=esptool -d1_mini_lite.upload.maximum_data_size=81920 -d1_mini_lite.upload.wait_for_upload_port=true -d1_mini_lite.serial.disableDTR=true -d1_mini_lite.serial.disableRTS=true -d1_mini_lite.build.mcu=esp8266 -d1_mini_lite.build.core=esp8266 -d1_mini_lite.build.spiffs_pagesize=256 -d1_mini_lite.build.debug_port= -d1_mini_lite.build.debug_level= -d1_mini_lite.menu.CpuFrequency.80=80 MHz -d1_mini_lite.menu.CpuFrequency.80.build.f_cpu=80000000L -d1_mini_lite.menu.CpuFrequency.160=160 MHz -d1_mini_lite.menu.CpuFrequency.160.build.f_cpu=160000000L -d1_mini_lite.upload.resetmethod=nodemcu -d1_mini_lite.build.flash_mode=dout -d1_mini_lite.build.flash_freq=40 -d1_mini_lite.menu.FlashSize.1M0=1M (no SPIFFS) -d1_mini_lite.menu.FlashSize.1M0.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M0.build.flash_ld=eagle.flash.1m0.ld -d1_mini_lite.menu.FlashSize.1M0.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M0.upload.maximum_size=1023984 -d1_mini_lite.menu.FlashSize.1M64=1M (64K SPIFFS) -d1_mini_lite.menu.FlashSize.1M64.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M64.build.flash_ld=eagle.flash.1m64.ld -d1_mini_lite.menu.FlashSize.1M64.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M64.upload.maximum_size=958448 -d1_mini_lite.menu.FlashSize.1M64.build.spiffs_start=0xEB000 -d1_mini_lite.menu.FlashSize.1M64.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M64.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M128=1M (128K SPIFFS) -d1_mini_lite.menu.FlashSize.1M128.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M128.build.flash_ld=eagle.flash.1m128.ld -d1_mini_lite.menu.FlashSize.1M128.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M128.upload.maximum_size=892912 -d1_mini_lite.menu.FlashSize.1M128.build.spiffs_start=0xDB000 -d1_mini_lite.menu.FlashSize.1M128.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M128.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M144=1M (144K SPIFFS) -d1_mini_lite.menu.FlashSize.1M144.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M144.build.flash_ld=eagle.flash.1m144.ld -d1_mini_lite.menu.FlashSize.1M144.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M144.upload.maximum_size=876528 -d1_mini_lite.menu.FlashSize.1M144.build.spiffs_start=0xD7000 -d1_mini_lite.menu.FlashSize.1M144.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M144.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M160=1M (160K SPIFFS) -d1_mini_lite.menu.FlashSize.1M160.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M160.build.flash_ld=eagle.flash.1m160.ld -d1_mini_lite.menu.FlashSize.1M160.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M160.upload.maximum_size=860144 -d1_mini_lite.menu.FlashSize.1M160.build.spiffs_start=0xD3000 -d1_mini_lite.menu.FlashSize.1M160.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M160.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M192=1M (192K SPIFFS) -d1_mini_lite.menu.FlashSize.1M192.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M192.build.flash_ld=eagle.flash.1m192.ld -d1_mini_lite.menu.FlashSize.1M192.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M192.upload.maximum_size=827376 -d1_mini_lite.menu.FlashSize.1M192.build.spiffs_start=0xCB000 -d1_mini_lite.menu.FlashSize.1M192.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M192.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M256=1M (256K SPIFFS) -d1_mini_lite.menu.FlashSize.1M256.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M256.build.flash_ld=eagle.flash.1m256.ld -d1_mini_lite.menu.FlashSize.1M256.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M256.upload.maximum_size=761840 -d1_mini_lite.menu.FlashSize.1M256.build.spiffs_start=0xBB000 -d1_mini_lite.menu.FlashSize.1M256.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M256.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M512=1M (512K SPIFFS) -d1_mini_lite.menu.FlashSize.1M512.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M512.build.flash_ld=eagle.flash.1m512.ld -d1_mini_lite.menu.FlashSize.1M512.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M512.upload.maximum_size=499696 -d1_mini_lite.menu.FlashSize.1M512.build.spiffs_start=0x7B000 -d1_mini_lite.menu.FlashSize.1M512.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M512.build.spiffs_blocksize=8192 -d1_mini_lite.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -d1_mini_lite.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -d1_mini_lite.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -d1_mini_lite.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -d1_mini_lite.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -d1_mini_lite.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -d1_mini_lite.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -d1_mini_lite.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -d1_mini_lite.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -d1_mini_lite.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -d1_mini_lite.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_lite.menu.LwIPVariant.OpenSource=v1.4 Open Source -d1_mini_lite.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -d1_mini_lite.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_lite.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -d1_mini_lite.menu.Debug.Disabled=Disabled -d1_mini_lite.menu.Debug.Disabled.build.debug_port= -d1_mini_lite.menu.Debug.Serial=Serial -d1_mini_lite.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -d1_mini_lite.menu.Debug.Serial1=Serial1 -d1_mini_lite.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -d1_mini_lite.menu.DebugLevel.None____=None -d1_mini_lite.menu.DebugLevel.None____.build.debug_level= -d1_mini_lite.menu.DebugLevel.SSL=SSL -d1_mini_lite.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -d1_mini_lite.menu.DebugLevel.TLS_MEM=TLS_MEM -d1_mini_lite.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -d1_mini_lite.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -d1_mini_lite.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -d1_mini_lite.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -d1_mini_lite.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.CORE=CORE -d1_mini_lite.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -d1_mini_lite.menu.DebugLevel.WIFI=WIFI -d1_mini_lite.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -d1_mini_lite.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -d1_mini_lite.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -d1_mini_lite.menu.DebugLevel.UPDATER=UPDATER -d1_mini_lite.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -d1_mini_lite.menu.DebugLevel.OTA=OTA -d1_mini_lite.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -d1_mini_lite.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -d1_mini_lite.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -d1_mini_lite.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -d1_mini_lite.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -d1_mini_lite.menu.UploadSpeed.921600=921600 -d1_mini_lite.menu.UploadSpeed.921600.upload.speed=921600 -d1_mini_lite.menu.UploadSpeed.9600=9600 -d1_mini_lite.menu.UploadSpeed.9600.upload.speed=9600 -d1_mini_lite.menu.UploadSpeed.57600=57600 -d1_mini_lite.menu.UploadSpeed.57600.upload.speed=57600 -d1_mini_lite.menu.UploadSpeed.115200=115200 -d1_mini_lite.menu.UploadSpeed.115200.upload.speed=115200 -d1_mini_lite.menu.UploadSpeed.230400.linux=230400 -d1_mini_lite.menu.UploadSpeed.230400.macosx=230400 -d1_mini_lite.menu.UploadSpeed.230400.upload.speed=230400 -d1_mini_lite.menu.UploadSpeed.256000.windows=256000 -d1_mini_lite.menu.UploadSpeed.256000.upload.speed=256000 -d1_mini_lite.menu.UploadSpeed.460800.linux=460800 -d1_mini_lite.menu.UploadSpeed.460800.macosx=460800 -d1_mini_lite.menu.UploadSpeed.460800.upload.speed=460800 -d1_mini_lite.menu.UploadSpeed.512000.windows=512000 -d1_mini_lite.menu.UploadSpeed.512000.upload.speed=512000 - -############################################################## -d1.name=WeMos D1 R1 -d1.build.board=ESP8266_WEMOS_D1MINI -d1.build.variant=d1 -d1.upload.tool=esptool -d1.upload.maximum_data_size=81920 -d1.upload.wait_for_upload_port=true -d1.serial.disableDTR=true -d1.serial.disableRTS=true -d1.build.mcu=esp8266 -d1.build.core=esp8266 -d1.build.spiffs_pagesize=256 -d1.build.debug_port= -d1.build.debug_level= -d1.menu.CpuFrequency.80=80 MHz -d1.menu.CpuFrequency.80.build.f_cpu=80000000L -d1.menu.CpuFrequency.160=160 MHz -d1.menu.CpuFrequency.160.build.f_cpu=160000000L -d1.upload.resetmethod=nodemcu -d1.build.flash_mode=dio -d1.build.flash_freq=40 -d1.menu.FlashSize.4M1M=4M (1M SPIFFS) -d1.menu.FlashSize.4M1M.build.flash_size=4M -d1.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -d1.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -d1.menu.FlashSize.4M1M.upload.maximum_size=1044464 -d1.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -d1.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -d1.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -d1.menu.FlashSize.4M3M=4M (3M SPIFFS) -d1.menu.FlashSize.4M3M.build.flash_size=4M -d1.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -d1.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -d1.menu.FlashSize.4M3M.upload.maximum_size=1044464 -d1.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -d1.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -d1.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -d1.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -d1.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -d1.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -d1.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -d1.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -d1.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -d1.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -d1.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -d1.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -d1.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -d1.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -d1.menu.LwIPVariant.OpenSource=v1.4 Open Source -d1.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -d1.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -d1.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -d1.menu.Debug.Disabled=Disabled -d1.menu.Debug.Disabled.build.debug_port= -d1.menu.Debug.Serial=Serial -d1.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -d1.menu.Debug.Serial1=Serial1 -d1.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -d1.menu.DebugLevel.None____=None -d1.menu.DebugLevel.None____.build.debug_level= -d1.menu.DebugLevel.SSL=SSL -d1.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -d1.menu.DebugLevel.TLS_MEM=TLS_MEM -d1.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -d1.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -d1.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -d1.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -d1.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -d1.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -d1.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -d1.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -d1.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -d1.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -d1.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -d1.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -d1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -d1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -d1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.CORE=CORE -d1.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -d1.menu.DebugLevel.WIFI=WIFI -d1.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -d1.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -d1.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -d1.menu.DebugLevel.UPDATER=UPDATER -d1.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -d1.menu.DebugLevel.OTA=OTA -d1.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -d1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -d1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -d1.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -d1.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -d1.menu.UploadSpeed.921600=921600 -d1.menu.UploadSpeed.921600.upload.speed=921600 -d1.menu.UploadSpeed.9600=9600 -d1.menu.UploadSpeed.9600.upload.speed=9600 -d1.menu.UploadSpeed.57600=57600 -d1.menu.UploadSpeed.57600.upload.speed=57600 -d1.menu.UploadSpeed.115200=115200 -d1.menu.UploadSpeed.115200.upload.speed=115200 -d1.menu.UploadSpeed.230400.linux=230400 -d1.menu.UploadSpeed.230400.macosx=230400 -d1.menu.UploadSpeed.230400.upload.speed=230400 -d1.menu.UploadSpeed.256000.windows=256000 -d1.menu.UploadSpeed.256000.upload.speed=256000 -d1.menu.UploadSpeed.460800.linux=460800 -d1.menu.UploadSpeed.460800.macosx=460800 -d1.menu.UploadSpeed.460800.upload.speed=460800 -d1.menu.UploadSpeed.512000.windows=512000 -d1.menu.UploadSpeed.512000.upload.speed=512000 - -############################################################## -espino.name=ESPino (ESP-12 Module) -espino.build.board=ESP8266_ESP12 -espino.build.variant=espino -espino.upload.tool=esptool -espino.upload.maximum_data_size=81920 -espino.upload.wait_for_upload_port=true -espino.serial.disableDTR=true -espino.serial.disableRTS=true -espino.build.mcu=esp8266 -espino.build.core=esp8266 -espino.build.spiffs_pagesize=256 -espino.build.debug_port= -espino.build.debug_level= -espino.menu.CpuFrequency.80=80 MHz -espino.menu.CpuFrequency.80.build.f_cpu=80000000L -espino.menu.CpuFrequency.160=160 MHz -espino.menu.CpuFrequency.160.build.f_cpu=160000000L -espino.menu.ResetMethod.ck=ck -espino.menu.ResetMethod.ck.upload.resetmethod=ck -espino.menu.ResetMethod.nodemcu=nodemcu -espino.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -espino.build.flash_mode=qio -espino.build.flash_freq=40 -espino.menu.FlashSize.4M1M=4M (1M SPIFFS) -espino.menu.FlashSize.4M1M.build.flash_size=4M -espino.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -espino.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -espino.menu.FlashSize.4M1M.upload.maximum_size=1044464 -espino.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -espino.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -espino.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -espino.menu.FlashSize.4M3M=4M (3M SPIFFS) -espino.menu.FlashSize.4M3M.build.flash_size=4M -espino.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -espino.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -espino.menu.FlashSize.4M3M.upload.maximum_size=1044464 -espino.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -espino.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -espino.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -espino.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -espino.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -espino.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -espino.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -espino.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -espino.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -espino.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -espino.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -espino.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -espino.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -espino.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -espino.menu.LwIPVariant.OpenSource=v1.4 Open Source -espino.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -espino.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -espino.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -espino.menu.Debug.Disabled=Disabled -espino.menu.Debug.Disabled.build.debug_port= -espino.menu.Debug.Serial=Serial -espino.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -espino.menu.Debug.Serial1=Serial1 -espino.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -espino.menu.DebugLevel.None____=None -espino.menu.DebugLevel.None____.build.debug_level= -espino.menu.DebugLevel.SSL=SSL -espino.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -espino.menu.DebugLevel.TLS_MEM=TLS_MEM -espino.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -espino.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -espino.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -espino.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -espino.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -espino.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -espino.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -espino.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -espino.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -espino.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -espino.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espino.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -espino.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -espino.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espino.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -espino.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -espino.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espino.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.CORE=CORE -espino.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -espino.menu.DebugLevel.WIFI=WIFI -espino.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -espino.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -espino.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -espino.menu.DebugLevel.UPDATER=UPDATER -espino.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -espino.menu.DebugLevel.OTA=OTA -espino.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -espino.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -espino.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -espino.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -espino.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -espino.menu.UploadSpeed.115200=115200 -espino.menu.UploadSpeed.115200.upload.speed=115200 -espino.menu.UploadSpeed.9600=9600 -espino.menu.UploadSpeed.9600.upload.speed=9600 -espino.menu.UploadSpeed.57600=57600 -espino.menu.UploadSpeed.57600.upload.speed=57600 -espino.menu.UploadSpeed.230400.linux=230400 -espino.menu.UploadSpeed.230400.macosx=230400 -espino.menu.UploadSpeed.230400.upload.speed=230400 -espino.menu.UploadSpeed.256000.windows=256000 -espino.menu.UploadSpeed.256000.upload.speed=256000 -espino.menu.UploadSpeed.460800.linux=460800 -espino.menu.UploadSpeed.460800.macosx=460800 -espino.menu.UploadSpeed.460800.upload.speed=460800 -espino.menu.UploadSpeed.512000.windows=512000 -espino.menu.UploadSpeed.512000.upload.speed=512000 -espino.menu.UploadSpeed.921600=921600 -espino.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -espinotee.name=ThaiEasyElec's ESPino -espinotee.build.board=ESP8266_ESP13 -espinotee.build.variant=espinotee -espinotee.upload.tool=esptool -espinotee.upload.maximum_data_size=81920 -espinotee.upload.wait_for_upload_port=true -espinotee.serial.disableDTR=true -espinotee.serial.disableRTS=true -espinotee.build.mcu=esp8266 -espinotee.build.core=esp8266 -espinotee.build.spiffs_pagesize=256 -espinotee.build.debug_port= -espinotee.build.debug_level= -espinotee.menu.CpuFrequency.80=80 MHz -espinotee.menu.CpuFrequency.80.build.f_cpu=80000000L -espinotee.menu.CpuFrequency.160=160 MHz -espinotee.menu.CpuFrequency.160.build.f_cpu=160000000L -espinotee.upload.resetmethod=nodemcu -espinotee.build.flash_mode=qio -espinotee.build.flash_freq=40 -espinotee.menu.FlashSize.4M1M=4M (1M SPIFFS) -espinotee.menu.FlashSize.4M1M.build.flash_size=4M -espinotee.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -espinotee.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -espinotee.menu.FlashSize.4M1M.upload.maximum_size=1044464 -espinotee.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -espinotee.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -espinotee.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -espinotee.menu.FlashSize.4M3M=4M (3M SPIFFS) -espinotee.menu.FlashSize.4M3M.build.flash_size=4M -espinotee.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -espinotee.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -espinotee.menu.FlashSize.4M3M.upload.maximum_size=1044464 -espinotee.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -espinotee.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -espinotee.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -espinotee.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -espinotee.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -espinotee.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -espinotee.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -espinotee.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -espinotee.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -espinotee.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -espinotee.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -espinotee.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -espinotee.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -espinotee.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -espinotee.menu.LwIPVariant.OpenSource=v1.4 Open Source -espinotee.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -espinotee.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -espinotee.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -espinotee.menu.Debug.Disabled=Disabled -espinotee.menu.Debug.Disabled.build.debug_port= -espinotee.menu.Debug.Serial=Serial -espinotee.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -espinotee.menu.Debug.Serial1=Serial1 -espinotee.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -espinotee.menu.DebugLevel.None____=None -espinotee.menu.DebugLevel.None____.build.debug_level= -espinotee.menu.DebugLevel.SSL=SSL -espinotee.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -espinotee.menu.DebugLevel.TLS_MEM=TLS_MEM -espinotee.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -espinotee.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -espinotee.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -espinotee.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -espinotee.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -espinotee.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -espinotee.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -espinotee.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -espinotee.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -espinotee.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -espinotee.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espinotee.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -espinotee.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -espinotee.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -espinotee.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espinotee.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.CORE=CORE -espinotee.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -espinotee.menu.DebugLevel.WIFI=WIFI -espinotee.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -espinotee.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -espinotee.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -espinotee.menu.DebugLevel.UPDATER=UPDATER -espinotee.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -espinotee.menu.DebugLevel.OTA=OTA -espinotee.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -espinotee.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -espinotee.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -espinotee.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -espinotee.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -espinotee.menu.UploadSpeed.115200=115200 -espinotee.menu.UploadSpeed.115200.upload.speed=115200 -espinotee.menu.UploadSpeed.9600=9600 -espinotee.menu.UploadSpeed.9600.upload.speed=9600 -espinotee.menu.UploadSpeed.57600=57600 -espinotee.menu.UploadSpeed.57600.upload.speed=57600 -espinotee.menu.UploadSpeed.230400.linux=230400 -espinotee.menu.UploadSpeed.230400.macosx=230400 -espinotee.menu.UploadSpeed.230400.upload.speed=230400 -espinotee.menu.UploadSpeed.256000.windows=256000 -espinotee.menu.UploadSpeed.256000.upload.speed=256000 -espinotee.menu.UploadSpeed.460800.linux=460800 -espinotee.menu.UploadSpeed.460800.macosx=460800 -espinotee.menu.UploadSpeed.460800.upload.speed=460800 -espinotee.menu.UploadSpeed.512000.windows=512000 -espinotee.menu.UploadSpeed.512000.upload.speed=512000 -espinotee.menu.UploadSpeed.921600=921600 -espinotee.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -wifinfo.name=WifInfo -wifinfo.menu.ESPModule.ESP12.build.board=ESP8266_ESP12 -wifinfo.menu.ESPModule.ESP12.upload.maximum_size=1044464 -wifinfo.menu.ESPModule.ESP12.build.spiffs_pagesize=256 -wifinfo.menu.ESPModule.ESP12.build.flash_ld=eagle.flash.4m1m.ld -wifinfo.menu.ESPModule.ESP07192.build.spiffs_blocksize=4096 -wifinfo.menu.ESPModule.ESP07192.build.spiffs_end=0xFB000 -wifinfo.menu.ESPModule.ESP12=ESP12 (4M/1M SPIFFS) -wifinfo.menu.ESPModule.ESP12.build.spiffs_start=0x300000 -wifinfo.menu.ESPModule.ESP12.build.spiffs_end=0x3FB000 -wifinfo.menu.ESPModule.ESP07192.build.spiffs_start=0xCB000 -wifinfo.menu.ESPModule.ESP07192.build.board=ESP8266_ESP07 -wifinfo.menu.ESPModule.ESP12.build.spiffs_blocksize=8192 -wifinfo.menu.ESPModule.ESP12.build.flash_size=4M -wifinfo.build.board=WIFINFO -wifinfo.build.variant=wifinfo -wifinfo.menu.ESPModule.ESP07192.build.flash_ld=eagle.flash.1m192.ld -wifinfo.menu.ESPModule.ESP07192.build.flash_size=1M -wifinfo.menu.ESPModule.ESP07192=ESP07 (1M/192K SPIFFS) -wifinfo.menu.ESPModule.ESP07192.upload.maximum_size=827376 -wifinfo.upload.tool=esptool -wifinfo.upload.maximum_data_size=81920 -wifinfo.upload.wait_for_upload_port=true -wifinfo.serial.disableDTR=true -wifinfo.serial.disableRTS=true -wifinfo.build.mcu=esp8266 -wifinfo.build.core=esp8266 -wifinfo.build.spiffs_pagesize=256 -wifinfo.build.debug_port= -wifinfo.build.debug_level= -wifinfo.menu.CpuFrequency.80=80 MHz -wifinfo.menu.CpuFrequency.80.build.f_cpu=80000000L -wifinfo.menu.CpuFrequency.160=160 MHz -wifinfo.menu.CpuFrequency.160.build.f_cpu=160000000L -wifinfo.build.flash_mode=qio -wifinfo.menu.FlashFreq.40=40MHz -wifinfo.menu.FlashFreq.40.build.flash_freq=40 -wifinfo.menu.FlashFreq.80=80MHz -wifinfo.menu.FlashFreq.80.build.flash_freq=80 -wifinfo.menu.FlashSize.1M0=1M (no SPIFFS) -wifinfo.menu.FlashSize.1M0.build.flash_size=1M -wifinfo.menu.FlashSize.1M0.build.flash_ld=eagle.flash.1m0.ld -wifinfo.menu.FlashSize.1M0.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M0.upload.maximum_size=1023984 -wifinfo.menu.FlashSize.1M64=1M (64K SPIFFS) -wifinfo.menu.FlashSize.1M64.build.flash_size=1M -wifinfo.menu.FlashSize.1M64.build.flash_ld=eagle.flash.1m64.ld -wifinfo.menu.FlashSize.1M64.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M64.upload.maximum_size=958448 -wifinfo.menu.FlashSize.1M64.build.spiffs_start=0xEB000 -wifinfo.menu.FlashSize.1M64.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M64.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M128=1M (128K SPIFFS) -wifinfo.menu.FlashSize.1M128.build.flash_size=1M -wifinfo.menu.FlashSize.1M128.build.flash_ld=eagle.flash.1m128.ld -wifinfo.menu.FlashSize.1M128.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M128.upload.maximum_size=892912 -wifinfo.menu.FlashSize.1M128.build.spiffs_start=0xDB000 -wifinfo.menu.FlashSize.1M128.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M128.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M144=1M (144K SPIFFS) -wifinfo.menu.FlashSize.1M144.build.flash_size=1M -wifinfo.menu.FlashSize.1M144.build.flash_ld=eagle.flash.1m144.ld -wifinfo.menu.FlashSize.1M144.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M144.upload.maximum_size=876528 -wifinfo.menu.FlashSize.1M144.build.spiffs_start=0xD7000 -wifinfo.menu.FlashSize.1M144.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M144.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M160=1M (160K SPIFFS) -wifinfo.menu.FlashSize.1M160.build.flash_size=1M -wifinfo.menu.FlashSize.1M160.build.flash_ld=eagle.flash.1m160.ld -wifinfo.menu.FlashSize.1M160.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M160.upload.maximum_size=860144 -wifinfo.menu.FlashSize.1M160.build.spiffs_start=0xD3000 -wifinfo.menu.FlashSize.1M160.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M160.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M192=1M (192K SPIFFS) -wifinfo.menu.FlashSize.1M192.build.flash_size=1M -wifinfo.menu.FlashSize.1M192.build.flash_ld=eagle.flash.1m192.ld -wifinfo.menu.FlashSize.1M192.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M192.upload.maximum_size=827376 -wifinfo.menu.FlashSize.1M192.build.spiffs_start=0xCB000 -wifinfo.menu.FlashSize.1M192.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M192.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M256=1M (256K SPIFFS) -wifinfo.menu.FlashSize.1M256.build.flash_size=1M -wifinfo.menu.FlashSize.1M256.build.flash_ld=eagle.flash.1m256.ld -wifinfo.menu.FlashSize.1M256.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M256.upload.maximum_size=761840 -wifinfo.menu.FlashSize.1M256.build.spiffs_start=0xBB000 -wifinfo.menu.FlashSize.1M256.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M256.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M512=1M (512K SPIFFS) -wifinfo.menu.FlashSize.1M512.build.flash_size=1M -wifinfo.menu.FlashSize.1M512.build.flash_ld=eagle.flash.1m512.ld -wifinfo.menu.FlashSize.1M512.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M512.upload.maximum_size=499696 -wifinfo.menu.FlashSize.1M512.build.spiffs_start=0x7B000 -wifinfo.menu.FlashSize.1M512.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M512.build.spiffs_blocksize=8192 -wifinfo.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -wifinfo.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -wifinfo.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -wifinfo.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -wifinfo.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -wifinfo.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -wifinfo.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -wifinfo.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -wifinfo.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -wifinfo.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -wifinfo.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -wifinfo.menu.LwIPVariant.OpenSource=v1.4 Open Source -wifinfo.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -wifinfo.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -wifinfo.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -wifinfo.menu.Debug.Disabled=Disabled -wifinfo.menu.Debug.Disabled.build.debug_port= -wifinfo.menu.Debug.Serial=Serial -wifinfo.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -wifinfo.menu.Debug.Serial1=Serial1 -wifinfo.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -wifinfo.menu.DebugLevel.None____=None -wifinfo.menu.DebugLevel.None____.build.debug_level= -wifinfo.menu.DebugLevel.SSL=SSL -wifinfo.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -wifinfo.menu.DebugLevel.TLS_MEM=TLS_MEM -wifinfo.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -wifinfo.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -wifinfo.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -wifinfo.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -wifinfo.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -wifinfo.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -wifinfo.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -wifinfo.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -wifinfo.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -wifinfo.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -wifinfo.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -wifinfo.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -wifinfo.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -wifinfo.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -wifinfo.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -wifinfo.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.CORE=CORE -wifinfo.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -wifinfo.menu.DebugLevel.WIFI=WIFI -wifinfo.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -wifinfo.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -wifinfo.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -wifinfo.menu.DebugLevel.UPDATER=UPDATER -wifinfo.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -wifinfo.menu.DebugLevel.OTA=OTA -wifinfo.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -wifinfo.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -wifinfo.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -wifinfo.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -wifinfo.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -wifinfo.menu.UploadSpeed.115200=115200 -wifinfo.menu.UploadSpeed.115200.upload.speed=115200 -wifinfo.menu.UploadSpeed.9600=9600 -wifinfo.menu.UploadSpeed.9600.upload.speed=9600 -wifinfo.menu.UploadSpeed.57600=57600 -wifinfo.menu.UploadSpeed.57600.upload.speed=57600 -wifinfo.menu.UploadSpeed.230400.linux=230400 -wifinfo.menu.UploadSpeed.230400.macosx=230400 -wifinfo.menu.UploadSpeed.230400.upload.speed=230400 -wifinfo.menu.UploadSpeed.256000.windows=256000 -wifinfo.menu.UploadSpeed.256000.upload.speed=256000 -wifinfo.menu.UploadSpeed.460800.linux=460800 -wifinfo.menu.UploadSpeed.460800.macosx=460800 -wifinfo.menu.UploadSpeed.460800.upload.speed=460800 -wifinfo.menu.UploadSpeed.512000.windows=512000 -wifinfo.menu.UploadSpeed.512000.upload.speed=512000 -wifinfo.menu.UploadSpeed.921600=921600 -wifinfo.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -arduino-esp8266.name=Arduino -arduino-esp8266.menu.BoardModel.starottodeved.build.board=ESP8266_ARDUINO_STAR_OTTO -arduino-esp8266.menu.BoardModel.primo.build.extra_flags=-DF_CRYSTAL=40000000 -DESP8266 -arduino-esp8266.menu.BoardModel.starottodeved.build.extra_flags=-DF_CRYSTAL=40000000 -DESP8266 -arduino-esp8266.menu.BoardModel.starottodeved.build.variant=arduino_uart -arduino-esp8266.menu.BoardModel.unowifideved.build.board=ESP8266_ARDUINO_UNOWIFI -arduino-esp8266.menu.BoardModel.unowifideved.build.extra_flags=-DF_CRYSTAL=40000000 -DESP8266 -arduino-esp8266.menu.BoardModel.primo=Primo -arduino-esp8266.menu.BoardModel.unowifideved.build.variant=arduino_uart -arduino-esp8266.menu.BoardModel.primo.build.variant=arduino_spi -arduino-esp8266.menu.BoardModel.starottodeved=Star OTTO -arduino-esp8266.build.board=ESP8266_ARDUINO -arduino-esp8266.menu.BoardModel.primo.build.board=ESP8266_ARDUINO_PRIMO -arduino-esp8266.menu.BoardModel.unowifideved=Uno WiFi -arduino-esp8266.upload.tool=esptool -arduino-esp8266.upload.maximum_data_size=81920 -arduino-esp8266.upload.wait_for_upload_port=true -arduino-esp8266.serial.disableDTR=true -arduino-esp8266.serial.disableRTS=true -arduino-esp8266.build.mcu=esp8266 -arduino-esp8266.build.core=esp8266 -arduino-esp8266.build.variant=generic -arduino-esp8266.build.spiffs_pagesize=256 -arduino-esp8266.build.debug_port= -arduino-esp8266.build.debug_level= -arduino-esp8266.menu.CpuFrequency.80=80 MHz -arduino-esp8266.menu.CpuFrequency.80.build.f_cpu=80000000L -arduino-esp8266.menu.CpuFrequency.160=160 MHz -arduino-esp8266.menu.CpuFrequency.160.build.f_cpu=160000000L -arduino-esp8266.build.flash_mode=qio -arduino-esp8266.build.flash_freq=40 -arduino-esp8266.menu.FlashSize.4M1M=4M (1M SPIFFS) -arduino-esp8266.menu.FlashSize.4M1M.build.flash_size=4M -arduino-esp8266.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -arduino-esp8266.menu.FlashSize.4M1M.upload.maximum_size=1044464 -arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -arduino-esp8266.menu.FlashSize.4M3M=4M (3M SPIFFS) -arduino-esp8266.menu.FlashSize.4M3M.build.flash_size=4M -arduino-esp8266.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -arduino-esp8266.menu.FlashSize.4M3M.upload.maximum_size=1044464 -arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -arduino-esp8266.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -arduino-esp8266.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -arduino-esp8266.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -arduino-esp8266.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -arduino-esp8266.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -arduino-esp8266.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -arduino-esp8266.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -arduino-esp8266.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -arduino-esp8266.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -arduino-esp8266.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -arduino-esp8266.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -arduino-esp8266.menu.LwIPVariant.OpenSource=v1.4 Open Source -arduino-esp8266.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -arduino-esp8266.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -arduino-esp8266.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -arduino-esp8266.menu.Debug.Disabled=Disabled -arduino-esp8266.menu.Debug.Disabled.build.debug_port= -arduino-esp8266.menu.Debug.Serial=Serial -arduino-esp8266.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -arduino-esp8266.menu.Debug.Serial1=Serial1 -arduino-esp8266.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -arduino-esp8266.menu.DebugLevel.None____=None -arduino-esp8266.menu.DebugLevel.None____.build.debug_level= -arduino-esp8266.menu.DebugLevel.SSL=SSL -arduino-esp8266.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -arduino-esp8266.menu.DebugLevel.TLS_MEM=TLS_MEM -arduino-esp8266.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -arduino-esp8266.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -arduino-esp8266.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -arduino-esp8266.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -arduino-esp8266.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.CORE=CORE -arduino-esp8266.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -arduino-esp8266.menu.DebugLevel.WIFI=WIFI -arduino-esp8266.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -arduino-esp8266.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -arduino-esp8266.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -arduino-esp8266.menu.DebugLevel.UPDATER=UPDATER -arduino-esp8266.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -arduino-esp8266.menu.DebugLevel.OTA=OTA -arduino-esp8266.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -arduino-esp8266.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -arduino-esp8266.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -arduino-esp8266.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -arduino-esp8266.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -arduino-esp8266.menu.UploadSpeed.115200=115200 -arduino-esp8266.menu.UploadSpeed.115200.upload.speed=115200 -arduino-esp8266.menu.UploadSpeed.9600=9600 -arduino-esp8266.menu.UploadSpeed.9600.upload.speed=9600 -arduino-esp8266.menu.UploadSpeed.57600=57600 -arduino-esp8266.menu.UploadSpeed.57600.upload.speed=57600 -arduino-esp8266.menu.UploadSpeed.230400.linux=230400 -arduino-esp8266.menu.UploadSpeed.230400.macosx=230400 -arduino-esp8266.menu.UploadSpeed.230400.upload.speed=230400 -arduino-esp8266.menu.UploadSpeed.256000.windows=256000 -arduino-esp8266.menu.UploadSpeed.256000.upload.speed=256000 -arduino-esp8266.menu.UploadSpeed.460800.linux=460800 -arduino-esp8266.menu.UploadSpeed.460800.macosx=460800 -arduino-esp8266.menu.UploadSpeed.460800.upload.speed=460800 -arduino-esp8266.menu.UploadSpeed.512000.windows=512000 -arduino-esp8266.menu.UploadSpeed.512000.upload.speed=512000 -arduino-esp8266.menu.UploadSpeed.921600=921600 -arduino-esp8266.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -gen4iod.name=4D Systems gen4 IoD Range -gen4iod.build.board=GEN4_IOD -gen4iod.build.f_cpu=160000000L -gen4iod.build.variant=generic -gen4iod.upload.tool=esptool -gen4iod.upload.maximum_data_size=81920 -gen4iod.upload.wait_for_upload_port=true -gen4iod.serial.disableDTR=true -gen4iod.serial.disableRTS=true -gen4iod.build.mcu=esp8266 -gen4iod.build.core=esp8266 -gen4iod.build.spiffs_pagesize=256 -gen4iod.build.debug_port= -gen4iod.build.debug_level= -gen4iod.menu.CpuFrequency.80=80 MHz -gen4iod.menu.CpuFrequency.80.build.f_cpu=80000000L -gen4iod.menu.CpuFrequency.160=160 MHz -gen4iod.menu.CpuFrequency.160.build.f_cpu=160000000L -gen4iod.build.flash_mode=qio -gen4iod.build.flash_freq=80 -gen4iod.menu.FlashSize.512K0=512K (no SPIFFS) -gen4iod.menu.FlashSize.512K0.build.flash_size=512K -gen4iod.menu.FlashSize.512K0.build.flash_ld=eagle.flash.512k0.ld -gen4iod.menu.FlashSize.512K0.build.spiffs_pagesize=256 -gen4iod.menu.FlashSize.512K0.upload.maximum_size=499696 -gen4iod.menu.FlashSize.512K64=512K (64K SPIFFS) -gen4iod.menu.FlashSize.512K64.build.flash_size=512K -gen4iod.menu.FlashSize.512K64.build.flash_ld=eagle.flash.512k64.ld -gen4iod.menu.FlashSize.512K64.build.spiffs_pagesize=256 -gen4iod.menu.FlashSize.512K64.upload.maximum_size=434160 -gen4iod.menu.FlashSize.512K64.build.spiffs_start=0x6B000 -gen4iod.menu.FlashSize.512K64.build.spiffs_end=0x7B000 -gen4iod.menu.FlashSize.512K64.build.spiffs_blocksize=4096 -gen4iod.menu.FlashSize.512K128=512K (128K SPIFFS) -gen4iod.menu.FlashSize.512K128.build.flash_size=512K -gen4iod.menu.FlashSize.512K128.build.flash_ld=eagle.flash.512k128.ld -gen4iod.menu.FlashSize.512K128.build.spiffs_pagesize=256 -gen4iod.menu.FlashSize.512K128.upload.maximum_size=368624 -gen4iod.menu.FlashSize.512K128.build.spiffs_start=0x5B000 -gen4iod.menu.FlashSize.512K128.build.spiffs_end=0x7B000 -gen4iod.menu.FlashSize.512K128.build.spiffs_blocksize=4096 -gen4iod.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -gen4iod.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -gen4iod.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -gen4iod.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -gen4iod.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -gen4iod.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -gen4iod.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -gen4iod.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -gen4iod.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -gen4iod.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -gen4iod.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -gen4iod.menu.LwIPVariant.OpenSource=v1.4 Open Source -gen4iod.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -gen4iod.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -gen4iod.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -gen4iod.menu.Debug.Disabled=Disabled -gen4iod.menu.Debug.Disabled.build.debug_port= -gen4iod.menu.Debug.Serial=Serial -gen4iod.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -gen4iod.menu.Debug.Serial1=Serial1 -gen4iod.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -gen4iod.menu.DebugLevel.None____=None -gen4iod.menu.DebugLevel.None____.build.debug_level= -gen4iod.menu.DebugLevel.SSL=SSL -gen4iod.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -gen4iod.menu.DebugLevel.TLS_MEM=TLS_MEM -gen4iod.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -gen4iod.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -gen4iod.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -gen4iod.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -gen4iod.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -gen4iod.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -gen4iod.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -gen4iod.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -gen4iod.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -gen4iod.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -gen4iod.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -gen4iod.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -gen4iod.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -gen4iod.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -gen4iod.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -gen4iod.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.CORE=CORE -gen4iod.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -gen4iod.menu.DebugLevel.WIFI=WIFI -gen4iod.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -gen4iod.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -gen4iod.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -gen4iod.menu.DebugLevel.UPDATER=UPDATER -gen4iod.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -gen4iod.menu.DebugLevel.OTA=OTA -gen4iod.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -gen4iod.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -gen4iod.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -gen4iod.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -gen4iod.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -gen4iod.menu.UploadSpeed.115200=115200 -gen4iod.menu.UploadSpeed.115200.upload.speed=115200 -gen4iod.menu.UploadSpeed.9600=9600 -gen4iod.menu.UploadSpeed.9600.upload.speed=9600 -gen4iod.menu.UploadSpeed.57600=57600 -gen4iod.menu.UploadSpeed.57600.upload.speed=57600 -gen4iod.menu.UploadSpeed.230400.linux=230400 -gen4iod.menu.UploadSpeed.230400.macosx=230400 -gen4iod.menu.UploadSpeed.230400.upload.speed=230400 -gen4iod.menu.UploadSpeed.256000.windows=256000 -gen4iod.menu.UploadSpeed.256000.upload.speed=256000 -gen4iod.menu.UploadSpeed.460800.linux=460800 -gen4iod.menu.UploadSpeed.460800.macosx=460800 -gen4iod.menu.UploadSpeed.460800.upload.speed=460800 -gen4iod.menu.UploadSpeed.512000.windows=512000 -gen4iod.menu.UploadSpeed.512000.upload.speed=512000 -gen4iod.menu.UploadSpeed.921600=921600 -gen4iod.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -oak.name=DigiStump Oak -oak.build.board=ESP8266_OAK -oak.build.variant=oak -oak.upload.maximum_size=1040368 -oak.upload.tool=esptool -oak.upload.maximum_data_size=81920 -oak.upload.wait_for_upload_port=true -oak.serial.disableDTR=true -oak.serial.disableRTS=true -oak.build.mcu=esp8266 -oak.build.core=esp8266 -oak.build.spiffs_pagesize=256 -oak.build.debug_port= -oak.build.debug_level= -oak.menu.CpuFrequency.80=80 MHz -oak.menu.CpuFrequency.80.build.f_cpu=80000000L -oak.menu.CpuFrequency.160=160 MHz -oak.menu.CpuFrequency.160.build.f_cpu=160000000L -oak.build.flash_mode=dio -oak.build.flash_freq=40 -oak.menu.FlashSize.4M1M=4M (1M SPIFFS) -oak.menu.FlashSize.4M1M.build.flash_size=4M -oak.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -oak.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -oak.menu.FlashSize.4M1M.upload.maximum_size=1044464 -oak.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -oak.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -oak.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -oak.menu.FlashSize.4M3M=4M (3M SPIFFS) -oak.menu.FlashSize.4M3M.build.flash_size=4M -oak.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -oak.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -oak.menu.FlashSize.4M3M.upload.maximum_size=1044464 -oak.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -oak.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -oak.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -oak.menu.LwIPVariant.v2mss536=v2 Prebuilt (MSS=536) -oak.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -oak.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -oak.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -oak.menu.LwIPVariant.v2mss1460=v2 Prebuilt (MSS=1460, unstable) -oak.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -oak.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -oak.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -oak.menu.LwIPVariant.Prebuilt=v1.4 Prebuilt -oak.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -oak.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -oak.menu.LwIPVariant.OpenSource=v1.4 Open Source -oak.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -oak.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -oak.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -oak.menu.Debug.Disabled=Disabled -oak.menu.Debug.Disabled.build.debug_port= -oak.menu.Debug.Serial=Serial -oak.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -oak.menu.Debug.Serial1=Serial1 -oak.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -oak.menu.DebugLevel.None____=None -oak.menu.DebugLevel.None____.build.debug_level= -oak.menu.DebugLevel.SSL=SSL -oak.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -oak.menu.DebugLevel.TLS_MEM=TLS_MEM -oak.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -oak.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -oak.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -oak.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -oak.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -oak.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -oak.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -oak.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -oak.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -oak.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -oak.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -oak.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -oak.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -oak.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -oak.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -oak.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -oak.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -oak.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.CORE=CORE -oak.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -oak.menu.DebugLevel.WIFI=WIFI -oak.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -oak.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -oak.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -oak.menu.DebugLevel.UPDATER=UPDATER -oak.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -oak.menu.DebugLevel.OTA=OTA -oak.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -oak.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -oak.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTA.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -oak.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -oak.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -oak.menu.UploadSpeed.921600=921600 -oak.menu.UploadSpeed.921600.upload.speed=921600 -oak.menu.UploadSpeed.9600=9600 -oak.menu.UploadSpeed.9600.upload.speed=9600 -oak.menu.UploadSpeed.57600=57600 -oak.menu.UploadSpeed.57600.upload.speed=57600 -oak.menu.UploadSpeed.115200=115200 -oak.menu.UploadSpeed.115200.upload.speed=115200 -oak.menu.UploadSpeed.230400.linux=230400 -oak.menu.UploadSpeed.230400.macosx=230400 -oak.menu.UploadSpeed.230400.upload.speed=230400 -oak.menu.UploadSpeed.256000.windows=256000 -oak.menu.UploadSpeed.256000.upload.speed=256000 -oak.menu.UploadSpeed.460800.linux=460800 -oak.menu.UploadSpeed.460800.macosx=460800 -oak.menu.UploadSpeed.460800.upload.speed=460800 -oak.menu.UploadSpeed.512000.windows=512000 -oak.menu.UploadSpeed.512000.upload.speed=512000 - diff --git a/arduino/version 2.4.0/platform.txt b/arduino/version 2.4.0/platform.txt deleted file mode 100644 index d284f64da..000000000 --- a/arduino/version 2.4.0/platform.txt +++ /dev/null @@ -1,133 +0,0 @@ - -# ESP8266 platform -# ------------------------------ - -# For more info: -# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification - -name=ESP8266 Modules -version=2.4.0 - - - - -compiler.warning_flags=-w -compiler.warning_flags.none=-w -compiler.warning_flags.default= -compiler.warning_flags.more=-Wall -compiler.warning_flags.all=-Wall -Wextra - -build.lwip_lib=-llwip_gcc -build.lwip_include=lwip/include -build.lwip_flags=-DLWIP_OPEN_SRC - -compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/ -compiler.sdk.path={runtime.platform.path}/tools/sdk -compiler.libc.path={runtime.platform.path}/tools/sdk/libc/xtensa-lx106-elf -compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/{build.lwip_include}" "-I{compiler.libc.path}/include" "-I{build.path}/core" - -compiler.c.cmd=xtensa-lx106-elf-gcc -compiler.c.flags=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections - -compiler.S.cmd=xtensa-lx106-elf-gcc -compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls - -# compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -u _printf_float -u _scanf_float -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read -compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read - -compiler.c.elf.cmd=xtensa-lx106-elf-gcc -compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lmesh -lwpa2 -lstdc++ -lm -lc -lgcc - -compiler.cpp.cmd=xtensa-lx106-elf-g++ -compiler.cpp.flags=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections - -compiler.as.cmd=xtensa-lx106-elf-as - -compiler.ar.cmd=xtensa-lx106-elf-ar -compiler.ar.flags=cru - -compiler.elf2hex.cmd=esptool -compiler.elf2hex.flags= - -compiler.size.cmd=xtensa-lx106-elf-size - -compiler.esptool.cmd=esptool -compiler.esptool.cmd.windows=esptool.exe - -# This can be overriden in boards.txt -build.extra_flags=-DESP8266 - -# These can be overridden in platform.local.txt -compiler.c.extra_flags= -compiler.c.elf.extra_flags= -compiler.S.extra_flags= -compiler.cpp.extra_flags= -compiler.ar.extra_flags= -compiler.objcopy.eep.extra_flags= -compiler.elf2hex.extra_flags= - -## generate file with git version number -## needs bash, git, and echo - -## windows-compatible version may be added later - - -## Compile c files -recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.c.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}" - -## Compile c++ files -recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor.flags} {compiler.cpp.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}" - -## Compile S files -recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}" - -## Create archives -recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/arduino.ar" "{object_file}" - -## Combine gc-sections, archives, and objects -recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{build.path}/arduino.ar" {compiler.c.elf.libs} -Wl,--end-group "-L{build.path}" - -## Create eeprom -recipe.objcopy.eep.pattern= - -## Create hex -#recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" - -recipe.objcopy.hex.pattern="{runtime.tools.esptool.path}/{compiler.esptool.cmd}" -eo "{runtime.platform.path}/bootloaders/eboot/eboot.elf" -bo "{build.path}/{build.project_name}.bin" -bm {build.flash_mode} -bf {build.flash_freq} -bz {build.flash_size} -bs .text -bp 4096 -ec -eo "{build.path}/{build.project_name}.elf" -bs .irom0.text -bs .text -bs .data -bs .rodata -bc -ec - -## Save hex -recipe.output.tmp_file={build.project_name}.bin -recipe.output.save_file={build.project_name}.{build.variant}.bin - -## Compute size -recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" -recipe.size.regex=^(?:\.irom0\.text|\.text|\.data|\.rodata|)\s+([0-9]+).* -recipe.size.regex.data=^(?:\.data|\.rodata|\.bss)\s+([0-9]+).* -#recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).* - -# ------------------------------ - -tools.esptool.cmd=esptool -tools.esptool.cmd.windows=esptool.exe -tools.esptool.path={runtime.tools.esptool.path} -tools.esptool.network_cmd=python -tools.esptool.network_cmd.windows=python.exe - -tools.esptool.upload.protocol=esp -tools.esptool.upload.params.verbose=-vv -tools.esptool.upload.params.quiet= -tools.esptool.upload.pattern="{path}/{cmd}" {upload.verbose} -cd {upload.resetmethod} -cb {upload.speed} -cp "{serial.port}" -ca 0x00000 -cf "{build.path}/{build.project_name}.bin" -tools.esptool.upload.network_pattern="{network_cmd}" "{runtime.platform.path}/tools/espota.py" -i "{serial.port}" -p "{network.port}" "--auth={network.password}" -f "{build.path}/{build.project_name}.bin" - -tools.mkspiffs.cmd=mkspiffs -tools.mkspiffs.cmd.windows=mkspiffs.exe -tools.mkspiffs.path={runtime.tools.mkspiffs.path} - -tools.espupload.cmd=python -tools.espupload.cmd.windows=python.exe -tools.espupload.path={runtime.platform.path}/tools - -tools.espupload.upload.protocol=espupload -tools.espupload.upload.params.verbose= -tools.espupload.upload.params.quiet= -tools.espupload.upload.pattern="{cmd}" "{path}/espupload.py" -f "{build.path}/{build.project_name}.bin" diff --git a/arduino/version 2.4.1/boards.txt b/arduino/version 2.4.1/boards.txt deleted file mode 100644 index 0d948f012..000000000 --- a/arduino/version 2.4.1/boards.txt +++ /dev/null @@ -1,3796 +0,0 @@ -# -# this file is script-generated and is likely to be overwritten by boards.txt.py -# - -menu.BoardModel=Model -menu.UploadSpeed=Upload Speed -menu.UploadTool=Upload Using -menu.CpuFrequency=CPU Frequency -menu.CrystalFreq=Crystal Frequency -menu.FlashSize=Flash Size -menu.FlashMode=Flash Mode -menu.FlashFreq=Flash Frequency -menu.ResetMethod=Reset Method -menu.ESPModule=Module -menu.Debug=Debug port -menu.DebugLevel=Debug Level -menu.LwIPVariant=lwIP Variant -menu.led=Builtin Led -menu.FlashErase=Erase Flash - -############################################################## -generic.name=Generic ESP8266 Module -generic.build.board=ESP8266_GENERIC -generic.upload.tool=esptool -generic.upload.maximum_data_size=81920 -generic.upload.wait_for_upload_port=true -generic.upload.erase_cmd= -generic.serial.disableDTR=true -generic.serial.disableRTS=true -generic.build.mcu=esp8266 -generic.build.core=esp8266 -generic.build.variant=generic -generic.build.spiffs_pagesize=256 -generic.build.debug_port= -generic.build.debug_level= - -generic.menu.UploadTool.esptool=Serial -generic.menu.UploadTool.esptool.upload.tool=esptool -generic.menu.UploadTool.esptool.upload.verbose=-vv -generic.menu.UploadTool.espupload=OTA_upload -generic.menu.UploadTool.espupload.upload.tool=espupload - -generic.menu.CpuFrequency.80=80 MHz -generic.menu.CpuFrequency.80.build.f_cpu=80000000L -generic.menu.CpuFrequency.160=160 MHz -generic.menu.CpuFrequency.160.build.f_cpu=160000000L -generic.menu.ResetMethod.ck=ck -generic.menu.ResetMethod.ck.upload.resetmethod=ck -generic.menu.ResetMethod.nodemcu=nodemcu -generic.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -generic.menu.ResetMethod.none=none -generic.menu.ResetMethod.none.upload.resetmethod=none -generic.menu.ResetMethod.dtrset=dtrset -generic.menu.ResetMethod.dtrset.upload.resetmethod=dtrset -generic.menu.CrystalFreq.26=26 MHz -generic.menu.CrystalFreq.40=40 MHz -generic.menu.CrystalFreq.40.build.extra_flags=-DF_CRYSTAL=40000000 -DESP8266 -generic.menu.FlashFreq.40=40MHz -generic.menu.FlashFreq.40.build.flash_freq=40 -generic.menu.FlashFreq.80=80MHz -generic.menu.FlashFreq.80.build.flash_freq=80 -generic.menu.FlashMode.qio=QIO -generic.menu.FlashMode.qio.build.flash_mode=qio -generic.menu.FlashMode.qout=QOUT -generic.menu.FlashMode.qout.build.flash_mode=qout -generic.menu.FlashMode.dio=DIO -generic.menu.FlashMode.dio.build.flash_mode=dio -generic.menu.FlashMode.dout=DOUT -generic.menu.FlashMode.dout.build.flash_mode=dout -generic.menu.FlashSize.512K0=512K (no SPIFFS) -generic.menu.FlashSize.512K0.build.flash_size=512K -generic.menu.FlashSize.512K0.build.flash_size_bytes=0x80000 -generic.menu.FlashSize.512K0.build.flash_ld=eagle.flash.512k0.ld -generic.menu.FlashSize.512K0.build.spiffs_pagesize=256 -generic.menu.FlashSize.512K0.upload.maximum_size=499696 -generic.menu.FlashSize.512K0.build.rfcal_addr=0x7C000 -generic.menu.FlashSize.512K64=512K (64K SPIFFS) -generic.menu.FlashSize.512K64.build.flash_size=512K -generic.menu.FlashSize.512K64.build.flash_size_bytes=0x80000 -generic.menu.FlashSize.512K64.build.flash_ld=eagle.flash.512k64.ld -generic.menu.FlashSize.512K64.build.spiffs_pagesize=256 -generic.menu.FlashSize.512K64.upload.maximum_size=434160 -generic.menu.FlashSize.512K64.build.rfcal_addr=0x7C000 -generic.menu.FlashSize.512K64.build.spiffs_start=0x6B000 -generic.menu.FlashSize.512K64.build.spiffs_end=0x7B000 -generic.menu.FlashSize.512K64.build.spiffs_blocksize=4096 -generic.menu.FlashSize.512K128=512K (128K SPIFFS) -generic.menu.FlashSize.512K128.build.flash_size=512K -generic.menu.FlashSize.512K128.build.flash_size_bytes=0x80000 -generic.menu.FlashSize.512K128.build.flash_ld=eagle.flash.512k128.ld -generic.menu.FlashSize.512K128.build.spiffs_pagesize=256 -generic.menu.FlashSize.512K128.upload.maximum_size=368624 -generic.menu.FlashSize.512K128.build.rfcal_addr=0x7C000 -generic.menu.FlashSize.512K128.build.spiffs_start=0x5B000 -generic.menu.FlashSize.512K128.build.spiffs_end=0x7B000 -generic.menu.FlashSize.512K128.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M0=1M (no SPIFFS) -generic.menu.FlashSize.1M0.build.flash_size=1M -generic.menu.FlashSize.1M0.build.flash_size_bytes=0x100000 -generic.menu.FlashSize.1M0.build.flash_ld=eagle.flash.1m0.ld -generic.menu.FlashSize.1M0.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M0.upload.maximum_size=1023984 -generic.menu.FlashSize.1M0.build.rfcal_addr=0xFC000 -generic.menu.FlashSize.1M64=1M (64K SPIFFS) -generic.menu.FlashSize.1M64.build.flash_size=1M -generic.menu.FlashSize.1M64.build.flash_size_bytes=0x100000 -generic.menu.FlashSize.1M64.build.flash_ld=eagle.flash.1m64.ld -generic.menu.FlashSize.1M64.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M64.upload.maximum_size=958448 -generic.menu.FlashSize.1M64.build.rfcal_addr=0xFC000 -generic.menu.FlashSize.1M64.build.spiffs_start=0xEB000 -generic.menu.FlashSize.1M64.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M64.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M128=1M (128K SPIFFS) -generic.menu.FlashSize.1M128.build.flash_size=1M -generic.menu.FlashSize.1M128.build.flash_size_bytes=0x100000 -generic.menu.FlashSize.1M128.build.flash_ld=eagle.flash.1m128.ld -generic.menu.FlashSize.1M128.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M128.upload.maximum_size=892912 -generic.menu.FlashSize.1M128.build.rfcal_addr=0xFC000 -generic.menu.FlashSize.1M128.build.spiffs_start=0xDB000 -generic.menu.FlashSize.1M128.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M128.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M144=1M (144K SPIFFS) -generic.menu.FlashSize.1M144.build.flash_size=1M -generic.menu.FlashSize.1M144.build.flash_size_bytes=0x100000 -generic.menu.FlashSize.1M144.build.flash_ld=eagle.flash.1m144.ld -generic.menu.FlashSize.1M144.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M144.upload.maximum_size=876528 -generic.menu.FlashSize.1M144.build.rfcal_addr=0xFC000 -generic.menu.FlashSize.1M144.build.spiffs_start=0xD7000 -generic.menu.FlashSize.1M144.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M144.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M160=1M (160K SPIFFS) -generic.menu.FlashSize.1M160.build.flash_size=1M -generic.menu.FlashSize.1M160.build.flash_size_bytes=0x100000 -generic.menu.FlashSize.1M160.build.flash_ld=eagle.flash.1m160.ld -generic.menu.FlashSize.1M160.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M160.upload.maximum_size=860144 -generic.menu.FlashSize.1M160.build.rfcal_addr=0xFC000 -generic.menu.FlashSize.1M160.build.spiffs_start=0xD3000 -generic.menu.FlashSize.1M160.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M160.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M192=1M (192K SPIFFS) -generic.menu.FlashSize.1M192.build.flash_size=1M -generic.menu.FlashSize.1M192.build.flash_size_bytes=0x100000 -generic.menu.FlashSize.1M192.build.flash_ld=eagle.flash.1m192.ld -generic.menu.FlashSize.1M192.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M192.upload.maximum_size=827376 -generic.menu.FlashSize.1M192.build.rfcal_addr=0xFC000 -generic.menu.FlashSize.1M192.build.spiffs_start=0xCB000 -generic.menu.FlashSize.1M192.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M192.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M256=1M (256K SPIFFS) -generic.menu.FlashSize.1M256.build.flash_size=1M -generic.menu.FlashSize.1M256.build.flash_size_bytes=0x100000 -generic.menu.FlashSize.1M256.build.flash_ld=eagle.flash.1m256.ld -generic.menu.FlashSize.1M256.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M256.upload.maximum_size=761840 -generic.menu.FlashSize.1M256.build.rfcal_addr=0xFC000 -generic.menu.FlashSize.1M256.build.spiffs_start=0xBB000 -generic.menu.FlashSize.1M256.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M256.build.spiffs_blocksize=4096 -generic.menu.FlashSize.1M512=1M (512K SPIFFS) -generic.menu.FlashSize.1M512.build.flash_size=1M -generic.menu.FlashSize.1M512.build.flash_size_bytes=0x100000 -generic.menu.FlashSize.1M512.build.flash_ld=eagle.flash.1m512.ld -generic.menu.FlashSize.1M512.build.spiffs_pagesize=256 -generic.menu.FlashSize.1M512.upload.maximum_size=499696 -generic.menu.FlashSize.1M512.build.rfcal_addr=0xFC000 -generic.menu.FlashSize.1M512.build.spiffs_start=0x7B000 -generic.menu.FlashSize.1M512.build.spiffs_end=0xFB000 -generic.menu.FlashSize.1M512.build.spiffs_blocksize=8192 -generic.menu.FlashSize.2M=2M (1M SPIFFS) -generic.menu.FlashSize.2M.build.flash_size=2M -generic.menu.FlashSize.2M.build.flash_size_bytes=0x200000 -generic.menu.FlashSize.2M.build.flash_ld=eagle.flash.2m.ld -generic.menu.FlashSize.2M.build.spiffs_pagesize=256 -generic.menu.FlashSize.2M.upload.maximum_size=1044464 -generic.menu.FlashSize.2M.build.rfcal_addr=0x1FC000 -generic.menu.FlashSize.2M.build.spiffs_start=0x100000 -generic.menu.FlashSize.2M.build.spiffs_end=0x1FB000 -generic.menu.FlashSize.2M.build.spiffs_blocksize=8192 -generic.menu.FlashSize.4M1M=4M (1M SPIFFS) -generic.menu.FlashSize.4M1M.build.flash_size=4M -generic.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -generic.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -generic.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -generic.menu.FlashSize.4M1M.upload.maximum_size=1044464 -generic.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -generic.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -generic.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -generic.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -generic.menu.FlashSize.4M3M=4M (3M SPIFFS) -generic.menu.FlashSize.4M3M.build.flash_size=4M -generic.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -generic.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -generic.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -generic.menu.FlashSize.4M3M.upload.maximum_size=1044464 -generic.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -generic.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -generic.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -generic.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -generic.menu.FlashSize.8M7M=8M (7M SPIFFS) -generic.menu.FlashSize.8M7M.build.flash_size=8M -generic.menu.FlashSize.8M7M.build.flash_size_bytes=0x800000 -generic.menu.FlashSize.8M7M.build.flash_ld=eagle.flash.8m.ld -generic.menu.FlashSize.8M7M.build.spiffs_pagesize=256 -generic.menu.FlashSize.8M7M.upload.maximum_size=1044464 -generic.menu.FlashSize.8M7M.build.rfcal_addr=0x7FC000 -generic.menu.FlashSize.8M7M.build.spiffs_start=0x100000 -generic.menu.FlashSize.8M7M.build.spiffs_end=0x7FB000 -generic.menu.FlashSize.8M7M.build.spiffs_blocksize=8192 -generic.menu.FlashSize.16M15M=16M (15M SPIFFS) -generic.menu.FlashSize.16M15M.build.flash_size=16M -generic.menu.FlashSize.16M15M.build.flash_size_bytes=0x1000000 -generic.menu.FlashSize.16M15M.build.flash_ld=eagle.flash.16m.ld -generic.menu.FlashSize.16M15M.build.spiffs_pagesize=256 -generic.menu.FlashSize.16M15M.upload.maximum_size=1044464 -generic.menu.FlashSize.16M15M.build.rfcal_addr=0xFFC000 -generic.menu.FlashSize.16M15M.build.spiffs_start=0x100000 -generic.menu.FlashSize.16M15M.build.spiffs_end=0xFFB000 -generic.menu.FlashSize.16M15M.build.spiffs_blocksize=8192 -generic.menu.led.2=2 -generic.menu.led.2.build.led=-DLED_BUILTIN=2 -generic.menu.led.0=0 -generic.menu.led.0.build.led=-DLED_BUILTIN=0 -generic.menu.led.1=1 -generic.menu.led.1.build.led=-DLED_BUILTIN=1 -generic.menu.led.3=3 -generic.menu.led.3.build.led=-DLED_BUILTIN=3 -generic.menu.led.4=4 -generic.menu.led.4.build.led=-DLED_BUILTIN=4 -generic.menu.led.5=5 -generic.menu.led.5.build.led=-DLED_BUILTIN=5 -generic.menu.led.6=6 -generic.menu.led.6.build.led=-DLED_BUILTIN=6 -generic.menu.led.7=7 -generic.menu.led.7.build.led=-DLED_BUILTIN=7 -generic.menu.led.8=8 -generic.menu.led.8.build.led=-DLED_BUILTIN=8 -generic.menu.led.9=9 -generic.menu.led.9.build.led=-DLED_BUILTIN=9 -generic.menu.led.10=10 -generic.menu.led.10.build.led=-DLED_BUILTIN=10 -generic.menu.led.11=11 -generic.menu.led.11.build.led=-DLED_BUILTIN=11 -generic.menu.led.12=12 -generic.menu.led.12.build.led=-DLED_BUILTIN=12 -generic.menu.led.13=13 -generic.menu.led.13.build.led=-DLED_BUILTIN=13 -generic.menu.led.14=14 -generic.menu.led.14.build.led=-DLED_BUILTIN=14 -generic.menu.led.15=15 -generic.menu.led.15.build.led=-DLED_BUILTIN=15 -generic.menu.LwIPVariant.v2mss536=v2 Lower Memory -generic.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -generic.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -generic.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -generic.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -generic.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -generic.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -generic.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -generic.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -generic.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -generic.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -generic.menu.LwIPVariant.OpenSource=v1.4 Compile from source -generic.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -generic.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -generic.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -generic.menu.Debug.Disabled=Disabled -generic.menu.Debug.Disabled.build.debug_port= -generic.menu.Debug.Serial=Serial -generic.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -generic.menu.Debug.Serial1=Serial1 -generic.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -generic.menu.DebugLevel.None____=None -generic.menu.DebugLevel.None____.build.debug_level= -generic.menu.DebugLevel.SSL=SSL -generic.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -generic.menu.DebugLevel.TLS_MEM=TLS_MEM -generic.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -generic.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -generic.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -generic.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -generic.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -generic.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -generic.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -generic.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -generic.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -generic.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -generic.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -generic.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -generic.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -generic.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -generic.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -generic.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -generic.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -generic.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -generic.menu.DebugLevel.CORE=CORE -generic.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -generic.menu.DebugLevel.WIFI=WIFI -generic.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -generic.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -generic.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -generic.menu.DebugLevel.UPDATER=UPDATER -generic.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -generic.menu.DebugLevel.OTA=OTA -generic.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -generic.menu.DebugLevel.OOM=OOM -generic.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -generic.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -generic.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -generic.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -generic.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -generic.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -generic.menu.FlashErase.none=Only Sketch -generic.menu.FlashErase.none.upload.erase_cmd= -generic.menu.FlashErase.sdk=Sketch + WiFi Settings -generic.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -generic.menu.FlashErase.all=All Flash Contents -generic.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -generic.menu.UploadSpeed.115200=115200 -generic.menu.UploadSpeed.115200.upload.speed=115200 -generic.menu.UploadSpeed.9600=9600 -generic.menu.UploadSpeed.9600.upload.speed=9600 -generic.menu.UploadSpeed.57600=57600 -generic.menu.UploadSpeed.57600.upload.speed=57600 -generic.menu.UploadSpeed.230400.linux=230400 -generic.menu.UploadSpeed.230400.macosx=230400 -generic.menu.UploadSpeed.230400.upload.speed=230400 -generic.menu.UploadSpeed.256000.windows=256000 -generic.menu.UploadSpeed.256000.upload.speed=256000 -generic.menu.UploadSpeed.460800.linux=460800 -generic.menu.UploadSpeed.460800.macosx=460800 -generic.menu.UploadSpeed.460800.upload.speed=460800 -generic.menu.UploadSpeed.512000.windows=512000 -generic.menu.UploadSpeed.512000.upload.speed=512000 -generic.menu.UploadSpeed.921600=921600 -generic.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -esp8285.name=Generic ESP8285 Module -esp8285.build.board=ESP8266_ESP01 -esp8285.upload.tool=esptool -esp8285.upload.maximum_data_size=81920 -esp8285.upload.wait_for_upload_port=true -esp8285.upload.erase_cmd= -esp8285.serial.disableDTR=true -esp8285.serial.disableRTS=true -esp8285.build.mcu=esp8266 -esp8285.build.core=esp8266 -esp8285.build.variant=generic -esp8285.build.spiffs_pagesize=256 -esp8285.build.debug_port= -esp8285.build.debug_level= -esp8285.menu.CpuFrequency.80=80 MHz -esp8285.menu.CpuFrequency.80.build.f_cpu=80000000L -esp8285.menu.CpuFrequency.160=160 MHz -esp8285.menu.CpuFrequency.160.build.f_cpu=160000000L -esp8285.menu.ResetMethod.ck=ck -esp8285.menu.ResetMethod.ck.upload.resetmethod=ck -esp8285.menu.ResetMethod.nodemcu=nodemcu -esp8285.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -esp8285.menu.ResetMethod.none=none -esp8285.menu.ResetMethod.none.upload.resetmethod=none -esp8285.menu.ResetMethod.dtrset=dtrset -esp8285.menu.ResetMethod.dtrset.upload.resetmethod=dtrset -esp8285.menu.CrystalFreq.26=26 MHz -esp8285.menu.CrystalFreq.40=40 MHz -esp8285.menu.CrystalFreq.40.build.extra_flags=-DF_CRYSTAL=40000000 -DESP8266 -esp8285.build.flash_mode=dout -esp8285.build.flash_freq=40 -esp8285.menu.FlashSize.1M0=1M (no SPIFFS) -esp8285.menu.FlashSize.1M0.build.flash_size=1M -esp8285.menu.FlashSize.1M0.build.flash_size_bytes=0x100000 -esp8285.menu.FlashSize.1M0.build.flash_ld=eagle.flash.1m0.ld -esp8285.menu.FlashSize.1M0.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M0.upload.maximum_size=1023984 -esp8285.menu.FlashSize.1M0.build.rfcal_addr=0xFC000 -esp8285.menu.FlashSize.1M64=1M (64K SPIFFS) -esp8285.menu.FlashSize.1M64.build.flash_size=1M -esp8285.menu.FlashSize.1M64.build.flash_size_bytes=0x100000 -esp8285.menu.FlashSize.1M64.build.flash_ld=eagle.flash.1m64.ld -esp8285.menu.FlashSize.1M64.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M64.upload.maximum_size=958448 -esp8285.menu.FlashSize.1M64.build.rfcal_addr=0xFC000 -esp8285.menu.FlashSize.1M64.build.spiffs_start=0xEB000 -esp8285.menu.FlashSize.1M64.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M64.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M128=1M (128K SPIFFS) -esp8285.menu.FlashSize.1M128.build.flash_size=1M -esp8285.menu.FlashSize.1M128.build.flash_size_bytes=0x100000 -esp8285.menu.FlashSize.1M128.build.flash_ld=eagle.flash.1m128.ld -esp8285.menu.FlashSize.1M128.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M128.upload.maximum_size=892912 -esp8285.menu.FlashSize.1M128.build.rfcal_addr=0xFC000 -esp8285.menu.FlashSize.1M128.build.spiffs_start=0xDB000 -esp8285.menu.FlashSize.1M128.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M128.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M144=1M (144K SPIFFS) -esp8285.menu.FlashSize.1M144.build.flash_size=1M -esp8285.menu.FlashSize.1M144.build.flash_size_bytes=0x100000 -esp8285.menu.FlashSize.1M144.build.flash_ld=eagle.flash.1m144.ld -esp8285.menu.FlashSize.1M144.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M144.upload.maximum_size=876528 -esp8285.menu.FlashSize.1M144.build.rfcal_addr=0xFC000 -esp8285.menu.FlashSize.1M144.build.spiffs_start=0xD7000 -esp8285.menu.FlashSize.1M144.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M144.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M160=1M (160K SPIFFS) -esp8285.menu.FlashSize.1M160.build.flash_size=1M -esp8285.menu.FlashSize.1M160.build.flash_size_bytes=0x100000 -esp8285.menu.FlashSize.1M160.build.flash_ld=eagle.flash.1m160.ld -esp8285.menu.FlashSize.1M160.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M160.upload.maximum_size=860144 -esp8285.menu.FlashSize.1M160.build.rfcal_addr=0xFC000 -esp8285.menu.FlashSize.1M160.build.spiffs_start=0xD3000 -esp8285.menu.FlashSize.1M160.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M160.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M192=1M (192K SPIFFS) -esp8285.menu.FlashSize.1M192.build.flash_size=1M -esp8285.menu.FlashSize.1M192.build.flash_size_bytes=0x100000 -esp8285.menu.FlashSize.1M192.build.flash_ld=eagle.flash.1m192.ld -esp8285.menu.FlashSize.1M192.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M192.upload.maximum_size=827376 -esp8285.menu.FlashSize.1M192.build.rfcal_addr=0xFC000 -esp8285.menu.FlashSize.1M192.build.spiffs_start=0xCB000 -esp8285.menu.FlashSize.1M192.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M192.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M256=1M (256K SPIFFS) -esp8285.menu.FlashSize.1M256.build.flash_size=1M -esp8285.menu.FlashSize.1M256.build.flash_size_bytes=0x100000 -esp8285.menu.FlashSize.1M256.build.flash_ld=eagle.flash.1m256.ld -esp8285.menu.FlashSize.1M256.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M256.upload.maximum_size=761840 -esp8285.menu.FlashSize.1M256.build.rfcal_addr=0xFC000 -esp8285.menu.FlashSize.1M256.build.spiffs_start=0xBB000 -esp8285.menu.FlashSize.1M256.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M256.build.spiffs_blocksize=4096 -esp8285.menu.FlashSize.1M512=1M (512K SPIFFS) -esp8285.menu.FlashSize.1M512.build.flash_size=1M -esp8285.menu.FlashSize.1M512.build.flash_size_bytes=0x100000 -esp8285.menu.FlashSize.1M512.build.flash_ld=eagle.flash.1m512.ld -esp8285.menu.FlashSize.1M512.build.spiffs_pagesize=256 -esp8285.menu.FlashSize.1M512.upload.maximum_size=499696 -esp8285.menu.FlashSize.1M512.build.rfcal_addr=0xFC000 -esp8285.menu.FlashSize.1M512.build.spiffs_start=0x7B000 -esp8285.menu.FlashSize.1M512.build.spiffs_end=0xFB000 -esp8285.menu.FlashSize.1M512.build.spiffs_blocksize=8192 -esp8285.menu.led.2=2 -esp8285.menu.led.2.build.led=-DLED_BUILTIN=2 -esp8285.menu.led.0=0 -esp8285.menu.led.0.build.led=-DLED_BUILTIN=0 -esp8285.menu.led.1=1 -esp8285.menu.led.1.build.led=-DLED_BUILTIN=1 -esp8285.menu.led.3=3 -esp8285.menu.led.3.build.led=-DLED_BUILTIN=3 -esp8285.menu.led.4=4 -esp8285.menu.led.4.build.led=-DLED_BUILTIN=4 -esp8285.menu.led.5=5 -esp8285.menu.led.5.build.led=-DLED_BUILTIN=5 -esp8285.menu.led.6=6 -esp8285.menu.led.6.build.led=-DLED_BUILTIN=6 -esp8285.menu.led.7=7 -esp8285.menu.led.7.build.led=-DLED_BUILTIN=7 -esp8285.menu.led.8=8 -esp8285.menu.led.8.build.led=-DLED_BUILTIN=8 -esp8285.menu.led.9=9 -esp8285.menu.led.9.build.led=-DLED_BUILTIN=9 -esp8285.menu.led.10=10 -esp8285.menu.led.10.build.led=-DLED_BUILTIN=10 -esp8285.menu.led.11=11 -esp8285.menu.led.11.build.led=-DLED_BUILTIN=11 -esp8285.menu.led.12=12 -esp8285.menu.led.12.build.led=-DLED_BUILTIN=12 -esp8285.menu.led.13=13 -esp8285.menu.led.13.build.led=-DLED_BUILTIN=13 -esp8285.menu.led.14=14 -esp8285.menu.led.14.build.led=-DLED_BUILTIN=14 -esp8285.menu.led.15=15 -esp8285.menu.led.15.build.led=-DLED_BUILTIN=15 -esp8285.menu.LwIPVariant.v2mss536=v2 Lower Memory -esp8285.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -esp8285.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -esp8285.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -esp8285.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -esp8285.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -esp8285.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -esp8285.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -esp8285.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -esp8285.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -esp8285.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -esp8285.menu.LwIPVariant.OpenSource=v1.4 Compile from source -esp8285.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -esp8285.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -esp8285.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -esp8285.menu.Debug.Disabled=Disabled -esp8285.menu.Debug.Disabled.build.debug_port= -esp8285.menu.Debug.Serial=Serial -esp8285.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -esp8285.menu.Debug.Serial1=Serial1 -esp8285.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -esp8285.menu.DebugLevel.None____=None -esp8285.menu.DebugLevel.None____.build.debug_level= -esp8285.menu.DebugLevel.SSL=SSL -esp8285.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -esp8285.menu.DebugLevel.TLS_MEM=TLS_MEM -esp8285.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -esp8285.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -esp8285.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -esp8285.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -esp8285.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -esp8285.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -esp8285.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -esp8285.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -esp8285.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -esp8285.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -esp8285.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -esp8285.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -esp8285.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -esp8285.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -esp8285.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -esp8285.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp8285.menu.DebugLevel.CORE=CORE -esp8285.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -esp8285.menu.DebugLevel.WIFI=WIFI -esp8285.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -esp8285.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -esp8285.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -esp8285.menu.DebugLevel.UPDATER=UPDATER -esp8285.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -esp8285.menu.DebugLevel.OTA=OTA -esp8285.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -esp8285.menu.DebugLevel.OOM=OOM -esp8285.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -esp8285.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -esp8285.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -esp8285.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -esp8285.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -esp8285.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -esp8285.menu.FlashErase.none=Only Sketch -esp8285.menu.FlashErase.none.upload.erase_cmd= -esp8285.menu.FlashErase.sdk=Sketch + WiFi Settings -esp8285.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -esp8285.menu.FlashErase.all=All Flash Contents -esp8285.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -esp8285.menu.UploadSpeed.115200=115200 -esp8285.menu.UploadSpeed.115200.upload.speed=115200 -esp8285.menu.UploadSpeed.9600=9600 -esp8285.menu.UploadSpeed.9600.upload.speed=9600 -esp8285.menu.UploadSpeed.57600=57600 -esp8285.menu.UploadSpeed.57600.upload.speed=57600 -esp8285.menu.UploadSpeed.230400.linux=230400 -esp8285.menu.UploadSpeed.230400.macosx=230400 -esp8285.menu.UploadSpeed.230400.upload.speed=230400 -esp8285.menu.UploadSpeed.256000.windows=256000 -esp8285.menu.UploadSpeed.256000.upload.speed=256000 -esp8285.menu.UploadSpeed.460800.linux=460800 -esp8285.menu.UploadSpeed.460800.macosx=460800 -esp8285.menu.UploadSpeed.460800.upload.speed=460800 -esp8285.menu.UploadSpeed.512000.windows=512000 -esp8285.menu.UploadSpeed.512000.upload.speed=512000 -esp8285.menu.UploadSpeed.921600=921600 -esp8285.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -espduino.name=ESPDuino (ESP-13 Module) -espduino.build.board=ESP8266_ESP13 -espduino.build.variant=ESPDuino -espduino.menu.ResetMethod.v2=ESPduino-V2 -espduino.menu.ResetMethod.v2.upload.resetmethod=nodemcu -espduino.menu.ResetMethod.v1=ESPduino-V1 -espduino.menu.ResetMethod.v1.upload.resetmethod=ck -espduino.menu.UploadTool.esptool=Serial -espduino.menu.UploadTool.esptool.upload.tool=esptool -espduino.menu.UploadTool.esptool.upload.verbose=-vv -espduino.menu.UploadTool.espota=OTA -espduino.menu.UploadTool.espota.upload.tool=espota -espduino.upload.tool=esptool -espduino.upload.maximum_data_size=81920 -espduino.upload.wait_for_upload_port=true -espduino.upload.erase_cmd= -espduino.serial.disableDTR=true -espduino.serial.disableRTS=true -espduino.build.mcu=esp8266 -espduino.build.core=esp8266 -espduino.build.spiffs_pagesize=256 -espduino.build.debug_port= -espduino.build.debug_level= -espduino.menu.CpuFrequency.80=80 MHz -espduino.menu.CpuFrequency.80.build.f_cpu=80000000L -espduino.menu.CpuFrequency.160=160 MHz -espduino.menu.CpuFrequency.160.build.f_cpu=160000000L -espduino.build.flash_mode=dio -espduino.build.flash_freq=40 -espduino.menu.FlashSize.4M1M=4M (1M SPIFFS) -espduino.menu.FlashSize.4M1M.build.flash_size=4M -espduino.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -espduino.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -espduino.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -espduino.menu.FlashSize.4M1M.upload.maximum_size=1044464 -espduino.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -espduino.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -espduino.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -espduino.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -espduino.menu.FlashSize.4M3M=4M (3M SPIFFS) -espduino.menu.FlashSize.4M3M.build.flash_size=4M -espduino.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -espduino.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -espduino.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -espduino.menu.FlashSize.4M3M.upload.maximum_size=1044464 -espduino.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -espduino.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -espduino.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -espduino.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -espduino.menu.LwIPVariant.v2mss536=v2 Lower Memory -espduino.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -espduino.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -espduino.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -espduino.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -espduino.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -espduino.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -espduino.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -espduino.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -espduino.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -espduino.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -espduino.menu.LwIPVariant.OpenSource=v1.4 Compile from source -espduino.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -espduino.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -espduino.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -espduino.menu.Debug.Disabled=Disabled -espduino.menu.Debug.Disabled.build.debug_port= -espduino.menu.Debug.Serial=Serial -espduino.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -espduino.menu.Debug.Serial1=Serial1 -espduino.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -espduino.menu.DebugLevel.None____=None -espduino.menu.DebugLevel.None____.build.debug_level= -espduino.menu.DebugLevel.SSL=SSL -espduino.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -espduino.menu.DebugLevel.TLS_MEM=TLS_MEM -espduino.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -espduino.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -espduino.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -espduino.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -espduino.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -espduino.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -espduino.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -espduino.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -espduino.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -espduino.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -espduino.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espduino.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -espduino.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -espduino.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -espduino.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espduino.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espduino.menu.DebugLevel.CORE=CORE -espduino.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -espduino.menu.DebugLevel.WIFI=WIFI -espduino.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -espduino.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -espduino.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -espduino.menu.DebugLevel.UPDATER=UPDATER -espduino.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -espduino.menu.DebugLevel.OTA=OTA -espduino.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -espduino.menu.DebugLevel.OOM=OOM -espduino.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espduino.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -espduino.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -espduino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espduino.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -espduino.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -espduino.menu.FlashErase.none=Only Sketch -espduino.menu.FlashErase.none.upload.erase_cmd= -espduino.menu.FlashErase.sdk=Sketch + WiFi Settings -espduino.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -espduino.menu.FlashErase.all=All Flash Contents -espduino.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -espduino.menu.UploadSpeed.115200=115200 -espduino.menu.UploadSpeed.115200.upload.speed=115200 -espduino.menu.UploadSpeed.9600=9600 -espduino.menu.UploadSpeed.9600.upload.speed=9600 -espduino.menu.UploadSpeed.57600=57600 -espduino.menu.UploadSpeed.57600.upload.speed=57600 -espduino.menu.UploadSpeed.230400.linux=230400 -espduino.menu.UploadSpeed.230400.macosx=230400 -espduino.menu.UploadSpeed.230400.upload.speed=230400 -espduino.menu.UploadSpeed.256000.windows=256000 -espduino.menu.UploadSpeed.256000.upload.speed=256000 -espduino.menu.UploadSpeed.460800.linux=460800 -espduino.menu.UploadSpeed.460800.macosx=460800 -espduino.menu.UploadSpeed.460800.upload.speed=460800 -espduino.menu.UploadSpeed.512000.windows=512000 -espduino.menu.UploadSpeed.512000.upload.speed=512000 -espduino.menu.UploadSpeed.921600=921600 -espduino.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -huzzah.name=Adafruit Feather HUZZAH ESP8266 -huzzah.build.board=ESP8266_ESP12 -huzzah.build.variant=adafruit -huzzah.upload.tool=esptool -huzzah.upload.maximum_data_size=81920 -huzzah.upload.wait_for_upload_port=true -huzzah.upload.erase_cmd= -huzzah.serial.disableDTR=true -huzzah.serial.disableRTS=true -huzzah.build.mcu=esp8266 -huzzah.build.core=esp8266 -huzzah.build.spiffs_pagesize=256 -huzzah.build.debug_port= -huzzah.build.debug_level= -huzzah.menu.CpuFrequency.80=80 MHz -huzzah.menu.CpuFrequency.80.build.f_cpu=80000000L -huzzah.menu.CpuFrequency.160=160 MHz -huzzah.menu.CpuFrequency.160.build.f_cpu=160000000L -huzzah.upload.resetmethod=nodemcu -huzzah.build.flash_mode=qio -huzzah.build.flash_freq=40 -huzzah.menu.FlashSize.4M1M=4M (1M SPIFFS) -huzzah.menu.FlashSize.4M1M.build.flash_size=4M -huzzah.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -huzzah.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -huzzah.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -huzzah.menu.FlashSize.4M1M.upload.maximum_size=1044464 -huzzah.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -huzzah.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -huzzah.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -huzzah.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -huzzah.menu.FlashSize.4M3M=4M (3M SPIFFS) -huzzah.menu.FlashSize.4M3M.build.flash_size=4M -huzzah.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -huzzah.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -huzzah.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -huzzah.menu.FlashSize.4M3M.upload.maximum_size=1044464 -huzzah.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -huzzah.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -huzzah.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -huzzah.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -huzzah.menu.LwIPVariant.v2mss536=v2 Lower Memory -huzzah.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -huzzah.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -huzzah.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -huzzah.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -huzzah.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -huzzah.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -huzzah.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -huzzah.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -huzzah.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -huzzah.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -huzzah.menu.LwIPVariant.OpenSource=v1.4 Compile from source -huzzah.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -huzzah.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -huzzah.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -huzzah.menu.Debug.Disabled=Disabled -huzzah.menu.Debug.Disabled.build.debug_port= -huzzah.menu.Debug.Serial=Serial -huzzah.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -huzzah.menu.Debug.Serial1=Serial1 -huzzah.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -huzzah.menu.DebugLevel.None____=None -huzzah.menu.DebugLevel.None____.build.debug_level= -huzzah.menu.DebugLevel.SSL=SSL -huzzah.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -huzzah.menu.DebugLevel.TLS_MEM=TLS_MEM -huzzah.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -huzzah.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -huzzah.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -huzzah.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -huzzah.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -huzzah.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -huzzah.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -huzzah.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -huzzah.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -huzzah.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -huzzah.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -huzzah.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -huzzah.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -huzzah.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -huzzah.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -huzzah.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -huzzah.menu.DebugLevel.CORE=CORE -huzzah.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -huzzah.menu.DebugLevel.WIFI=WIFI -huzzah.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -huzzah.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -huzzah.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -huzzah.menu.DebugLevel.UPDATER=UPDATER -huzzah.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -huzzah.menu.DebugLevel.OTA=OTA -huzzah.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -huzzah.menu.DebugLevel.OOM=OOM -huzzah.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -huzzah.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -huzzah.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -huzzah.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -huzzah.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -huzzah.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -huzzah.menu.FlashErase.none=Only Sketch -huzzah.menu.FlashErase.none.upload.erase_cmd= -huzzah.menu.FlashErase.sdk=Sketch + WiFi Settings -huzzah.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -huzzah.menu.FlashErase.all=All Flash Contents -huzzah.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -huzzah.menu.UploadSpeed.115200=115200 -huzzah.menu.UploadSpeed.115200.upload.speed=115200 -huzzah.menu.UploadSpeed.9600=9600 -huzzah.menu.UploadSpeed.9600.upload.speed=9600 -huzzah.menu.UploadSpeed.57600=57600 -huzzah.menu.UploadSpeed.57600.upload.speed=57600 -huzzah.menu.UploadSpeed.230400.linux=230400 -huzzah.menu.UploadSpeed.230400.macosx=230400 -huzzah.menu.UploadSpeed.230400.upload.speed=230400 -huzzah.menu.UploadSpeed.256000.windows=256000 -huzzah.menu.UploadSpeed.256000.upload.speed=256000 -huzzah.menu.UploadSpeed.460800.linux=460800 -huzzah.menu.UploadSpeed.460800.macosx=460800 -huzzah.menu.UploadSpeed.460800.upload.speed=460800 -huzzah.menu.UploadSpeed.512000.windows=512000 -huzzah.menu.UploadSpeed.512000.upload.speed=512000 -huzzah.menu.UploadSpeed.921600=921600 -huzzah.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -espresso_lite_v1.name=ESPresso Lite 1.0 -espresso_lite_v1.build.board=ESP8266_ESPRESSO_LITE_V1 -espresso_lite_v1.build.variant=espresso_lite_v1 -espresso_lite_v1.upload.tool=esptool -espresso_lite_v1.upload.maximum_data_size=81920 -espresso_lite_v1.upload.wait_for_upload_port=true -espresso_lite_v1.upload.erase_cmd= -espresso_lite_v1.serial.disableDTR=true -espresso_lite_v1.serial.disableRTS=true -espresso_lite_v1.build.mcu=esp8266 -espresso_lite_v1.build.core=esp8266 -espresso_lite_v1.build.spiffs_pagesize=256 -espresso_lite_v1.build.debug_port= -espresso_lite_v1.build.debug_level= -espresso_lite_v1.menu.CpuFrequency.80=80 MHz -espresso_lite_v1.menu.CpuFrequency.80.build.f_cpu=80000000L -espresso_lite_v1.menu.CpuFrequency.160=160 MHz -espresso_lite_v1.menu.CpuFrequency.160.build.f_cpu=160000000L -espresso_lite_v1.build.flash_mode=dio -espresso_lite_v1.build.flash_freq=40 -espresso_lite_v1.menu.FlashSize.4M1M=4M (1M SPIFFS) -espresso_lite_v1.menu.FlashSize.4M1M.build.flash_size=4M -espresso_lite_v1.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -espresso_lite_v1.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -espresso_lite_v1.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -espresso_lite_v1.menu.FlashSize.4M1M.upload.maximum_size=1044464 -espresso_lite_v1.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -espresso_lite_v1.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -espresso_lite_v1.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -espresso_lite_v1.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -espresso_lite_v1.menu.FlashSize.4M3M=4M (3M SPIFFS) -espresso_lite_v1.menu.FlashSize.4M3M.build.flash_size=4M -espresso_lite_v1.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -espresso_lite_v1.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -espresso_lite_v1.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -espresso_lite_v1.menu.FlashSize.4M3M.upload.maximum_size=1044464 -espresso_lite_v1.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -espresso_lite_v1.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -espresso_lite_v1.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -espresso_lite_v1.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -espresso_lite_v1.menu.ResetMethod.ck=ck -espresso_lite_v1.menu.ResetMethod.ck.upload.resetmethod=ck -espresso_lite_v1.menu.ResetMethod.nodemcu=nodemcu -espresso_lite_v1.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -espresso_lite_v1.menu.LwIPVariant.v2mss536=v2 Lower Memory -espresso_lite_v1.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -espresso_lite_v1.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -espresso_lite_v1.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -espresso_lite_v1.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -espresso_lite_v1.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -espresso_lite_v1.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -espresso_lite_v1.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -espresso_lite_v1.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -espresso_lite_v1.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -espresso_lite_v1.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v1.menu.LwIPVariant.OpenSource=v1.4 Compile from source -espresso_lite_v1.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -espresso_lite_v1.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v1.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -espresso_lite_v1.menu.Debug.Disabled=Disabled -espresso_lite_v1.menu.Debug.Disabled.build.debug_port= -espresso_lite_v1.menu.Debug.Serial=Serial -espresso_lite_v1.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -espresso_lite_v1.menu.Debug.Serial1=Serial1 -espresso_lite_v1.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -espresso_lite_v1.menu.DebugLevel.None____=None -espresso_lite_v1.menu.DebugLevel.None____.build.debug_level= -espresso_lite_v1.menu.DebugLevel.SSL=SSL -espresso_lite_v1.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -espresso_lite_v1.menu.DebugLevel.TLS_MEM=TLS_MEM -espresso_lite_v1.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -espresso_lite_v1.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -espresso_lite_v1.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v1.menu.DebugLevel.CORE=CORE -espresso_lite_v1.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -espresso_lite_v1.menu.DebugLevel.WIFI=WIFI -espresso_lite_v1.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -espresso_lite_v1.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -espresso_lite_v1.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -espresso_lite_v1.menu.DebugLevel.UPDATER=UPDATER -espresso_lite_v1.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -espresso_lite_v1.menu.DebugLevel.OTA=OTA -espresso_lite_v1.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -espresso_lite_v1.menu.DebugLevel.OOM=OOM -espresso_lite_v1.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espresso_lite_v1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -espresso_lite_v1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -espresso_lite_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espresso_lite_v1.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -espresso_lite_v1.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -espresso_lite_v1.menu.FlashErase.none=Only Sketch -espresso_lite_v1.menu.FlashErase.none.upload.erase_cmd= -espresso_lite_v1.menu.FlashErase.sdk=Sketch + WiFi Settings -espresso_lite_v1.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -espresso_lite_v1.menu.FlashErase.all=All Flash Contents -espresso_lite_v1.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -espresso_lite_v1.menu.UploadSpeed.115200=115200 -espresso_lite_v1.menu.UploadSpeed.115200.upload.speed=115200 -espresso_lite_v1.menu.UploadSpeed.9600=9600 -espresso_lite_v1.menu.UploadSpeed.9600.upload.speed=9600 -espresso_lite_v1.menu.UploadSpeed.57600=57600 -espresso_lite_v1.menu.UploadSpeed.57600.upload.speed=57600 -espresso_lite_v1.menu.UploadSpeed.230400.linux=230400 -espresso_lite_v1.menu.UploadSpeed.230400.macosx=230400 -espresso_lite_v1.menu.UploadSpeed.230400.upload.speed=230400 -espresso_lite_v1.menu.UploadSpeed.256000.windows=256000 -espresso_lite_v1.menu.UploadSpeed.256000.upload.speed=256000 -espresso_lite_v1.menu.UploadSpeed.460800.linux=460800 -espresso_lite_v1.menu.UploadSpeed.460800.macosx=460800 -espresso_lite_v1.menu.UploadSpeed.460800.upload.speed=460800 -espresso_lite_v1.menu.UploadSpeed.512000.windows=512000 -espresso_lite_v1.menu.UploadSpeed.512000.upload.speed=512000 -espresso_lite_v1.menu.UploadSpeed.921600=921600 -espresso_lite_v1.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -espresso_lite_v2.name=ESPresso Lite 2.0 -espresso_lite_v2.build.board=ESP8266_ESPRESSO_LITE_V2 -espresso_lite_v2.build.variant=espresso_lite_v2 -espresso_lite_v2.upload.tool=esptool -espresso_lite_v2.upload.maximum_data_size=81920 -espresso_lite_v2.upload.wait_for_upload_port=true -espresso_lite_v2.upload.erase_cmd= -espresso_lite_v2.serial.disableDTR=true -espresso_lite_v2.serial.disableRTS=true -espresso_lite_v2.build.mcu=esp8266 -espresso_lite_v2.build.core=esp8266 -espresso_lite_v2.build.spiffs_pagesize=256 -espresso_lite_v2.build.debug_port= -espresso_lite_v2.build.debug_level= -espresso_lite_v2.menu.CpuFrequency.80=80 MHz -espresso_lite_v2.menu.CpuFrequency.80.build.f_cpu=80000000L -espresso_lite_v2.menu.CpuFrequency.160=160 MHz -espresso_lite_v2.menu.CpuFrequency.160.build.f_cpu=160000000L -espresso_lite_v2.build.flash_mode=dio -espresso_lite_v2.build.flash_freq=40 -espresso_lite_v2.menu.FlashSize.4M1M=4M (1M SPIFFS) -espresso_lite_v2.menu.FlashSize.4M1M.build.flash_size=4M -espresso_lite_v2.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -espresso_lite_v2.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -espresso_lite_v2.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -espresso_lite_v2.menu.FlashSize.4M1M.upload.maximum_size=1044464 -espresso_lite_v2.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -espresso_lite_v2.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -espresso_lite_v2.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -espresso_lite_v2.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -espresso_lite_v2.menu.FlashSize.4M3M=4M (3M SPIFFS) -espresso_lite_v2.menu.FlashSize.4M3M.build.flash_size=4M -espresso_lite_v2.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -espresso_lite_v2.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -espresso_lite_v2.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -espresso_lite_v2.menu.FlashSize.4M3M.upload.maximum_size=1044464 -espresso_lite_v2.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -espresso_lite_v2.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -espresso_lite_v2.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -espresso_lite_v2.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -espresso_lite_v2.menu.ResetMethod.ck=ck -espresso_lite_v2.menu.ResetMethod.ck.upload.resetmethod=ck -espresso_lite_v2.menu.ResetMethod.nodemcu=nodemcu -espresso_lite_v2.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -espresso_lite_v2.menu.LwIPVariant.v2mss536=v2 Lower Memory -espresso_lite_v2.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -espresso_lite_v2.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -espresso_lite_v2.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -espresso_lite_v2.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -espresso_lite_v2.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -espresso_lite_v2.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -espresso_lite_v2.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -espresso_lite_v2.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -espresso_lite_v2.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -espresso_lite_v2.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v2.menu.LwIPVariant.OpenSource=v1.4 Compile from source -espresso_lite_v2.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -espresso_lite_v2.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -espresso_lite_v2.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -espresso_lite_v2.menu.Debug.Disabled=Disabled -espresso_lite_v2.menu.Debug.Disabled.build.debug_port= -espresso_lite_v2.menu.Debug.Serial=Serial -espresso_lite_v2.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -espresso_lite_v2.menu.Debug.Serial1=Serial1 -espresso_lite_v2.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -espresso_lite_v2.menu.DebugLevel.None____=None -espresso_lite_v2.menu.DebugLevel.None____.build.debug_level= -espresso_lite_v2.menu.DebugLevel.SSL=SSL -espresso_lite_v2.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -espresso_lite_v2.menu.DebugLevel.TLS_MEM=TLS_MEM -espresso_lite_v2.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -espresso_lite_v2.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -espresso_lite_v2.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espresso_lite_v2.menu.DebugLevel.CORE=CORE -espresso_lite_v2.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -espresso_lite_v2.menu.DebugLevel.WIFI=WIFI -espresso_lite_v2.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -espresso_lite_v2.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -espresso_lite_v2.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -espresso_lite_v2.menu.DebugLevel.UPDATER=UPDATER -espresso_lite_v2.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -espresso_lite_v2.menu.DebugLevel.OTA=OTA -espresso_lite_v2.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -espresso_lite_v2.menu.DebugLevel.OOM=OOM -espresso_lite_v2.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espresso_lite_v2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -espresso_lite_v2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -espresso_lite_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espresso_lite_v2.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -espresso_lite_v2.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -espresso_lite_v2.menu.FlashErase.none=Only Sketch -espresso_lite_v2.menu.FlashErase.none.upload.erase_cmd= -espresso_lite_v2.menu.FlashErase.sdk=Sketch + WiFi Settings -espresso_lite_v2.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -espresso_lite_v2.menu.FlashErase.all=All Flash Contents -espresso_lite_v2.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -espresso_lite_v2.menu.UploadSpeed.115200=115200 -espresso_lite_v2.menu.UploadSpeed.115200.upload.speed=115200 -espresso_lite_v2.menu.UploadSpeed.9600=9600 -espresso_lite_v2.menu.UploadSpeed.9600.upload.speed=9600 -espresso_lite_v2.menu.UploadSpeed.57600=57600 -espresso_lite_v2.menu.UploadSpeed.57600.upload.speed=57600 -espresso_lite_v2.menu.UploadSpeed.230400.linux=230400 -espresso_lite_v2.menu.UploadSpeed.230400.macosx=230400 -espresso_lite_v2.menu.UploadSpeed.230400.upload.speed=230400 -espresso_lite_v2.menu.UploadSpeed.256000.windows=256000 -espresso_lite_v2.menu.UploadSpeed.256000.upload.speed=256000 -espresso_lite_v2.menu.UploadSpeed.460800.linux=460800 -espresso_lite_v2.menu.UploadSpeed.460800.macosx=460800 -espresso_lite_v2.menu.UploadSpeed.460800.upload.speed=460800 -espresso_lite_v2.menu.UploadSpeed.512000.windows=512000 -espresso_lite_v2.menu.UploadSpeed.512000.upload.speed=512000 -espresso_lite_v2.menu.UploadSpeed.921600=921600 -espresso_lite_v2.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -phoenix_v1.name=Phoenix 1.0 -phoenix_v1.build.board=ESP8266_PHOENIX_V1 -phoenix_v1.build.variant=phoenix_v1 -phoenix_v1.upload.tool=esptool -phoenix_v1.upload.maximum_data_size=81920 -phoenix_v1.upload.wait_for_upload_port=true -phoenix_v1.upload.erase_cmd= -phoenix_v1.serial.disableDTR=true -phoenix_v1.serial.disableRTS=true -phoenix_v1.build.mcu=esp8266 -phoenix_v1.build.core=esp8266 -phoenix_v1.build.spiffs_pagesize=256 -phoenix_v1.build.debug_port= -phoenix_v1.build.debug_level= -phoenix_v1.menu.CpuFrequency.80=80 MHz -phoenix_v1.menu.CpuFrequency.80.build.f_cpu=80000000L -phoenix_v1.menu.CpuFrequency.160=160 MHz -phoenix_v1.menu.CpuFrequency.160.build.f_cpu=160000000L -phoenix_v1.build.flash_mode=dio -phoenix_v1.build.flash_freq=40 -phoenix_v1.menu.FlashSize.4M1M=4M (1M SPIFFS) -phoenix_v1.menu.FlashSize.4M1M.build.flash_size=4M -phoenix_v1.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -phoenix_v1.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -phoenix_v1.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -phoenix_v1.menu.FlashSize.4M1M.upload.maximum_size=1044464 -phoenix_v1.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -phoenix_v1.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -phoenix_v1.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -phoenix_v1.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -phoenix_v1.menu.FlashSize.4M3M=4M (3M SPIFFS) -phoenix_v1.menu.FlashSize.4M3M.build.flash_size=4M -phoenix_v1.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -phoenix_v1.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -phoenix_v1.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -phoenix_v1.menu.FlashSize.4M3M.upload.maximum_size=1044464 -phoenix_v1.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -phoenix_v1.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -phoenix_v1.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -phoenix_v1.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -phoenix_v1.menu.ResetMethod.ck=ck -phoenix_v1.menu.ResetMethod.ck.upload.resetmethod=ck -phoenix_v1.menu.ResetMethod.nodemcu=nodemcu -phoenix_v1.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -phoenix_v1.menu.LwIPVariant.v2mss536=v2 Lower Memory -phoenix_v1.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -phoenix_v1.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -phoenix_v1.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -phoenix_v1.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -phoenix_v1.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -phoenix_v1.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -phoenix_v1.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -phoenix_v1.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -phoenix_v1.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -phoenix_v1.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v1.menu.LwIPVariant.OpenSource=v1.4 Compile from source -phoenix_v1.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -phoenix_v1.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v1.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -phoenix_v1.menu.Debug.Disabled=Disabled -phoenix_v1.menu.Debug.Disabled.build.debug_port= -phoenix_v1.menu.Debug.Serial=Serial -phoenix_v1.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -phoenix_v1.menu.Debug.Serial1=Serial1 -phoenix_v1.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -phoenix_v1.menu.DebugLevel.None____=None -phoenix_v1.menu.DebugLevel.None____.build.debug_level= -phoenix_v1.menu.DebugLevel.SSL=SSL -phoenix_v1.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -phoenix_v1.menu.DebugLevel.TLS_MEM=TLS_MEM -phoenix_v1.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -phoenix_v1.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -phoenix_v1.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -phoenix_v1.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -phoenix_v1.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -phoenix_v1.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -phoenix_v1.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -phoenix_v1.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -phoenix_v1.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -phoenix_v1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -phoenix_v1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v1.menu.DebugLevel.CORE=CORE -phoenix_v1.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -phoenix_v1.menu.DebugLevel.WIFI=WIFI -phoenix_v1.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -phoenix_v1.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -phoenix_v1.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -phoenix_v1.menu.DebugLevel.UPDATER=UPDATER -phoenix_v1.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -phoenix_v1.menu.DebugLevel.OTA=OTA -phoenix_v1.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -phoenix_v1.menu.DebugLevel.OOM=OOM -phoenix_v1.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -phoenix_v1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -phoenix_v1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -phoenix_v1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -phoenix_v1.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -phoenix_v1.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -phoenix_v1.menu.FlashErase.none=Only Sketch -phoenix_v1.menu.FlashErase.none.upload.erase_cmd= -phoenix_v1.menu.FlashErase.sdk=Sketch + WiFi Settings -phoenix_v1.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -phoenix_v1.menu.FlashErase.all=All Flash Contents -phoenix_v1.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -phoenix_v1.menu.UploadSpeed.115200=115200 -phoenix_v1.menu.UploadSpeed.115200.upload.speed=115200 -phoenix_v1.menu.UploadSpeed.9600=9600 -phoenix_v1.menu.UploadSpeed.9600.upload.speed=9600 -phoenix_v1.menu.UploadSpeed.57600=57600 -phoenix_v1.menu.UploadSpeed.57600.upload.speed=57600 -phoenix_v1.menu.UploadSpeed.230400.linux=230400 -phoenix_v1.menu.UploadSpeed.230400.macosx=230400 -phoenix_v1.menu.UploadSpeed.230400.upload.speed=230400 -phoenix_v1.menu.UploadSpeed.256000.windows=256000 -phoenix_v1.menu.UploadSpeed.256000.upload.speed=256000 -phoenix_v1.menu.UploadSpeed.460800.linux=460800 -phoenix_v1.menu.UploadSpeed.460800.macosx=460800 -phoenix_v1.menu.UploadSpeed.460800.upload.speed=460800 -phoenix_v1.menu.UploadSpeed.512000.windows=512000 -phoenix_v1.menu.UploadSpeed.512000.upload.speed=512000 -phoenix_v1.menu.UploadSpeed.921600=921600 -phoenix_v1.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -phoenix_v2.name=Phoenix 2.0 -phoenix_v2.build.board=ESP8266_PHOENIX_V2 -phoenix_v2.build.variant=phoenix_v2 -phoenix_v2.upload.tool=esptool -phoenix_v2.upload.maximum_data_size=81920 -phoenix_v2.upload.wait_for_upload_port=true -phoenix_v2.upload.erase_cmd= -phoenix_v2.serial.disableDTR=true -phoenix_v2.serial.disableRTS=true -phoenix_v2.build.mcu=esp8266 -phoenix_v2.build.core=esp8266 -phoenix_v2.build.spiffs_pagesize=256 -phoenix_v2.build.debug_port= -phoenix_v2.build.debug_level= -phoenix_v2.menu.CpuFrequency.80=80 MHz -phoenix_v2.menu.CpuFrequency.80.build.f_cpu=80000000L -phoenix_v2.menu.CpuFrequency.160=160 MHz -phoenix_v2.menu.CpuFrequency.160.build.f_cpu=160000000L -phoenix_v2.build.flash_mode=dio -phoenix_v2.build.flash_freq=40 -phoenix_v2.menu.FlashSize.4M1M=4M (1M SPIFFS) -phoenix_v2.menu.FlashSize.4M1M.build.flash_size=4M -phoenix_v2.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -phoenix_v2.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -phoenix_v2.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -phoenix_v2.menu.FlashSize.4M1M.upload.maximum_size=1044464 -phoenix_v2.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -phoenix_v2.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -phoenix_v2.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -phoenix_v2.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -phoenix_v2.menu.FlashSize.4M3M=4M (3M SPIFFS) -phoenix_v2.menu.FlashSize.4M3M.build.flash_size=4M -phoenix_v2.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -phoenix_v2.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -phoenix_v2.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -phoenix_v2.menu.FlashSize.4M3M.upload.maximum_size=1044464 -phoenix_v2.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -phoenix_v2.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -phoenix_v2.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -phoenix_v2.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -phoenix_v2.menu.ResetMethod.ck=ck -phoenix_v2.menu.ResetMethod.ck.upload.resetmethod=ck -phoenix_v2.menu.ResetMethod.nodemcu=nodemcu -phoenix_v2.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -phoenix_v2.menu.LwIPVariant.v2mss536=v2 Lower Memory -phoenix_v2.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -phoenix_v2.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -phoenix_v2.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -phoenix_v2.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -phoenix_v2.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -phoenix_v2.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -phoenix_v2.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -phoenix_v2.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -phoenix_v2.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -phoenix_v2.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v2.menu.LwIPVariant.OpenSource=v1.4 Compile from source -phoenix_v2.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -phoenix_v2.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -phoenix_v2.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -phoenix_v2.menu.Debug.Disabled=Disabled -phoenix_v2.menu.Debug.Disabled.build.debug_port= -phoenix_v2.menu.Debug.Serial=Serial -phoenix_v2.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -phoenix_v2.menu.Debug.Serial1=Serial1 -phoenix_v2.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -phoenix_v2.menu.DebugLevel.None____=None -phoenix_v2.menu.DebugLevel.None____.build.debug_level= -phoenix_v2.menu.DebugLevel.SSL=SSL -phoenix_v2.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -phoenix_v2.menu.DebugLevel.TLS_MEM=TLS_MEM -phoenix_v2.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -phoenix_v2.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -phoenix_v2.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -phoenix_v2.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -phoenix_v2.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -phoenix_v2.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -phoenix_v2.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -phoenix_v2.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -phoenix_v2.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -phoenix_v2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -phoenix_v2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -phoenix_v2.menu.DebugLevel.CORE=CORE -phoenix_v2.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -phoenix_v2.menu.DebugLevel.WIFI=WIFI -phoenix_v2.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -phoenix_v2.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -phoenix_v2.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -phoenix_v2.menu.DebugLevel.UPDATER=UPDATER -phoenix_v2.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -phoenix_v2.menu.DebugLevel.OTA=OTA -phoenix_v2.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -phoenix_v2.menu.DebugLevel.OOM=OOM -phoenix_v2.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -phoenix_v2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -phoenix_v2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -phoenix_v2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -phoenix_v2.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -phoenix_v2.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -phoenix_v2.menu.FlashErase.none=Only Sketch -phoenix_v2.menu.FlashErase.none.upload.erase_cmd= -phoenix_v2.menu.FlashErase.sdk=Sketch + WiFi Settings -phoenix_v2.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -phoenix_v2.menu.FlashErase.all=All Flash Contents -phoenix_v2.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -phoenix_v2.menu.UploadSpeed.115200=115200 -phoenix_v2.menu.UploadSpeed.115200.upload.speed=115200 -phoenix_v2.menu.UploadSpeed.9600=9600 -phoenix_v2.menu.UploadSpeed.9600.upload.speed=9600 -phoenix_v2.menu.UploadSpeed.57600=57600 -phoenix_v2.menu.UploadSpeed.57600.upload.speed=57600 -phoenix_v2.menu.UploadSpeed.230400.linux=230400 -phoenix_v2.menu.UploadSpeed.230400.macosx=230400 -phoenix_v2.menu.UploadSpeed.230400.upload.speed=230400 -phoenix_v2.menu.UploadSpeed.256000.windows=256000 -phoenix_v2.menu.UploadSpeed.256000.upload.speed=256000 -phoenix_v2.menu.UploadSpeed.460800.linux=460800 -phoenix_v2.menu.UploadSpeed.460800.macosx=460800 -phoenix_v2.menu.UploadSpeed.460800.upload.speed=460800 -phoenix_v2.menu.UploadSpeed.512000.windows=512000 -phoenix_v2.menu.UploadSpeed.512000.upload.speed=512000 -phoenix_v2.menu.UploadSpeed.921600=921600 -phoenix_v2.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -nodemcu.name=NodeMCU 0.9 (ESP-12 Module) -nodemcu.build.board=ESP8266_NODEMCU -nodemcu.build.variant=nodemcu -nodemcu.upload.tool=esptool -nodemcu.upload.maximum_data_size=81920 -nodemcu.upload.wait_for_upload_port=true -nodemcu.upload.erase_cmd= -nodemcu.serial.disableDTR=true -nodemcu.serial.disableRTS=true -nodemcu.build.mcu=esp8266 -nodemcu.build.core=esp8266 -nodemcu.build.spiffs_pagesize=256 -nodemcu.build.debug_port= -nodemcu.build.debug_level= -nodemcu.menu.CpuFrequency.80=80 MHz -nodemcu.menu.CpuFrequency.80.build.f_cpu=80000000L -nodemcu.menu.CpuFrequency.160=160 MHz -nodemcu.menu.CpuFrequency.160.build.f_cpu=160000000L -nodemcu.upload.resetmethod=nodemcu -nodemcu.build.flash_mode=qio -nodemcu.build.flash_freq=40 -nodemcu.menu.FlashSize.4M1M=4M (1M SPIFFS) -nodemcu.menu.FlashSize.4M1M.build.flash_size=4M -nodemcu.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -nodemcu.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -nodemcu.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -nodemcu.menu.FlashSize.4M1M.upload.maximum_size=1044464 -nodemcu.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -nodemcu.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -nodemcu.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -nodemcu.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -nodemcu.menu.FlashSize.4M3M=4M (3M SPIFFS) -nodemcu.menu.FlashSize.4M3M.build.flash_size=4M -nodemcu.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -nodemcu.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -nodemcu.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -nodemcu.menu.FlashSize.4M3M.upload.maximum_size=1044464 -nodemcu.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -nodemcu.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -nodemcu.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -nodemcu.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -nodemcu.menu.LwIPVariant.v2mss536=v2 Lower Memory -nodemcu.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -nodemcu.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -nodemcu.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -nodemcu.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -nodemcu.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -nodemcu.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -nodemcu.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -nodemcu.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -nodemcu.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -nodemcu.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcu.menu.LwIPVariant.OpenSource=v1.4 Compile from source -nodemcu.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -nodemcu.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcu.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -nodemcu.menu.Debug.Disabled=Disabled -nodemcu.menu.Debug.Disabled.build.debug_port= -nodemcu.menu.Debug.Serial=Serial -nodemcu.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -nodemcu.menu.Debug.Serial1=Serial1 -nodemcu.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -nodemcu.menu.DebugLevel.None____=None -nodemcu.menu.DebugLevel.None____.build.debug_level= -nodemcu.menu.DebugLevel.SSL=SSL -nodemcu.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -nodemcu.menu.DebugLevel.TLS_MEM=TLS_MEM -nodemcu.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -nodemcu.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -nodemcu.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -nodemcu.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -nodemcu.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -nodemcu.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -nodemcu.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -nodemcu.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -nodemcu.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -nodemcu.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -nodemcu.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -nodemcu.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -nodemcu.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -nodemcu.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -nodemcu.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -nodemcu.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcu.menu.DebugLevel.CORE=CORE -nodemcu.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -nodemcu.menu.DebugLevel.WIFI=WIFI -nodemcu.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -nodemcu.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -nodemcu.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -nodemcu.menu.DebugLevel.UPDATER=UPDATER -nodemcu.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -nodemcu.menu.DebugLevel.OTA=OTA -nodemcu.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -nodemcu.menu.DebugLevel.OOM=OOM -nodemcu.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -nodemcu.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -nodemcu.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -nodemcu.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -nodemcu.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -nodemcu.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -nodemcu.menu.FlashErase.none=Only Sketch -nodemcu.menu.FlashErase.none.upload.erase_cmd= -nodemcu.menu.FlashErase.sdk=Sketch + WiFi Settings -nodemcu.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -nodemcu.menu.FlashErase.all=All Flash Contents -nodemcu.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -nodemcu.menu.UploadSpeed.115200=115200 -nodemcu.menu.UploadSpeed.115200.upload.speed=115200 -nodemcu.menu.UploadSpeed.9600=9600 -nodemcu.menu.UploadSpeed.9600.upload.speed=9600 -nodemcu.menu.UploadSpeed.57600=57600 -nodemcu.menu.UploadSpeed.57600.upload.speed=57600 -nodemcu.menu.UploadSpeed.230400.linux=230400 -nodemcu.menu.UploadSpeed.230400.macosx=230400 -nodemcu.menu.UploadSpeed.230400.upload.speed=230400 -nodemcu.menu.UploadSpeed.256000.windows=256000 -nodemcu.menu.UploadSpeed.256000.upload.speed=256000 -nodemcu.menu.UploadSpeed.460800.linux=460800 -nodemcu.menu.UploadSpeed.460800.macosx=460800 -nodemcu.menu.UploadSpeed.460800.upload.speed=460800 -nodemcu.menu.UploadSpeed.512000.windows=512000 -nodemcu.menu.UploadSpeed.512000.upload.speed=512000 -nodemcu.menu.UploadSpeed.921600=921600 -nodemcu.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -nodemcuv2.name=NodeMCU 1.0 (ESP-12E Module) -nodemcuv2.build.board=ESP8266_NODEMCU -nodemcuv2.build.variant=nodemcu -nodemcuv2.upload.tool=esptool -nodemcuv2.upload.maximum_data_size=81920 -nodemcuv2.upload.wait_for_upload_port=true -nodemcuv2.upload.erase_cmd= -nodemcuv2.serial.disableDTR=true -nodemcuv2.serial.disableRTS=true -nodemcuv2.build.mcu=esp8266 -nodemcuv2.build.core=esp8266 -nodemcuv2.build.spiffs_pagesize=256 -nodemcuv2.build.debug_port= -nodemcuv2.build.debug_level= -nodemcuv2.menu.CpuFrequency.80=80 MHz -nodemcuv2.menu.CpuFrequency.80.build.f_cpu=80000000L -nodemcuv2.menu.CpuFrequency.160=160 MHz -nodemcuv2.menu.CpuFrequency.160.build.f_cpu=160000000L -nodemcuv2.upload.resetmethod=nodemcu -nodemcuv2.build.flash_mode=dio -nodemcuv2.build.flash_freq=40 -nodemcuv2.menu.FlashSize.4M1M=4M (1M SPIFFS) -nodemcuv2.menu.FlashSize.4M1M.build.flash_size=4M -nodemcuv2.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -nodemcuv2.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -nodemcuv2.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -nodemcuv2.menu.FlashSize.4M1M.upload.maximum_size=1044464 -nodemcuv2.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -nodemcuv2.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -nodemcuv2.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -nodemcuv2.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -nodemcuv2.menu.FlashSize.4M3M=4M (3M SPIFFS) -nodemcuv2.menu.FlashSize.4M3M.build.flash_size=4M -nodemcuv2.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -nodemcuv2.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -nodemcuv2.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -nodemcuv2.menu.FlashSize.4M3M.upload.maximum_size=1044464 -nodemcuv2.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -nodemcuv2.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -nodemcuv2.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -nodemcuv2.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -nodemcuv2.menu.LwIPVariant.v2mss536=v2 Lower Memory -nodemcuv2.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -nodemcuv2.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -nodemcuv2.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -nodemcuv2.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -nodemcuv2.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -nodemcuv2.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -nodemcuv2.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -nodemcuv2.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -nodemcuv2.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -nodemcuv2.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcuv2.menu.LwIPVariant.OpenSource=v1.4 Compile from source -nodemcuv2.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -nodemcuv2.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -nodemcuv2.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -nodemcuv2.menu.Debug.Disabled=Disabled -nodemcuv2.menu.Debug.Disabled.build.debug_port= -nodemcuv2.menu.Debug.Serial=Serial -nodemcuv2.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -nodemcuv2.menu.Debug.Serial1=Serial1 -nodemcuv2.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -nodemcuv2.menu.DebugLevel.None____=None -nodemcuv2.menu.DebugLevel.None____.build.debug_level= -nodemcuv2.menu.DebugLevel.SSL=SSL -nodemcuv2.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -nodemcuv2.menu.DebugLevel.TLS_MEM=TLS_MEM -nodemcuv2.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -nodemcuv2.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -nodemcuv2.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -nodemcuv2.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -nodemcuv2.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -nodemcuv2.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -nodemcuv2.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -nodemcuv2.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -nodemcuv2.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -nodemcuv2.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -nodemcuv2.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -nodemcuv2.menu.DebugLevel.CORE=CORE -nodemcuv2.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -nodemcuv2.menu.DebugLevel.WIFI=WIFI -nodemcuv2.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -nodemcuv2.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -nodemcuv2.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -nodemcuv2.menu.DebugLevel.UPDATER=UPDATER -nodemcuv2.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -nodemcuv2.menu.DebugLevel.OTA=OTA -nodemcuv2.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -nodemcuv2.menu.DebugLevel.OOM=OOM -nodemcuv2.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -nodemcuv2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -nodemcuv2.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -nodemcuv2.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -nodemcuv2.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -nodemcuv2.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -nodemcuv2.menu.FlashErase.none=Only Sketch -nodemcuv2.menu.FlashErase.none.upload.erase_cmd= -nodemcuv2.menu.FlashErase.sdk=Sketch + WiFi Settings -nodemcuv2.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -nodemcuv2.menu.FlashErase.all=All Flash Contents -nodemcuv2.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -nodemcuv2.menu.UploadSpeed.115200=115200 -nodemcuv2.menu.UploadSpeed.115200.upload.speed=115200 -nodemcuv2.menu.UploadSpeed.9600=9600 -nodemcuv2.menu.UploadSpeed.9600.upload.speed=9600 -nodemcuv2.menu.UploadSpeed.57600=57600 -nodemcuv2.menu.UploadSpeed.57600.upload.speed=57600 -nodemcuv2.menu.UploadSpeed.230400.linux=230400 -nodemcuv2.menu.UploadSpeed.230400.macosx=230400 -nodemcuv2.menu.UploadSpeed.230400.upload.speed=230400 -nodemcuv2.menu.UploadSpeed.256000.windows=256000 -nodemcuv2.menu.UploadSpeed.256000.upload.speed=256000 -nodemcuv2.menu.UploadSpeed.460800.linux=460800 -nodemcuv2.menu.UploadSpeed.460800.macosx=460800 -nodemcuv2.menu.UploadSpeed.460800.upload.speed=460800 -nodemcuv2.menu.UploadSpeed.512000.windows=512000 -nodemcuv2.menu.UploadSpeed.512000.upload.speed=512000 -nodemcuv2.menu.UploadSpeed.921600=921600 -nodemcuv2.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -modwifi.name=Olimex MOD-WIFI-ESP8266(-DEV) -modwifi.build.board=MOD_WIFI_ESP8266 -modwifi.upload.tool=esptool -modwifi.upload.maximum_data_size=81920 -modwifi.upload.wait_for_upload_port=true -modwifi.upload.erase_cmd= -modwifi.serial.disableDTR=true -modwifi.serial.disableRTS=true -modwifi.build.mcu=esp8266 -modwifi.build.core=esp8266 -modwifi.build.variant=generic -modwifi.build.spiffs_pagesize=256 -modwifi.build.debug_port= -modwifi.build.debug_level= -modwifi.menu.CpuFrequency.80=80 MHz -modwifi.menu.CpuFrequency.80.build.f_cpu=80000000L -modwifi.menu.CpuFrequency.160=160 MHz -modwifi.menu.CpuFrequency.160.build.f_cpu=160000000L -modwifi.upload.resetmethod=ck -modwifi.build.flash_mode=qio -modwifi.build.flash_freq=40 -modwifi.menu.FlashSize.2M=2M (1M SPIFFS) -modwifi.menu.FlashSize.2M.build.flash_size=2M -modwifi.menu.FlashSize.2M.build.flash_size_bytes=0x200000 -modwifi.menu.FlashSize.2M.build.flash_ld=eagle.flash.2m.ld -modwifi.menu.FlashSize.2M.build.spiffs_pagesize=256 -modwifi.menu.FlashSize.2M.upload.maximum_size=1044464 -modwifi.menu.FlashSize.2M.build.rfcal_addr=0x1FC000 -modwifi.menu.FlashSize.2M.build.spiffs_start=0x100000 -modwifi.menu.FlashSize.2M.build.spiffs_end=0x1FB000 -modwifi.menu.FlashSize.2M.build.spiffs_blocksize=8192 -modwifi.menu.LwIPVariant.v2mss536=v2 Lower Memory -modwifi.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -modwifi.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -modwifi.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -modwifi.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -modwifi.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -modwifi.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -modwifi.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -modwifi.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -modwifi.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -modwifi.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -modwifi.menu.LwIPVariant.OpenSource=v1.4 Compile from source -modwifi.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -modwifi.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -modwifi.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -modwifi.menu.Debug.Disabled=Disabled -modwifi.menu.Debug.Disabled.build.debug_port= -modwifi.menu.Debug.Serial=Serial -modwifi.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -modwifi.menu.Debug.Serial1=Serial1 -modwifi.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -modwifi.menu.DebugLevel.None____=None -modwifi.menu.DebugLevel.None____.build.debug_level= -modwifi.menu.DebugLevel.SSL=SSL -modwifi.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -modwifi.menu.DebugLevel.TLS_MEM=TLS_MEM -modwifi.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -modwifi.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -modwifi.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -modwifi.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -modwifi.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -modwifi.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -modwifi.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -modwifi.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -modwifi.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -modwifi.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -modwifi.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -modwifi.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -modwifi.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -modwifi.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -modwifi.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -modwifi.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -modwifi.menu.DebugLevel.CORE=CORE -modwifi.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -modwifi.menu.DebugLevel.WIFI=WIFI -modwifi.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -modwifi.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -modwifi.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -modwifi.menu.DebugLevel.UPDATER=UPDATER -modwifi.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -modwifi.menu.DebugLevel.OTA=OTA -modwifi.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -modwifi.menu.DebugLevel.OOM=OOM -modwifi.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -modwifi.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -modwifi.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -modwifi.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -modwifi.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -modwifi.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -modwifi.menu.FlashErase.none=Only Sketch -modwifi.menu.FlashErase.none.upload.erase_cmd= -modwifi.menu.FlashErase.sdk=Sketch + WiFi Settings -modwifi.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -modwifi.menu.FlashErase.all=All Flash Contents -modwifi.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -modwifi.menu.UploadSpeed.115200=115200 -modwifi.menu.UploadSpeed.115200.upload.speed=115200 -modwifi.menu.UploadSpeed.9600=9600 -modwifi.menu.UploadSpeed.9600.upload.speed=9600 -modwifi.menu.UploadSpeed.57600=57600 -modwifi.menu.UploadSpeed.57600.upload.speed=57600 -modwifi.menu.UploadSpeed.230400.linux=230400 -modwifi.menu.UploadSpeed.230400.macosx=230400 -modwifi.menu.UploadSpeed.230400.upload.speed=230400 -modwifi.menu.UploadSpeed.256000.windows=256000 -modwifi.menu.UploadSpeed.256000.upload.speed=256000 -modwifi.menu.UploadSpeed.460800.linux=460800 -modwifi.menu.UploadSpeed.460800.macosx=460800 -modwifi.menu.UploadSpeed.460800.upload.speed=460800 -modwifi.menu.UploadSpeed.512000.windows=512000 -modwifi.menu.UploadSpeed.512000.upload.speed=512000 -modwifi.menu.UploadSpeed.921600=921600 -modwifi.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -thing.name=SparkFun ESP8266 Thing -thing.build.board=ESP8266_THING -thing.build.variant=thing -thing.upload.tool=esptool -thing.upload.maximum_data_size=81920 -thing.upload.wait_for_upload_port=true -thing.upload.erase_cmd= -thing.serial.disableDTR=true -thing.serial.disableRTS=true -thing.build.mcu=esp8266 -thing.build.core=esp8266 -thing.build.spiffs_pagesize=256 -thing.build.debug_port= -thing.build.debug_level= -thing.menu.CpuFrequency.80=80 MHz -thing.menu.CpuFrequency.80.build.f_cpu=80000000L -thing.menu.CpuFrequency.160=160 MHz -thing.menu.CpuFrequency.160.build.f_cpu=160000000L -thing.upload.resetmethod=ck -thing.build.flash_mode=qio -thing.build.flash_freq=40 -thing.menu.FlashSize.512K0=512K (no SPIFFS) -thing.menu.FlashSize.512K0.build.flash_size=512K -thing.menu.FlashSize.512K0.build.flash_size_bytes=0x80000 -thing.menu.FlashSize.512K0.build.flash_ld=eagle.flash.512k0.ld -thing.menu.FlashSize.512K0.build.spiffs_pagesize=256 -thing.menu.FlashSize.512K0.upload.maximum_size=499696 -thing.menu.FlashSize.512K0.build.rfcal_addr=0x7C000 -thing.menu.FlashSize.512K64=512K (64K SPIFFS) -thing.menu.FlashSize.512K64.build.flash_size=512K -thing.menu.FlashSize.512K64.build.flash_size_bytes=0x80000 -thing.menu.FlashSize.512K64.build.flash_ld=eagle.flash.512k64.ld -thing.menu.FlashSize.512K64.build.spiffs_pagesize=256 -thing.menu.FlashSize.512K64.upload.maximum_size=434160 -thing.menu.FlashSize.512K64.build.rfcal_addr=0x7C000 -thing.menu.FlashSize.512K64.build.spiffs_start=0x6B000 -thing.menu.FlashSize.512K64.build.spiffs_end=0x7B000 -thing.menu.FlashSize.512K64.build.spiffs_blocksize=4096 -thing.menu.FlashSize.512K128=512K (128K SPIFFS) -thing.menu.FlashSize.512K128.build.flash_size=512K -thing.menu.FlashSize.512K128.build.flash_size_bytes=0x80000 -thing.menu.FlashSize.512K128.build.flash_ld=eagle.flash.512k128.ld -thing.menu.FlashSize.512K128.build.spiffs_pagesize=256 -thing.menu.FlashSize.512K128.upload.maximum_size=368624 -thing.menu.FlashSize.512K128.build.rfcal_addr=0x7C000 -thing.menu.FlashSize.512K128.build.spiffs_start=0x5B000 -thing.menu.FlashSize.512K128.build.spiffs_end=0x7B000 -thing.menu.FlashSize.512K128.build.spiffs_blocksize=4096 -thing.menu.LwIPVariant.v2mss536=v2 Lower Memory -thing.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -thing.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -thing.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -thing.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -thing.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -thing.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -thing.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -thing.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -thing.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -thing.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -thing.menu.LwIPVariant.OpenSource=v1.4 Compile from source -thing.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -thing.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -thing.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -thing.menu.Debug.Disabled=Disabled -thing.menu.Debug.Disabled.build.debug_port= -thing.menu.Debug.Serial=Serial -thing.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -thing.menu.Debug.Serial1=Serial1 -thing.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -thing.menu.DebugLevel.None____=None -thing.menu.DebugLevel.None____.build.debug_level= -thing.menu.DebugLevel.SSL=SSL -thing.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -thing.menu.DebugLevel.TLS_MEM=TLS_MEM -thing.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -thing.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -thing.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -thing.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -thing.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -thing.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -thing.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -thing.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -thing.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -thing.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -thing.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -thing.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -thing.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -thing.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -thing.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -thing.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -thing.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -thing.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thing.menu.DebugLevel.CORE=CORE -thing.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -thing.menu.DebugLevel.WIFI=WIFI -thing.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -thing.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -thing.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -thing.menu.DebugLevel.UPDATER=UPDATER -thing.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -thing.menu.DebugLevel.OTA=OTA -thing.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -thing.menu.DebugLevel.OOM=OOM -thing.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -thing.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -thing.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -thing.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -thing.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -thing.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -thing.menu.FlashErase.none=Only Sketch -thing.menu.FlashErase.none.upload.erase_cmd= -thing.menu.FlashErase.sdk=Sketch + WiFi Settings -thing.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -thing.menu.FlashErase.all=All Flash Contents -thing.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -thing.menu.UploadSpeed.115200=115200 -thing.menu.UploadSpeed.115200.upload.speed=115200 -thing.menu.UploadSpeed.9600=9600 -thing.menu.UploadSpeed.9600.upload.speed=9600 -thing.menu.UploadSpeed.57600=57600 -thing.menu.UploadSpeed.57600.upload.speed=57600 -thing.menu.UploadSpeed.230400.linux=230400 -thing.menu.UploadSpeed.230400.macosx=230400 -thing.menu.UploadSpeed.230400.upload.speed=230400 -thing.menu.UploadSpeed.256000.windows=256000 -thing.menu.UploadSpeed.256000.upload.speed=256000 -thing.menu.UploadSpeed.460800.linux=460800 -thing.menu.UploadSpeed.460800.macosx=460800 -thing.menu.UploadSpeed.460800.upload.speed=460800 -thing.menu.UploadSpeed.512000.windows=512000 -thing.menu.UploadSpeed.512000.upload.speed=512000 -thing.menu.UploadSpeed.921600=921600 -thing.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -thingdev.name=SparkFun ESP8266 Thing Dev -thingdev.build.board=ESP8266_THING_DEV -thingdev.build.variant=thing -thingdev.upload.tool=esptool -thingdev.upload.maximum_data_size=81920 -thingdev.upload.wait_for_upload_port=true -thingdev.upload.erase_cmd= -thingdev.serial.disableDTR=true -thingdev.serial.disableRTS=true -thingdev.build.mcu=esp8266 -thingdev.build.core=esp8266 -thingdev.build.spiffs_pagesize=256 -thingdev.build.debug_port= -thingdev.build.debug_level= -thingdev.menu.CpuFrequency.80=80 MHz -thingdev.menu.CpuFrequency.80.build.f_cpu=80000000L -thingdev.menu.CpuFrequency.160=160 MHz -thingdev.menu.CpuFrequency.160.build.f_cpu=160000000L -thingdev.upload.resetmethod=nodemcu -thingdev.build.flash_mode=dio -thingdev.build.flash_freq=40 -thingdev.menu.FlashSize.512K0=512K (no SPIFFS) -thingdev.menu.FlashSize.512K0.build.flash_size=512K -thingdev.menu.FlashSize.512K0.build.flash_size_bytes=0x80000 -thingdev.menu.FlashSize.512K0.build.flash_ld=eagle.flash.512k0.ld -thingdev.menu.FlashSize.512K0.build.spiffs_pagesize=256 -thingdev.menu.FlashSize.512K0.upload.maximum_size=499696 -thingdev.menu.FlashSize.512K0.build.rfcal_addr=0x7C000 -thingdev.menu.FlashSize.512K64=512K (64K SPIFFS) -thingdev.menu.FlashSize.512K64.build.flash_size=512K -thingdev.menu.FlashSize.512K64.build.flash_size_bytes=0x80000 -thingdev.menu.FlashSize.512K64.build.flash_ld=eagle.flash.512k64.ld -thingdev.menu.FlashSize.512K64.build.spiffs_pagesize=256 -thingdev.menu.FlashSize.512K64.upload.maximum_size=434160 -thingdev.menu.FlashSize.512K64.build.rfcal_addr=0x7C000 -thingdev.menu.FlashSize.512K64.build.spiffs_start=0x6B000 -thingdev.menu.FlashSize.512K64.build.spiffs_end=0x7B000 -thingdev.menu.FlashSize.512K64.build.spiffs_blocksize=4096 -thingdev.menu.FlashSize.512K128=512K (128K SPIFFS) -thingdev.menu.FlashSize.512K128.build.flash_size=512K -thingdev.menu.FlashSize.512K128.build.flash_size_bytes=0x80000 -thingdev.menu.FlashSize.512K128.build.flash_ld=eagle.flash.512k128.ld -thingdev.menu.FlashSize.512K128.build.spiffs_pagesize=256 -thingdev.menu.FlashSize.512K128.upload.maximum_size=368624 -thingdev.menu.FlashSize.512K128.build.rfcal_addr=0x7C000 -thingdev.menu.FlashSize.512K128.build.spiffs_start=0x5B000 -thingdev.menu.FlashSize.512K128.build.spiffs_end=0x7B000 -thingdev.menu.FlashSize.512K128.build.spiffs_blocksize=4096 -thingdev.menu.LwIPVariant.v2mss536=v2 Lower Memory -thingdev.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -thingdev.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -thingdev.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -thingdev.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -thingdev.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -thingdev.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -thingdev.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -thingdev.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -thingdev.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -thingdev.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -thingdev.menu.LwIPVariant.OpenSource=v1.4 Compile from source -thingdev.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -thingdev.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -thingdev.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -thingdev.menu.Debug.Disabled=Disabled -thingdev.menu.Debug.Disabled.build.debug_port= -thingdev.menu.Debug.Serial=Serial -thingdev.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -thingdev.menu.Debug.Serial1=Serial1 -thingdev.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -thingdev.menu.DebugLevel.None____=None -thingdev.menu.DebugLevel.None____.build.debug_level= -thingdev.menu.DebugLevel.SSL=SSL -thingdev.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -thingdev.menu.DebugLevel.TLS_MEM=TLS_MEM -thingdev.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -thingdev.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -thingdev.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -thingdev.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -thingdev.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -thingdev.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -thingdev.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -thingdev.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -thingdev.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -thingdev.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -thingdev.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -thingdev.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -thingdev.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -thingdev.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -thingdev.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -thingdev.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -thingdev.menu.DebugLevel.CORE=CORE -thingdev.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -thingdev.menu.DebugLevel.WIFI=WIFI -thingdev.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -thingdev.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -thingdev.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -thingdev.menu.DebugLevel.UPDATER=UPDATER -thingdev.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -thingdev.menu.DebugLevel.OTA=OTA -thingdev.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -thingdev.menu.DebugLevel.OOM=OOM -thingdev.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -thingdev.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -thingdev.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -thingdev.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -thingdev.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -thingdev.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -thingdev.menu.FlashErase.none=Only Sketch -thingdev.menu.FlashErase.none.upload.erase_cmd= -thingdev.menu.FlashErase.sdk=Sketch + WiFi Settings -thingdev.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -thingdev.menu.FlashErase.all=All Flash Contents -thingdev.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -thingdev.menu.UploadSpeed.115200=115200 -thingdev.menu.UploadSpeed.115200.upload.speed=115200 -thingdev.menu.UploadSpeed.9600=9600 -thingdev.menu.UploadSpeed.9600.upload.speed=9600 -thingdev.menu.UploadSpeed.57600=57600 -thingdev.menu.UploadSpeed.57600.upload.speed=57600 -thingdev.menu.UploadSpeed.230400.linux=230400 -thingdev.menu.UploadSpeed.230400.macosx=230400 -thingdev.menu.UploadSpeed.230400.upload.speed=230400 -thingdev.menu.UploadSpeed.256000.windows=256000 -thingdev.menu.UploadSpeed.256000.upload.speed=256000 -thingdev.menu.UploadSpeed.460800.linux=460800 -thingdev.menu.UploadSpeed.460800.macosx=460800 -thingdev.menu.UploadSpeed.460800.upload.speed=460800 -thingdev.menu.UploadSpeed.512000.windows=512000 -thingdev.menu.UploadSpeed.512000.upload.speed=512000 -thingdev.menu.UploadSpeed.921600=921600 -thingdev.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -esp210.name=SweetPea ESP-210 -esp210.build.board=ESP8266_ESP210 -esp210.upload.tool=esptool -esp210.upload.maximum_data_size=81920 -esp210.upload.wait_for_upload_port=true -esp210.upload.erase_cmd= -esp210.serial.disableDTR=true -esp210.serial.disableRTS=true -esp210.build.mcu=esp8266 -esp210.build.core=esp8266 -esp210.build.variant=generic -esp210.build.spiffs_pagesize=256 -esp210.build.debug_port= -esp210.build.debug_level= -esp210.menu.CpuFrequency.80=80 MHz -esp210.menu.CpuFrequency.80.build.f_cpu=80000000L -esp210.menu.CpuFrequency.160=160 MHz -esp210.menu.CpuFrequency.160.build.f_cpu=160000000L -esp210.upload.resetmethod=ck -esp210.build.flash_mode=qio -esp210.build.flash_freq=40 -esp210.menu.FlashSize.4M1M=4M (1M SPIFFS) -esp210.menu.FlashSize.4M1M.build.flash_size=4M -esp210.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -esp210.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -esp210.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -esp210.menu.FlashSize.4M1M.upload.maximum_size=1044464 -esp210.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -esp210.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -esp210.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -esp210.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -esp210.menu.FlashSize.4M3M=4M (3M SPIFFS) -esp210.menu.FlashSize.4M3M.build.flash_size=4M -esp210.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -esp210.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -esp210.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -esp210.menu.FlashSize.4M3M.upload.maximum_size=1044464 -esp210.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -esp210.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -esp210.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -esp210.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -esp210.menu.LwIPVariant.v2mss536=v2 Lower Memory -esp210.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -esp210.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -esp210.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -esp210.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -esp210.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -esp210.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -esp210.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -esp210.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -esp210.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -esp210.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -esp210.menu.LwIPVariant.OpenSource=v1.4 Compile from source -esp210.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -esp210.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -esp210.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -esp210.menu.Debug.Disabled=Disabled -esp210.menu.Debug.Disabled.build.debug_port= -esp210.menu.Debug.Serial=Serial -esp210.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -esp210.menu.Debug.Serial1=Serial1 -esp210.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -esp210.menu.DebugLevel.None____=None -esp210.menu.DebugLevel.None____.build.debug_level= -esp210.menu.DebugLevel.SSL=SSL -esp210.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -esp210.menu.DebugLevel.TLS_MEM=TLS_MEM -esp210.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -esp210.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -esp210.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -esp210.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -esp210.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -esp210.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -esp210.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -esp210.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -esp210.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -esp210.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -esp210.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -esp210.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -esp210.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -esp210.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -esp210.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -esp210.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -esp210.menu.DebugLevel.CORE=CORE -esp210.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -esp210.menu.DebugLevel.WIFI=WIFI -esp210.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -esp210.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -esp210.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -esp210.menu.DebugLevel.UPDATER=UPDATER -esp210.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -esp210.menu.DebugLevel.OTA=OTA -esp210.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -esp210.menu.DebugLevel.OOM=OOM -esp210.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -esp210.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -esp210.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -esp210.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -esp210.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -esp210.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -esp210.menu.FlashErase.none=Only Sketch -esp210.menu.FlashErase.none.upload.erase_cmd= -esp210.menu.FlashErase.sdk=Sketch + WiFi Settings -esp210.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -esp210.menu.FlashErase.all=All Flash Contents -esp210.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -esp210.menu.UploadSpeed.57600=57600 -esp210.menu.UploadSpeed.57600.upload.speed=57600 -esp210.menu.UploadSpeed.9600=9600 -esp210.menu.UploadSpeed.9600.upload.speed=9600 -esp210.menu.UploadSpeed.115200=115200 -esp210.menu.UploadSpeed.115200.upload.speed=115200 -esp210.menu.UploadSpeed.230400.linux=230400 -esp210.menu.UploadSpeed.230400.macosx=230400 -esp210.menu.UploadSpeed.230400.upload.speed=230400 -esp210.menu.UploadSpeed.256000.windows=256000 -esp210.menu.UploadSpeed.256000.upload.speed=256000 -esp210.menu.UploadSpeed.460800.linux=460800 -esp210.menu.UploadSpeed.460800.macosx=460800 -esp210.menu.UploadSpeed.460800.upload.speed=460800 -esp210.menu.UploadSpeed.512000.windows=512000 -esp210.menu.UploadSpeed.512000.upload.speed=512000 -esp210.menu.UploadSpeed.921600=921600 -esp210.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -d1_mini.name=WeMos D1 R2 & mini -d1_mini.build.board=ESP8266_WEMOS_D1MINI -d1_mini.build.variant=d1_mini -d1_mini.upload.tool=esptool -d1_mini.upload.maximum_data_size=81920 -d1_mini.upload.wait_for_upload_port=true -d1_mini.upload.erase_cmd= -d1_mini.serial.disableDTR=true -d1_mini.serial.disableRTS=true -d1_mini.build.mcu=esp8266 -d1_mini.build.core=esp8266 -d1_mini.build.spiffs_pagesize=256 -d1_mini.build.debug_port= -d1_mini.build.debug_level= -d1_mini.menu.CpuFrequency.80=80 MHz -d1_mini.menu.CpuFrequency.80.build.f_cpu=80000000L -d1_mini.menu.CpuFrequency.160=160 MHz -d1_mini.menu.CpuFrequency.160.build.f_cpu=160000000L -d1_mini.upload.resetmethod=nodemcu -d1_mini.build.flash_mode=dio -d1_mini.build.flash_freq=40 -d1_mini.menu.FlashSize.4M1M=4M (1M SPIFFS) -d1_mini.menu.FlashSize.4M1M.build.flash_size=4M -d1_mini.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -d1_mini.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -d1_mini.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -d1_mini.menu.FlashSize.4M1M.upload.maximum_size=1044464 -d1_mini.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -d1_mini.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -d1_mini.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -d1_mini.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -d1_mini.menu.FlashSize.4M3M=4M (3M SPIFFS) -d1_mini.menu.FlashSize.4M3M.build.flash_size=4M -d1_mini.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -d1_mini.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -d1_mini.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -d1_mini.menu.FlashSize.4M3M.upload.maximum_size=1044464 -d1_mini.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -d1_mini.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -d1_mini.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -d1_mini.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -d1_mini.menu.LwIPVariant.v2mss536=v2 Lower Memory -d1_mini.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -d1_mini.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -d1_mini.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -d1_mini.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -d1_mini.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -d1_mini.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -d1_mini.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -d1_mini.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -d1_mini.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -d1_mini.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini.menu.LwIPVariant.OpenSource=v1.4 Compile from source -d1_mini.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -d1_mini.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -d1_mini.menu.Debug.Disabled=Disabled -d1_mini.menu.Debug.Disabled.build.debug_port= -d1_mini.menu.Debug.Serial=Serial -d1_mini.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -d1_mini.menu.Debug.Serial1=Serial1 -d1_mini.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -d1_mini.menu.DebugLevel.None____=None -d1_mini.menu.DebugLevel.None____.build.debug_level= -d1_mini.menu.DebugLevel.SSL=SSL -d1_mini.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -d1_mini.menu.DebugLevel.TLS_MEM=TLS_MEM -d1_mini.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -d1_mini.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -d1_mini.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -d1_mini.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -d1_mini.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -d1_mini.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -d1_mini.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -d1_mini.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -d1_mini.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -d1_mini.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -d1_mini.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -d1_mini.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -d1_mini.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -d1_mini.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini.menu.DebugLevel.CORE=CORE -d1_mini.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -d1_mini.menu.DebugLevel.WIFI=WIFI -d1_mini.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -d1_mini.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -d1_mini.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -d1_mini.menu.DebugLevel.UPDATER=UPDATER -d1_mini.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -d1_mini.menu.DebugLevel.OTA=OTA -d1_mini.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -d1_mini.menu.DebugLevel.OOM=OOM -d1_mini.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1_mini.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -d1_mini.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -d1_mini.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1_mini.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -d1_mini.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -d1_mini.menu.FlashErase.none=Only Sketch -d1_mini.menu.FlashErase.none.upload.erase_cmd= -d1_mini.menu.FlashErase.sdk=Sketch + WiFi Settings -d1_mini.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -d1_mini.menu.FlashErase.all=All Flash Contents -d1_mini.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -d1_mini.menu.UploadSpeed.921600=921600 -d1_mini.menu.UploadSpeed.921600.upload.speed=921600 -d1_mini.menu.UploadSpeed.9600=9600 -d1_mini.menu.UploadSpeed.9600.upload.speed=9600 -d1_mini.menu.UploadSpeed.57600=57600 -d1_mini.menu.UploadSpeed.57600.upload.speed=57600 -d1_mini.menu.UploadSpeed.115200=115200 -d1_mini.menu.UploadSpeed.115200.upload.speed=115200 -d1_mini.menu.UploadSpeed.230400.linux=230400 -d1_mini.menu.UploadSpeed.230400.macosx=230400 -d1_mini.menu.UploadSpeed.230400.upload.speed=230400 -d1_mini.menu.UploadSpeed.256000.windows=256000 -d1_mini.menu.UploadSpeed.256000.upload.speed=256000 -d1_mini.menu.UploadSpeed.460800.linux=460800 -d1_mini.menu.UploadSpeed.460800.macosx=460800 -d1_mini.menu.UploadSpeed.460800.upload.speed=460800 -d1_mini.menu.UploadSpeed.512000.windows=512000 -d1_mini.menu.UploadSpeed.512000.upload.speed=512000 - -############################################################## -d1_mini_pro.name=WeMos D1 mini Pro -d1_mini_pro.build.board=ESP8266_WEMOS_D1MINIPRO -d1_mini_pro.build.variant=d1_mini -d1_mini_pro.upload.tool=esptool -d1_mini_pro.upload.maximum_data_size=81920 -d1_mini_pro.upload.wait_for_upload_port=true -d1_mini_pro.upload.erase_cmd= -d1_mini_pro.serial.disableDTR=true -d1_mini_pro.serial.disableRTS=true -d1_mini_pro.build.mcu=esp8266 -d1_mini_pro.build.core=esp8266 -d1_mini_pro.build.spiffs_pagesize=256 -d1_mini_pro.build.debug_port= -d1_mini_pro.build.debug_level= -d1_mini_pro.menu.CpuFrequency.80=80 MHz -d1_mini_pro.menu.CpuFrequency.80.build.f_cpu=80000000L -d1_mini_pro.menu.CpuFrequency.160=160 MHz -d1_mini_pro.menu.CpuFrequency.160.build.f_cpu=160000000L -d1_mini_pro.upload.resetmethod=nodemcu -d1_mini_pro.build.flash_mode=dio -d1_mini_pro.build.flash_freq=40 -d1_mini_pro.menu.FlashSize.16M15M=16M (15M SPIFFS) -d1_mini_pro.menu.FlashSize.16M15M.build.flash_size=16M -d1_mini_pro.menu.FlashSize.16M15M.build.flash_size_bytes=0x1000000 -d1_mini_pro.menu.FlashSize.16M15M.build.flash_ld=eagle.flash.16m.ld -d1_mini_pro.menu.FlashSize.16M15M.build.spiffs_pagesize=256 -d1_mini_pro.menu.FlashSize.16M15M.upload.maximum_size=1044464 -d1_mini_pro.menu.FlashSize.16M15M.build.rfcal_addr=0xFFC000 -d1_mini_pro.menu.FlashSize.16M15M.build.spiffs_start=0x100000 -d1_mini_pro.menu.FlashSize.16M15M.build.spiffs_end=0xFFB000 -d1_mini_pro.menu.FlashSize.16M15M.build.spiffs_blocksize=8192 -d1_mini_pro.menu.LwIPVariant.v2mss536=v2 Lower Memory -d1_mini_pro.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -d1_mini_pro.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -d1_mini_pro.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -d1_mini_pro.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -d1_mini_pro.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -d1_mini_pro.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -d1_mini_pro.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -d1_mini_pro.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -d1_mini_pro.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -d1_mini_pro.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_pro.menu.LwIPVariant.OpenSource=v1.4 Compile from source -d1_mini_pro.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -d1_mini_pro.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_pro.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -d1_mini_pro.menu.Debug.Disabled=Disabled -d1_mini_pro.menu.Debug.Disabled.build.debug_port= -d1_mini_pro.menu.Debug.Serial=Serial -d1_mini_pro.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -d1_mini_pro.menu.Debug.Serial1=Serial1 -d1_mini_pro.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -d1_mini_pro.menu.DebugLevel.None____=None -d1_mini_pro.menu.DebugLevel.None____.build.debug_level= -d1_mini_pro.menu.DebugLevel.SSL=SSL -d1_mini_pro.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -d1_mini_pro.menu.DebugLevel.TLS_MEM=TLS_MEM -d1_mini_pro.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -d1_mini_pro.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -d1_mini_pro.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -d1_mini_pro.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -d1_mini_pro.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_pro.menu.DebugLevel.CORE=CORE -d1_mini_pro.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -d1_mini_pro.menu.DebugLevel.WIFI=WIFI -d1_mini_pro.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -d1_mini_pro.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -d1_mini_pro.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -d1_mini_pro.menu.DebugLevel.UPDATER=UPDATER -d1_mini_pro.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -d1_mini_pro.menu.DebugLevel.OTA=OTA -d1_mini_pro.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -d1_mini_pro.menu.DebugLevel.OOM=OOM -d1_mini_pro.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1_mini_pro.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -d1_mini_pro.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -d1_mini_pro.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1_mini_pro.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -d1_mini_pro.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -d1_mini_pro.menu.FlashErase.none=Only Sketch -d1_mini_pro.menu.FlashErase.none.upload.erase_cmd= -d1_mini_pro.menu.FlashErase.sdk=Sketch + WiFi Settings -d1_mini_pro.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -d1_mini_pro.menu.FlashErase.all=All Flash Contents -d1_mini_pro.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -d1_mini_pro.menu.UploadSpeed.921600=921600 -d1_mini_pro.menu.UploadSpeed.921600.upload.speed=921600 -d1_mini_pro.menu.UploadSpeed.9600=9600 -d1_mini_pro.menu.UploadSpeed.9600.upload.speed=9600 -d1_mini_pro.menu.UploadSpeed.57600=57600 -d1_mini_pro.menu.UploadSpeed.57600.upload.speed=57600 -d1_mini_pro.menu.UploadSpeed.115200=115200 -d1_mini_pro.menu.UploadSpeed.115200.upload.speed=115200 -d1_mini_pro.menu.UploadSpeed.230400.linux=230400 -d1_mini_pro.menu.UploadSpeed.230400.macosx=230400 -d1_mini_pro.menu.UploadSpeed.230400.upload.speed=230400 -d1_mini_pro.menu.UploadSpeed.256000.windows=256000 -d1_mini_pro.menu.UploadSpeed.256000.upload.speed=256000 -d1_mini_pro.menu.UploadSpeed.460800.linux=460800 -d1_mini_pro.menu.UploadSpeed.460800.macosx=460800 -d1_mini_pro.menu.UploadSpeed.460800.upload.speed=460800 -d1_mini_pro.menu.UploadSpeed.512000.windows=512000 -d1_mini_pro.menu.UploadSpeed.512000.upload.speed=512000 - -############################################################## -d1_mini_lite.name=WeMos D1 mini Lite -d1_mini_lite.build.board=ESP8266_WEMOS_D1MINILITE -d1_mini_lite.build.variant=d1_mini -d1_mini_lite.upload.tool=esptool -d1_mini_lite.upload.maximum_data_size=81920 -d1_mini_lite.upload.wait_for_upload_port=true -d1_mini_lite.upload.erase_cmd= -d1_mini_lite.serial.disableDTR=true -d1_mini_lite.serial.disableRTS=true -d1_mini_lite.build.mcu=esp8266 -d1_mini_lite.build.core=esp8266 -d1_mini_lite.build.spiffs_pagesize=256 -d1_mini_lite.build.debug_port= -d1_mini_lite.build.debug_level= -d1_mini_lite.menu.CpuFrequency.80=80 MHz -d1_mini_lite.menu.CpuFrequency.80.build.f_cpu=80000000L -d1_mini_lite.menu.CpuFrequency.160=160 MHz -d1_mini_lite.menu.CpuFrequency.160.build.f_cpu=160000000L -d1_mini_lite.upload.resetmethod=nodemcu -d1_mini_lite.build.flash_mode=dout -d1_mini_lite.build.flash_freq=40 -d1_mini_lite.menu.FlashSize.1M0=1M (no SPIFFS) -d1_mini_lite.menu.FlashSize.1M0.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M0.build.flash_size_bytes=0x100000 -d1_mini_lite.menu.FlashSize.1M0.build.flash_ld=eagle.flash.1m0.ld -d1_mini_lite.menu.FlashSize.1M0.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M0.upload.maximum_size=1023984 -d1_mini_lite.menu.FlashSize.1M0.build.rfcal_addr=0xFC000 -d1_mini_lite.menu.FlashSize.1M64=1M (64K SPIFFS) -d1_mini_lite.menu.FlashSize.1M64.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M64.build.flash_size_bytes=0x100000 -d1_mini_lite.menu.FlashSize.1M64.build.flash_ld=eagle.flash.1m64.ld -d1_mini_lite.menu.FlashSize.1M64.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M64.upload.maximum_size=958448 -d1_mini_lite.menu.FlashSize.1M64.build.rfcal_addr=0xFC000 -d1_mini_lite.menu.FlashSize.1M64.build.spiffs_start=0xEB000 -d1_mini_lite.menu.FlashSize.1M64.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M64.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M128=1M (128K SPIFFS) -d1_mini_lite.menu.FlashSize.1M128.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M128.build.flash_size_bytes=0x100000 -d1_mini_lite.menu.FlashSize.1M128.build.flash_ld=eagle.flash.1m128.ld -d1_mini_lite.menu.FlashSize.1M128.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M128.upload.maximum_size=892912 -d1_mini_lite.menu.FlashSize.1M128.build.rfcal_addr=0xFC000 -d1_mini_lite.menu.FlashSize.1M128.build.spiffs_start=0xDB000 -d1_mini_lite.menu.FlashSize.1M128.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M128.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M144=1M (144K SPIFFS) -d1_mini_lite.menu.FlashSize.1M144.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M144.build.flash_size_bytes=0x100000 -d1_mini_lite.menu.FlashSize.1M144.build.flash_ld=eagle.flash.1m144.ld -d1_mini_lite.menu.FlashSize.1M144.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M144.upload.maximum_size=876528 -d1_mini_lite.menu.FlashSize.1M144.build.rfcal_addr=0xFC000 -d1_mini_lite.menu.FlashSize.1M144.build.spiffs_start=0xD7000 -d1_mini_lite.menu.FlashSize.1M144.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M144.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M160=1M (160K SPIFFS) -d1_mini_lite.menu.FlashSize.1M160.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M160.build.flash_size_bytes=0x100000 -d1_mini_lite.menu.FlashSize.1M160.build.flash_ld=eagle.flash.1m160.ld -d1_mini_lite.menu.FlashSize.1M160.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M160.upload.maximum_size=860144 -d1_mini_lite.menu.FlashSize.1M160.build.rfcal_addr=0xFC000 -d1_mini_lite.menu.FlashSize.1M160.build.spiffs_start=0xD3000 -d1_mini_lite.menu.FlashSize.1M160.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M160.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M192=1M (192K SPIFFS) -d1_mini_lite.menu.FlashSize.1M192.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M192.build.flash_size_bytes=0x100000 -d1_mini_lite.menu.FlashSize.1M192.build.flash_ld=eagle.flash.1m192.ld -d1_mini_lite.menu.FlashSize.1M192.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M192.upload.maximum_size=827376 -d1_mini_lite.menu.FlashSize.1M192.build.rfcal_addr=0xFC000 -d1_mini_lite.menu.FlashSize.1M192.build.spiffs_start=0xCB000 -d1_mini_lite.menu.FlashSize.1M192.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M192.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M256=1M (256K SPIFFS) -d1_mini_lite.menu.FlashSize.1M256.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M256.build.flash_size_bytes=0x100000 -d1_mini_lite.menu.FlashSize.1M256.build.flash_ld=eagle.flash.1m256.ld -d1_mini_lite.menu.FlashSize.1M256.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M256.upload.maximum_size=761840 -d1_mini_lite.menu.FlashSize.1M256.build.rfcal_addr=0xFC000 -d1_mini_lite.menu.FlashSize.1M256.build.spiffs_start=0xBB000 -d1_mini_lite.menu.FlashSize.1M256.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M256.build.spiffs_blocksize=4096 -d1_mini_lite.menu.FlashSize.1M512=1M (512K SPIFFS) -d1_mini_lite.menu.FlashSize.1M512.build.flash_size=1M -d1_mini_lite.menu.FlashSize.1M512.build.flash_size_bytes=0x100000 -d1_mini_lite.menu.FlashSize.1M512.build.flash_ld=eagle.flash.1m512.ld -d1_mini_lite.menu.FlashSize.1M512.build.spiffs_pagesize=256 -d1_mini_lite.menu.FlashSize.1M512.upload.maximum_size=499696 -d1_mini_lite.menu.FlashSize.1M512.build.rfcal_addr=0xFC000 -d1_mini_lite.menu.FlashSize.1M512.build.spiffs_start=0x7B000 -d1_mini_lite.menu.FlashSize.1M512.build.spiffs_end=0xFB000 -d1_mini_lite.menu.FlashSize.1M512.build.spiffs_blocksize=8192 -d1_mini_lite.menu.LwIPVariant.v2mss536=v2 Lower Memory -d1_mini_lite.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -d1_mini_lite.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -d1_mini_lite.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -d1_mini_lite.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -d1_mini_lite.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -d1_mini_lite.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -d1_mini_lite.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -d1_mini_lite.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -d1_mini_lite.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -d1_mini_lite.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_lite.menu.LwIPVariant.OpenSource=v1.4 Compile from source -d1_mini_lite.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -d1_mini_lite.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -d1_mini_lite.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -d1_mini_lite.menu.Debug.Disabled=Disabled -d1_mini_lite.menu.Debug.Disabled.build.debug_port= -d1_mini_lite.menu.Debug.Serial=Serial -d1_mini_lite.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -d1_mini_lite.menu.Debug.Serial1=Serial1 -d1_mini_lite.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -d1_mini_lite.menu.DebugLevel.None____=None -d1_mini_lite.menu.DebugLevel.None____.build.debug_level= -d1_mini_lite.menu.DebugLevel.SSL=SSL -d1_mini_lite.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -d1_mini_lite.menu.DebugLevel.TLS_MEM=TLS_MEM -d1_mini_lite.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -d1_mini_lite.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -d1_mini_lite.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -d1_mini_lite.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -d1_mini_lite.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1_mini_lite.menu.DebugLevel.CORE=CORE -d1_mini_lite.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -d1_mini_lite.menu.DebugLevel.WIFI=WIFI -d1_mini_lite.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -d1_mini_lite.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -d1_mini_lite.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -d1_mini_lite.menu.DebugLevel.UPDATER=UPDATER -d1_mini_lite.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -d1_mini_lite.menu.DebugLevel.OTA=OTA -d1_mini_lite.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -d1_mini_lite.menu.DebugLevel.OOM=OOM -d1_mini_lite.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1_mini_lite.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -d1_mini_lite.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -d1_mini_lite.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1_mini_lite.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -d1_mini_lite.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -d1_mini_lite.menu.FlashErase.none=Only Sketch -d1_mini_lite.menu.FlashErase.none.upload.erase_cmd= -d1_mini_lite.menu.FlashErase.sdk=Sketch + WiFi Settings -d1_mini_lite.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -d1_mini_lite.menu.FlashErase.all=All Flash Contents -d1_mini_lite.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -d1_mini_lite.menu.UploadSpeed.921600=921600 -d1_mini_lite.menu.UploadSpeed.921600.upload.speed=921600 -d1_mini_lite.menu.UploadSpeed.9600=9600 -d1_mini_lite.menu.UploadSpeed.9600.upload.speed=9600 -d1_mini_lite.menu.UploadSpeed.57600=57600 -d1_mini_lite.menu.UploadSpeed.57600.upload.speed=57600 -d1_mini_lite.menu.UploadSpeed.115200=115200 -d1_mini_lite.menu.UploadSpeed.115200.upload.speed=115200 -d1_mini_lite.menu.UploadSpeed.230400.linux=230400 -d1_mini_lite.menu.UploadSpeed.230400.macosx=230400 -d1_mini_lite.menu.UploadSpeed.230400.upload.speed=230400 -d1_mini_lite.menu.UploadSpeed.256000.windows=256000 -d1_mini_lite.menu.UploadSpeed.256000.upload.speed=256000 -d1_mini_lite.menu.UploadSpeed.460800.linux=460800 -d1_mini_lite.menu.UploadSpeed.460800.macosx=460800 -d1_mini_lite.menu.UploadSpeed.460800.upload.speed=460800 -d1_mini_lite.menu.UploadSpeed.512000.windows=512000 -d1_mini_lite.menu.UploadSpeed.512000.upload.speed=512000 - -############################################################## -d1.name=WeMos D1 R1 -d1.build.board=ESP8266_WEMOS_D1R1 -d1.build.variant=d1 -d1.upload.tool=esptool -d1.upload.maximum_data_size=81920 -d1.upload.wait_for_upload_port=true -d1.upload.erase_cmd= -d1.serial.disableDTR=true -d1.serial.disableRTS=true -d1.build.mcu=esp8266 -d1.build.core=esp8266 -d1.build.spiffs_pagesize=256 -d1.build.debug_port= -d1.build.debug_level= -d1.menu.CpuFrequency.80=80 MHz -d1.menu.CpuFrequency.80.build.f_cpu=80000000L -d1.menu.CpuFrequency.160=160 MHz -d1.menu.CpuFrequency.160.build.f_cpu=160000000L -d1.upload.resetmethod=nodemcu -d1.build.flash_mode=dio -d1.build.flash_freq=40 -d1.menu.FlashSize.4M1M=4M (1M SPIFFS) -d1.menu.FlashSize.4M1M.build.flash_size=4M -d1.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -d1.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -d1.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -d1.menu.FlashSize.4M1M.upload.maximum_size=1044464 -d1.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -d1.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -d1.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -d1.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -d1.menu.FlashSize.4M3M=4M (3M SPIFFS) -d1.menu.FlashSize.4M3M.build.flash_size=4M -d1.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -d1.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -d1.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -d1.menu.FlashSize.4M3M.upload.maximum_size=1044464 -d1.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -d1.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -d1.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -d1.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -d1.menu.LwIPVariant.v2mss536=v2 Lower Memory -d1.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -d1.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -d1.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -d1.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -d1.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -d1.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -d1.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -d1.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -d1.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -d1.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -d1.menu.LwIPVariant.OpenSource=v1.4 Compile from source -d1.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -d1.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -d1.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -d1.menu.Debug.Disabled=Disabled -d1.menu.Debug.Disabled.build.debug_port= -d1.menu.Debug.Serial=Serial -d1.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -d1.menu.Debug.Serial1=Serial1 -d1.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -d1.menu.DebugLevel.None____=None -d1.menu.DebugLevel.None____.build.debug_level= -d1.menu.DebugLevel.SSL=SSL -d1.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -d1.menu.DebugLevel.TLS_MEM=TLS_MEM -d1.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -d1.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -d1.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -d1.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -d1.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -d1.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -d1.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -d1.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -d1.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -d1.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -d1.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -d1.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -d1.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -d1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -d1.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -d1.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -d1.menu.DebugLevel.CORE=CORE -d1.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -d1.menu.DebugLevel.WIFI=WIFI -d1.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -d1.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -d1.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -d1.menu.DebugLevel.UPDATER=UPDATER -d1.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -d1.menu.DebugLevel.OTA=OTA -d1.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -d1.menu.DebugLevel.OOM=OOM -d1.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -d1.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -d1.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -d1.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -d1.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -d1.menu.FlashErase.none=Only Sketch -d1.menu.FlashErase.none.upload.erase_cmd= -d1.menu.FlashErase.sdk=Sketch + WiFi Settings -d1.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -d1.menu.FlashErase.all=All Flash Contents -d1.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -d1.menu.UploadSpeed.921600=921600 -d1.menu.UploadSpeed.921600.upload.speed=921600 -d1.menu.UploadSpeed.9600=9600 -d1.menu.UploadSpeed.9600.upload.speed=9600 -d1.menu.UploadSpeed.57600=57600 -d1.menu.UploadSpeed.57600.upload.speed=57600 -d1.menu.UploadSpeed.115200=115200 -d1.menu.UploadSpeed.115200.upload.speed=115200 -d1.menu.UploadSpeed.230400.linux=230400 -d1.menu.UploadSpeed.230400.macosx=230400 -d1.menu.UploadSpeed.230400.upload.speed=230400 -d1.menu.UploadSpeed.256000.windows=256000 -d1.menu.UploadSpeed.256000.upload.speed=256000 -d1.menu.UploadSpeed.460800.linux=460800 -d1.menu.UploadSpeed.460800.macosx=460800 -d1.menu.UploadSpeed.460800.upload.speed=460800 -d1.menu.UploadSpeed.512000.windows=512000 -d1.menu.UploadSpeed.512000.upload.speed=512000 - -############################################################## -espino.name=ESPino (ESP-12 Module) -espino.build.board=ESP8266_ESP12 -espino.build.variant=espino -espino.upload.tool=esptool -espino.upload.maximum_data_size=81920 -espino.upload.wait_for_upload_port=true -espino.upload.erase_cmd= -espino.serial.disableDTR=true -espino.serial.disableRTS=true -espino.build.mcu=esp8266 -espino.build.core=esp8266 -espino.build.spiffs_pagesize=256 -espino.build.debug_port= -espino.build.debug_level= -espino.menu.CpuFrequency.80=80 MHz -espino.menu.CpuFrequency.80.build.f_cpu=80000000L -espino.menu.CpuFrequency.160=160 MHz -espino.menu.CpuFrequency.160.build.f_cpu=160000000L -espino.menu.ResetMethod.ck=ck -espino.menu.ResetMethod.ck.upload.resetmethod=ck -espino.menu.ResetMethod.nodemcu=nodemcu -espino.menu.ResetMethod.nodemcu.upload.resetmethod=nodemcu -espino.build.flash_mode=qio -espino.build.flash_freq=40 -espino.menu.FlashSize.4M1M=4M (1M SPIFFS) -espino.menu.FlashSize.4M1M.build.flash_size=4M -espino.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -espino.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -espino.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -espino.menu.FlashSize.4M1M.upload.maximum_size=1044464 -espino.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -espino.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -espino.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -espino.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -espino.menu.FlashSize.4M3M=4M (3M SPIFFS) -espino.menu.FlashSize.4M3M.build.flash_size=4M -espino.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -espino.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -espino.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -espino.menu.FlashSize.4M3M.upload.maximum_size=1044464 -espino.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -espino.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -espino.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -espino.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -espino.menu.LwIPVariant.v2mss536=v2 Lower Memory -espino.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -espino.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -espino.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -espino.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -espino.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -espino.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -espino.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -espino.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -espino.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -espino.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -espino.menu.LwIPVariant.OpenSource=v1.4 Compile from source -espino.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -espino.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -espino.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -espino.menu.Debug.Disabled=Disabled -espino.menu.Debug.Disabled.build.debug_port= -espino.menu.Debug.Serial=Serial -espino.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -espino.menu.Debug.Serial1=Serial1 -espino.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -espino.menu.DebugLevel.None____=None -espino.menu.DebugLevel.None____.build.debug_level= -espino.menu.DebugLevel.SSL=SSL -espino.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -espino.menu.DebugLevel.TLS_MEM=TLS_MEM -espino.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -espino.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -espino.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -espino.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -espino.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -espino.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -espino.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -espino.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -espino.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -espino.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -espino.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espino.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -espino.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -espino.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espino.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -espino.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -espino.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espino.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espino.menu.DebugLevel.CORE=CORE -espino.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -espino.menu.DebugLevel.WIFI=WIFI -espino.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -espino.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -espino.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -espino.menu.DebugLevel.UPDATER=UPDATER -espino.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -espino.menu.DebugLevel.OTA=OTA -espino.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -espino.menu.DebugLevel.OOM=OOM -espino.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espino.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -espino.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -espino.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espino.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -espino.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -espino.menu.FlashErase.none=Only Sketch -espino.menu.FlashErase.none.upload.erase_cmd= -espino.menu.FlashErase.sdk=Sketch + WiFi Settings -espino.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -espino.menu.FlashErase.all=All Flash Contents -espino.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -espino.menu.UploadSpeed.115200=115200 -espino.menu.UploadSpeed.115200.upload.speed=115200 -espino.menu.UploadSpeed.9600=9600 -espino.menu.UploadSpeed.9600.upload.speed=9600 -espino.menu.UploadSpeed.57600=57600 -espino.menu.UploadSpeed.57600.upload.speed=57600 -espino.menu.UploadSpeed.230400.linux=230400 -espino.menu.UploadSpeed.230400.macosx=230400 -espino.menu.UploadSpeed.230400.upload.speed=230400 -espino.menu.UploadSpeed.256000.windows=256000 -espino.menu.UploadSpeed.256000.upload.speed=256000 -espino.menu.UploadSpeed.460800.linux=460800 -espino.menu.UploadSpeed.460800.macosx=460800 -espino.menu.UploadSpeed.460800.upload.speed=460800 -espino.menu.UploadSpeed.512000.windows=512000 -espino.menu.UploadSpeed.512000.upload.speed=512000 -espino.menu.UploadSpeed.921600=921600 -espino.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -espinotee.name=ThaiEasyElec's ESPino -espinotee.build.board=ESP8266_ESP13 -espinotee.build.variant=espinotee -espinotee.upload.tool=esptool -espinotee.upload.maximum_data_size=81920 -espinotee.upload.wait_for_upload_port=true -espinotee.upload.erase_cmd= -espinotee.serial.disableDTR=true -espinotee.serial.disableRTS=true -espinotee.build.mcu=esp8266 -espinotee.build.core=esp8266 -espinotee.build.spiffs_pagesize=256 -espinotee.build.debug_port= -espinotee.build.debug_level= -espinotee.menu.CpuFrequency.80=80 MHz -espinotee.menu.CpuFrequency.80.build.f_cpu=80000000L -espinotee.menu.CpuFrequency.160=160 MHz -espinotee.menu.CpuFrequency.160.build.f_cpu=160000000L -espinotee.upload.resetmethod=nodemcu -espinotee.build.flash_mode=qio -espinotee.build.flash_freq=40 -espinotee.menu.FlashSize.4M1M=4M (1M SPIFFS) -espinotee.menu.FlashSize.4M1M.build.flash_size=4M -espinotee.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -espinotee.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -espinotee.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -espinotee.menu.FlashSize.4M1M.upload.maximum_size=1044464 -espinotee.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -espinotee.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -espinotee.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -espinotee.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -espinotee.menu.FlashSize.4M3M=4M (3M SPIFFS) -espinotee.menu.FlashSize.4M3M.build.flash_size=4M -espinotee.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -espinotee.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -espinotee.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -espinotee.menu.FlashSize.4M3M.upload.maximum_size=1044464 -espinotee.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -espinotee.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -espinotee.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -espinotee.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -espinotee.menu.LwIPVariant.v2mss536=v2 Lower Memory -espinotee.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -espinotee.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -espinotee.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -espinotee.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -espinotee.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -espinotee.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -espinotee.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -espinotee.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -espinotee.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -espinotee.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -espinotee.menu.LwIPVariant.OpenSource=v1.4 Compile from source -espinotee.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -espinotee.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -espinotee.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -espinotee.menu.Debug.Disabled=Disabled -espinotee.menu.Debug.Disabled.build.debug_port= -espinotee.menu.Debug.Serial=Serial -espinotee.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -espinotee.menu.Debug.Serial1=Serial1 -espinotee.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -espinotee.menu.DebugLevel.None____=None -espinotee.menu.DebugLevel.None____.build.debug_level= -espinotee.menu.DebugLevel.SSL=SSL -espinotee.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -espinotee.menu.DebugLevel.TLS_MEM=TLS_MEM -espinotee.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -espinotee.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -espinotee.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -espinotee.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -espinotee.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -espinotee.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -espinotee.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -espinotee.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -espinotee.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -espinotee.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -espinotee.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espinotee.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -espinotee.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -espinotee.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -espinotee.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espinotee.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -espinotee.menu.DebugLevel.CORE=CORE -espinotee.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -espinotee.menu.DebugLevel.WIFI=WIFI -espinotee.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -espinotee.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -espinotee.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -espinotee.menu.DebugLevel.UPDATER=UPDATER -espinotee.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -espinotee.menu.DebugLevel.OTA=OTA -espinotee.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -espinotee.menu.DebugLevel.OOM=OOM -espinotee.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espinotee.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -espinotee.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -espinotee.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -espinotee.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -espinotee.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -espinotee.menu.FlashErase.none=Only Sketch -espinotee.menu.FlashErase.none.upload.erase_cmd= -espinotee.menu.FlashErase.sdk=Sketch + WiFi Settings -espinotee.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -espinotee.menu.FlashErase.all=All Flash Contents -espinotee.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -espinotee.menu.UploadSpeed.115200=115200 -espinotee.menu.UploadSpeed.115200.upload.speed=115200 -espinotee.menu.UploadSpeed.9600=9600 -espinotee.menu.UploadSpeed.9600.upload.speed=9600 -espinotee.menu.UploadSpeed.57600=57600 -espinotee.menu.UploadSpeed.57600.upload.speed=57600 -espinotee.menu.UploadSpeed.230400.linux=230400 -espinotee.menu.UploadSpeed.230400.macosx=230400 -espinotee.menu.UploadSpeed.230400.upload.speed=230400 -espinotee.menu.UploadSpeed.256000.windows=256000 -espinotee.menu.UploadSpeed.256000.upload.speed=256000 -espinotee.menu.UploadSpeed.460800.linux=460800 -espinotee.menu.UploadSpeed.460800.macosx=460800 -espinotee.menu.UploadSpeed.460800.upload.speed=460800 -espinotee.menu.UploadSpeed.512000.windows=512000 -espinotee.menu.UploadSpeed.512000.upload.speed=512000 -espinotee.menu.UploadSpeed.921600=921600 -espinotee.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -wifinfo.name=WifInfo -wifinfo.menu.ESPModule.ESP12.build.board=ESP8266_ESP12 -wifinfo.menu.ESPModule.ESP12.upload.maximum_size=1044464 -wifinfo.menu.ESPModule.ESP12.build.spiffs_pagesize=256 -wifinfo.menu.ESPModule.ESP12.build.flash_ld=eagle.flash.4m1m.ld -wifinfo.menu.ESPModule.ESP07192.build.spiffs_blocksize=4096 -wifinfo.menu.ESPModule.ESP07192.build.spiffs_end=0xFB000 -wifinfo.menu.ESPModule.ESP12=ESP12 (4M/1M SPIFFS) -wifinfo.menu.ESPModule.ESP12.build.spiffs_start=0x300000 -wifinfo.menu.ESPModule.ESP12.build.spiffs_end=0x3FB000 -wifinfo.menu.ESPModule.ESP07192.build.spiffs_start=0xCB000 -wifinfo.menu.ESPModule.ESP07192.build.board=ESP8266_ESP07 -wifinfo.menu.ESPModule.ESP12.build.spiffs_blocksize=8192 -wifinfo.menu.ESPModule.ESP12.build.flash_size=4M -wifinfo.build.board=WIFINFO -wifinfo.build.variant=wifinfo -wifinfo.menu.ESPModule.ESP07192.build.flash_ld=eagle.flash.1m192.ld -wifinfo.menu.ESPModule.ESP07192.build.flash_size=1M -wifinfo.menu.ESPModule.ESP07192=ESP07 (1M/192K SPIFFS) -wifinfo.menu.ESPModule.ESP07192.upload.maximum_size=827376 -wifinfo.upload.tool=esptool -wifinfo.upload.maximum_data_size=81920 -wifinfo.upload.wait_for_upload_port=true -wifinfo.upload.erase_cmd= -wifinfo.serial.disableDTR=true -wifinfo.serial.disableRTS=true -wifinfo.build.mcu=esp8266 -wifinfo.build.core=esp8266 -wifinfo.build.spiffs_pagesize=256 -wifinfo.build.debug_port= -wifinfo.build.debug_level= -wifinfo.menu.CpuFrequency.80=80 MHz -wifinfo.menu.CpuFrequency.80.build.f_cpu=80000000L -wifinfo.menu.CpuFrequency.160=160 MHz -wifinfo.menu.CpuFrequency.160.build.f_cpu=160000000L -wifinfo.upload.resetmethod=nodemcu -wifinfo.build.flash_mode=qio -wifinfo.menu.FlashFreq.40=40MHz -wifinfo.menu.FlashFreq.40.build.flash_freq=40 -wifinfo.menu.FlashFreq.80=80MHz -wifinfo.menu.FlashFreq.80.build.flash_freq=80 -wifinfo.menu.FlashSize.1M0=1M (no SPIFFS) -wifinfo.menu.FlashSize.1M0.build.flash_size=1M -wifinfo.menu.FlashSize.1M0.build.flash_size_bytes=0x100000 -wifinfo.menu.FlashSize.1M0.build.flash_ld=eagle.flash.1m0.ld -wifinfo.menu.FlashSize.1M0.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M0.upload.maximum_size=1023984 -wifinfo.menu.FlashSize.1M0.build.rfcal_addr=0xFC000 -wifinfo.menu.FlashSize.1M64=1M (64K SPIFFS) -wifinfo.menu.FlashSize.1M64.build.flash_size=1M -wifinfo.menu.FlashSize.1M64.build.flash_size_bytes=0x100000 -wifinfo.menu.FlashSize.1M64.build.flash_ld=eagle.flash.1m64.ld -wifinfo.menu.FlashSize.1M64.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M64.upload.maximum_size=958448 -wifinfo.menu.FlashSize.1M64.build.rfcal_addr=0xFC000 -wifinfo.menu.FlashSize.1M64.build.spiffs_start=0xEB000 -wifinfo.menu.FlashSize.1M64.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M64.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M128=1M (128K SPIFFS) -wifinfo.menu.FlashSize.1M128.build.flash_size=1M -wifinfo.menu.FlashSize.1M128.build.flash_size_bytes=0x100000 -wifinfo.menu.FlashSize.1M128.build.flash_ld=eagle.flash.1m128.ld -wifinfo.menu.FlashSize.1M128.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M128.upload.maximum_size=892912 -wifinfo.menu.FlashSize.1M128.build.rfcal_addr=0xFC000 -wifinfo.menu.FlashSize.1M128.build.spiffs_start=0xDB000 -wifinfo.menu.FlashSize.1M128.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M128.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M144=1M (144K SPIFFS) -wifinfo.menu.FlashSize.1M144.build.flash_size=1M -wifinfo.menu.FlashSize.1M144.build.flash_size_bytes=0x100000 -wifinfo.menu.FlashSize.1M144.build.flash_ld=eagle.flash.1m144.ld -wifinfo.menu.FlashSize.1M144.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M144.upload.maximum_size=876528 -wifinfo.menu.FlashSize.1M144.build.rfcal_addr=0xFC000 -wifinfo.menu.FlashSize.1M144.build.spiffs_start=0xD7000 -wifinfo.menu.FlashSize.1M144.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M144.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M160=1M (160K SPIFFS) -wifinfo.menu.FlashSize.1M160.build.flash_size=1M -wifinfo.menu.FlashSize.1M160.build.flash_size_bytes=0x100000 -wifinfo.menu.FlashSize.1M160.build.flash_ld=eagle.flash.1m160.ld -wifinfo.menu.FlashSize.1M160.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M160.upload.maximum_size=860144 -wifinfo.menu.FlashSize.1M160.build.rfcal_addr=0xFC000 -wifinfo.menu.FlashSize.1M160.build.spiffs_start=0xD3000 -wifinfo.menu.FlashSize.1M160.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M160.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M192=1M (192K SPIFFS) -wifinfo.menu.FlashSize.1M192.build.flash_size=1M -wifinfo.menu.FlashSize.1M192.build.flash_size_bytes=0x100000 -wifinfo.menu.FlashSize.1M192.build.flash_ld=eagle.flash.1m192.ld -wifinfo.menu.FlashSize.1M192.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M192.upload.maximum_size=827376 -wifinfo.menu.FlashSize.1M192.build.rfcal_addr=0xFC000 -wifinfo.menu.FlashSize.1M192.build.spiffs_start=0xCB000 -wifinfo.menu.FlashSize.1M192.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M192.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M256=1M (256K SPIFFS) -wifinfo.menu.FlashSize.1M256.build.flash_size=1M -wifinfo.menu.FlashSize.1M256.build.flash_size_bytes=0x100000 -wifinfo.menu.FlashSize.1M256.build.flash_ld=eagle.flash.1m256.ld -wifinfo.menu.FlashSize.1M256.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M256.upload.maximum_size=761840 -wifinfo.menu.FlashSize.1M256.build.rfcal_addr=0xFC000 -wifinfo.menu.FlashSize.1M256.build.spiffs_start=0xBB000 -wifinfo.menu.FlashSize.1M256.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M256.build.spiffs_blocksize=4096 -wifinfo.menu.FlashSize.1M512=1M (512K SPIFFS) -wifinfo.menu.FlashSize.1M512.build.flash_size=1M -wifinfo.menu.FlashSize.1M512.build.flash_size_bytes=0x100000 -wifinfo.menu.FlashSize.1M512.build.flash_ld=eagle.flash.1m512.ld -wifinfo.menu.FlashSize.1M512.build.spiffs_pagesize=256 -wifinfo.menu.FlashSize.1M512.upload.maximum_size=499696 -wifinfo.menu.FlashSize.1M512.build.rfcal_addr=0xFC000 -wifinfo.menu.FlashSize.1M512.build.spiffs_start=0x7B000 -wifinfo.menu.FlashSize.1M512.build.spiffs_end=0xFB000 -wifinfo.menu.FlashSize.1M512.build.spiffs_blocksize=8192 -wifinfo.menu.LwIPVariant.v2mss536=v2 Lower Memory -wifinfo.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -wifinfo.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -wifinfo.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -wifinfo.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -wifinfo.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -wifinfo.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -wifinfo.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -wifinfo.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -wifinfo.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -wifinfo.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -wifinfo.menu.LwIPVariant.OpenSource=v1.4 Compile from source -wifinfo.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -wifinfo.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -wifinfo.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -wifinfo.menu.Debug.Disabled=Disabled -wifinfo.menu.Debug.Disabled.build.debug_port= -wifinfo.menu.Debug.Serial=Serial -wifinfo.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -wifinfo.menu.Debug.Serial1=Serial1 -wifinfo.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -wifinfo.menu.DebugLevel.None____=None -wifinfo.menu.DebugLevel.None____.build.debug_level= -wifinfo.menu.DebugLevel.SSL=SSL -wifinfo.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -wifinfo.menu.DebugLevel.TLS_MEM=TLS_MEM -wifinfo.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -wifinfo.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -wifinfo.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -wifinfo.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -wifinfo.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -wifinfo.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -wifinfo.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -wifinfo.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -wifinfo.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -wifinfo.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -wifinfo.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -wifinfo.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -wifinfo.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -wifinfo.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -wifinfo.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -wifinfo.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -wifinfo.menu.DebugLevel.CORE=CORE -wifinfo.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -wifinfo.menu.DebugLevel.WIFI=WIFI -wifinfo.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -wifinfo.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -wifinfo.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -wifinfo.menu.DebugLevel.UPDATER=UPDATER -wifinfo.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -wifinfo.menu.DebugLevel.OTA=OTA -wifinfo.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -wifinfo.menu.DebugLevel.OOM=OOM -wifinfo.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -wifinfo.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -wifinfo.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -wifinfo.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -wifinfo.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -wifinfo.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -wifinfo.menu.FlashErase.none=Only Sketch -wifinfo.menu.FlashErase.none.upload.erase_cmd= -wifinfo.menu.FlashErase.sdk=Sketch + WiFi Settings -wifinfo.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -wifinfo.menu.FlashErase.all=All Flash Contents -wifinfo.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -wifinfo.menu.UploadSpeed.115200=115200 -wifinfo.menu.UploadSpeed.115200.upload.speed=115200 -wifinfo.menu.UploadSpeed.9600=9600 -wifinfo.menu.UploadSpeed.9600.upload.speed=9600 -wifinfo.menu.UploadSpeed.57600=57600 -wifinfo.menu.UploadSpeed.57600.upload.speed=57600 -wifinfo.menu.UploadSpeed.230400.linux=230400 -wifinfo.menu.UploadSpeed.230400.macosx=230400 -wifinfo.menu.UploadSpeed.230400.upload.speed=230400 -wifinfo.menu.UploadSpeed.256000.windows=256000 -wifinfo.menu.UploadSpeed.256000.upload.speed=256000 -wifinfo.menu.UploadSpeed.460800.linux=460800 -wifinfo.menu.UploadSpeed.460800.macosx=460800 -wifinfo.menu.UploadSpeed.460800.upload.speed=460800 -wifinfo.menu.UploadSpeed.512000.windows=512000 -wifinfo.menu.UploadSpeed.512000.upload.speed=512000 -wifinfo.menu.UploadSpeed.921600=921600 -wifinfo.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -arduino-esp8266.name=Arduino -arduino-esp8266.menu.BoardModel.starottodeved.build.board=ESP8266_ARDUINO_STAR_OTTO -arduino-esp8266.menu.BoardModel.primo.build.extra_flags=-DF_CRYSTAL=40000000 -DESP8266 -arduino-esp8266.menu.BoardModel.starottodeved.build.extra_flags=-DF_CRYSTAL=40000000 -DESP8266 -arduino-esp8266.menu.BoardModel.starottodeved.build.variant=arduino_uart -arduino-esp8266.menu.BoardModel.unowifideved.build.board=ESP8266_ARDUINO_UNOWIFI -arduino-esp8266.menu.BoardModel.unowifideved.build.extra_flags=-DF_CRYSTAL=40000000 -DESP8266 -arduino-esp8266.menu.BoardModel.primo=Primo -arduino-esp8266.menu.BoardModel.unowifideved.build.variant=arduino_uart -arduino-esp8266.menu.BoardModel.primo.build.variant=arduino_spi -arduino-esp8266.menu.BoardModel.starottodeved=Star OTTO -arduino-esp8266.build.board=ESP8266_ARDUINO -arduino-esp8266.menu.BoardModel.primo.build.board=ESP8266_ARDUINO_PRIMO -arduino-esp8266.menu.BoardModel.unowifideved=Uno WiFi -arduino-esp8266.upload.tool=esptool -arduino-esp8266.upload.maximum_data_size=81920 -arduino-esp8266.upload.wait_for_upload_port=true -arduino-esp8266.upload.erase_cmd= -arduino-esp8266.serial.disableDTR=true -arduino-esp8266.serial.disableRTS=true -arduino-esp8266.build.mcu=esp8266 -arduino-esp8266.build.core=esp8266 -arduino-esp8266.build.variant=generic -arduino-esp8266.build.spiffs_pagesize=256 -arduino-esp8266.build.debug_port= -arduino-esp8266.build.debug_level= -arduino-esp8266.menu.CpuFrequency.80=80 MHz -arduino-esp8266.menu.CpuFrequency.80.build.f_cpu=80000000L -arduino-esp8266.menu.CpuFrequency.160=160 MHz -arduino-esp8266.menu.CpuFrequency.160.build.f_cpu=160000000L -arduino-esp8266.upload.resetmethod=ck -arduino-esp8266.build.flash_mode=qio -arduino-esp8266.build.flash_freq=40 -arduino-esp8266.menu.FlashSize.4M1M=4M (1M SPIFFS) -arduino-esp8266.menu.FlashSize.4M1M.build.flash_size=4M -arduino-esp8266.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -arduino-esp8266.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -arduino-esp8266.menu.FlashSize.4M1M.upload.maximum_size=1044464 -arduino-esp8266.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -arduino-esp8266.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -arduino-esp8266.menu.FlashSize.4M3M=4M (3M SPIFFS) -arduino-esp8266.menu.FlashSize.4M3M.build.flash_size=4M -arduino-esp8266.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -arduino-esp8266.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -arduino-esp8266.menu.FlashSize.4M3M.upload.maximum_size=1044464 -arduino-esp8266.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -arduino-esp8266.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -arduino-esp8266.menu.LwIPVariant.v2mss536=v2 Lower Memory -arduino-esp8266.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -arduino-esp8266.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -arduino-esp8266.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -arduino-esp8266.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -arduino-esp8266.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -arduino-esp8266.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -arduino-esp8266.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -arduino-esp8266.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -arduino-esp8266.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -arduino-esp8266.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -arduino-esp8266.menu.LwIPVariant.OpenSource=v1.4 Compile from source -arduino-esp8266.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -arduino-esp8266.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -arduino-esp8266.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -arduino-esp8266.menu.Debug.Disabled=Disabled -arduino-esp8266.menu.Debug.Disabled.build.debug_port= -arduino-esp8266.menu.Debug.Serial=Serial -arduino-esp8266.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -arduino-esp8266.menu.Debug.Serial1=Serial1 -arduino-esp8266.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -arduino-esp8266.menu.DebugLevel.None____=None -arduino-esp8266.menu.DebugLevel.None____.build.debug_level= -arduino-esp8266.menu.DebugLevel.SSL=SSL -arduino-esp8266.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -arduino-esp8266.menu.DebugLevel.TLS_MEM=TLS_MEM -arduino-esp8266.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -arduino-esp8266.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -arduino-esp8266.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -arduino-esp8266.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -arduino-esp8266.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -arduino-esp8266.menu.DebugLevel.CORE=CORE -arduino-esp8266.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -arduino-esp8266.menu.DebugLevel.WIFI=WIFI -arduino-esp8266.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -arduino-esp8266.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -arduino-esp8266.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -arduino-esp8266.menu.DebugLevel.UPDATER=UPDATER -arduino-esp8266.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -arduino-esp8266.menu.DebugLevel.OTA=OTA -arduino-esp8266.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -arduino-esp8266.menu.DebugLevel.OOM=OOM -arduino-esp8266.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -arduino-esp8266.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -arduino-esp8266.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -arduino-esp8266.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -arduino-esp8266.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -arduino-esp8266.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -arduino-esp8266.menu.FlashErase.none=Only Sketch -arduino-esp8266.menu.FlashErase.none.upload.erase_cmd= -arduino-esp8266.menu.FlashErase.sdk=Sketch + WiFi Settings -arduino-esp8266.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -arduino-esp8266.menu.FlashErase.all=All Flash Contents -arduino-esp8266.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -arduino-esp8266.menu.UploadSpeed.115200=115200 -arduino-esp8266.menu.UploadSpeed.115200.upload.speed=115200 -arduino-esp8266.menu.UploadSpeed.9600=9600 -arduino-esp8266.menu.UploadSpeed.9600.upload.speed=9600 -arduino-esp8266.menu.UploadSpeed.57600=57600 -arduino-esp8266.menu.UploadSpeed.57600.upload.speed=57600 -arduino-esp8266.menu.UploadSpeed.230400.linux=230400 -arduino-esp8266.menu.UploadSpeed.230400.macosx=230400 -arduino-esp8266.menu.UploadSpeed.230400.upload.speed=230400 -arduino-esp8266.menu.UploadSpeed.256000.windows=256000 -arduino-esp8266.menu.UploadSpeed.256000.upload.speed=256000 -arduino-esp8266.menu.UploadSpeed.460800.linux=460800 -arduino-esp8266.menu.UploadSpeed.460800.macosx=460800 -arduino-esp8266.menu.UploadSpeed.460800.upload.speed=460800 -arduino-esp8266.menu.UploadSpeed.512000.windows=512000 -arduino-esp8266.menu.UploadSpeed.512000.upload.speed=512000 -arduino-esp8266.menu.UploadSpeed.921600=921600 -arduino-esp8266.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -gen4iod.name=4D Systems gen4 IoD Range -gen4iod.build.board=GEN4_IOD -gen4iod.build.f_cpu=160000000L -gen4iod.build.variant=generic -gen4iod.upload.tool=esptool -gen4iod.upload.maximum_data_size=81920 -gen4iod.upload.wait_for_upload_port=true -gen4iod.upload.erase_cmd= -gen4iod.serial.disableDTR=true -gen4iod.serial.disableRTS=true -gen4iod.build.mcu=esp8266 -gen4iod.build.core=esp8266 -gen4iod.build.spiffs_pagesize=256 -gen4iod.build.debug_port= -gen4iod.build.debug_level= -gen4iod.menu.CpuFrequency.80=80 MHz -gen4iod.menu.CpuFrequency.80.build.f_cpu=80000000L -gen4iod.menu.CpuFrequency.160=160 MHz -gen4iod.menu.CpuFrequency.160.build.f_cpu=160000000L -gen4iod.upload.resetmethod=nodemcu -gen4iod.build.flash_mode=qio -gen4iod.build.flash_freq=80 -gen4iod.menu.FlashSize.512K0=512K (no SPIFFS) -gen4iod.menu.FlashSize.512K0.build.flash_size=512K -gen4iod.menu.FlashSize.512K0.build.flash_size_bytes=0x80000 -gen4iod.menu.FlashSize.512K0.build.flash_ld=eagle.flash.512k0.ld -gen4iod.menu.FlashSize.512K0.build.spiffs_pagesize=256 -gen4iod.menu.FlashSize.512K0.upload.maximum_size=499696 -gen4iod.menu.FlashSize.512K0.build.rfcal_addr=0x7C000 -gen4iod.menu.FlashSize.512K64=512K (64K SPIFFS) -gen4iod.menu.FlashSize.512K64.build.flash_size=512K -gen4iod.menu.FlashSize.512K64.build.flash_size_bytes=0x80000 -gen4iod.menu.FlashSize.512K64.build.flash_ld=eagle.flash.512k64.ld -gen4iod.menu.FlashSize.512K64.build.spiffs_pagesize=256 -gen4iod.menu.FlashSize.512K64.upload.maximum_size=434160 -gen4iod.menu.FlashSize.512K64.build.rfcal_addr=0x7C000 -gen4iod.menu.FlashSize.512K64.build.spiffs_start=0x6B000 -gen4iod.menu.FlashSize.512K64.build.spiffs_end=0x7B000 -gen4iod.menu.FlashSize.512K64.build.spiffs_blocksize=4096 -gen4iod.menu.FlashSize.512K128=512K (128K SPIFFS) -gen4iod.menu.FlashSize.512K128.build.flash_size=512K -gen4iod.menu.FlashSize.512K128.build.flash_size_bytes=0x80000 -gen4iod.menu.FlashSize.512K128.build.flash_ld=eagle.flash.512k128.ld -gen4iod.menu.FlashSize.512K128.build.spiffs_pagesize=256 -gen4iod.menu.FlashSize.512K128.upload.maximum_size=368624 -gen4iod.menu.FlashSize.512K128.build.rfcal_addr=0x7C000 -gen4iod.menu.FlashSize.512K128.build.spiffs_start=0x5B000 -gen4iod.menu.FlashSize.512K128.build.spiffs_end=0x7B000 -gen4iod.menu.FlashSize.512K128.build.spiffs_blocksize=4096 -gen4iod.menu.LwIPVariant.v2mss536=v2 Lower Memory -gen4iod.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -gen4iod.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -gen4iod.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -gen4iod.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -gen4iod.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -gen4iod.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -gen4iod.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -gen4iod.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -gen4iod.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -gen4iod.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -gen4iod.menu.LwIPVariant.OpenSource=v1.4 Compile from source -gen4iod.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -gen4iod.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -gen4iod.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -gen4iod.menu.Debug.Disabled=Disabled -gen4iod.menu.Debug.Disabled.build.debug_port= -gen4iod.menu.Debug.Serial=Serial -gen4iod.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -gen4iod.menu.Debug.Serial1=Serial1 -gen4iod.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -gen4iod.menu.DebugLevel.None____=None -gen4iod.menu.DebugLevel.None____.build.debug_level= -gen4iod.menu.DebugLevel.SSL=SSL -gen4iod.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -gen4iod.menu.DebugLevel.TLS_MEM=TLS_MEM -gen4iod.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -gen4iod.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -gen4iod.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -gen4iod.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -gen4iod.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -gen4iod.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -gen4iod.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -gen4iod.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -gen4iod.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -gen4iod.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -gen4iod.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -gen4iod.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -gen4iod.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -gen4iod.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -gen4iod.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -gen4iod.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -gen4iod.menu.DebugLevel.CORE=CORE -gen4iod.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -gen4iod.menu.DebugLevel.WIFI=WIFI -gen4iod.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -gen4iod.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -gen4iod.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -gen4iod.menu.DebugLevel.UPDATER=UPDATER -gen4iod.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -gen4iod.menu.DebugLevel.OTA=OTA -gen4iod.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -gen4iod.menu.DebugLevel.OOM=OOM -gen4iod.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -gen4iod.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -gen4iod.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -gen4iod.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -gen4iod.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -gen4iod.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -gen4iod.menu.FlashErase.none=Only Sketch -gen4iod.menu.FlashErase.none.upload.erase_cmd= -gen4iod.menu.FlashErase.sdk=Sketch + WiFi Settings -gen4iod.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -gen4iod.menu.FlashErase.all=All Flash Contents -gen4iod.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -gen4iod.menu.UploadSpeed.115200=115200 -gen4iod.menu.UploadSpeed.115200.upload.speed=115200 -gen4iod.menu.UploadSpeed.9600=9600 -gen4iod.menu.UploadSpeed.9600.upload.speed=9600 -gen4iod.menu.UploadSpeed.57600=57600 -gen4iod.menu.UploadSpeed.57600.upload.speed=57600 -gen4iod.menu.UploadSpeed.230400.linux=230400 -gen4iod.menu.UploadSpeed.230400.macosx=230400 -gen4iod.menu.UploadSpeed.230400.upload.speed=230400 -gen4iod.menu.UploadSpeed.256000.windows=256000 -gen4iod.menu.UploadSpeed.256000.upload.speed=256000 -gen4iod.menu.UploadSpeed.460800.linux=460800 -gen4iod.menu.UploadSpeed.460800.macosx=460800 -gen4iod.menu.UploadSpeed.460800.upload.speed=460800 -gen4iod.menu.UploadSpeed.512000.windows=512000 -gen4iod.menu.UploadSpeed.512000.upload.speed=512000 -gen4iod.menu.UploadSpeed.921600=921600 -gen4iod.menu.UploadSpeed.921600.upload.speed=921600 - -############################################################## -oak.name=Digistump Oak -oak.build.board=ESP8266_OAK -oak.build.variant=oak -oak.upload.maximum_size=1040368 -oak.upload.tool=esptool -oak.upload.maximum_data_size=81920 -oak.upload.wait_for_upload_port=true -oak.upload.erase_cmd= -oak.serial.disableDTR=true -oak.serial.disableRTS=true -oak.build.mcu=esp8266 -oak.build.core=esp8266 -oak.build.spiffs_pagesize=256 -oak.build.debug_port= -oak.build.debug_level= -oak.menu.CpuFrequency.80=80 MHz -oak.menu.CpuFrequency.80.build.f_cpu=80000000L -oak.menu.CpuFrequency.160=160 MHz -oak.menu.CpuFrequency.160.build.f_cpu=160000000L -oak.upload.resetmethod=none -oak.build.flash_mode=dio -oak.build.flash_freq=40 -oak.menu.FlashSize.4M1M=4M (1M SPIFFS) -oak.menu.FlashSize.4M1M.build.flash_size=4M -oak.menu.FlashSize.4M1M.build.flash_size_bytes=0x400000 -oak.menu.FlashSize.4M1M.build.flash_ld=eagle.flash.4m1m.ld -oak.menu.FlashSize.4M1M.build.spiffs_pagesize=256 -oak.menu.FlashSize.4M1M.upload.maximum_size=1044464 -oak.menu.FlashSize.4M1M.build.rfcal_addr=0x3FC000 -oak.menu.FlashSize.4M1M.build.spiffs_start=0x300000 -oak.menu.FlashSize.4M1M.build.spiffs_end=0x3FB000 -oak.menu.FlashSize.4M1M.build.spiffs_blocksize=8192 -oak.menu.FlashSize.4M3M=4M (3M SPIFFS) -oak.menu.FlashSize.4M3M.build.flash_size=4M -oak.menu.FlashSize.4M3M.build.flash_size_bytes=0x400000 -oak.menu.FlashSize.4M3M.build.flash_ld=eagle.flash.4m.ld -oak.menu.FlashSize.4M3M.build.spiffs_pagesize=256 -oak.menu.FlashSize.4M3M.upload.maximum_size=1044464 -oak.menu.FlashSize.4M3M.build.rfcal_addr=0x3FC000 -oak.menu.FlashSize.4M3M.build.spiffs_start=0x100000 -oak.menu.FlashSize.4M3M.build.spiffs_end=0x3FB000 -oak.menu.FlashSize.4M3M.build.spiffs_blocksize=8192 -oak.menu.LwIPVariant.v2mss536=v2 Lower Memory -oak.menu.LwIPVariant.v2mss536.build.lwip_include=lwip2/include -oak.menu.LwIPVariant.v2mss536.build.lwip_lib=-llwip2 -oak.menu.LwIPVariant.v2mss536.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=536 -oak.menu.LwIPVariant.v2mss1460=v2 Higher Bandwidth -oak.menu.LwIPVariant.v2mss1460.build.lwip_include=lwip2/include -oak.menu.LwIPVariant.v2mss1460.build.lwip_lib=-llwip2_1460 -oak.menu.LwIPVariant.v2mss1460.build.lwip_flags=-DLWIP_OPEN_SRC -DTCP_MSS=1460 -oak.menu.LwIPVariant.Prebuilt=v1.4 Higher Bandwidth -oak.menu.LwIPVariant.Prebuilt.build.lwip_lib=-llwip_gcc -oak.menu.LwIPVariant.Prebuilt.build.lwip_flags=-DLWIP_OPEN_SRC -oak.menu.LwIPVariant.OpenSource=v1.4 Compile from source -oak.menu.LwIPVariant.OpenSource.build.lwip_lib=-llwip_src -oak.menu.LwIPVariant.OpenSource.build.lwip_flags=-DLWIP_OPEN_SRC -oak.menu.LwIPVariant.OpenSource.recipe.hooks.sketch.prebuild.1.pattern=make -C "{runtime.platform.path}/tools/sdk/lwip/src" install TOOLS_PATH="{runtime.tools.xtensa-lx106-elf-gcc.path}/bin/xtensa-lx106-elf-" -oak.menu.Debug.Disabled=Disabled -oak.menu.Debug.Disabled.build.debug_port= -oak.menu.Debug.Serial=Serial -oak.menu.Debug.Serial.build.debug_port=-DDEBUG_ESP_PORT=Serial -oak.menu.Debug.Serial1=Serial1 -oak.menu.Debug.Serial1.build.debug_port=-DDEBUG_ESP_PORT=Serial1 -oak.menu.DebugLevel.None____=None -oak.menu.DebugLevel.None____.build.debug_level= -oak.menu.DebugLevel.SSL=SSL -oak.menu.DebugLevel.SSL.build.debug_level= -DDEBUG_ESP_SSL -oak.menu.DebugLevel.TLS_MEM=TLS_MEM -oak.menu.DebugLevel.TLS_MEM.build.debug_level= -DDEBUG_ESP_TLS_MEM -oak.menu.DebugLevel.HTTP_CLIENT=HTTP_CLIENT -oak.menu.DebugLevel.HTTP_CLIENT.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -oak.menu.DebugLevel.HTTP_SERVER=HTTP_SERVER -oak.menu.DebugLevel.HTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.SSLTLS_MEM=SSL+TLS_MEM -oak.menu.DebugLevel.SSLTLS_MEM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -oak.menu.DebugLevel.SSLHTTP_CLIENT=SSL+HTTP_CLIENT -oak.menu.DebugLevel.SSLHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -oak.menu.DebugLevel.SSLHTTP_SERVER=SSL+HTTP_SERVER -oak.menu.DebugLevel.SSLHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.TLS_MEMHTTP_CLIENT=TLS_MEM+HTTP_CLIENT -oak.menu.DebugLevel.TLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -oak.menu.DebugLevel.TLS_MEMHTTP_SERVER=TLS_MEM+HTTP_SERVER -oak.menu.DebugLevel.TLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER=HTTP_CLIENT+HTTP_SERVER -oak.menu.DebugLevel.HTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT=SSL+TLS_MEM+HTTP_CLIENT -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENT.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -oak.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER=SSL+TLS_MEM+HTTP_SERVER -oak.menu.DebugLevel.SSLTLS_MEMHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER=SSL+HTTP_CLIENT+HTTP_SERVER -oak.menu.DebugLevel.SSLHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER=TLS_MEM+HTTP_CLIENT+HTTP_SERVER -oak.menu.DebugLevel.TLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVER.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -oak.menu.DebugLevel.CORE=CORE -oak.menu.DebugLevel.CORE.build.debug_level= -DDEBUG_ESP_CORE -oak.menu.DebugLevel.WIFI=WIFI -oak.menu.DebugLevel.WIFI.build.debug_level= -DDEBUG_ESP_WIFI -oak.menu.DebugLevel.HTTP_UPDATE=HTTP_UPDATE -oak.menu.DebugLevel.HTTP_UPDATE.build.debug_level= -DDEBUG_ESP_HTTP_UPDATE -oak.menu.DebugLevel.UPDATER=UPDATER -oak.menu.DebugLevel.UPDATER.build.debug_level= -DDEBUG_ESP_UPDATER -oak.menu.DebugLevel.OTA=OTA -oak.menu.DebugLevel.OTA.build.debug_level= -DDEBUG_ESP_OTA -oak.menu.DebugLevel.OOM=OOM -oak.menu.DebugLevel.OOM.build.debug_level= -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -oak.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM=CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -oak.menu.DebugLevel.COREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM=SSL+TLS_MEM+HTTP_CLIENT+HTTP_SERVER+CORE+WIFI+HTTP_UPDATE+UPDATER+OTA+OOM -oak.menu.DebugLevel.SSLTLS_MEMHTTP_CLIENTHTTP_SERVERCOREWIFIHTTP_UPDATEUPDATEROTAOOM.build.debug_level= -DDEBUG_ESP_SSL -DDEBUG_ESP_TLS_MEM -DDEBUG_ESP_HTTP_CLIENT -DDEBUG_ESP_HTTP_SERVER -DDEBUG_ESP_CORE -DDEBUG_ESP_WIFI -DDEBUG_ESP_HTTP_UPDATE -DDEBUG_ESP_UPDATER -DDEBUG_ESP_OTA -DDEBUG_ESP_OOM -include "umm_malloc/umm_malloc_cfg.h" -oak.menu.DebugLevel.NoAssert-NDEBUG=NoAssert-NDEBUG -oak.menu.DebugLevel.NoAssert-NDEBUG.build.debug_level= -DNDEBUG -oak.menu.FlashErase.none=Only Sketch -oak.menu.FlashErase.none.upload.erase_cmd= -oak.menu.FlashErase.sdk=Sketch + WiFi Settings -oak.menu.FlashErase.sdk.upload.erase_cmd=-ca "{build.rfcal_addr}" -cz 0x4000 -oak.menu.FlashErase.all=All Flash Contents -oak.menu.FlashErase.all.upload.erase_cmd=-ca 0x0 -cz "{build.flash_size_bytes}" -oak.menu.UploadSpeed.921600=921600 -oak.menu.UploadSpeed.921600.upload.speed=921600 -oak.menu.UploadSpeed.9600=9600 -oak.menu.UploadSpeed.9600.upload.speed=9600 -oak.menu.UploadSpeed.57600=57600 -oak.menu.UploadSpeed.57600.upload.speed=57600 -oak.menu.UploadSpeed.115200=115200 -oak.menu.UploadSpeed.115200.upload.speed=115200 -oak.menu.UploadSpeed.230400.linux=230400 -oak.menu.UploadSpeed.230400.macosx=230400 -oak.menu.UploadSpeed.230400.upload.speed=230400 -oak.menu.UploadSpeed.256000.windows=256000 -oak.menu.UploadSpeed.256000.upload.speed=256000 -oak.menu.UploadSpeed.460800.linux=460800 -oak.menu.UploadSpeed.460800.macosx=460800 -oak.menu.UploadSpeed.460800.upload.speed=460800 -oak.menu.UploadSpeed.512000.windows=512000 -oak.menu.UploadSpeed.512000.upload.speed=512000 - diff --git a/arduino/version 2.4.1/platform.txt b/arduino/version 2.4.1/platform.txt deleted file mode 100644 index 2ddeb0065..000000000 --- a/arduino/version 2.4.1/platform.txt +++ /dev/null @@ -1,137 +0,0 @@ - -# ESP8266 platform -# ------------------------------ - -# For more info: -# https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5---3rd-party-Hardware-specification - -name=ESP8266 Modules -version=2.4.1 - - - - -compiler.warning_flags=-w -compiler.warning_flags.none=-w -compiler.warning_flags.default= -compiler.warning_flags.more=-Wall -compiler.warning_flags.all=-Wall -Wextra - -build.lwip_lib=-llwip_gcc -build.lwip_include=lwip/include -build.lwip_flags=-DLWIP_OPEN_SRC - -#build.float=-u _printf_float -u _scanf_float -build.float= -build.led= - -compiler.path={runtime.tools.xtensa-lx106-elf-gcc.path}/bin/ -compiler.sdk.path={runtime.platform.path}/tools/sdk -compiler.libc.path={runtime.platform.path}/tools/sdk/libc/xtensa-lx106-elf -compiler.cpreprocessor.flags=-D__ets__ -DICACHE_FLASH -U__STRICT_ANSI__ "-I{compiler.sdk.path}/include" "-I{compiler.sdk.path}/{build.lwip_include}" "-I{compiler.libc.path}/include" "-I{build.path}/core" - -compiler.c.cmd=xtensa-lx106-elf-gcc -compiler.c.flags=-c {compiler.warning_flags} -Os -g -Wpointer-arith -Wno-implicit-function-declaration -Wl,-EL -fno-inline-functions -nostdlib -mlongcalls -mtext-section-literals -falign-functions=4 -MMD -std=gnu99 -ffunction-sections -fdata-sections - -compiler.S.cmd=xtensa-lx106-elf-gcc -compiler.S.flags=-c -g -x assembler-with-cpp -MMD -mlongcalls - -compiler.c.elf.flags=-g {compiler.warning_flags} -Os -nostdlib -Wl,--no-check-sections -u call_user_start {build.float} -Wl,-static "-L{compiler.sdk.path}/lib" "-L{compiler.sdk.path}/ld" "-L{compiler.libc.path}/lib" "-T{build.flash_ld}" -Wl,--gc-sections -Wl,-wrap,system_restart_local -Wl,-wrap,spi_flash_read - -compiler.c.elf.cmd=xtensa-lx106-elf-gcc -compiler.c.elf.libs=-lhal -lphy -lpp -lnet80211 {build.lwip_lib} -lwpa -lcrypto -lmain -lwps -laxtls -lespnow -lsmartconfig -lairkiss -lwpa2 -lstdc++ -lm -lc -lgcc - -compiler.cpp.cmd=xtensa-lx106-elf-g++ -compiler.cpp.flags=-c {compiler.warning_flags} -Os -g -mlongcalls -mtext-section-literals -fno-exceptions -fno-rtti -falign-functions=4 -std=c++11 -MMD -ffunction-sections -fdata-sections - -compiler.as.cmd=xtensa-lx106-elf-as - -compiler.ar.cmd=xtensa-lx106-elf-ar -compiler.ar.flags=cru - -compiler.elf2hex.cmd=esptool -compiler.elf2hex.flags= - -compiler.size.cmd=xtensa-lx106-elf-size - -compiler.esptool.cmd=esptool -compiler.esptool.cmd.windows=esptool.exe - -# This can be overriden in boards.txt -build.extra_flags=-DESP8266 - -# These can be overridden in platform.local.txt -compiler.c.extra_flags= -compiler.c.elf.extra_flags= -compiler.S.extra_flags= -compiler.cpp.extra_flags= -compiler.ar.extra_flags= -compiler.objcopy.eep.extra_flags= -compiler.elf2hex.extra_flags= - -## generate file with git version number -## needs bash, git, and echo - - -## windows-compatible version without git - - - -## Compile c files -recipe.c.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.c.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {build.led} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}" - -## Compile c++ files -recipe.cpp.o.pattern="{compiler.path}{compiler.cpp.cmd}" {compiler.cpreprocessor.flags} {compiler.cpp.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {build.led} {compiler.cpp.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}" - -## Compile S files -recipe.S.o.pattern="{compiler.path}{compiler.c.cmd}" {compiler.cpreprocessor.flags} {compiler.S.flags} -DF_CPU={build.f_cpu} {build.lwip_flags} {build.debug_port} {build.debug_level} -DARDUINO={runtime.ide.version} -DARDUINO_{build.board} -DARDUINO_ARCH_{build.arch} -DARDUINO_BOARD="{build.board}" {build.led} {compiler.c.extra_flags} {build.extra_flags} {includes} "{source_file}" -o "{object_file}" - -## Create archives -recipe.ar.pattern="{compiler.path}{compiler.ar.cmd}" {compiler.ar.flags} {compiler.ar.extra_flags} "{build.path}/arduino.ar" "{object_file}" - -## Combine gc-sections, archives, and objects -recipe.c.combine.pattern="{compiler.path}{compiler.c.elf.cmd}" {compiler.c.elf.flags} {compiler.c.elf.extra_flags} -o "{build.path}/{build.project_name}.elf" -Wl,--start-group {object_files} "{build.path}/arduino.ar" {compiler.c.elf.libs} -Wl,--end-group "-L{build.path}" - -## Create eeprom -recipe.objcopy.eep.pattern= - -## Create hex -#recipe.objcopy.hex.pattern="{compiler.path}{compiler.elf2hex.cmd}" {compiler.elf2hex.flags} {compiler.elf2hex.extra_flags} "{build.path}/{build.project_name}.elf" "{build.path}/{build.project_name}.hex" - -recipe.objcopy.hex.pattern="{runtime.tools.esptool.path}/{compiler.esptool.cmd}" -eo "{runtime.platform.path}/bootloaders/eboot/eboot.elf" -bo "{build.path}/{build.project_name}.bin" -bm {build.flash_mode} -bf {build.flash_freq} -bz {build.flash_size} -bs .text -bp 4096 -ec -eo "{build.path}/{build.project_name}.elf" -bs .irom0.text -bs .text -bs .data -bs .rodata -bc -ec - -## Save hex -recipe.output.tmp_file={build.project_name}.bin -recipe.output.save_file={build.project_name}.{build.variant}.bin - -## Compute size -recipe.size.pattern="{compiler.path}{compiler.size.cmd}" -A "{build.path}/{build.project_name}.elf" -recipe.size.regex=^(?:\.irom0\.text|\.text|\.data|\.rodata|)\s+([0-9]+).* -recipe.size.regex.data=^(?:\.data|\.rodata|\.bss)\s+([0-9]+).* -#recipe.size.regex.eeprom=^(?:\.eeprom)\s+([0-9]+).* - -# ------------------------------ - -tools.esptool.cmd=esptool -tools.esptool.cmd.windows=esptool.exe -tools.esptool.path={runtime.tools.esptool.path} -tools.esptool.network_cmd=python -tools.esptool.network_cmd.windows=python.exe - -tools.esptool.upload.protocol=esp -tools.esptool.upload.params.verbose=-vv -tools.esptool.upload.params.quiet= -tools.esptool.upload.pattern="{path}/{cmd}" {upload.verbose} -cd {upload.resetmethod} -cb {upload.speed} -cp "{serial.port}" {upload.erase_cmd} -ca 0x00000 -cf "{build.path}/{build.project_name}.bin" -tools.esptool.upload.network_pattern="{network_cmd}" "{runtime.platform.path}/tools/espota.py" -i "{serial.port}" -p "{network.port}" "--auth={network.password}" -f "{build.path}/{build.project_name}.bin" - -tools.mkspiffs.cmd=mkspiffs -tools.mkspiffs.cmd.windows=mkspiffs.exe -tools.mkspiffs.path={runtime.tools.mkspiffs.path} - -tools.espupload.cmd=python -tools.espupload.cmd.windows=python.exe -tools.espupload.path={runtime.platform.path}/tools -tools.espupload.upload.protocol=espupload -tools.espupload.upload.params.verbose= -tools.espupload.upload.params.quiet= -tools.espupload.upload.pattern="{cmd}" "{path}/espupload.py" -f "{build.path}/{build.project_name}.bin" diff --git a/lib/I2Cdevlib-MPU6050/MPU6050_6Axis_MotionApps20.h b/lib/I2Cdevlib-MPU6050/MPU6050_6Axis_MotionApps20.h index 1f7b88589..90704f0c7 100644 --- a/lib/I2Cdevlib-MPU6050/MPU6050_6Axis_MotionApps20.h +++ b/lib/I2Cdevlib-MPU6050/MPU6050_6Axis_MotionApps20.h @@ -46,7 +46,11 @@ THE SOFTWARE. // Tom Carpenter's conditional PROGMEM code // http://forum.arduino.cc/index.php?topic=129407.0 #ifndef __arm__ - #include + #if (defined(__AVR__)) + #include + #else + #include + #endif #else // Teensy 3.0 library conditional PROGMEM code from Paul Stoffregen #ifndef __PGMSPACE_H_ @@ -109,11 +113,19 @@ THE SOFTWARE. #define DEBUG_PRINTLN(x) Serial.println(x) #define DEBUG_PRINTLNF(x, y) Serial.println(x, y) #else +#ifndef DEBUG_PRINT #define DEBUG_PRINT(x) +#endif +#ifndef DEBUG_PRINTF #define DEBUG_PRINTF(x, y) +#endif +#ifndef DEBUG_PRINTLN #define DEBUG_PRINTLN(x) +#endif +#ifndef DEBUG_PRINTLNF #define DEBUG_PRINTLNF(x, y) #endif +#endif #define MPU6050_DMP_CODE_SIZE 1929 // dmpMemory[] #define MPU6050_DMP_CONFIG_SIZE 192 // dmpConfig[] @@ -402,7 +414,7 @@ uint8_t MPU6050::dmpInitialize() { setIntEnabled(0x12); DEBUG_PRINTLN(F("Setting sample rate to 200Hz...")); - setRate(4); // 1khz / (1 + 4) = 200 Hz + setRate(1); // 1khz / (1 + 4) = 200 Hz DEBUG_PRINTLN(F("Setting external frame sync to TEMP_OUT_L[0]...")); setExternalFrameSync(MPU6050_EXT_SYNC_TEMP_OUT_L); diff --git a/lib/IRremoteESP8266-2.2.1.02/README.md b/lib/IRremoteESP8266-2.2.1.02/README.md deleted file mode 100644 index 6b2975793..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/README.md +++ /dev/null @@ -1,74 +0,0 @@ -# IRremote ESP8266 Library - -[![Build Status](https://travis-ci.org/markszabo/IRremoteESP8266.svg?branch=master)](https://travis-ci.org/markszabo/IRremoteESP8266) -[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/markszabo/IRremoteESP8266.svg)](http://isitmaintained.com/project/markszabo/IRremoteESP8266 "Average time to resolve an issue") -[![Percentage of issues still open](http://isitmaintained.com/badge/open/markszabo/IRremoteESP8266.svg)](http://isitmaintained.com/project/markszabo/IRremoteESP8266 "Percentage of issues still open") -[![GitLicense](https://gitlicense.com/badge/markszabo/IRremoteESP8266)](https://gitlicense.com/license/markszabo/IRremoteESP8266) - -This library enables you to **send and receive** infra-red signals on an ESP8266 using Arduino framework (https://github.com/esp8266/Arduino) - -## v2.2 Now Available -Version 2.2 of the library is now available. This is a significant internal change to existing versions. - -## Upgrading from versions prior to v2.0 -You will need to change your pre-v2.0 code slightly to work with post-v2.0 versions of the library. You can read more about the changes on our [wiki](https://github.com/markszabo/IRremoteESP8266/wiki/Upgrading-to-v2.0) page. -Please [report an issue](https://github.com/markszabo/IRremoteESP8266/issues/new) if you find any problems with the documentation or the library itself. - -## Troubleshooting -Before reporting an issue or asking for help, please try to follow our [Troubleshooting Guide](https://github.com/markszabo/IRremoteESP8266/wiki/Troubleshooting-Guide) first. - -## Frequently Asked Questions -Some common answers to common questions and problems can be found on our [F.A.Q. wiki page](https://github.com/markszabo/IRremoteESP8266/wiki/Frequently-Asked-Questions). - -## History -This library was originally based on Ken Shirriff's work (https://github.com/shirriff/Arduino-IRremote/) - -[Mark Szabo](https://github.com/markszabo/IRremoteESP8266) has updated the IRsend class to work on ESP8266 and [Sebastien Warin](https://github.com/sebastienwarin/IRremoteESP8266) the receiving & decoding part (IRrecv class). - -## Installation -1. Click "Download ZIP" -2. Extract the downloaded zip file -3. Rename the extracted folder to "IRremoteESP8266" -4. Move this folder to your libraries directory (under windows: C:\Users\YOURNAME\Documents\Arduino\libraries\) -5. Restart your Arduino ide -6. Check out the examples - -###### Using Git to install library ( Linux ) -``` -cd ~/Arduino/libraries -git clone https://github.com/markszabo/IRremoteESP8266.git -``` -###### To Update to the latest version of the library -` -cd ~/Arduino/libraries/IRremoteESP8266 && git pull -` - -## Unit Tests -The [Unit Tests](https://en.wikipedia.org/wiki/Unit_testing) under the test/ directory are for a Unix machine, **not** the micro-controller (ESP8266). -This allows execution under Travis and on the developer's machine. -We can do this from v2.0 of the library onwards, as everything now uses c98-style type definitions. -e.g. uint16_t etc. -Any Arduino/ESP8266 specific code needs to be disabled using something similar to the following lines: -``` -#ifndef UNIT_TEST - -#endif -``` - -This is not a perfect situation as we can not obviously emulate hardware specific features and differences. e.g. Interrupts, GPIOs, CPU instruction timing etc, etc. - -If you want to run all the tests yourself, try the following: -``` -$ cd test -$ make run -``` - -## Contributing -If you want to [contribute](.github/CONTRIBUTING.md#how-can-i-contribute) to this project, consider: -- [Report](.github/CONTRIBUTING.md#reporting-bugs) bugs and errors -- Ask for enhancements -- [Create issues](.github/CONTRIBUTING.md#reporting-bugs) and [pull requests](.github/CONTRIBUTING.md#pull-requests) -- Tell other people about this library - -## Contributors -Available [here](.github/Contributors.md) diff --git a/lib/IRremoteESP8266-2.2.1.02/ReleaseNotes.md b/lib/IRremoteESP8266-2.2.1.02/ReleaseNotes.md deleted file mode 100644 index 3b9bce86a..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/ReleaseNotes.md +++ /dev/null @@ -1,112 +0,0 @@ -# Release Notes - -## _v2.2.1 (20171025)_ - -**[Features]** -- Support for sending and decoding Nikai TV messages. (#311, #313) -- gc_decode: External utility to decode Global Cache codes. (#308, #312) -- IRMQTTServer: Example code to send IR messages via HTTP & MQTT. (#316, #323) -- Improve converting 64bit values to hexidecimal. (#318) - -**[Misc]** -- IRrecvDump.ino code is now deprecated. Use IRrecvDumpV2.ino instead. (#314) - - -## _v2.2.0 (20170922)_ - -**[Bug Fixes]** -- Add printing output of RC-MM and RC-5X protocols in example code. (#284) -- LG timing improvements based on observations (#291) - -**[Features]** -- Automatic capture timing calibration for some protocols. (#268) -- Support for creating & sending Trotec AC codes. (#279) -- Support for creating & sending Argo Ulisse 13 DCI codes. (#280 #300) -- Move to 2 microsecond timing resolution for capture of codes. (#287) -- Capture buffer changes: -- Size at runtime. (#276) -- Message timeout at runtime. (#294) -- Simplify creating & using a second buffer (#303) -- New example code: - - Trotec A/C (#279) - - LG A/C units (#289) - - Argo Ulisse 13 DCI codes. (#300) - - -## _v2.1.1 (20170711)_ - -**[Bug Fixes]** -- GlobalCache incorrectly using hardware offset for period calc. (#267) - -**[Features]** -- Support reporting of 'NEC'-like 32-bit protocols. e.g. Apple TV remote (#265) -- Add an example of sendRaw() to IRsendDemo.ino (#270) - - -## _v2.1.0 (20170704)_ - -**[Features]** -- Support for sending Pronto IR codes. (#248) -- Support for sending Fujitsu A/C codes. (#88) -- Minor improvements to examples. - - -## _v2.0.3 (20170618)_ - -**[Bug fixes]** -- Capture buffer could become corrupt after large message, breaking subsequent decodes. (#253) - - -## _v2.0.2 (20170615)_ - -**[Bug fixes]** -- Correct decode issue introduced in v2.0.1 affecting multiple protocol decoders (#243) -- Correct post-message gap for the Panasonic protocol(s) (#245) -- Incorrect display of the decoded uint64_t value in the example code. (#245) - - -## _v2.0.1 (20170614)_ - -**[Bug fixes]** -- Decoding protocols when it doesn't detect a post-command gap, and there is no more data. (#243) -- Incorrect minimum size calculation when there is no post-command gap. (#243) - - -## _v2.0.0 - 64 bit support and major improvements (20170612)_ - -**[Misc]** -- This is almost a complete re-write of the library. - -**[Features]** -- All suitable protocols now handle 64-bit data messages and are repeatable via an optional argument. -- Unit tests for all protocols. -- Far better and stricter decoding for most protocols. -- Address & command decoding for protocols where that information is available. -- Much more precise timing for generation of signals sent. -- Lower duty-cycles for some protocols. -- Several new protocols added, and some new sending and decoding routines for existing ones. -- Ability to optionally chose which protocols are included, enabling faster decoding and smaller code footprints if desired. -- Support for far larger capture buffers. (e.g. RAWLEN > 256) - -**[Bug fixes]** -- Numerous bug fixes. - - -## _v1.2.0 (20170429)_ - -**[Features]** -- Add ability to copy IR capture buffer, and continue capturing. Means faster and better IR command decoding. -- Reduce IRAM usage by 28 bytes. -- Improve capture of RC-MM & Panasonic protocols. -- Upgrade IRrecvDumpV2 to new IR capture buffer. Much fewer corrupted/truncated IR messages. - - -## _v1.1.1 (20170413)_ - -**[Bug fixes]** -- Fix a reported problem when sending the LG protocol. Preemptive fix for possible similar cases. -- Fix minor issues in examples. - -**[Features]** -- Add documentation to some examples to aid new people. -- Add ALPHA support for RC-MM protocol. (Known to be currently not 100% working.) diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDumpV2/IRrecvDumpV2.ino b/lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDumpV2/IRrecvDumpV2.ino deleted file mode 100644 index bb86a5f9d..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDumpV2/IRrecvDumpV2.ino +++ /dev/null @@ -1,199 +0,0 @@ -/* - * IRremoteESP8266: IRrecvDumpV2 - dump details of IR codes with IRrecv - * An IR detector/demodulator must be connected to the input RECV_PIN. - * Example circuit diagram: - * https://github.com/markszabo/IRremoteESP8266/wiki#ir-receiving - * Changes: - * Version 0.2 April, 2017 - * - Decode from a copy of the data so we can start capturing faster thus - * reduce the likelihood of miscaptures. - * Based on Ken Shirriff's IrsendDemo Version 0.1 July, 2009, Copyright 2009 Ken Shirriff, http://arcfn.com - */ - -#ifndef UNIT_TEST -#include -#endif -#include -#include -#include - -// An IR detector/demodulator is connected to GPIO pin 14(D5 on a NodeMCU -// board). -uint16_t RECV_PIN = 14; -// As this program is a special purpose capture/decoder, let us use a larger -// than normal buffer so we can handle Air Conditioner remote codes. -uint16_t CAPTURE_BUFFER_SIZE = 1024; - -// Nr. of milli-Seconds of no-more-data before we consider a message ended. -// NOTE: Don't exceed MAX_TIMEOUT_MS. Typically 130ms. -#define TIMEOUT 15U // Suits most messages, while not swallowing repeats. -// #define TIMEOUT 90U // Suits messages with big gaps like XMP-1 & some aircon - // units, but can accidently swallow repeated messages - // in the rawData[] output. - -// Use turn on the save buffer feature for more complete capture coverage. -IRrecv irrecv(RECV_PIN, CAPTURE_BUFFER_SIZE, TIMEOUT, true); - -decode_results results; // Somewhere to store the results - -void setup() { - // Status message will be sent to the PC at 115200 baud - Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY); - delay(500); // Wait a bit for the serial connection to be establised. - - irrecv.enableIRIn(); // Start the receiver -} - -// Display encoding type -// -void encoding(decode_results *results) { - switch (results->decode_type) { - default: - case UNKNOWN: Serial.print("UNKNOWN"); break; - case NEC: Serial.print("NEC"); break; - case NEC_LIKE: Serial.print("NEC (non-strict)"); break; - case SONY: Serial.print("SONY"); break; - case RC5: Serial.print("RC5"); break; - case RC5X: Serial.print("RC5X"); break; - case RC6: Serial.print("RC6"); break; - case RCMM: Serial.print("RCMM"); break; - case DISH: Serial.print("DISH"); break; - case SHARP: Serial.print("SHARP"); break; - case JVC: Serial.print("JVC"); break; - case SANYO: Serial.print("SANYO"); break; - case SANYO_LC7461: Serial.print("SANYO_LC7461"); break; - case MITSUBISHI: Serial.print("MITSUBISHI"); break; - case SAMSUNG: Serial.print("SAMSUNG"); break; - case LG: Serial.print("LG"); break; - case WHYNTER: Serial.print("WHYNTER"); break; - case AIWA_RC_T501: Serial.print("AIWA_RC_T501"); break; - case PANASONIC: Serial.print("PANASONIC"); break; - case DENON: Serial.print("DENON"); break; - case COOLIX: Serial.print("COOLIX"); break; - case NIKAI: Serial.print("NIKAI"); break; - } - if (results->repeat) Serial.print(" (Repeat)"); -} - -// Dump out the decode_results structure. -// -void dumpInfo(decode_results *results) { - if (results->overflow) - Serial.printf("WARNING: IR code too big for buffer (>= %d). " - "These results shouldn't be trusted until this is resolved. " - "Edit & increase CAPTURE_BUFFER_SIZE.\n", - CAPTURE_BUFFER_SIZE); - - // Show Encoding standard - Serial.print("Encoding : "); - encoding(results); - Serial.println(""); - - // Show Code & length - Serial.print("Code : "); - serialPrintUint64(results->value, 16); - Serial.print(" ("); - Serial.print(results->bits, DEC); - Serial.println(" bits)"); -} - -uint16_t getCookedLength(decode_results *results) { - uint16_t length = results->rawlen - 1; - for (uint16_t i = 0; i < results->rawlen - 1; i++) { - uint32_t usecs = results->rawbuf[i] * RAWTICK; - // Add two extra entries for multiple larger than UINT16_MAX it is. - length += (usecs / UINT16_MAX) * 2; - } - return length; -} - -// Dump out the decode_results structure. -// -void dumpRaw(decode_results *results) { - // Print Raw data - Serial.print("Timing["); - Serial.print(results->rawlen - 1, DEC); - Serial.println("]: "); - - for (uint16_t i = 1; i < results->rawlen; i++) { - if (i % 100 == 0) - yield(); // Preemptive yield every 100th entry to feed the WDT. - if (i % 2 == 0) { // even - Serial.print("-"); - } else { // odd - Serial.print(" +"); - } - Serial.printf("%6d", results->rawbuf[i] * RAWTICK); - if (i < results->rawlen - 1) - Serial.print(", "); // ',' not needed for last one - if (!(i % 8)) Serial.println(""); - } - Serial.println(""); // Newline -} - -// Dump out the decode_results structure. -// -void dumpCode(decode_results *results) { - // Start declaration - Serial.print("uint16_t "); // variable type - Serial.print("rawData["); // array name - Serial.print(getCookedLength(results), DEC); // array size - Serial.print("] = {"); // Start declaration - - // Dump data - for (uint16_t i = 1; i < results->rawlen; i++) { - uint32_t usecs; - for (usecs = results->rawbuf[i] * RAWTICK; - usecs > UINT16_MAX; - usecs -= UINT16_MAX) - Serial.printf("%d, 0", UINT16_MAX); - Serial.print(usecs, DEC); - if (i < results->rawlen - 1) - Serial.print(", "); // ',' not needed on last one - if (i % 2 == 0) Serial.print(" "); // Extra if it was even. - } - - // End declaration - Serial.print("};"); // - - // Comment - Serial.print(" // "); - encoding(results); - Serial.print(" "); - serialPrintUint64(results->value, HEX); - - // Newline - Serial.println(""); - - // Now dump "known" codes - if (results->decode_type != UNKNOWN) { - // Some protocols have an address &/or command. - // NOTE: It will ignore the atypical case when a message has been decoded - // but the address & the command are both 0. - if (results->address > 0 || results->command > 0) { - Serial.print("uint32_t address = 0x"); - Serial.print(results->address, HEX); - Serial.println(";"); - Serial.print("uint32_t command = 0x"); - Serial.print(results->command, HEX); - Serial.println(";"); - } - - // All protocols have data - Serial.print("uint64_t data = 0x"); - serialPrintUint64(results->value, 16); - Serial.println(";"); - } -} - -// The repeating section of the code -// -void loop() { - // Check if the IR code has been received. - if (irrecv.decode(&results)) { - dumpInfo(&results); // Output the results - dumpRaw(&results); // Output the results in RAW format - dumpCode(&results); // Output the results as source code - Serial.println(""); // Blank line between entries - } -} diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnFujitsuAC/TurnOnFujitsuAC.ino b/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnFujitsuAC/TurnOnFujitsuAC.ino deleted file mode 100644 index 52e31b5d8..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnFujitsuAC/TurnOnFujitsuAC.ino +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2017 Jonny Graham -#include -#include - -IRFujitsuAC fujitsu(5); // IR led controlled by Pin D1. - -void printState() { - // Display the settings. - Serial.println("Fujitsu A/C remote is in the following state:"); - Serial.printf(" Command:%d, Mode: %d, Temp: %dC, Fan Speed: %d," \ - " Swing Mode: %d\n", - fujitsu.getCmd(), fujitsu.getMode(), fujitsu.getTemp(), - fujitsu.getFanSpeed(), fujitsu.getSwing()); - // Display the encoded IR sequence. - unsigned char* ir_code = fujitsu.getRaw(); - Serial.print("IR Code: 0x"); - for (uint8_t i = 0; i < FUJITSU_AC_STATE_LENGTH; i++) - Serial.printf("%02X", ir_code[i]); - Serial.println(); -} - -void setup() { - fujitsu.begin(); - Serial.begin(115200); - delay(200); - - // Set up what we want to send. See ir_Mitsubishi.cpp for all the options. - Serial.println("Default state of the remote."); - printState(); - Serial.println("Setting desired state for A/C."); - fujitsu.setCmd(FUJITSU_AC_CMD_TURN_ON); - fujitsu.setSwing(FUJITSU_AC_SWING_BOTH); - fujitsu.setMode(FUJITSU_AC_MODE_COOL); - fujitsu.setFanSpeed(FUJITSU_AC_FAN_HIGH); - fujitsu.setTemp(24); -} - -void loop() { - // Now send the IR signal. - Serial.println("Sending IR command to A/C ..."); - fujitsu.send(); - printState(); - delay(5000); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/keywords.txt b/lib/IRremoteESP8266-2.2.1.02/keywords.txt deleted file mode 100644 index ab1b3f70c..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/keywords.txt +++ /dev/null @@ -1,128 +0,0 @@ -######################################### -# Syntax Coloring Map For IRremoteESP8266 -######################################### - -####################################################### -# The Arduino IDE requires the use of a tab separator -# between the name and identifier. Without this tab the -# keyword is not highlighted. -# -# Reference: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords -####################################################### - -####################################### -# Datatypes (KEYWORD1) -####################################### - -decode_results KEYWORD1 -IRrecv KEYWORD1 -IRsend KEYWORD1 -IRtimer KEYWORD1 - -####################################### -# Methods and Functions (KEYWORD2) -####################################### - -decode KEYWORD2 -enableIRIn KEYWORD2 -disableIRIn KEYWORD2 -resume KEYWORD2 -begin KEYWORD2 -send KEYWORD2 -enableIROut KEYWORD2 -sendNEC KEYWORD2 -encodeNEC KEYWORD2 -sendLG KEYWORD2 -encodeLG KEYWORD2 -sendSony KEYWORD2 -encodeSony KEYWORD2 -sendSanyo KEYWORD2 -sendSanyoLC7461 KEYWORD2 -encodeSanyoLC7461 KEYWORD2 -sendMitsubishi KEYWORD2 -sendRaw KEYWORD2 -sendGC KEYWORD2 -sendRC5 KEYWORD2 -sendRC6 KEYWORD2 -sendRCMM KEYWORD2 -sendDISH KEYWORD2 -sendSharp KEYWORD2 -sendSharpRaw KEYWORD2 -encodeSharp KEYWORD2 -sendPanasonic KEYWORD2 -sendPanasonic64 KEYWORD2 -encodePanasonic KEYWORD2 -sendJVC KEYWORD2 -encodeJVC KEYWORD2 -sendWhynter KEYWORD2 -sendSAMSUNG KEYWORD2 -encodeSAMSUNG KEYWORD2 -sendDaikin KEYWORD2 -sendCOOLIX KEYWORD2 -sendDenon KEYWORD2 -sendKelvinator KEYWORD2 -sendSherwood KEYWORD2 -sendMitsubishiAC KEYWORD2 -mark KEYWORD2 -space KEYWORD2 -reset KEYWORD2 -elapsed KEYWORD2 -calcLGChecksum KEYWORD2 -reverseBits KEYWORD2 - -####################################### -# Constants (LITERAL1) -####################################### - -NEC LITERAL1 -SONY LITERAL1 -SANYO LITERAL1 -MITSUBISHI LITERAL1 -RC5 LITERAL1 -RC5X LITERAL1 -RC6 LITERAL1 -DISH LITERAL1 -SHARP LITERAL1 -PANASONIC LITERAL1 -JVC LITERAL1 -LG LITERAL1 -SAMSUNG LITERAL1 -WHYNTER LITERAL1 -AIWA_RC_T501 LITERAL1 -COOLIX LITERAL1 -UNKNOWN LITERAL1 -REPEAT LITERAL1 -DENON LITERAL1 -DAIKIN LITERAL1 -KELVINATOR LITERAL1 -SHERWOOD LITERAL1 -MITSUBISHIAC LITERAL1 -RCMM LITERAL1 -SANYO_LC7461 LITERAL1 -NEC_BITS LITERAL1 -SHERWOOD_BITS LITERAL1 -SONY_MIN_BITS LITERAL1 -SONY_12_BITS LITERAL1 -SONY_15_BITS LITERAL1 -SONY_20_BITS LITERAL1 -SANYO_SA8650B_BITS LITERAL1 -MITSUBISHI_BITS LITERAL1 -PANASONIC_BITS LITERAL1 -JVC_BITS LITERAL1 -LG_BITS LITERAL1 -SAMSUNG_BITS LITERAL1 -COOLIX_BITS LITERAL1 -DAIKIN_BITS LITERAL1 -RC5X_BITS LITERAL1 -RC6_36_BITS LITERAL1 -RC6_MODE0_BITS LITERAL1 -RCMM_BITS LITERAL1 -WHYNTER_BITS LITERAL1 -SANYO_LC7461_BITS LITERAL1 -SHARP_BITS LITERAL1 -DISH_BITS LITERAL1 -DENON_BITS LITERAL1 -SONY_MIN_REPEAT LITERAL1 -MITSUBISHI_MIN_REPEAT LITERAL1 -DISH_MIN_REPEAT LITERAL1 -SHERWOOD_MIN_REPEAT LITERAL1 diff --git a/lib/IRremoteESP8266-2.2.1.02/src/IRrecv.h b/lib/IRremoteESP8266-2.2.1.02/src/IRrecv.h deleted file mode 100644 index febe5e2d5..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/IRrecv.h +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright 2009 Ken Shirriff -// Copyright 2015 Mark Szabo -// Copyright 2015 Sebastien Warin -// Copyright 2017 David Conran - -#ifndef IRRECV_H_ -#define IRRECV_H_ - -#ifndef UNIT_TEST -#include -#endif -#include -#define __STDC_LIMIT_MACROS -#include -#include "IRremoteESP8266.h" - -// Constants -#define HEADER 2U // Usual nr. of header entries. -#define FOOTER 2U // Usual nr. of footer (stop bits) entries. -#define OFFSET_START 1U // Usual rawbuf entry to start processing from. -#define MS_TO_USEC(x) (x * 1000U) // Convert milli-Seconds to micro-Seconds. -// Marks tend to be 100us too long, and spaces 100us too short -// when received due to sensor lag. -#define MARK_EXCESS 50U -#define RAWBUF 100U // Default length of raw capture buffer -#define REPEAT UINT64_MAX -// receiver states -#define STATE_IDLE 2U -#define STATE_MARK 3U -#define STATE_SPACE 4U -#define STATE_STOP 5U -#define TOLERANCE 25U // default percent tolerance in measurements -#define RAWTICK 2U // Capture tick to uSec factor. -// How long (ms) before we give up wait for more data? -// Don't exceed MAX_TIMEOUT_MS without a good reason. -// That is the capture buffers maximum value size. (UINT16_MAX / RAWTICK) -// Typically messages/protocols tend to repeat around the 100ms timeframe, -// thus we should timeout before that to give us some time to try to decode -// before we need to start capturing a possible new message. -// Typically 15ms suits most applications. However, some protocols demand a -// higher value. e.g. 90ms for XMP-1 and some aircon units. -#define TIMEOUT_MS 15U // In MilliSeconds. -#define MAX_TIMEOUT_MS (RAWTICK * UINT16_MAX / MS_TO_USEC(1)) - -// Use FNV hash algorithm: http://isthe.com/chongo/tech/comp/fnv/#FNV-param -#define FNV_PRIME_32 16777619UL -#define FNV_BASIS_32 2166136261UL - -// Types -// information for the interrupt handler -typedef struct { - uint8_t recvpin; // pin for IR data from detector - uint8_t rcvstate; // state machine - uint16_t timer; // state timer, counts 50uS ticks. - uint16_t bufsize; // max. nr. of entries in the capture buffer. - uint16_t *rawbuf; // raw data - // uint16_t is used for rawlen as it saves 3 bytes of iram in the interrupt - // handler. Don't ask why, I don't know. It just does. - uint16_t rawlen; // counter of entries in rawbuf. - uint8_t overflow; // Buffer overflow indicator. - uint8_t timeout; // Nr. of milliSeconds before we give up. -} irparams_t; - -// results from a data match -typedef struct { - bool success; // Was the match successful? - uint64_t data; // The data found. - uint16_t used; // How many buffer positions were used. -} match_result_t; - -// Classes - -// Results returned from the decoder -class decode_results { - public: - decode_type_t decode_type; // NEC, SONY, RC5, UNKNOWN - uint64_t value; // Decoded value - uint16_t bits; // Number of bits in decoded value - volatile uint16_t *rawbuf; // Raw intervals in .5 us ticks - uint16_t rawlen; // Number of records in rawbuf. - bool overflow; - bool repeat; // Is the result a repeat code? - uint32_t address; // Decoded device address. - uint32_t command; // Decoded command. -}; - -// main class for receiving IR -class IRrecv { - public: - explicit IRrecv(uint16_t recvpin, uint16_t bufsize = RAWBUF, - uint8_t timeout = TIMEOUT_MS, - bool save_buffer = false); // Constructor - ~IRrecv(); // Destructor - bool decode(decode_results *results, irparams_t *save = NULL); - void enableIRIn(); - void disableIRIn(); - void resume(); - uint16_t getBufSize(); - -#ifndef UNIT_TEST - - private: -#endif - irparams_t *irparams_save; - // These are called by decode - void copyIrParams(volatile irparams_t *src, irparams_t *dst); - int16_t compare(uint16_t oldval, uint16_t newval); - uint32_t ticksLow(uint32_t usecs, uint8_t tolerance = TOLERANCE); - uint32_t ticksHigh(uint32_t usecs, uint8_t tolerance = TOLERANCE); - bool match(uint32_t measured, uint32_t desired, - uint8_t tolerance = TOLERANCE); - bool matchAtLeast(uint32_t measured, uint32_t desired, - uint8_t tolerance = TOLERANCE); - bool matchMark(uint32_t measured, uint32_t desired, - uint8_t tolerance = TOLERANCE, int16_t excess = MARK_EXCESS); - bool matchSpace(uint32_t measured, uint32_t desired, - uint8_t tolerance = TOLERANCE, int16_t excess = MARK_EXCESS); - match_result_t matchData(volatile uint16_t *data_ptr, uint16_t nbits, - uint16_t onemark, uint32_t onespace, - uint16_t zeromark, uint32_t zerospace); - bool decodeHash(decode_results *results); -#if (DECODE_NEC || DECODE_SHERWOOD || DECODE_AIWA_RC_T501 || SEND_SANYO) - bool decodeNEC(decode_results *results, uint16_t nbits = NEC_BITS, - bool strict = true); -#endif -#if DECODE_SONY - bool decodeSony(decode_results *results, uint16_t nbits = SONY_MIN_BITS, - bool strict = false); -#endif -#if DECODE_SANYO - // DISABLED due to poor quality. - // bool decodeSanyo(decode_results *results, - // uint16_t nbits = SANYO_SA8650B_BITS, - // bool strict = false); - bool decodeSanyoLC7461(decode_results *results, - uint16_t nbits = SANYO_LC7461_BITS, - bool strict = true); -#endif -#if DECODE_MITSUBISHI - bool decodeMitsubishi(decode_results *results, - uint16_t nbits = MITSUBISHI_BITS, - bool strict = true); -#endif -#if (DECODE_RC5 || DECODE_R6) - int16_t getRClevel(decode_results *results, uint16_t *offset, uint16_t *used, - uint16_t bitTime); -#endif -#if DECODE_RC5 - bool decodeRC5(decode_results *results, uint16_t nbits = RC5X_BITS, - bool strict = true); -#endif -#if DECODE_RC6 - bool decodeRC6(decode_results *results, uint16_t nbits = RC6_MODE0_BITS, - bool strict = false); -#endif -#if DECODE_RCMM - bool decodeRCMM(decode_results *results, uint16_t nbits = RCMM_BITS, - bool strict = false); -#endif -#if (DECODE_PANASONIC || DECODE_DENON) - bool decodePanasonic(decode_results *results, uint16_t nbits = PANASONIC_BITS, - bool strict = false, - uint32_t manufacturer = PANASONIC_MANUFACTURER); -#endif -#if DECODE_LG - bool decodeLG(decode_results *results, uint16_t nbits = LG_BITS, - bool strict = false); -#endif -#if DECODE_JVC - bool decodeJVC(decode_results *results, uint16_t nbits = JVC_BITS, - bool strict = true); -#endif -#if DECODE_SAMSUNG - bool decodeSAMSUNG(decode_results *results, uint16_t nbits = SAMSUNG_BITS, - bool strict = true); -#endif -#if DECODE_WHYNTER - bool decodeWhynter(decode_results *results, uint16_t nbits = WHYNTER_BITS, - bool strict = true); -#endif -#if DECODE_COOLIX - bool decodeCOOLIX(decode_results *results, uint16_t nbits = COOLIX_BITS, - bool strict = true); -#endif -#if DECODE_DENON - bool decodeDenon(decode_results *results, uint16_t nbits = DENON_BITS, - bool strict = true); -#endif -#if DECODE_DISH - bool decodeDISH(decode_results *results, uint16_t nbits = DISH_BITS, - bool strict = true); -#endif -#if (DECODE_SHARP || DECODE_DENON) - bool decodeSharp(decode_results *results, uint16_t nbits = SHARP_BITS, - bool strict = true, bool expansion = true); -#endif -#if DECODE_AIWA_RC_T501 - bool decodeAiwaRCT501(decode_results *results, - uint16_t nbits = AIWA_RC_T501_BITS, bool strict = true); -#endif -#if DECODE_NIKAI - bool decodeNikai(decode_results *results, uint16_t nbits = NIKAI_BITS, - bool strict = true); -#endif -}; - -#endif // IRRECV_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/IRremoteESP8266.h b/lib/IRremoteESP8266-2.2.1.02/src/IRremoteESP8266.h deleted file mode 100644 index e2dc26904..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/IRremoteESP8266.h +++ /dev/null @@ -1,337 +0,0 @@ - /*************************************************** - * IRremote for ESP8266 - * - * Based on the IRremote library for Arduino by Ken Shirriff - * Version 0.11 August, 2009 - * Copyright 2009 Ken Shirriff - * For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html - * - * Edited by Mitra to add new controller SANYO - * - * Interrupt code based on NECIRrcv by Joe Knapp - * http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556 - * Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/ - * - * JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post) - * LG added by Darryl Smith (based on the JVC protocol) - * Whynter A/C ARC-110WD added by Francesco Meschia - * Coolix A/C / heatpump added by (send) bakrus & (decode) crankyoldgit - * Denon: sendDenon, decodeDenon added by Massimiliano Pinto - (from https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Denon.cpp) - * Kelvinator A/C and Sherwood added by crankyoldgit - * Mitsubishi (TV) sending added by crankyoldgit - * Pronto code sending added by crankyoldgit - * Mitsubishi A/C added by crankyoldgit - * (derived from https://github.com/r45635/HVAC-IR-Control) - * DISH decode by marcosamarinho - * Gree Heatpump sending added by Ville Skyttä (scop) - * (derived from https://github.com/ToniA/arduino-heatpumpir/blob/master/GreeHeatpumpIR.cpp) - * Updated by markszabo (https://github.com/markszabo/IRremoteESP8266) for sending IR code on ESP8266 - * Updated by Sebastien Warin (http://sebastien.warin.fr) for receiving IR code on ESP8266 - * - * Updated by sillyfrog for Daikin, adopted from - * (https://github.com/mharizanov/Daikin-AC-remote-control-over-the-Internet/) - * Fujitsu A/C code added by jonnygraham - * Trotec AC code by stufisher - * GPL license, all text above must be included in any redistribution - ****************************************************/ - -#ifndef IRREMOTEESP8266_H_ -#define IRREMOTEESP8266_H_ - -#define __STDC_LIMIT_MACROS -#include -#ifdef UNIT_TEST -#include -#endif - -// Library Version -#define _IRREMOTEESP8266_VERSION_ "2.2.1" -// Supported IR protocols -// Each protocol you include costs memory and, during decode, costs time -// Disable (set to false) all the protocols you do not need/want! -// -/* -#define DECODE_NEC true -#define SEND_NEC true - -#define DECODE_SHERWOOD true // Doesn't exist. Actually is DECODE_NEC -#define SEND_SHERWOOD true - -#define DECODE_RC5 true -#define SEND_RC5 true - -#define DECODE_RC6 true -#define SEND_RC6 true - -#define DECODE_RCMM true -#define SEND_RCMM true - -#define DECODE_SONY true -#define SEND_SONY true - -#define DECODE_PANASONIC true -#define SEND_PANASONIC true - -#define DECODE_JVC true -#define SEND_JVC true - -#define DECODE_SAMSUNG true -#define SEND_SAMSUNG true - -#define DECODE_WHYNTER true -#define SEND_WHYNTER true - -#define DECODE_AIWA_RC_T501 true -#define SEND_AIWA_RC_T501 true - -#define DECODE_LG true -#define SEND_LG true - -#define DECODE_SANYO true -#define SEND_SANYO true - -#define DECODE_MITSUBISHI true -#define SEND_MITSUBISHI true - -#define DECODE_DISH true -#define SEND_DISH true - -#define DECODE_SHARP true -#define SEND_SHARP true - -#define DECODE_DENON true -#define SEND_DENON true - -#define DECODE_KELVINATOR false // Not written. -#define SEND_KELVINATOR true - -#define DECODE_MITSUBISHI_AC false // Not written. -#define SEND_MITSUBISHI_AC true - -#define DECODE_FUJITSU_AC false // Not written. -#define SEND_FUJITSU_AC true - -#define DECODE_DAIKIN false // Not finished. -#define SEND_DAIKIN true - -#define DECODE_COOLIX true -#define SEND_COOLIX true - -#define DECODE_GLOBALCACHE false // Not written. -#define SEND_GLOBALCACHE true - -#define DECODE_GREE false // Not written. -#define SEND_GREE true - -#define DECODE_PRONTO false // Not written. -#define SEND_PRONTO true - -#define DECODE_ARGO false // Not written. -#define SEND_ARGO true - -#define DECODE_TROTEC false // Not implemented. -#define SEND_TROTEC true - -#define DECODE_NIKAI true -#define SEND_NIKAI true -*/ - -// Tasmota supported protocols (less protocols is less code size) -#define DECODE_NEC true -#define SEND_NEC true - -#define DECODE_SHERWOOD false // Doesn't exist. Actually is DECODE_NEC -#define SEND_SHERWOOD false - -#define DECODE_RC5 true -#define SEND_RC5 true - -#define DECODE_RC6 true -#define SEND_RC6 true - -#define DECODE_RCMM false -#define SEND_RCMM false - -#define DECODE_SONY true -#define SEND_SONY true - -#define DECODE_PANASONIC true -#define SEND_PANASONIC true - -#define DECODE_JVC true -#define SEND_JVC true - -#define DECODE_SAMSUNG true -#define SEND_SAMSUNG true - -#define DECODE_WHYNTER false -#define SEND_WHYNTER false - -#define DECODE_AIWA_RC_T501 false -#define SEND_AIWA_RC_T501 false - -#define DECODE_LG false -#define SEND_LG false - -#define DECODE_SANYO false -#define SEND_SANYO false - -#define DECODE_MITSUBISHI false -#define SEND_MITSUBISHI false - -#define DECODE_DISH false -#define SEND_DISH true - -#define DECODE_SHARP false -#define SEND_SHARP false - -#define DECODE_DENON false -#define SEND_DENON false - -#define DECODE_KELVINATOR false // Not written. -#define SEND_KELVINATOR false - -#define DECODE_MITSUBISHI_AC false // Not written. -#define SEND_MITSUBISHI_AC true - -#define DECODE_FUJITSU_AC false // Not written. -#define SEND_FUJITSU_AC false - -#define DECODE_DAIKIN false // Not finished. -#define SEND_DAIKIN false - -#define DECODE_COOLIX false -#define SEND_COOLIX false - -#define DECODE_GLOBALCACHE false // Not written. -#define SEND_GLOBALCACHE false - -#define DECODE_GREE false // Not written. -#define SEND_GREE false - -#define DECODE_PRONTO false // Not written. -#define SEND_PRONTO false - -#define DECODE_ARGO false // Not written. -#define SEND_ARGO false - -#define DECODE_TROTEC false // Not implemented. -#define SEND_TROTEC false - -#define DECODE_NIKAI false -#define SEND_NIKAI false - -/* - * Always add to the end of the list and should never remove entries - * or change order. Projects may save the type number for later usage - * so numbering should always stay the same. - */ -enum decode_type_t { - UNKNOWN = -1, - UNUSED = 0, - RC5, - RC6, - NEC, - SONY, - PANASONIC, - JVC, - SAMSUNG, - WHYNTER, - AIWA_RC_T501, - LG, - SANYO, - MITSUBISHI, - DISH, - SHARP, - COOLIX, - DAIKIN, - DENON, - KELVINATOR, - SHERWOOD, - MITSUBISHI_AC, - RCMM, - SANYO_LC7461, - RC5X, - GREE, - PRONTO, // Technically not a protocol, but an encoding. - NEC_LIKE, - ARGO, - TROTEC, - NIKAI, - RAW, // Technically not a protocol, but an encoding. - GLOBALCACHE // Technically not a protocol, but an encoding. -}; - -// Message lengths & required repeat values -#define AIWA_RC_T501_BITS 15U -#define AIWA_RC_T501_MIN_REPEAT 1U -#define COOLIX_BITS 24U -#define DAIKIN_BITS 99U -#define DAIKIN_COMMAND_LENGTH 27U -#define DENON_BITS SHARP_BITS -#define DENON_48_BITS PANASONIC_BITS -#define DENON_LEGACY_BITS 14U -#define DISH_BITS 16U -#define DISH_MIN_REPEAT 3U -#define GREE_STATE_LENGTH 8U -#define GREE_BITS (GREE_STATE_LENGTH * 8) -#define JVC_BITS 16U -#define KELVINATOR_STATE_LENGTH 16U -#define LG_BITS 28U -#define LG32_BITS 32U -#define MITSUBISHI_BITS 16U -// TODO(anyone): Verify that the Mitsubishi repeat is really needed. -#define MITSUBISHI_MIN_REPEAT 1U // Based on marcosamarinho's code. -#define MITSUBISHI_AC_STATE_LENGTH 18U -#define MITSUBISHI_AC_MIN_REPEAT 1U -#define FUJITSU_AC_MIN_REPEAT 0U -#define NEC_BITS 32U -#define PANASONIC_BITS 48U -#define PANASONIC_MANUFACTURER 0x4004ULL -#define PRONTO_MIN_LENGTH 6U -#define RC5_RAW_BITS 14U -#define RC5_BITS RC5_RAW_BITS - 2U -#define RC5X_BITS RC5_RAW_BITS - 1U -#define RC6_MODE0_BITS 20U // Excludes the 'start' bit. -#define RC6_36_BITS 36U // Excludes the 'start' bit. -#define RCMM_BITS 24U -#define SAMSUNG_BITS 32U -#define SANYO_SA8650B_BITS 12U -#define SANYO_LC7461_ADDRESS_BITS 13U -#define SANYO_LC7461_COMMAND_BITS 8U -#define SANYO_LC7461_BITS ((SANYO_LC7461_ADDRESS_BITS + \ - SANYO_LC7461_COMMAND_BITS) * 2) -#define SHARP_ADDRESS_BITS 5U -#define SHARP_COMMAND_BITS 8U -#define SHARP_BITS (SHARP_ADDRESS_BITS + SHARP_COMMAND_BITS + 2) // 15U -#define SHERWOOD_BITS NEC_BITS -#define SHERWOOD_MIN_REPEAT 1U -#define SONY_12_BITS 12U -#define SONY_15_BITS 15U -#define SONY_20_BITS 20U -#define SONY_MIN_BITS SONY_12_BITS -#define SONY_MIN_REPEAT 2U -#define TROTEC_COMMAND_LENGTH 9U -#define WHYNTER_BITS 32U -#define ARGO_COMMAND_LENGTH 12U -#define NIKAI_BITS 24U - -// Turn on Debugging information by uncommenting the following line. -// #define DEBUG 1 - -#ifdef DEBUG -#ifdef UNIT_TEST -#define DPRINT(x) do { std::cout << x; } while (0) -#define DPRINTLN(x) do { std::cout << x << std::endl; } while (0) -#endif // UNIT_TEST -#ifdef ARDUINO -#define DPRINT(x) do { Serial.print(x); } while (0) -#define DPRINTLN(x) do { Serial.println(x); } while (0) -#endif // ARDUINO -#else // DEBUG -#define DPRINT(x) -#define DPRINTLN(x) -#endif // DEBUG - -#endif // IRREMOTEESP8266_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/IRsend.cpp b/lib/IRremoteESP8266-2.2.1.02/src/IRsend.cpp deleted file mode 100644 index 300b1fa99..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/IRsend.cpp +++ /dev/null @@ -1,327 +0,0 @@ -// Copyright 2009 Ken Shirriff -// Copyright 2015 Mark Szabo -// Copyright 2017 David Conran - -#include "IRsend.h" -#ifndef UNIT_TEST -#include -#else -#define __STDC_LIMIT_MACROS -#include -#endif -#include -#ifdef UNIT_TEST -#include -#endif -#include "IRtimer.h" - -// Originally from https://github.com/shirriff/Arduino-IRremote/ -// Updated by markszabo (https://github.com/markszabo/IRremoteESP8266) for -// sending IR code on ESP8266 - -// IRsend ---------------------------------------------------------------------- -// Create an IRsend object. -// -// Args: -// IRsendPin: Which GPIO pin to use when sending an IR command. -// inverted: *DANGER* Optional flag to invert the output. (default = false) -// e.g. LED is illuminated when GPIO is LOW rather than HIGH. -// Setting this to something other than the default could -// easily destroy your IR LED if you are overdriving it. -// Unless you *REALLY* know what you are doing, don't change this. -// Returns: -// An IRsend object. -IRsend::IRsend(uint16_t IRsendPin, bool inverted) : IRpin(IRsendPin), - periodOffset(PERIOD_OFFSET) { - if (inverted) { - outputOn = LOW; - outputOff = HIGH; - } else { - outputOn = HIGH; - outputOff = LOW; - } -} - -// Enable the pin for output. -void IRsend::begin() { -#ifndef UNIT_TEST - pinMode(IRpin, OUTPUT); -#endif -} - -// Turn off the IR LED. -void IRsend::ledOff() { -#ifndef UNIT_TEST - digitalWrite(IRpin, outputOff); -#endif -} - -// Calculate the period for a given frequency. (T = 1/f) -// -// Args: -// freq: Frequency in Hz. -// use_offset: Should we use the calculated offset or not? -// Returns: -// nr. of uSeconds. -uint32_t IRsend::calcUSecPeriod(uint32_t hz, bool use_offset) { - if (hz == 0) hz = 1; // Avoid Zero hz. Divide by Zero is nasty. - uint32_t period = (1000000UL + hz/2) / hz; // The equiv of round(1000000/hz). - // Apply the offset and ensure we don't result in a <= 0 value. - if (use_offset) - return std::max((uint32_t) 1, period + periodOffset); - else - return std::max((uint32_t) 1, period); -} - -// Set the output frequency modulation and duty cycle. -// -// Args: -// freq: The freq we want to modulate at. Assumes < 1000 means kHz else Hz. -// duty: Percentage duty cycle of the LED. e.g. 25 = 25% = 1/4 on, 3/4 off. -// -// Note: -// Integer timing functions & math mean we can't do fractions of -// microseconds timing. Thus minor changes to the freq & duty values may have -// limited effect. You've been warned. -void IRsend::enableIROut(uint32_t freq, uint8_t duty) { - // Can't have more than 100% duty cycle. - duty = std::min(duty, (uint8_t) 100); - if (freq < 1000) // Were we given kHz? Supports the old call usage. - freq *= 1000; - uint32_t period = calcUSecPeriod(freq); - // Nr. of uSeconds the LED will be on per pulse. - onTimePeriod = (period * duty) / 100; - // Nr. of uSeconds the LED will be off per pulse. - offTimePeriod = period - onTimePeriod; -} - -// Modulate the IR LED for the given period (usec) and at the duty cycle set. -// -// Args: -// usec: The period of time to modulate the IR LED for, in microseconds. -// Returns: -// Nr. of pulses actually sent. -// -// Note: -// The ESP8266 has no good way to do hardware PWM, so we have to do it all -// in software. There is a horrible kludge/brilliant hack to use the second -// serial TX line to do fairly accurate hardware PWM, but it is only -// available on a single specific GPIO and only available on some modules. -// e.g. It's not available on the ESP-01 module. -// Hence, for greater compatibility & choice, we don't use that method. -// Ref: -// https://www.analysir.com/blog/2017/01/29/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals/ -uint16_t IRsend::mark(uint16_t usec) { - uint16_t counter = 0; - IRtimer usecTimer = IRtimer(); - // Cache the time taken so far. This saves us calling time, and we can be - // assured that we can't have odd math problems. i.e. unsigned under/overflow. - uint32_t elapsed = usecTimer.elapsed(); - - while (elapsed < usec) { // Loop until we've met/exceeded our required time. -#ifndef UNIT_TEST - digitalWrite(IRpin, outputOn); // Turn the LED on. - // Calculate how long we should pulse on for. - // e.g. Are we to close to the end of our requested mark time (usec)? - delayMicroseconds(std::min((uint32_t) onTimePeriod, usec - elapsed)); - digitalWrite(IRpin, outputOff); // Turn the LED off. -#endif - counter++; - if (elapsed + onTimePeriod >= usec) - return counter; // LED is now off & we've passed our allotted time. - // Wait for the lesser of the rest of the duty cycle, or the time remaining. -#ifndef UNIT_TEST - delayMicroseconds(std::min(usec - elapsed - onTimePeriod, - (uint32_t) offTimePeriod)); -#endif - elapsed = usecTimer.elapsed(); // Update & recache the actual elapsed time. - } - return counter; -} - -// Turn the pin (LED) off for a given time. -// Sends an IR space for the specified number of microseconds. -// A space is no output, so the PWM output is disabled. -// -// Args: -// time: Time in microseconds (us). -void IRsend::space(uint32_t time) { - ledOff(); - if (time == 0) return; -#ifndef UNIT_TEST - // delayMicroseconds is only accurate to 16383us. - // Ref: https://www.arduino.cc/en/Reference/delayMicroseconds - if (time <= 16383) { - delayMicroseconds(time); - } else { - // Invoke a delay(), where possible, to avoid triggering the WDT. - delay(time / 1000UL); // Delay for as many whole milliseconds as we can. - // Delay the remaining sub-millisecond. - delayMicroseconds(static_cast(time % 1000UL)); - } -#endif -} - -// Calculate & set any offsets to account for execution times. -// -// Args: -// hz: The frequency to calibrate at >= 1000Hz. Default is 38000Hz. -// -// Status: ALPHA / Untested. -// -// NOTE: -// This will generate an 65535us mark() IR LED signal. -// This only needs to be called once, if at all. -void IRsend::calibrate(uint16_t hz) { - if (hz < 1000) // Were we given kHz? Supports the old call usage. - hz *= 1000; - periodOffset = 0; // Turn off any existing offset while we calibrate. - enableIROut(hz); - IRtimer usecTimer = IRtimer(); // Start a timer *just* before we do the call. - uint16_t pulses = mark(UINT16_MAX); // Generate a PWM of 65,535 us. (Max.) - uint32_t timeTaken = usecTimer.elapsed(); // Record the time it took. - // While it shouldn't be necessary, assume at least 1 pulse, to avoid a - // divide by 0 situation. - pulses = std::max(pulses, (uint16_t) 1U); - uint32_t calcPeriod = calcUSecPeriod(hz); // e.g. @38kHz it should be 26us. - // Assuming 38kHz for the example calculations: - // In a 65535us pulse, we should have 2520.5769 pulses @ 26us periods. - // e.g. 65535.0us / 26us = 2520.5769 - // This should have caused approx 2520 loops through the main loop in mark(). - // The average over that many interations should give us a reasonable - // approximation at what offset we need to use to account for instruction - // execution times. - // - // Calculate the actual period from the actual time & the actual pulses - // generated. - double_t actualPeriod = (double_t) timeTaken / (double_t) pulses; - // Store the difference between the actual time per period vs. calculated. - periodOffset = (int8_t) ((double_t) calcPeriod - actualPeriod); -} - -// Generic method for sending data that is common to most protocols. -// Will send leading or trailing 0's if the nbits is larger than the number -// of bits in data. -// -// Args: -// onemark: Nr. of usecs for the led to be pulsed for a '1' bit. -// onespace: Nr. of usecs for the led to be fully off for a '1' bit. -// zeromark: Nr. of usecs for the led to be pulsed for a '0' bit. -// zerospace: Nr. of usecs for the led to be fully off for a '0' bit. -// data: The data to be transmitted. -// nbits: Nr. of bits of data to be sent. -// MSBfirst: Flag for bit transmission order. Defaults to MSB->LSB order. -void IRsend::sendData(uint16_t onemark, uint32_t onespace, - uint16_t zeromark, uint32_t zerospace, - uint64_t data, uint16_t nbits, bool MSBfirst) { - if (nbits == 0) // If we are asked to send nothing, just return. - return; - if (MSBfirst) { // Send the MSB first. - // Send 0's until we get down to a bit size we can actually manage. - while (nbits > sizeof(data) * 8) { - mark(zeromark); - space(zerospace); - nbits--; - } - // Send the supplied data. - for (uint64_t mask = 1ULL << (nbits - 1); mask; mask >>= 1) - if (data & mask) { // Send a 1 - mark(onemark); - space(onespace); - } else { // Send a 0 - mark(zeromark); - space(zerospace); - } - } else { // Send the Least Significant Bit (LSB) first / MSB last. - for (uint16_t bit = 0; bit < nbits; bit++, data >>= 1) - if (data & 1) { // Send a 1 - mark(onemark); - space(onespace); - } else { // Send a 0 - mark(zeromark); - space(zerospace); - } - } -} - -// Send a raw IRremote message. -// -// Args: -// buf: An array of uint16_t's that has microseconds elements. -// len: Nr. of elements in the buf[] array. -// hz: Frequency to send the message at. (kHz < 1000; Hz >= 1000) -// -// Status: STABLE / Known working. -// -// Notes: -// Even elements are Mark times (On), Odd elements are Space times (Off). -// -// Ref: -// examples/IRrecvDumpV2/IRrecvDumpV2.ino -void IRsend::sendRaw(uint16_t buf[], uint16_t len, uint16_t hz) { - // Set IR carrier frequency - enableIROut(hz); - for (uint16_t i = 0; i < len; i++) { - if (i & 1) { // Odd bit. - space(buf[i]); - } else { // Even bit. - mark(buf[i]); - } - } - ledOff(); // We potentially have ended with a mark(), so turn of the LED. -} - -#ifndef UNIT_TEST -void IRsend::send(uint16_t type, uint64_t data, uint16_t nbits) { - switch (type) { -#if SEND_NEC - case NEC: sendNEC(data, nbits); break; -#endif -#if SEND_SONY - case SONY: sendSony(data, nbits); break; -#endif -#if SEND_RC5 - case RC5: sendRC5(data, nbits); break; -#endif -#if SEND_RC6 - case RC6: sendRC6(data, nbits); break; -#endif -#if SEND_DISH - case DISH: sendDISH(data, nbits); break; -#endif -#if SEND_JVC - case JVC: sendJVC(data, nbits); break; -#endif -#if SEND_SAMSUNG - case SAMSUNG: sendSAMSUNG(data, nbits); break; -#endif -#if SEND_LG - case LG: sendLG(data, nbits); break; -#endif -#if SEND_WHYNTER - case WHYNTER: sendWhynter(data, nbits); break; -#endif -#if SEND_COOLIX - case COOLIX: sendCOOLIX(data, nbits); break; -#endif -#if SEND_DENON - case DENON: sendDenon(data, nbits); break; -#endif -#if SEND_SHERWOOD - case SHERWOOD: sendSherwood(data, nbits); break; -#endif -#if SEND_RCMM - case RCMM: sendRCMM(data, nbits); break; -#endif -#if SEND_MITSUBISHI - case MITSUBISHI: sendMitsubishi(data, nbits); break; -#endif -#if SEND_SHARP - case SHARP: sendSharpRaw(data, nbits); break; -#endif -#if SEND_AIWA_RC_T501 - case AIWA_RC_T501: sendAiwaRCT501(data, nbits); break; -#endif - } -} -#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/src/IRsend.h b/lib/IRremoteESP8266-2.2.1.02/src/IRsend.h deleted file mode 100644 index 87c1fdd9a..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/IRsend.h +++ /dev/null @@ -1,209 +0,0 @@ -// Copyright 2009 Ken Shirriff -// Copyright 2015 Mark Szabo -// Copyright 2017 David Conran -#ifndef IRSEND_H_ -#define IRSEND_H_ - -#define __STDC_LIMIT_MACROS -#include -#include "IRremoteESP8266.h" - -// Originally from https://github.com/shirriff/Arduino-IRremote/ -// Updated by markszabo (https://github.com/markszabo/IRremoteESP8266) for -// sending IR code on ESP8266 - -#if TEST || UNIT_TEST -#define VIRTUAL virtual -#else -#define VIRTUAL -#endif - -// Constants -// Offset (in microseconds) to use in Period time calculations to account for -// code excution time in producing the software PWM signal. -// Value determined in https://github.com/markszabo/IRremoteESP8266/issues/62 -#define PERIOD_OFFSET -3 -#define DUTY_DEFAULT 50 - -// Classes -class IRsend { - public: - explicit IRsend(uint16_t IRsendPin, bool inverted = false); - void begin(); - void enableIROut(uint32_t freq, uint8_t duty = DUTY_DEFAULT); - VIRTUAL uint16_t mark(uint16_t usec); - VIRTUAL void space(uint32_t usec); - void calibrate(uint16_t hz = 38000U); - void sendRaw(uint16_t buf[], uint16_t len, uint16_t hz); - void sendData(uint16_t onemark, uint32_t onespace, uint16_t zeromark, - uint32_t zerospace, uint64_t data, uint16_t nbits, - bool MSBfirst = true); - void send(uint16_t type, uint64_t data, uint16_t nbits); -#if (SEND_NEC || SEND_SHERWOOD || SEND_AIWA_RC_T501 || SEND_SANYO) - void sendNEC(uint64_t data, uint16_t nbits = NEC_BITS, uint16_t repeat = 0); - uint32_t encodeNEC(uint16_t address, uint16_t command); -#endif -#if SEND_SONY - // sendSony() should typically be called with repeat=2 as Sony devices - // expect the code to be sent at least 3 times. (code + 2 repeats = 3 codes) - // Legacy use of this procedure was to only send a single code so call it with - // repeat=0 for backward compatibility. As of v2.0 it defaults to sending - // a Sony command that will be accepted be a device. - void sendSony(uint64_t data, uint16_t nbits = SONY_20_BITS, - uint16_t repeat = SONY_MIN_REPEAT); - uint32_t encodeSony(uint16_t nbits, uint16_t command, uint16_t address, - uint16_t extended = 0); -#endif -#if SEND_SHERWOOD - void sendSherwood(uint64_t data, uint16_t nbits = SHERWOOD_BITS, - uint16_t repeat = SHERWOOD_MIN_REPEAT); -#endif -#if SEND_SAMSUNG - void sendSAMSUNG(uint64_t data, uint16_t nbits = SAMSUNG_BITS, - uint16_t repeat = 0); - uint32_t encodeSAMSUNG(uint8_t customer, uint8_t command); -#endif -#if SEND_LG - void sendLG(uint64_t data, uint16_t nbits = LG_BITS, uint16_t repeat = 0); - uint32_t encodeLG(uint16_t address, uint16_t command); -#endif -#if (SEND_SHARP || SEND_DENON) - uint32_t encodeSharp(uint16_t address, uint16_t command, - uint16_t expansion = 1, uint16_t check = 0, - bool MSBfirst = false); - void sendSharp(uint16_t address, uint16_t command, - uint16_t nbits = SHARP_BITS, uint16_t repeat = 0); - void sendSharpRaw(uint64_t data, uint16_t nbits = SHARP_BITS, - uint16_t repeat = 0); -#endif -#if SEND_JVC - void sendJVC(uint64_t data, uint16_t nbits = JVC_BITS, uint16_t repeat = 0); - uint16_t encodeJVC(uint8_t address, uint8_t command); -#endif -#if SEND_DENON - void sendDenon(uint64_t data, uint16_t nbits = DENON_BITS, - uint16_t repeat = 0); -#endif -#if SEND_SANYO - uint64_t encodeSanyoLC7461(uint16_t address, uint8_t command); - void sendSanyoLC7461(uint64_t data, uint16_t nbits = SANYO_LC7461_BITS, - uint16_t repeat = 0); -#endif -#if SEND_DISH - // sendDISH() should typically be called with repeat=3 as DISH devices - // expect the code to be sent at least 4 times. (code + 3 repeats = 4 codes) - // Legacy use of this procedure was only to send a single code - // so use repeat=0 for backward compatibility. - void sendDISH(uint64_t data, uint16_t nbits = DISH_BITS, - uint16_t repeat = DISH_MIN_REPEAT); -#endif -#if (SEND_PANASONIC || SEND_DENON) - void sendPanasonic64(uint64_t data, uint16_t nbits = PANASONIC_BITS, - uint16_t repeat = 0); - void sendPanasonic(uint16_t address, uint32_t data, - uint16_t nbits = PANASONIC_BITS, uint16_t repeat = 0); - uint64_t encodePanasonic(uint16_t manufacturer, uint8_t device, - uint8_t subdevice, uint8_t function); -#endif -#if SEND_RC5 - void sendRC5(uint64_t data, uint16_t nbits = RC5X_BITS, uint16_t repeat = 0); - uint16_t encodeRC5(uint8_t address, uint8_t command, - bool key_released = false); - uint16_t encodeRC5X(uint8_t address, uint8_t command, - bool key_released = false); - uint64_t toggleRC5(uint64_t data); -#endif -#if SEND_RC6 - void sendRC6(uint64_t data, uint16_t nbits = RC6_MODE0_BITS, - uint16_t repeat = 0); - uint64_t encodeRC6(uint32_t address, uint8_t command, - uint16_t mode = RC6_MODE0_BITS); - uint64_t toggleRC6(uint64_t data, uint16_t nbits = RC6_MODE0_BITS); -#endif -#if SEND_RCMM - void sendRCMM(uint64_t data, uint16_t nbits = RCMM_BITS, uint16_t repeat = 0); -#endif -#if SEND_COOLIX - void sendCOOLIX(uint64_t data, uint16_t nbits = COOLIX_BITS, - uint16_t repeat = 0); -#endif -#if SEND_WHYNTER - void sendWhynter(uint64_t data, uint16_t nbits = WHYNTER_BITS, - uint16_t repeat = 0); -#endif -#if SEND_MITSUBISHI - void sendMitsubishi(uint64_t data, uint16_t nbits = MITSUBISHI_BITS, - uint16_t repeat = MITSUBISHI_MIN_REPEAT); -#endif -#if SEND_MITSUBISHI_AC - void sendMitsubishiAC(unsigned char data[], - uint16_t nbytes = MITSUBISHI_AC_STATE_LENGTH, - uint16_t repeat = MITSUBISHI_AC_MIN_REPEAT); -#endif -#if SEND_FUJITSU_AC - void sendFujitsuAC(unsigned char data[], - uint16_t nbytes, - uint16_t repeat = FUJITSU_AC_MIN_REPEAT); -#endif -#if SEND_GLOBALCACHE - void sendGC(uint16_t buf[], uint16_t len); -#endif -#if SEND_KELVINATOR - void sendKelvinator(unsigned char data[], - uint16_t nbytes = KELVINATOR_STATE_LENGTH, - uint16_t repeat = 0); -#endif -#if SEND_DAIKIN - void sendDaikin(unsigned char data[], - uint16_t nbytes = DAIKIN_COMMAND_LENGTH, - uint16_t repeat = 0); -#endif -#if SEND_AIWA_RC_T501 - void sendAiwaRCT501(uint64_t data, uint16_t nbits = AIWA_RC_T501_BITS, - uint16_t repeat = AIWA_RC_T501_MIN_REPEAT); -#endif -#if SEND_GREE - void sendGree(uint64_t data, uint16_t nbits = GREE_BITS, uint16_t repeat = 0); - void sendGree(uint8_t data[], uint16_t nbytes = GREE_STATE_LENGTH, - uint16_t repeat = 0); -#endif -#if SEND_PRONTO - void sendPronto(uint16_t data[], uint16_t len, uint16_t repeat = 0); -#endif -#if SEND_ARGO - void sendArgo(unsigned char data[], - uint16_t nbytes = ARGO_COMMAND_LENGTH, - uint16_t repeat = 0); -#endif -#if SEND_TROTEC - void sendTrotec(unsigned char data[], - uint16_t nbytes = TROTEC_COMMAND_LENGTH, - uint16_t repeat = 0); -#endif -#if SEND_NIKAI - void sendNikai(uint64_t data, uint16_t nbits = NIKAI_BITS, - uint16_t repeat = 0); -#endif - - protected: -#ifdef UNIT_TEST -#ifndef HIGH -#define HIGH 0x1 -#endif -#ifndef LOW -#define LOW 0x0 -#endif -#endif // UNIT_TEST - uint8_t outputOn; - uint8_t outputOff; - - private: - uint16_t onTimePeriod; - uint16_t offTimePeriod; - uint16_t IRpin; - int8_t periodOffset; - void ledOff(); - uint32_t calcUSecPeriod(uint32_t hz, bool use_offset = true); -}; - -#endif // IRSEND_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/IRutils.cpp b/lib/IRremoteESP8266-2.2.1.02/src/IRutils.cpp deleted file mode 100644 index 22b4bb3b7..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/IRutils.cpp +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRutils.h" -#ifndef UNIT_TEST -#include -#endif - -#define __STDC_LIMIT_MACROS -#include -#include -#ifndef ARDUINO -#include -#endif -#include "IRrecv.h" - -// Reverse the order of the requested least significant nr. of bits. -// Args: -// input: Bit pattern/integer to reverse. -// nbits: Nr. of bits to reverse. -// Returns: -// The reversed bit pattern. -uint64_t reverseBits(uint64_t input, uint16_t nbits) { - if (nbits <= 1) - return input; // Reversing <= 1 bits makes no change at all. - // Cap the nr. of bits to rotate to the max nr. of bits in the input. - nbits = std::min(nbits, (uint16_t) (sizeof(input) * 8)); - uint64_t output = 0; - for (uint16_t i = 0; i < nbits; i++) { - output <<= 1; - output |= (input & 1); - input >>= 1; - } - // Merge any remaining unreversed bits back to the top of the reversed bits. - return (input << nbits) | output; -} - -// Convert a uint64_t (unsigned long long) to a string. -// Arduino String/toInt/Serial.print() can't handle printing 64 bit values. -// -// Args: -// input: The value to print -// base: The output base. -// Returns: -// A string representation of the integer. -// Note: Based on Arduino's Print::printNumber() -#ifdef ARDUINO // Arduino's & C++'s string implementations can't co-exist. -String uint64ToString(uint64_t input, uint8_t base) { - String result = ""; -#else -std::string uint64ToString(uint64_t input, uint8_t base) { - std::string result = ""; -#endif - // prevent issues if called with base <= 1 - if (base < 2) base = 10; - // Check we have a base that we can actually print. - // i.e. [0-9A-Z] == 36 - if (base > 36) base = 10; - - do { - char c = input % base; - input /= base; - - if (c < 10) - c +='0'; - else - c += 'A' - 10; - result = c + result; - } while (input); - return result; -} - -#ifdef ARDUINO -// Print a uint64_t/unsigned long long to the Serial port -// Serial.print() can't handle printing long longs. (uint64_t) -// -// Args: -// input: The value to print -// base: The output base. -void serialPrintUint64(uint64_t input, uint8_t base) { - Serial.print(uint64ToString(input, base)); -} -#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/src/IRutils.h b/lib/IRremoteESP8266-2.2.1.02/src/IRutils.h deleted file mode 100644 index eb3f1d8ee..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/IRutils.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef IRUTILS_H_ -#define IRUTILS_H_ - -// Copyright 2017 David Conran - -#ifndef UNIT_TEST -#include -#endif -#define __STDC_LIMIT_MACROS -#include -#ifndef ARDUINO -#include -#endif - -uint64_t reverseBits(uint64_t input, uint16_t nbits); -#ifdef ARDUINO // Arduino's & C++'s string implementations can't co-exist. -String uint64ToString(uint64_t input, uint8_t base = 10); -#else -std::string uint64ToString(uint64_t input, uint8_t base = 10); -#endif -void serialPrintUint64(uint64_t input, uint8_t base = 10); - -#endif // IRUTILS_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Coolix.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_Coolix.cpp deleted file mode 100644 index f664d6ad7..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Coolix.cpp +++ /dev/null @@ -1,167 +0,0 @@ -// Copyright bakrus -// Copyright 2017 David Conran - -#include "IRrecv.h" -#include "IRsend.h" -#include "IRtimer.h" -#include "IRutils.h" - -// CCCCC OOOOO OOOOO LL IIIII XX XX -// CC C OO OO OO OO LL III XX XX -// CC OO OO OO OO LL III XXXX -// CC C OO OO OO OO LL III XX XX -// CCCCC OOOO0 OOOO0 LLLLLLL IIIII XX XX - -// Coolix A/C / heatpump added by (send) bakrus & (decode) crankyoldgit - -// Constants -// Pulse parms are *50-100 for the Mark and *50+100 for the space -// First MARK is the one after the long gap -// pulse parameters in usec -#define COOLIX_TICK 560U // Approximately 21 cycles at 38kHz -#define COOLIX_BIT_MARK_TICKS 1U -#define COOLIX_BIT_MARK (COOLIX_BIT_MARK_TICKS * COOLIX_TICK) -#define COOLIX_ONE_SPACE_TICKS 3U -#define COOLIX_ONE_SPACE (COOLIX_ONE_SPACE_TICKS * COOLIX_TICK) -#define COOLIX_ZERO_SPACE_TICKS 1U -#define COOLIX_ZERO_SPACE (COOLIX_ZERO_SPACE_TICKS * COOLIX_TICK) -#define COOLIX_HDR_MARK_TICKS 8U -#define COOLIX_HDR_MARK (COOLIX_HDR_MARK_TICKS * COOLIX_TICK) -#define COOLIX_HDR_SPACE_TICKS 8U -#define COOLIX_HDR_SPACE (COOLIX_HDR_SPACE_TICKS * COOLIX_TICK) -#define COOLIX_MIN_GAP_TICKS (COOLIX_HDR_MARK_TICKS + \ - COOLIX_ZERO_SPACE_TICKS) -#define COOLIX_MIN_GAP (COOLIX_MIN_GAP_TICKS * COOLIX_TICK) - -#if SEND_COOLIX -// Send a Coolix message -// -// Args: -// data: Contents of the message to be sent. -// nbits: Nr. of bits of data to be sent. Typically COOLIX_BITS. -// repeat: Nr. of additional times the message is to be sent. -// -// Status: BETA / Probably works. -// -// Ref: -// https://github.com/z3t0/Arduino-IRremote/blob/master/ir_COOLIX.cpp -// TODO(anyone): Verify repeat functionality against a real unit. -void IRsend::sendCOOLIX(uint64_t data, uint16_t nbits, uint16_t repeat) { - if (nbits % 8 != 0) - return; // nbits is required to be a multiple of 8. - - // Set IR carrier frequency - enableIROut(38); - - for (uint16_t r = 0; r <= repeat; r++) { - // Header - mark(COOLIX_HDR_MARK); - space(COOLIX_HDR_SPACE); - - // Data - // Break data into byte segments, starting at the Most Significant - // Byte. Each byte then being sent normal, then followed inverted. - for (uint16_t i = 8; i <= nbits; i += 8) { - // Grab a bytes worth of data. - uint8_t segment = (data >> (nbits - i)) & 0xFF; - // Normal - sendData(COOLIX_BIT_MARK, COOLIX_ONE_SPACE, - COOLIX_BIT_MARK, COOLIX_ZERO_SPACE, - segment, 8, true); - // Inverted. - sendData(COOLIX_BIT_MARK, COOLIX_ONE_SPACE, - COOLIX_BIT_MARK, COOLIX_ZERO_SPACE, - segment ^ 0xFF, 8, true); - } - - // Footer - mark(COOLIX_BIT_MARK); - space(COOLIX_MIN_GAP); // Pause before repeating - } -} -#endif - -#if DECODE_COOLIX -// Decode the supplied Coolix message. -// -// Args: -// results: Ptr to the data to decode and where to store the decode result. -// nbits: The number of data bits to expect. Typically COOLIX_BITS. -// strict: Flag indicating if we should perform strict matching. -// Returns: -// boolean: True if it can decode it, false if it can't. -// -// Status: BETA / Probably working. -bool IRrecv::decodeCOOLIX(decode_results *results, uint16_t nbits, - bool strict) { - // The protocol sends the data normal + inverted, alternating on - // each byte. Hence twice the number of expected data bits. - if (results->rawlen < 2 * 2 * nbits + HEADER + FOOTER - 1) - return false; // Can't possibly be a valid COOLIX message. - if (strict && nbits != COOLIX_BITS) - return false; // Not strictly an COOLIX message. - if (nbits % 8 != 0) // nbits has to be a multiple of nr. of bits in a byte. - return false; - - uint64_t data = 0; - uint64_t inverted = 0; - uint16_t offset = OFFSET_START; - - if (nbits > sizeof(data) * 8) - return false; // We can't possibly capture a Coolix packet that big. - - // Header - if (!matchMark(results->rawbuf[offset], COOLIX_HDR_MARK)) return false; - // Calculate how long the common tick time is based on the header mark. - uint32_t m_tick = results->rawbuf[offset++] * RAWTICK / COOLIX_HDR_MARK_TICKS; - if (!matchSpace(results->rawbuf[offset], COOLIX_HDR_SPACE)) return false; - // Calculate how long the common tick time is based on the header space. - uint32_t s_tick = results->rawbuf[offset++] * RAWTICK / - COOLIX_HDR_SPACE_TICKS; - - // Data - // Twice as many bits as there are normal plus inverted bits. - for (uint16_t i = 0; i < nbits * 2; i++, offset++) { - bool flip = (i / 8) % 2; - if (!matchMark(results->rawbuf[offset++], COOLIX_BIT_MARK_TICKS * m_tick)) - return false; - if (matchSpace(results->rawbuf[offset], COOLIX_ONE_SPACE_TICKS * s_tick)) { - if (flip) - inverted = (inverted << 1) | 1; - else - data = (data << 1) | 1; - } else if (matchSpace(results->rawbuf[offset], - COOLIX_ZERO_SPACE_TICKS * s_tick)) { - if (flip) - inverted <<= 1; - else - data <<= 1; - } else { - return false; - } - } - - // Footer - if (!matchMark(results->rawbuf[offset++], COOLIX_BIT_MARK_TICKS * m_tick)) - return false; - if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], COOLIX_MIN_GAP_TICKS * s_tick)) - return false; - - // Compliance - uint64_t orig = data; // Save a copy of the data. - if (strict) { - for (uint16_t i = 0; i < nbits; i += 8, data >>= 8, inverted >>= 8) - if ((data & 0xFF) != ((inverted & 0xFF) ^ 0xFF)) - return false; - } - - // Success - results->decode_type = COOLIX; - results->bits = nbits; - results->value = orig; - results->address = 0; - results->command = 0; - return true; -} -#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Daikin.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_Daikin.cpp deleted file mode 100644 index f57b67608..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Daikin.cpp +++ /dev/null @@ -1,347 +0,0 @@ -/* -An Arduino sketch to emulate IR Daikin ARC433** remote control unit -Read more at: -http://harizanov.com/2012/02/control-daikin-air-conditioner-over-the-internet/ - -Copyright 2016 sillyfrog -*/ - -#include "ir_Daikin.h" -#include -#include "IRremoteESP8266.h" -#include "IRutils.h" - -// DDDDD AAA IIIII KK KK IIIII NN NN -// DD DD AAAAA III KK KK III NNN NN -// DD DD AA AA III KKKK III NN N NN -// DD DD AAAAAAA III KK KK III NN NNN -// DDDDDD AA AA IIIII KK KK IIIII NN NN - -// Constants -// Ref: -// https://github.com/mharizanov/Daikin-AC-remote-control-over-the-Internet/tree/master/IRremote -#define DAIKIN_HDR_MARK 3650U // DAIKIN_ZERO_MARK * 8 -#define DAIKIN_HDR_SPACE 1623U // DAIKIN_ZERO_MARK * 4 -#define DAIKIN_ONE_SPACE 1280U -#define DAIKIN_ONE_MARK 428U -#define DAIKIN_ZERO_MARK 428U -#define DAIKIN_ZERO_SPACE 428U -#define DAIKIN_GAP 29000U - -#if SEND_DAIKIN -// Send a Daikin A/C message. -// -// Args: -// data: An array of DAIKIN_COMMAND_LENGTH bytes containing the IR command. -// -// Status: STABLE -// -// Ref: -// IRDaikinESP.cpp -// https://github.com/mharizanov/Daikin-AC-remote-control-over-the-Internet/tree/master/IRremote -void IRsend::sendDaikin(unsigned char data[], uint16_t nbytes, - uint16_t repeat) { - if (nbytes < DAIKIN_COMMAND_LENGTH) - return; // Not enough bytes to send a proper message. - // Set IR carrier frequency - enableIROut(38); - for (uint16_t r = 0; r <= repeat; r++) { - // Header #1 - mark(DAIKIN_HDR_MARK); - space(DAIKIN_HDR_SPACE); - // Data #1 - for (uint16_t i = 0; i < 8 && i < nbytes; i++) - sendData(DAIKIN_ONE_MARK, DAIKIN_ONE_SPACE, DAIKIN_ZERO_MARK, - DAIKIN_ZERO_SPACE, data[i], 8, false); - // Footer #1 - mark(DAIKIN_ONE_MARK); - space(DAIKIN_ZERO_SPACE + DAIKIN_GAP); - - // Header #2 - mark(DAIKIN_HDR_MARK); - space(DAIKIN_HDR_SPACE); - // Data #2 - for (uint16_t i = 8; i < nbytes; i++) - sendData(DAIKIN_ONE_MARK, DAIKIN_ONE_SPACE, DAIKIN_ZERO_MARK, - DAIKIN_ZERO_SPACE, data[i], 8, false); - // Footer #2 - mark(DAIKIN_ONE_MARK); - space(DAIKIN_ZERO_SPACE + DAIKIN_GAP); - } -} - -IRDaikinESP::IRDaikinESP(uint16_t pin) : _irsend(pin) { - stateReset(); -} - -void IRDaikinESP::begin() { - _irsend.begin(); -} - -void IRDaikinESP::send() { - _irsend.sendDaikin(daikin); -} - -void IRDaikinESP::checksum() { - uint8_t sum = 0; - uint8_t i; - - for (i = 0; i <= 6; i++) - sum += daikin[i]; - - daikin[7] = sum & 0xFF; - sum = 0; - for (i = 8; i <= 25; i++) - sum += daikin[i]; - daikin[26] = sum & 0xFF; -} - - -void IRDaikinESP::stateReset() { - for (uint8_t i = 4; i < DAIKIN_COMMAND_LENGTH; i++) - daikin[i] = 0x0; - - daikin[0] = 0x11; - daikin[1] = 0xDA; - daikin[2] = 0x27; - daikin[3] = 0xF0; - daikin[7] = 0x20; - daikin[8] = 0x11; - daikin[9] = 0xDA; - daikin[10] = 0x27; - daikin[13] = 0x41; - daikin[14] = 0x1E; - daikin[16] = 0xB0; - daikin[23] = 0xC0; - daikin[26] = 0xE3; - checksum(); -} - -uint8_t* IRDaikinESP::getRaw() { - checksum(); // Ensure correct settings before sending. - return daikin; -} - -void IRDaikinESP::on() { - // state = ON; - daikin[13] |= 0x01; - checksum(); -} - -void IRDaikinESP::off() { - // state = OFF; - daikin[13] &= 0xFE; - checksum(); -} - -void IRDaikinESP::setPower(bool state) { - if (state) - on(); - else - off(); -} - -uint8_t IRDaikinESP::getPower() { - return daikin[13] & 0x01; -} - -// DAIKIN_SILENT or DAIKIN_POWERFUL -void IRDaikinESP::setAux(uint8_t aux) { - daikin[21] = aux; - checksum(); -} - -uint8_t IRDaikinESP::getAux() { - return daikin[21]; -} - -void IRDaikinESP::setQuiet(bool state) { - if (state) - setAux(DAIKIN_SILENT); - else - setAux(0x0); -} - -bool IRDaikinESP::getQuiet() { - return (getAux() == DAIKIN_SILENT); -} - -void IRDaikinESP::setPowerful(bool state) { - if (state) - setAux(DAIKIN_POWERFUL); - else - setAux(0x0); -} - -bool IRDaikinESP::getPowerful() { - return (getAux() == DAIKIN_POWERFUL); -} - -// Set the temp in deg C -void IRDaikinESP::setTemp(uint8_t temp) { - if (temp < DAIKIN_MIN_TEMP) - temp = DAIKIN_MIN_TEMP; - else if (temp > DAIKIN_MAX_TEMP) - temp = DAIKIN_MAX_TEMP; - daikin[14] = temp * 2; - checksum(); -} - -uint8_t IRDaikinESP::getTemp() { - return daikin[14] / 2; -} - -// Set the speed of the fan, 0-5, 0 is auto, 1-5 is the speed -void IRDaikinESP::setFan(uint8_t fan) { - // Set the fan speed bits, leave low 4 bits alone - uint8_t fanset; - daikin[16] &= 0x0F; - fan = std::min(fan, DAIKIN_FAN_MAX); - if (fan == DAIKIN_FAN_AUTO) - fanset = 0xA0; - else - fanset = 0x20 + (0x10 * fan); - daikin[16] |= fanset; - checksum(); -} - -uint8_t IRDaikinESP::getFan() { - uint8_t fan = daikin[16] >> 4; - fan -= 2; - if (fan > DAIKIN_FAN_MAX) - fan = DAIKIN_FAN_AUTO; - return fan; -} - -uint8_t IRDaikinESP::getMode() { - /* - DAIKIN_COOL - DAIKIN_HEAT - DAIKIN_FAN - DAIKIN_AUTO - DAIKIN_DRY - */ - return daikin[13] >> 4; -} - -void IRDaikinESP::setMode(uint8_t mode) { - switch (mode) { - case DAIKIN_COOL: - case DAIKIN_HEAT: - case DAIKIN_FAN: - case DAIKIN_DRY: - break; - default: - mode = DAIKIN_AUTO; - } - daikin[13] = (mode << 4) | getPower(); - checksum(); -} - -void IRDaikinESP::setSwingVertical(bool state) { - if (state) - daikin[16] |= 0x0F; - else - daikin[16] &= 0xF0; - checksum(); -} - -bool IRDaikinESP::getSwingVertical() { - return daikin[16] & 0x01; -} - -void IRDaikinESP::setSwingHorizontal(bool state) { - if (state) - daikin[17] |= 0x0F; - else - daikin[17] &= 0xF0; - checksum(); -} - -bool IRDaikinESP::getSwingHorizontal() { - return daikin[17] & 0x01; -} -#endif // SEND_DAIKIN - -#if DECODE_DAIKIN -// TODO(crankyoldgit): NOT WORKING. This needs to be finished. -// Decode the supplied Daikin A/C message. (NOT WORKING - DO NOT USE) -// Args: -// results: Ptr to the data to decode and where to store the decode result. -// nbits: Nr. of bits to expect in the data portion. Typically SAMSUNG_BITS. -// strict: Flag to indicate if we strictly adhere to the specification. -// Returns: -// boolean: True if it can decode it, false if it can't. -// -// Status: UNFINISHED / Completely not working, not even vaguely. -// -// Ref: -// https://github.com/mharizanov/Daikin-AC-remote-control-over-the-Internet/tree/master/IRremote -bool IRrecv::decodeDaikin(decode_results *results, uint16_t nbits, - bool strict) { - if (results->rawlen < 2 * nbits + HEADER + FOOTER) - return false; - - // Compliance - if (strict && nbits != DAIKIN_BITS) - return false; - - uint32_t data = 0; - uint16_t offset = OFFSET_START; - - // Header - if (!matchMark(results->rawbuf[offset++], DAIKIN_HDR_MARK)) - return false; - if (!matchSpace(results->rawbuf[offset++], DAIKIN_HDR_SPACE)) - return false; - - // Data (#1) - for (uint8_t i = 0; i < sizeof(data) * 8; i++, offset++) { - if (!matchMark(results->rawbuf[offset++], DAIKIN_ONE_MARK)) - return false; - if (matchSpace(results->rawbuf[offset], DAIKIN_ONE_SPACE)) - data = (data << 1) | 1; // 1 - else if (matchSpace(results->rawbuf[offset], DAIKIN_ZERO_SPACE)) - data <<= 1; // 0 - else - return false; - } - - uint32_t number = data; // some number... - uint32_t reversed = reverseBits(number, sizeof(number) * 8) - - DPRINT("Code "); - DPRINTLN(reversed, HEX); - - // Data (#2) - for (uint8_t i = 0; i < sizeof(data) * 8; i++, offset++) { - if (!matchMark(results->rawbuf[offset++], DAIKIN_ONE_MARK)) - return false; - if (matchSpace(results->rawbuf[offset], DAIKIN_ONE_SPACE)) - data = (data << 1) | 1; // 1 - else if (matchSpace(results->rawbuf[offset], DAIKIN_ZERO_SPACE)) - data <<= 1; // 0 - else - return false; - } - - number = data; // some number... - reversed = reverseBits(number, sizeof(number) * 8) - - DPRINT("Code2 "); - DPRINTLN(reversed, HEX); - - if (!matchSpace(results->rawbuf[offset++], DAIKIN_GAP)) { - DPRINTLN("no gap"); - return false; - } - - // Success - results->bits = DAIKIN_BITS; - results->value = reversed; - results->decode_type = DAIKIN; - results->address = 0; - results->command = 0; - return true; -} -#endif // DECODE_DAIKIN diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Daikin.h b/lib/IRremoteESP8266-2.2.1.02/src/ir_Daikin.h deleted file mode 100644 index 7172a5e27..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Daikin.h +++ /dev/null @@ -1,107 +0,0 @@ -/* Copyright 2016 sillyfrog */ -#ifndef IR_DAIKIN_H_ -#define IR_DAIKIN_H_ - -#include "IRremoteESP8266.h" -#include "IRsend.h" - -// DDDDD AAA IIIII KK KK IIIII NN NN -// DD DD AAAAA III KK KK III NNN NN -// DD DD AA AA III KKKK III NN N NN -// DD DD AAAAAAA III KK KK III NN NNN -// DDDDDD AA AA IIIII KK KK IIIII NN NN - -/* - Daikin AC map - byte 7= checksum of the first part (and last byte before a 29ms pause) - byte 13=mode - b7 = 0 - b6+b5+b4 = Mode - Modes: b6+b5+b4 - 011 = Cool - 100 = Heat (temp 23) - 110 = FAN (temp not shown, but 25) - 000 = Fully Automatic (temp 25) - 010 = DRY (temp 0xc0 = 96 degrees c) - b3 = 0 - b2 = OFF timer set - b1 = ON timer set - b0 = Air Conditioner ON - byte 14=temp*2 (Temp should be between 18 - 32) - byte 16=Fan - FAN control - b7+b6+b5+b4 = Fan speed - Fan: b7+b6+b5+b4 - 0×30 = 1 bar - 0×40 = 2 bar - 0×50 = 3 bar - 0×60 = 4 bar - 0×70 = 5 bar - 0xa0 = Auto - 0xb0 = Not auto, moon + tree - b3+b2+b1+b0 = Swing control up/down - Swing control up/down: - 0000 = Swing up/down off - 1111 = Swing up/down on - byte 17 - Swing control left/right: - 0000 = Swing left/right off - 1111 = Swing left/right on - byte 21=Aux -> Powerful (bit 1), Silent (bit 5) - byte 24=Aux2 -> Intelligent eye on (bit 7) - byte 26= checksum of the second part -*/ - -// Constants -#define DAIKIN_COOL 0b011 -#define DAIKIN_HEAT 0b100 -#define DAIKIN_FAN 0b110 -#define DAIKIN_AUTO 0b000 -#define DAIKIN_DRY 0b010 -#define DAIKIN_POWERFUL 0b00000010 -#define DAIKIN_SILENT 0b00100000 -#define DAIKIN_MIN_TEMP 18U // Celsius -#define DAIKIN_MAX_TEMP 32U // Celsius -#define DAIKIN_FAN_AUTO (uint8_t) 0U -#define DAIKIN_FAN_MIN (uint8_t) 1U -#define DAIKIN_FAN_MAX (uint8_t) 5U - -#if SEND_DAIKIN -class IRDaikinESP { - public: - explicit IRDaikinESP(uint16_t pin); - - void send(); - void begin(); - void on(); - void off(); - void setPower(bool state); - uint8_t getPower(); - void setAux(uint8_t aux); - uint8_t getAux(); - void setTemp(uint8_t temp); - uint8_t getTemp(); - void setFan(uint8_t fan); - uint8_t getFan(); - uint8_t getMode(); - void setMode(uint8_t mode); - void setSwingVertical(bool state); - bool getSwingVertical(); - void setSwingHorizontal(bool state); - bool getSwingHorizontal(); - bool getQuiet(); - void setQuiet(bool state); - bool getPowerful(); - void setPowerful(bool state); - uint8_t* getRaw(); - - private: - // # of bytes per command - uint8_t daikin[DAIKIN_COMMAND_LENGTH]; - void stateReset(); - void checksum(); - IRsend _irsend; -}; -#endif - -#endif // IR_DAIKIN_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Fujitsu.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_Fujitsu.cpp deleted file mode 100644 index adf753c0c..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Fujitsu.cpp +++ /dev/null @@ -1,221 +0,0 @@ -// Copyright 2017 Jonny Graham -#include "ir_Fujitsu.h" -#include -#include "IRsend.h" - - -// Fujitsu A/C support added by Jonny Graham - - -// Fujitsu A/C -// Ref: -// These values are based on averages of measurements -#define FUJITSU_AC_HDR_MARK 3224U -#define FUJITSU_AC_HDR_SPACE 1574U -#define FUJITSU_AC_BIT_MARK 448U -#define FUJITSU_AC_ONE_SPACE 1182U -#define FUJITSU_AC_ZERO_SPACE 367U -#define FUJITSU_AC_TRL_MARK 448U -#define FUJITSU_AC_TRL_SPACE 8100U - -#if SEND_FUJITSU_AC -// Send a Fujitsu A/C message. -// -// Args: -// data: An array of bytes containing the IR command. -// nbytes: Nr. of bytes of data in the array. (typically either -// FUJITSU_AC_STATE_LENGTH or FUJITSU_AC_STATE_LENGTH_SHORT) -// repeat: Nr. of times the message is to be repeated. -// (Default = FUJITSU_AC_MIN_REPEAT). -// -// Status: BETA / Appears to be working. -// -void IRsend::sendFujitsuAC(unsigned char data[], uint16_t nbytes, - uint16_t repeat) { - // Set IR carrier frequency - enableIROut(38); - for (uint16_t r = 0; r <= repeat; ++r) { - // Header - mark(FUJITSU_AC_HDR_MARK); - space(FUJITSU_AC_HDR_SPACE); - // Data - for (uint16_t i = 0; i < nbytes; i++) - sendData(FUJITSU_AC_BIT_MARK, FUJITSU_AC_ONE_SPACE, - FUJITSU_AC_BIT_MARK, FUJITSU_AC_ZERO_SPACE, - data[i], 8, false); - // Footer - mark(FUJITSU_AC_TRL_MARK); - space(FUJITSU_AC_TRL_SPACE); - } -} - -// Code to emulate Fujitsu A/C IR remote control unit. - -// Warning: Consider this very alpha code. Seems to work, but not validated. -// -// Equipment it seems compatible with: -// * Fujitsu ASYG30LFCA with remote AR-RAH2E -// * -// Initialise the object. -IRFujitsuAC::IRFujitsuAC(uint16_t pin) : _irsend(pin) { - stateReset(); -} - -// Reset the state of the remote to a known good state/sequence. -void IRFujitsuAC::stateReset() { - _temp = 24; - _fanSpeed = FUJITSU_AC_FAN_HIGH; - _mode = FUJITSU_AC_MODE_COOL; - _swingMode = FUJITSU_AC_SWING_BOTH; - _cmd = FUJITSU_AC_CMD_TURN_ON; -} - -// Configure the pin for output. -void IRFujitsuAC::begin() { - _irsend.begin(); -} - -// Send the current desired state to the IR LED. -void IRFujitsuAC::send() { - getRaw(); - uint8_t len = getCommandLength(); - _irsend.sendFujitsuAC(remote_state, len); -} - -uint8_t IRFujitsuAC::getCommandLength() { - if (remote_state[5] != 0xFE) - return FUJITSU_AC_STATE_LENGTH_SHORT; - else - return FUJITSU_AC_STATE_LENGTH; -} - -// Return a pointer to the internal state date of the remote. -uint8_t* IRFujitsuAC::getRaw() { - remote_state[0] = 0x14; - remote_state[1] = 0x63; - remote_state[2] = 0x00; - remote_state[3] = 0x10; - remote_state[4] = 0x10; - bool fullCmd = false; - switch (_cmd) { - case FUJITSU_AC_CMD_TURN_OFF: - remote_state[5] = 0x02; - break; - case FUJITSU_AC_CMD_STEP_HORIZ: - remote_state[5] = 0x79; - break; - case FUJITSU_AC_CMD_STEP_VERT: - remote_state[5] = 0x6C; - break; - default: - remote_state[5] = 0xFE; - fullCmd = true; - break; - } - if (fullCmd) { - remote_state[6] = 0x09; - remote_state[7] = 0x30; - uint8_t tempByte = _temp - FUJITSU_AC_MIN_TEMP; - remote_state[8] = (_cmd == FUJITSU_AC_CMD_TURN_ON) | (tempByte << 4); - remote_state[9] = _mode | 0 << 4; // timer off - remote_state[10] = _fanSpeed | _swingMode << 4; - remote_state[11] = 0; // timerOff values - remote_state[12] = 0; // timerOff/on values - remote_state[13] = 0; // timerOn values - remote_state[14] = 0x20; - // Checksum is the sum of the 8th to 16th bytes (ie remote_state[7] - // thru remote_state[15]). - // The checksum itself is stored in the 16th byte (ie remote_state[15]). - // So we sum bytes 8th-15th... - uint8_t checksum = 0; - for (uint8_t i = 7 ; i < 15; ++i) { - checksum += remote_state[i]; - } - // and then do 0 - sum and store it in 16th. - remote_state[15] = 0 - checksum; - } else { - // For the short codes, byte 7 is the inverse of byte 6 - remote_state[6] = ~remote_state[5]; - for (uint8_t i = 7; i < FUJITSU_AC_STATE_LENGTH; ++i) { - remote_state[i] = 0; - } - } - return remote_state; -} - -// Set the requested power state of the A/C to off. -void IRFujitsuAC::off() { - _cmd = FUJITSU_AC_CMD_TURN_OFF; -} - -void IRFujitsuAC::stepHoriz() { - _cmd = FUJITSU_AC_CMD_STEP_HORIZ; -} - -void IRFujitsuAC::stepVert() { - _cmd = FUJITSU_AC_CMD_STEP_VERT; -} - -// Set the requested command of the A/C. -void IRFujitsuAC::setCmd(uint8_t cmd) { - switch (cmd) { - case FUJITSU_AC_CMD_TURN_OFF: - case FUJITSU_AC_CMD_TURN_ON: - case FUJITSU_AC_CMD_STAY_ON: - case FUJITSU_AC_CMD_STEP_HORIZ: - case FUJITSU_AC_CMD_STEP_VERT: - break; - default: - cmd = FUJITSU_AC_CMD_STAY_ON; - break; - } - _cmd = cmd; -} - -uint8_t IRFujitsuAC::getCmd() { - return _cmd; -} - -// Set the temp. in deg C -void IRFujitsuAC::setTemp(uint8_t temp) { - temp = std::max((uint8_t) FUJITSU_AC_MIN_TEMP, temp); - temp = std::min((uint8_t) FUJITSU_AC_MAX_TEMP, temp); - _temp = temp; -} - -uint8_t IRFujitsuAC::getTemp() { - return _temp; -} - -// Set the speed of the fan -void IRFujitsuAC::setFanSpeed(uint8_t fanSpeed) { - if (fanSpeed > FUJITSU_AC_FAN_QUIET) - fanSpeed = FUJITSU_AC_FAN_HIGH; // Set the fan to maximum if out of range. - _fanSpeed = fanSpeed; -} -uint8_t IRFujitsuAC::getFanSpeed() { - return _fanSpeed; -} - -// Set the requested climate operation mode of the a/c unit. -void IRFujitsuAC::setMode(uint8_t mode) { - if (mode > FUJITSU_AC_MODE_HEAT) - mode = FUJITSU_AC_MODE_HEAT; // Set the mode to maximum if out of range. - _mode = mode; -} - -uint8_t IRFujitsuAC::getMode() { - return _mode; -} -// Set the requested swing operation mode of the a/c unit. -void IRFujitsuAC::setSwing(uint8_t swingMode) { - if (swingMode > FUJITSU_AC_SWING_BOTH) - swingMode = FUJITSU_AC_SWING_BOTH; // Set the mode to max if out of range - _swingMode = swingMode; -} - -uint8_t IRFujitsuAC::getSwing() { - return _swingMode; -} - -#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Fujitsu.h b/lib/IRremoteESP8266-2.2.1.02/src/ir_Fujitsu.h deleted file mode 100644 index 451a5b203..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Fujitsu.h +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2017 Jonny Graham -#ifndef IR_FUJITSU_H_ -#define IR_FUJITSU_H_ - -#define __STDC_LIMIT_MACROS -#include -#include "IRremoteESP8266.h" -#include "IRsend.h" - - -// FUJITSU A/C support added by Jonny Graham - -// Constants - -#define FUJITSU_AC_MODE_AUTO 0x00U -#define FUJITSU_AC_MODE_COOL 0x01U -#define FUJITSU_AC_MODE_DRY 0x02U -#define FUJITSU_AC_MODE_FAN 0x03U -#define FUJITSU_AC_MODE_HEAT 0x04U - -#define FUJITSU_AC_CMD_STAY_ON 0x00U -#define FUJITSU_AC_CMD_TURN_ON 0x01U -#define FUJITSU_AC_CMD_TURN_OFF 0x02U -#define FUJITSU_AC_CMD_STEP_HORIZ 0x79U -#define FUJITSU_AC_CMD_STEP_VERT 0x6CU - -#define FUJITSU_AC_FAN_AUTO 0x00U -#define FUJITSU_AC_FAN_HIGH 0x01U -#define FUJITSU_AC_FAN_MED 0x02U -#define FUJITSU_AC_FAN_LOW 0x03U -#define FUJITSU_AC_FAN_QUIET 0x04U - -#define FUJITSU_AC_MIN_TEMP 16U // 16C -#define FUJITSU_AC_MAX_TEMP 30U // 30C - -#define FUJITSU_AC_SWING_OFF 0x00U -#define FUJITSU_AC_SWING_VERT 0x01U -#define FUJITSU_AC_SWING_HORIZ 0x02U -#define FUJITSU_AC_SWING_BOTH 0x03U - -#define FUJITSU_AC_STATE_LENGTH 16 -#define FUJITSU_AC_STATE_LENGTH_SHORT 7 - -#if SEND_FUJITSU_AC -class IRFujitsuAC { - public: - explicit IRFujitsuAC(uint16_t pin); - - void stateReset(); - void send(); - void begin(); - void off(); - void stepHoriz(); - void stepVert(); - void setCmd(uint8_t cmd); - uint8_t getCmd(); - void setTemp(uint8_t temp); - uint8_t getTemp(); - void setFanSpeed(uint8_t fan); - uint8_t getFanSpeed(); - void setMode(uint8_t mode); - uint8_t getMode(); - void setSwing(uint8_t mode); - uint8_t getSwing(); - uint8_t* getRaw(); - - private: - uint8_t remote_state[FUJITSU_AC_STATE_LENGTH]; - uint8_t getCommandLength(); - IRsend _irsend; - uint8_t _temp; - uint8_t _fanSpeed; - uint8_t _mode; - uint8_t _swingMode; - uint8_t _cmd; -}; - -#endif - -#endif // IR_FUJITSU_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Gree.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_Gree.cpp deleted file mode 100644 index d1bc760bf..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Gree.cpp +++ /dev/null @@ -1,113 +0,0 @@ -// Copyright 2017 Ville Skyttä (scop) -// Copyright 2017 David Conran -// -// Gree protocol compatible heat pump carrying the "Ultimate" brand name. -// - -#include "IRremoteESP8266.h" -#include "IRsend.h" - -// GGGG RRRRRR EEEEEEE EEEEEEE -// GG GG RR RR EE EE -// GG RRRRRR EEEEE EEEEE -// GG GG RR RR EE EE -// GGGGGG RR RR EEEEEEE EEEEEEE - -// Constants -// Ref: https://github.com/ToniA/arduino-heatpumpir/blob/master/GreeHeatpumpIR.h -#define GREE_HDR_MARK 9000U -#define GREE_HDR_SPACE 4000U -#define GREE_BIT_MARK 620U -#define GREE_ONE_SPACE 1600U -#define GREE_ZERO_SPACE 540U -#define GREE_MSG_SPACE 19000U - -#if SEND_GREE -// Send a Gree Heat Pump message. -// -// Args: -// data: An array of bytes containing the IR command. -// nbytes: Nr. of bytes of data in the array. (>=GREE_STATE_LENGTH) -// repeat: Nr. of times the message is to be repeated. (Default = 0). -// -// Status: ALPHA / Untested. -// -// Ref: -// https://github.com/ToniA/arduino-heatpumpir/blob/master/GreeHeatpumpIR.cpp -void IRsend::sendGree(unsigned char data[], uint16_t nbytes, uint16_t repeat) { - if (nbytes < GREE_STATE_LENGTH) - return; // Not enough bytes to send a proper message. - - // Set IR carrier frequency - enableIROut(38); - - for (uint16_t r = 0; r <= repeat; r++) { - // Header #1 - mark(GREE_HDR_MARK); - space(GREE_HDR_SPACE); - - // Data #1 - uint16_t i; - for (i = 0; i < 4 && i < nbytes; i++) - sendData(GREE_BIT_MARK, GREE_ONE_SPACE, GREE_BIT_MARK, GREE_ZERO_SPACE, - data[i], 8, false); - - // Footer #1 (010) - sendData(GREE_BIT_MARK, GREE_ONE_SPACE, GREE_BIT_MARK, GREE_ZERO_SPACE, - 0b010, 3); - - // Header #2 - mark(GREE_BIT_MARK); - space(GREE_MSG_SPACE); - - // Data #2 - for (; i < nbytes; i++) - sendData(GREE_BIT_MARK, GREE_ONE_SPACE, GREE_BIT_MARK, GREE_ZERO_SPACE, - data[i], 8, false); - - // Footer #2 - mark(GREE_BIT_MARK); - space(GREE_MSG_SPACE); - } -} - -// Send a Gree Heat Pump message. -// -// Args: -// data: The raw message to be sent. -// nbits: Nr. of bits of data in the message. (Default is GREE_BITS) -// repeat: Nr. of times the message is to be repeated. (Default = 0). -// -// Status: ALPHA / Untested. -// -// Ref: -// https://github.com/ToniA/arduino-heatpumpir/blob/master/GreeHeatpumpIR.cpp -void IRsend::sendGree(uint64_t data, uint16_t nbits, uint16_t repeat) { - if (nbits != GREE_BITS) - return; // Wrong nr. of bits to send a proper message. - // Set IR carrier frequency - enableIROut(38); - - for (uint16_t r = 0; r <= repeat; r++) { - // Header - mark(GREE_HDR_MARK); - space(GREE_HDR_SPACE); - - // Data - for (int16_t i = 8; i <= nbits; i += 8) { - sendData(GREE_BIT_MARK, GREE_ONE_SPACE, GREE_BIT_MARK, GREE_ZERO_SPACE, - (data >> (nbits - i)) & 0xFF, 8, false); - if (i == nbits / 2) { - // Send the mid-message Footer. - sendData(GREE_BIT_MARK, GREE_ONE_SPACE, GREE_BIT_MARK, GREE_ZERO_SPACE, - 0b010, 3); - mark(GREE_BIT_MARK); - space(GREE_MSG_SPACE); - } - } - // Footer - mark(GREE_BIT_MARK); - space(GREE_MSG_SPACE); - } -} -#endif // SEND_GREE diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Kelvinator.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_Kelvinator.cpp deleted file mode 100644 index 257a32e1a..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Kelvinator.cpp +++ /dev/null @@ -1,329 +0,0 @@ -// Copyright 2016 David Conran -// -// Code to emulate IR Kelvinator YALIF remote control unit, which should control -// at least the following Kelvinator A/C units: -// KSV26CRC, KSV26HRC, KSV35CRC, KSV35HRC, KSV53HRC, KSV62HRC, KSV70CRC, -// KSV70HRC, KSV80HRC. -// -// Note: -// * Unsupported: -// - All Sleep modes. -// - All Timer modes. -// - "I Feel" button & mode. -// - Energy Saving mode. -// - Low Heat mode. -// - Fahrenheit. - -#include "ir_Kelvinator.h" -#include - -// KK KK EEEEEEE LL VV VV IIIII NN NN AAA TTTTTTT OOOOO RRRRRR -// KK KK EE LL VV VV III NNN NN AAAAA TTT OO OO RR RR -// KKKK EEEEE LL VV VV III NN N NN AA AA TTT OO OO RRRRRR -// KK KK EE LL VV VV III NN NNN AAAAAAA TTT OO OO RR RR -// KK KK EEEEEEE LLLLLLL VVV IIIII NN NN AA AA TTT OOOO0 RR RR - -// Constants -#define KELVINATOR_HDR_MARK 8990U -#define KELVINATOR_HDR_SPACE 4490U -#define KELVINATOR_BIT_MARK 675U -#define KELVINATOR_ONE_SPACE 1560U -#define KELVINATOR_ZERO_SPACE 520U -#define KELVINATOR_GAP_SPACE 19950U -#define KELVINATOR_CMD_FOOTER 2U - -#define KELVINATOR_POWER 8U -#define KELVINATOR_MODE_MASK 0xF8U -#define KELVINATOR_FAN_OFFSET 4U -#define KELVINATOR_BASIC_FAN_MASK uint8_t(0xFFU ^ (3U << KELVINATOR_FAN_OFFSET)) -#define KELVINATOR_FAN_MASK uint8_t(0xFFU ^ (7U << KELVINATOR_FAN_OFFSET)) -#define KELVINATOR_CHECKSUM_START 10U -#define KELVINATOR_VENT_SWING_OFFSET 6U -#define KELVINATOR_VENT_SWING uint8_t(1U << KELVINATOR_VENT_SWING_OFFSET) -#define KELVINATOR_VENT_SWING_V uint8_t(1U) -#define KELVINATOR_VENT_SWING_H uint8_t(1U << 4) -#define KELVINATOR_SLEEP_1_AND_3 uint8_t(1U << 7) -#define KELVINATOR_QUIET_OFFSET 7U -#define KELVINATOR_QUIET uint8_t(1U << KELVINATOR_QUIET_OFFSET) -#define KELVINATOR_ION_FILTER_OFFSET 6U -#define KELVINATOR_ION_FILTER uint8_t(1U << KELVINATOR_ION_FILTER_OFFSET) -#define KELVINATOR_LIGHT_OFFSET 5U -#define KELVINATOR_LIGHT uint8_t(1U << KELVINATOR_LIGHT_OFFSET) -#define KELVINATOR_XFAN_OFFSET 7U -#define KELVINATOR_XFAN uint8_t(1U << KELVINATOR_XFAN_OFFSET) -#define KELVINATOR_TURBO_OFFSET 4U -#define KELVINATOR_TURBO uint8_t(1U << KELVINATOR_TURBO_OFFSET) - -#if SEND_KELVINATOR -// Send a Kelvinator A/C message. -// -// Args: -// data: An array of bytes containing the IR command. -// nbytes: Nr. of bytes of data in the array. (>=KELVINATOR_STATE_LENGTH) -// repeat: Nr. of times the message is to be repeated. (Default = 0). -// -// Status: STABLE / Known working. -// -void IRsend::sendKelvinator(unsigned char data[], uint16_t nbytes, - uint16_t repeat) { - if (nbytes < KELVINATOR_STATE_LENGTH) - return; // Not enough bytes to send a proper message. - - // Set IR carrier frequency - enableIROut(38); - - for (uint16_t r = 0; r <= repeat; r++) { - // Header #1 - mark(KELVINATOR_HDR_MARK); - space(KELVINATOR_HDR_SPACE); - // Data (command) - // Send the first command data (4 bytes) - uint8_t i; - for (i = 0; i < 4; i++) - sendData(KELVINATOR_BIT_MARK, KELVINATOR_ONE_SPACE, KELVINATOR_BIT_MARK, - KELVINATOR_ZERO_SPACE, data[i], 8, false); - // Send Footer for the command data (3 bits (0b010)) - sendData(KELVINATOR_BIT_MARK, KELVINATOR_ONE_SPACE, KELVINATOR_BIT_MARK, - KELVINATOR_ZERO_SPACE, KELVINATOR_CMD_FOOTER, 3, false); - // Send an interdata gap. - mark(KELVINATOR_BIT_MARK); - space(KELVINATOR_GAP_SPACE); - // Data (options) - // Send the 1st option chunk of data (4 bytes). - for (; i < 8; i++) - sendData(KELVINATOR_BIT_MARK, KELVINATOR_ONE_SPACE, KELVINATOR_BIT_MARK, - KELVINATOR_ZERO_SPACE, data[i], 8, false); - // Send a double data gap to signify we are starting a new command sequence. - mark(KELVINATOR_BIT_MARK); - space(KELVINATOR_GAP_SPACE * 2); - // Header #2 - mark(KELVINATOR_HDR_MARK); - space(KELVINATOR_HDR_SPACE); - // Data (command) - // Send the 2nd command data (4 bytes). - // Basically an almost identical repeat of the earlier command data. - for (; i < 12; i++) - sendData(KELVINATOR_BIT_MARK, KELVINATOR_ONE_SPACE, KELVINATOR_BIT_MARK, - KELVINATOR_ZERO_SPACE, data[i], 8, false); - // Send Footer for the command data (3 bits (B010)) - sendData(KELVINATOR_BIT_MARK, KELVINATOR_ONE_SPACE, KELVINATOR_BIT_MARK, - KELVINATOR_ZERO_SPACE, KELVINATOR_CMD_FOOTER, 3, false); - // Send an interdata gap. - mark(KELVINATOR_BIT_MARK); - space(KELVINATOR_GAP_SPACE); - // Data (options) - // Send the 2nd option chunk of data (4 bytes). - // Unlike the commands, definitely not a repeat of the earlier option data. - for (; i < KELVINATOR_STATE_LENGTH; i++) - sendData(KELVINATOR_BIT_MARK, KELVINATOR_ONE_SPACE, KELVINATOR_BIT_MARK, - KELVINATOR_ZERO_SPACE, data[i], 8, false); - // Footer - mark(KELVINATOR_BIT_MARK); - space(KELVINATOR_GAP_SPACE * 2); - } -} - -IRKelvinatorAC::IRKelvinatorAC(uint16_t pin) : _irsend(pin) { - stateReset(); -} - -void IRKelvinatorAC::stateReset() { - for (uint8_t i = 0; i < KELVINATOR_STATE_LENGTH; i++) - remote_state[i] = 0x0; - remote_state[3] = 0x50; - remote_state[11] = 0x70; -} - -void IRKelvinatorAC::begin() { - _irsend.begin(); -} - -void IRKelvinatorAC::fixup() { - // X-Fan mode is only valid in COOL or DRY modes. - if (getMode() != KELVINATOR_COOL && getMode() != KELVINATOR_DRY) - setXFan(false); - checksum(); // Calculate the checksums -} - -void IRKelvinatorAC::send() { - fixup(); // Ensure correct settings before sending. - _irsend.sendKelvinator(remote_state); -} - -uint8_t* IRKelvinatorAC::getRaw() { - fixup(); // Ensure correct settings before sending. - return remote_state; -} - -// Many Bothans died to bring us this information. -void IRKelvinatorAC::checksum() { - // For each command + options block. - for (uint8_t offset = 0; offset < KELVINATOR_STATE_LENGTH; offset += 8) { - uint8_t sum = KELVINATOR_CHECKSUM_START; - // Sum the lower half of the first 4 bytes of this block. - for (uint8_t i = 0; i < 4; i++) - sum += (remote_state[i + offset] & 0xFU); - // then sum the upper half of the next 3 bytes. - for (uint8_t i = 4; i < 7; i++) - sum += (remote_state[i + offset] >> 4); - // Trim it down to fit into the 4 bits allowed. i.e. Mod 16. - sum &= 0xFU; - // Place it into the IR code in the top half of the 8th & 16th byte. - remote_state[7 + offset] = (sum << 4) | (remote_state[7 + offset] & 0xFU); - } -} - -void IRKelvinatorAC::on() { - remote_state[0] |= KELVINATOR_POWER; - remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. -} - -void IRKelvinatorAC::off() { - remote_state[0] &= ~KELVINATOR_POWER; - remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. -} - -void IRKelvinatorAC::setPower(bool state) { - if (state) - on(); - else - off(); -} - -bool IRKelvinatorAC::getPower() { - return ((remote_state[0] & KELVINATOR_POWER) != 0); -} - -// Set the temp. in deg C -void IRKelvinatorAC::setTemp(uint8_t temp) { - temp = std::max((uint8_t) KELVINATOR_MIN_TEMP, temp); - temp = std::min((uint8_t) KELVINATOR_MAX_TEMP, temp); - remote_state[1] = (remote_state[1] & 0xF0U) | (temp - KELVINATOR_MIN_TEMP); - remote_state[9] = remote_state[1]; // Duplicate to the 2nd command chunk. -} - -// Return the set temp. in deg C -uint8_t IRKelvinatorAC::getTemp() { - return ((remote_state[1] & 0xFU) + KELVINATOR_MIN_TEMP); -} - -// Set the speed of the fan, 0-5, 0 is auto, 1-5 is the speed -void IRKelvinatorAC::setFan(uint8_t fan) { - fan = std::min((uint8_t) KELVINATOR_FAN_MAX, fan); // Bounds check - - // Only change things if we need to. - if (fan != getFan()) { - // Set the basic fan values. - uint8_t fan_basic = std::min((uint8_t) KELVINATOR_BASIC_FAN_MAX, fan); - remote_state[0] = (remote_state[0] & KELVINATOR_BASIC_FAN_MASK) | - (fan_basic << KELVINATOR_FAN_OFFSET); - remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. - // Set the advanced(?) fan value. - remote_state[14] = (remote_state[14] & KELVINATOR_FAN_MASK) | - (fan << KELVINATOR_FAN_OFFSET); - setTurbo(false); // Turbo mode is turned off if we change the fan settings. - } -} - -uint8_t IRKelvinatorAC::getFan() { - return ((remote_state[14] & ~KELVINATOR_FAN_MASK) >> KELVINATOR_FAN_OFFSET); -} - -uint8_t IRKelvinatorAC::getMode() { - return (remote_state[0] & ~KELVINATOR_MODE_MASK); -} - -void IRKelvinatorAC::setMode(uint8_t mode) { - // If we get an unexpected mode, default to AUTO. - if (mode > KELVINATOR_HEAT) mode = KELVINATOR_AUTO; - remote_state[0] = (remote_state[0] & KELVINATOR_MODE_MASK) | mode; - remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. - if (mode == KELVINATOR_AUTO || KELVINATOR_DRY) - // When the remote is set to Auto or Dry, it defaults to 25C and doesn't - // show it. - setTemp(KELVINATOR_AUTO_TEMP); -} - -void IRKelvinatorAC::setSwingVertical(bool state) { - if (state) { - remote_state[0] |= KELVINATOR_VENT_SWING; - remote_state[4] |= KELVINATOR_VENT_SWING_V; - } else { - remote_state[4] &= ~KELVINATOR_VENT_SWING_V; - if (!getSwingHorizontal()) - remote_state[0] &= ~KELVINATOR_VENT_SWING; - } - remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. -} - -bool IRKelvinatorAC::getSwingVertical() { - return ((remote_state[4] & KELVINATOR_VENT_SWING_V) != 0); -} - -void IRKelvinatorAC::setSwingHorizontal(bool state) { - if (state) { - remote_state[0] |= KELVINATOR_VENT_SWING; - remote_state[4] |= KELVINATOR_VENT_SWING_H; - } else { - remote_state[4] &= ~KELVINATOR_VENT_SWING_H; - if (!getSwingVertical()) - remote_state[0] &= ~KELVINATOR_VENT_SWING; - } - remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. -} - -bool IRKelvinatorAC::getSwingHorizontal() { - return ((remote_state[4] & KELVINATOR_VENT_SWING_H) != 0); -} - -void IRKelvinatorAC::setQuiet(bool state) { - remote_state[12] &= ~KELVINATOR_QUIET; - remote_state[12] |= (state << KELVINATOR_QUIET_OFFSET); -} - -bool IRKelvinatorAC::getQuiet() { - return ((remote_state[12] & KELVINATOR_QUIET) != 0); -} - -void IRKelvinatorAC::setIonFilter(bool state) { - remote_state[2] &= ~KELVINATOR_ION_FILTER; - remote_state[2] |= (state << KELVINATOR_ION_FILTER_OFFSET); - remote_state[10] = remote_state[2]; // Duplicate to the 2nd command chunk. -} - -bool IRKelvinatorAC::getIonFilter() { - return ((remote_state[2] & KELVINATOR_ION_FILTER) != 0); -} - -void IRKelvinatorAC::setLight(bool state) { - remote_state[2] &= ~KELVINATOR_LIGHT; - remote_state[2] |= (state << KELVINATOR_LIGHT_OFFSET); - remote_state[10] = remote_state[2]; // Duplicate to the 2nd command chunk. -} - -bool IRKelvinatorAC::getLight() { - return ((remote_state[2] & KELVINATOR_LIGHT) != 0); -} - -// Note: XFan mode is only valid in Cool or Dry mode. -void IRKelvinatorAC::setXFan(bool state) { - remote_state[2] &= ~KELVINATOR_XFAN; - remote_state[2] |= (state << KELVINATOR_XFAN_OFFSET); - remote_state[10] = remote_state[2]; // Duplicate to the 2nd command chunk. -} - -bool IRKelvinatorAC::getXFan() { - return ((remote_state[2] & KELVINATOR_XFAN) != 0); -} - -// Note: Turbo mode is turned off if the fan speed is changed. -void IRKelvinatorAC::setTurbo(bool state) { - remote_state[2] &= ~KELVINATOR_TURBO; - remote_state[2] |= (state << KELVINATOR_TURBO_OFFSET); - remote_state[10] = remote_state[2]; // Duplicate to the 2nd command chunk. -} - -bool IRKelvinatorAC::getTurbo() { - return ((remote_state[2] & KELVINATOR_TURBO) != 0); -} -#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_LG.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_LG.cpp deleted file mode 100644 index 716ddd205..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_LG.cpp +++ /dev/null @@ -1,233 +0,0 @@ -// Copyright 2015 Darryl Smith -// Copyright 2015 cheaplin -// Copyright 2017 David Conran - -#include "ir_LG.h" -#include -#include "IRrecv.h" -#include "IRsend.h" -#include "IRtimer.h" -#include "IRutils.h" - -// L GGGG -// L G -// L G GG -// L G G -// LLLLL GGG - -// LG decode originally added by Darryl Smith (based on the JVC protocol) -// LG send originally added by https://github.com/chaeplin - -// Constants -#define LG_TICK 50U -#define LG_HDR_MARK_TICKS 160U -#define LG_HDR_MARK (LG_HDR_MARK_TICKS * LG_TICK) -#define LG_HDR_SPACE_TICKS 80U -#define LG_HDR_SPACE (LG_HDR_SPACE_TICKS * LG_TICK) -#define LG_BIT_MARK_TICKS 11U -#define LG_BIT_MARK (LG_BIT_MARK_TICKS * LG_TICK) -#define LG_ONE_SPACE_TICKS 32U -#define LG_ONE_SPACE (LG_ONE_SPACE_TICKS * LG_TICK) -#define LG_ZERO_SPACE_TICKS 11U -#define LG_ZERO_SPACE (LG_ZERO_SPACE_TICKS * LG_TICK) -#define LG_RPT_SPACE_TICKS 45U -#define LG_RPT_SPACE (LG_RPT_SPACE_TICKS * LG_TICK) -#define LG_MIN_GAP_TICKS 795U -#define LG_MIN_GAP (LG_MIN_GAP_TICKS * LG_TICK) -#define LG_MIN_MESSAGE_LENGTH_TICKS 2161U -#define LG_MIN_MESSAGE_LENGTH (LG_MIN_MESSAGE_LENGTH_TICKS * LG_TICK) -#define LG32_HDR_MARK_TICKS 90U -#define LG32_HDR_MARK (LG32_HDR_MARK_TICKS * LG_TICK) -#define LG32_HDR_SPACE_TICKS 89U -#define LG32_HDR_SPACE (LG32_HDR_SPACE_TICKS * LG_TICK) -#define LG32_RPT_HDR_MARK_TICKS 179U -#define LG32_RPT_HDR_MARK (LG32_RPT_HDR_MARK_TICKS * LG_TICK) - -#if (SEND_LG || DECODE_LG) -// Calculate the rolling 4-bit wide checksum over all of the data. -// Args: -// data: The value to be checksum'ed. -// Returns: -// A 4-bit checksum. -uint8_t calcLGChecksum(uint16_t data) { - return(((data >> 12) + ((data >> 8) & 0xF) + ((data >> 4) & 0xF) + - (data & 0xF)) & 0xF); -} -#endif - -#if SEND_LG -// Send an LG formatted message. -// -// Args: -// data: The contents of the message you want to send. -// nbits: The bit size of the message being sent. -// Typically LG_BITS or LG32_BITS. -// repeat: The number of times you want the message to be repeated. -// -// Status: Beta / Should be working. -// -// Notes: -// LG has a separate message to indicate a repeat, like NEC does. -void IRsend::sendLG(uint64_t data, uint16_t nbits, uint16_t repeat) { - // Set IR carrier frequency - enableIROut(38); - - uint16_t repeatHeaderMark = 0; - IRtimer usecTimer = IRtimer(); - - if (nbits >= LG32_BITS) { - // LG 32bit protocol is near identical to Samsung except for repeats. - sendSAMSUNG(data, nbits, 0); // Send it as a single Samsung message. - repeatHeaderMark = LG32_RPT_HDR_MARK; - repeat++; - } else { - // LG (28-bit) protocol. - repeatHeaderMark = LG_HDR_MARK; - // Header - usecTimer.reset(); - mark(LG_HDR_MARK); - space(LG_HDR_SPACE); - // Data - sendData(LG_BIT_MARK, LG_ONE_SPACE, LG_BIT_MARK, LG_ZERO_SPACE, - data, nbits, true); - // Footer - mark(LG_BIT_MARK); - space(std::max((uint32_t) (LG_MIN_MESSAGE_LENGTH - usecTimer.elapsed()), - (uint32_t) LG_MIN_GAP)); - } - - // Repeat - // Protocol has a mandatory repeat-specific code sent after every command. - for (uint16_t i = 0; i < repeat; i++) { - usecTimer.reset(); - mark(repeatHeaderMark); - space(LG_RPT_SPACE); - mark(LG_BIT_MARK); - space(std::max((uint32_t) LG_MIN_MESSAGE_LENGTH - usecTimer.elapsed(), - (uint32_t) LG_MIN_GAP)); - } -} - -// Construct a raw 28-bit LG message from the supplied address & command. -// -// Args: -// address: The address code. -// command: The command code. -// Returns: -// A raw 28-bit LG message suitable for sendLG(). -// -// Status: BETA / Should work. -// -// Notes: -// e.g. Sequence of bits = address + command + checksum. -uint32_t IRsend::encodeLG(uint16_t address, uint16_t command) { - return ((address << 20) | (command << 4) | calcLGChecksum(command)); -} -#endif - -#if DECODE_LG -// Decode the supplied LG message. -// LG protocol has a repeat code which is 4 items long. -// Even though the protocol has 28/32 bits of data, only 24/28 bits are -// distinct. -// In transmission order, the 28/32 bits are constructed as follows: -// 8/12 bits of address + 16 bits of command + 4 bits of checksum. -// -// Args: -// results: Ptr to the data to decode and where to store the decode result. -// nbits: Nr. of bits to expect in the data portion. -// Typically LG_BITS or LG32_BITS. -// strict: Flag to indicate if we strictly adhere to the specification. -// Returns: -// boolean: True if it can decode it, false if it can't. -// -// Status: BETA / Should work. -// -// Note: -// LG 32bit protocol appears near identical to the Samsung protocol. -// They possibly differ on how they repeat and initial HDR mark. - -// Ref: -// https://funembedded.wordpress.com/2014/11/08/ir-remote-control-for-lg-conditioner-using-stm32f302-mcu-on-mbed-platform/ -bool IRrecv::decodeLG(decode_results *results, uint16_t nbits, bool strict) { - if (results->rawlen < 2 * nbits + HEADER + FOOTER - 1 && results->rawlen != 4) - return false; // Can't possibly be a valid LG message. - if (strict && nbits != LG_BITS && nbits != LG32_BITS) - return false; // Doesn't comply with expected LG protocol. - - uint64_t data = 0; - uint16_t offset = OFFSET_START; - - // Header - if (!matchMark(results->rawbuf[offset], LG_HDR_MARK) && - !matchMark(results->rawbuf[offset], LG32_HDR_MARK)) return false; - uint32_t m_tick; - if (matchMark(results->rawbuf[offset], LG_HDR_MARK)) - m_tick = results->rawbuf[offset++] * RAWTICK / LG_HDR_MARK_TICKS; - else - m_tick = results->rawbuf[offset++] * RAWTICK / LG32_HDR_MARK_TICKS; - if (!matchSpace(results->rawbuf[offset], LG_HDR_SPACE) && - !matchSpace(results->rawbuf[offset], LG32_HDR_SPACE)) return false; - uint32_t s_tick; - if (matchSpace(results->rawbuf[offset], LG_HDR_SPACE)) - s_tick = results->rawbuf[offset++] * RAWTICK / LG_HDR_SPACE_TICKS; - else - s_tick = results->rawbuf[offset++] * RAWTICK / LG32_HDR_SPACE_TICKS; - - // Data - match_result_t data_result = matchData(&(results->rawbuf[offset]), nbits, - LG_BIT_MARK_TICKS * m_tick, - LG_ONE_SPACE_TICKS * s_tick, - LG_BIT_MARK_TICKS * m_tick, - LG_ZERO_SPACE_TICKS * s_tick); - if (data_result.success == false) return false; - data = data_result.data; - offset += data_result.used; - - // Footer - if (!matchMark(results->rawbuf[offset++], LG_BIT_MARK_TICKS * m_tick)) - return false; - if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], LG_MIN_GAP_TICKS * s_tick)) - return false; - - // Repeat - if (nbits >= LG32_BITS) { - // If we are expecting the LG 32-bit protocol, there is always - // a repeat message. So, check for it. -#ifndef UNIT_TEST - if (!matchSpace(results->rawbuf[offset], LG_MIN_GAP_TICKS * s_tick)) -#else - if (!(matchSpace(results->rawbuf[offset], - LG_MIN_MESSAGE_LENGTH_TICKS * s_tick) || - matchSpace(results->rawbuf[offset], 65500) || - matchSpace(results->rawbuf[offset], LG_MIN_GAP_TICKS * s_tick))) -#endif // UNIT_TEST - return false; - offset++; - if (!matchMark(results->rawbuf[offset++], LG32_RPT_HDR_MARK_TICKS * m_tick)) - return false; - if (!matchSpace(results->rawbuf[offset++], LG_RPT_SPACE_TICKS * s_tick)) - return false; - if (!matchMark(results->rawbuf[offset++], LG_BIT_MARK_TICKS * m_tick)) - return false; - if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], LG_MIN_GAP_TICKS * s_tick)) - return false; - } - - // Compliance - uint16_t command = (data >> 4) & 0xFFFF; // The 16 bits before the checksum. - - if (strict && (data & 0xF) != calcLGChecksum(command)) - return false; // The last 4 bits sent are the expected checksum. - - // Success - results->decode_type = LG; - results->bits = nbits; - results->value = data; - results->command = command; - results->address = data >> 20; // The bits before the command. - return true; -} -#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Mitsubishi.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_Mitsubishi.cpp deleted file mode 100644 index df8b6e1ef..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Mitsubishi.cpp +++ /dev/null @@ -1,349 +0,0 @@ -// Copyright 2009 Ken Shirriff -// Copyright 2017 David Conran - -#include "ir_Mitsubishi.h" -#include -#include "IRrecv.h" -#include "IRsend.h" -#include "IRtimer.h" -#include "IRutils.h" - -// MMMMM IIIII TTTTT SSSS U U BBBB IIIII SSSS H H IIIII -// M M M I T S U U B B I S H H I -// M M M I T SSS U U BBBB I SSS HHHHH I -// M M I T S U U B B I S H H I -// M M IIIII T SSSS UUU BBBBB IIIII SSSS H H IIIII - -// Mitsubishi (TV) decoding added from https://github.com/z3t0/Arduino-IRremote -// Mitsubishi (TV) sending & Mitsubishi A/C support added by David Conran - -// Constants -// Mitsubishi TV -// period time is 1/33000Hz = 30.303 uSeconds (T) -// Ref: -// GlobalCache's Control Tower's Mitsubishi TV data. -// https://github.com/marcosamarinho/IRremoteESP8266/blob/master/ir_Mitsubishi.cpp -#define MITSUBISHI_TICK 30U -#define MITSUBISHI_BIT_MARK_TICKS 10U -#define MITSUBISHI_BIT_MARK (MITSUBISHI_BIT_MARK_TICKS * \ - MITSUBISHI_TICK) -#define MITSUBISHI_ONE_SPACE_TICKS 70U -#define MITSUBISHI_ONE_SPACE (MITSUBISHI_ONE_SPACE_TICKS * \ - MITSUBISHI_TICK) -#define MITSUBISHI_ZERO_SPACE_TICKS 30U -#define MITSUBISHI_ZERO_SPACE (MITSUBISHI_ZERO_SPACE_TICKS * \ - MITSUBISHI_TICK) -#define MITSUBISHI_MIN_COMMAND_LENGTH_TICKS 1786U -#define MITSUBISHI_MIN_COMMAND_LENGTH (MITSUBISHI_MIN_COMMAND_LENGTH_TICKS * \ - MITSUBISHI_TICK) -#define MITSUBISHI_MIN_GAP_TICKS 936U -#define MITSUBISHI_MIN_GAP (MITSUBISHI_MIN_GAP_TICKS * \ - MITSUBISHI_TICK) - -// Mitsubishi A/C -// Ref: -// https://github.com/r45635/HVAC-IR-Control/blob/master/HVAC_ESP8266/HVAC_ESP8266.ino#L84 -#define MITSUBISHI_AC_HDR_MARK 3400U -#define MITSUBISHI_AC_HDR_SPACE 1750U -#define MITSUBISHI_AC_BIT_MARK 450U -#define MITSUBISHI_AC_ONE_SPACE 1300U -#define MITSUBISHI_AC_ZERO_SPACE 420U -#define MITSUBISHI_AC_RPT_MARK 440U -#define MITSUBISHI_AC_RPT_SPACE 17100UL - -#if SEND_MITSUBISHI -// Send a Mitsubishi message -// -// Args: -// data: Contents of the message to be sent. -// nbits: Nr. of bits of data to be sent. Typically MITSUBISHI_BITS. -// repeat: Nr. of additional times the message is to be sent. -// -// Status: ALPHA / untested. -// -// Notes: -// This protocol appears to have no header. -// Ref: -// https://github.com/marcosamarinho/IRremoteESP8266/blob/master/ir_Mitsubishi.cpp -// GlobalCache's Control Tower's Mitsubishi TV data. -void IRsend::sendMitsubishi(uint64_t data, uint16_t nbits, uint16_t repeat) { - enableIROut(33); // Set IR carrier frequency - IRtimer usecTimer = IRtimer(); - - for (uint16_t i = 0; i <= repeat; i++) { - usecTimer.reset(); - // No header - - // Data - sendData(MITSUBISHI_BIT_MARK, MITSUBISHI_ONE_SPACE, - MITSUBISHI_BIT_MARK, MITSUBISHI_ZERO_SPACE, - data, nbits, true); - // Footer - mark(MITSUBISHI_BIT_MARK); - space(std::max(MITSUBISHI_MIN_COMMAND_LENGTH - usecTimer.elapsed(), - MITSUBISHI_MIN_GAP)); - } -} -#endif - -#if DECODE_MITSUBISHI -// Decode the supplied Mitsubishi message. -// -// Args: -// results: Ptr to the data to decode and where to store the decode result. -// nbits: Nr. of data bits to expect. -// strict: Flag indicating if we should perform strict matching. -// Returns: -// boolean: True if it can decode it, false if it can't. -// -// Status: BETA / previously working. -// -// Notes: -// This protocol appears to have no header. -// -// Ref: -// GlobalCache's Control Tower's Mitsubishi TV data. -bool IRrecv::decodeMitsubishi(decode_results *results, uint16_t nbits, - bool strict) { - if (results->rawlen < 2 * nbits + FOOTER - 1) - return false; // Shorter than shortest possibly expected. - if (strict && nbits != MITSUBISHI_BITS) - return false; // Request is out of spec. - - uint16_t offset = OFFSET_START; - uint64_t data = 0; - - // No Header - // But try to auto-calibrate off the initial mark signal. - if (!matchMark(results->rawbuf[offset], MITSUBISHI_BIT_MARK, 30)) - return false; - // Calculate how long the common tick time is based on the initial mark. - uint32_t tick = results->rawbuf[offset] * RAWTICK / MITSUBISHI_BIT_MARK_TICKS; - - // Data - match_result_t data_result = matchData(&(results->rawbuf[offset]), nbits, - MITSUBISHI_BIT_MARK_TICKS * tick, - MITSUBISHI_ONE_SPACE_TICKS * tick, - MITSUBISHI_BIT_MARK_TICKS * tick, - MITSUBISHI_ZERO_SPACE_TICKS * tick); - if (data_result.success == false) return false; - data = data_result.data; - offset += data_result.used; - uint16_t actualBits = data_result.used / 2; - - // Footer - if (!matchMark(results->rawbuf[offset++], MITSUBISHI_BIT_MARK_TICKS * tick, - 30)) return false; - if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], MITSUBISHI_MIN_GAP_TICKS * tick)) - return false; - - // Compliance - if (actualBits < nbits) - return false; - if (strict && actualBits != nbits) - return false; // Not as we expected. - - // Success - results->decode_type = MITSUBISHI; - results->bits = actualBits; - results->value = data; - results->address = 0; - results->command = 0; - return true; -} -#endif - -#if SEND_MITSUBISHI_AC -// Send a Mitsubishi A/C message. -// -// Args: -// data: An array of bytes containing the IR command. -// nbytes: Nr. of bytes of data in the array. (>=MITSUBISHI_AC_STATE_LENGTH) -// repeat: Nr. of times the message is to be repeated. -// (Default = MITSUBISHI_AC_MIN_REPEAT). -// -// Status: BETA / Appears to be working. -// -void IRsend::sendMitsubishiAC(unsigned char data[], uint16_t nbytes, - uint16_t repeat) { - if (nbytes < MITSUBISHI_AC_STATE_LENGTH) - return; // Not enough bytes to send a proper message. - - // Set IR carrier frequency - enableIROut(38); - // Mitsubishi AC remote sends the packet twice. - for (uint16_t r = 0; r <= repeat; r++) { - // Header - mark(MITSUBISHI_AC_HDR_MARK); - space(MITSUBISHI_AC_HDR_SPACE); - // Data - for (uint16_t i = 0; i < nbytes; i++) - sendData(MITSUBISHI_AC_BIT_MARK, MITSUBISHI_AC_ONE_SPACE, - MITSUBISHI_AC_BIT_MARK, MITSUBISHI_AC_ZERO_SPACE, - data[i], 8, false); - // Footer - mark(MITSUBISHI_AC_RPT_MARK); - space(MITSUBISHI_AC_RPT_SPACE); - } -} - -// Code to emulate Mitsubishi A/C IR remote control unit. -// Inspired and derived from the work done at: -// https://github.com/r45635/HVAC-IR-Control -// -// Warning: Consider this very alpha code. Seems to work, but not validated. -// -// Equipment it seems compatible with: -// * -// Initialise the object. -IRMitsubishiAC::IRMitsubishiAC(uint16_t pin) : _irsend(pin) { - stateReset(); -} - -// Reset the state of the remote to a known good state/sequence. -void IRMitsubishiAC::stateReset() { - // The state of the IR remote in IR code form. - // Known good state obtained from: - // https://github.com/r45635/HVAC-IR-Control/blob/master/HVAC_ESP8266/HVAC_ESP8266.ino#L108 - // Note: Can't use the following because it requires -std=c++11 - // uint8_t known_good_state[MITSUBISHI_AC_STATE_LENGTH] = { - // 0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, 0x08, 0x06, 0x30, 0x45, 0x67, 0x00, - // 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F}; - remote_state[0] = 0x23; - remote_state[1] = 0xCB; - remote_state[2] = 0x26; - remote_state[3] = 0x01; - remote_state[4] = 0x00; - remote_state[5] = 0x20; - remote_state[6] = 0x08; - remote_state[7] = 0x06; - remote_state[8] = 0x30; - remote_state[9] = 0x45; - remote_state[10] = 0x67; - for (uint8_t i = 11; i < MITSUBISHI_AC_STATE_LENGTH - 1; i++) - remote_state[i] = 0; - remote_state[MITSUBISHI_AC_STATE_LENGTH - 1] = 0x1F; - checksum(); // Calculate the checksum -} - -// Configure the pin for output. -void IRMitsubishiAC::begin() { - _irsend.begin(); -} - -// Send the current desired state to the IR LED. -void IRMitsubishiAC::send() { - checksum(); // Ensure correct checksum before sending. - _irsend.sendMitsubishiAC(remote_state); -} - -// Return a pointer to the internal state date of the remote. -uint8_t* IRMitsubishiAC::getRaw() { - checksum(); - return remote_state; -} - -// Calculate the checksum for the current internal state of the remote. -void IRMitsubishiAC::checksum() { - uint8_t sum = 0; - // Checksum is simple addition of all previous bytes stored - // as a 8 bit value. - for (uint8_t i = 0; i < 17; i++) - sum += remote_state[i]; - remote_state[17] = sum & 0xFFU; -} - -// Set the requested power state of the A/C to off. -void IRMitsubishiAC::on() { - // state = ON; - remote_state[5] |= MITSUBISHI_AC_POWER; -} - -// Set the requested power state of the A/C to off. -void IRMitsubishiAC::off() { - // state = OFF; - remote_state[5] &= ~MITSUBISHI_AC_POWER; -} - -// Set the requested power state of the A/C. -void IRMitsubishiAC::setPower(bool state) { - if (state) - on(); - else - off(); -} - -// Return the requested power state of the A/C. -bool IRMitsubishiAC::getPower() { - return((remote_state[5] & MITSUBISHI_AC_POWER) != 0); -} - -// Set the temp. in deg C -void IRMitsubishiAC::setTemp(uint8_t temp) { - temp = std::max((uint8_t) MITSUBISHI_AC_MIN_TEMP, temp); - temp = std::min((uint8_t) MITSUBISHI_AC_MAX_TEMP, temp); - remote_state[7] = temp - MITSUBISHI_AC_MIN_TEMP; -} - -// Return the set temp. in deg C -uint8_t IRMitsubishiAC::getTemp() { - return(remote_state[7] + MITSUBISHI_AC_MIN_TEMP); -} - -// Set the speed of the fan, 0-6. -// 0 is auto, 1-5 is the speed, 6 is silent. -void IRMitsubishiAC::setFan(uint8_t fan) { - // Bounds check - if (fan > MITSUBISHI_AC_FAN_SILENT) - fan = MITSUBISHI_AC_FAN_MAX; // Set the fan to maximum if out of range. - if (fan == MITSUBISHI_AC_FAN_AUTO) { // Automatic is a special case. - remote_state[9] = 0b10000000 | (remote_state[9] & 0b01111000); - return; - } else if (fan >= MITSUBISHI_AC_FAN_MAX) { - fan--; // There is no spoon^H^H^Heed 5 (max), pretend it doesn't exist. - } - remote_state[9] &= 0b01111000; // Clear the previous state - remote_state[9] |= fan; -} - -// Return the requested state of the unit's fan. -uint8_t IRMitsubishiAC::getFan() { - uint8_t fan = remote_state[9] & 0b111; - if (fan == MITSUBISHI_AC_FAN_MAX) - return MITSUBISHI_AC_FAN_SILENT; - return fan; -} - -// Return the requested climate operation mode of the a/c unit. -uint8_t IRMitsubishiAC::getMode() { - return(remote_state[6]); -} - -// Set the requested climate operation mode of the a/c unit. -void IRMitsubishiAC::setMode(uint8_t mode) { - // If we get an unexpected mode, default to AUTO. - switch (mode) { - case MITSUBISHI_AC_AUTO: break; - case MITSUBISHI_AC_COOL: break; - case MITSUBISHI_AC_DRY: break; - case MITSUBISHI_AC_HEAT: break; - default: mode = MITSUBISHI_AC_AUTO; - } - remote_state[6] = mode; -} - -// Set the requested vane operation mode of the a/c unit. -void IRMitsubishiAC::setVane(uint8_t mode) { - mode = std::min(mode, (uint8_t) 0b111); // bounds check - mode |= 0b1000; - mode <<= 3; - remote_state[9] &= 0b11000111; // Clear the previous setting. - remote_state[9] |= mode; -} - -// Return the requested vane operation mode of the a/c unit. -uint8_t IRMitsubishiAC::getVane() { - return ((remote_state[9] & 0b00111000) >> 3); -} -#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Mitsubishi.h b/lib/IRremoteESP8266-2.2.1.02/src/ir_Mitsubishi.h deleted file mode 100644 index e9f5731aa..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Mitsubishi.h +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2009 Ken Shirriff -// Copyright 2017 David Conran -#ifndef IR_MITSUBISHI_H_ -#define IR_MITSUBISHI_H_ - -#define __STDC_LIMIT_MACROS -#include -#include "IRremoteESP8266.h" -#include "IRsend.h" - -// MMMMM IIIII TTTTT SSSS U U BBBB IIIII SSSS H H IIIII -// M M M I T S U U B B I S H H I -// M M M I T SSS U U BBBB I SSS HHHHH I -// M M I T S U U B B I S H H I -// M M IIIII T SSSS UUU BBBBB IIIII SSSS H H IIIII - -// Mitsubishi (TV) decoding added from https://github.com/z3t0/Arduino-IRremote -// Mitsubishi (TV) sending & Mitsubishi A/C support added by David Conran - -// Constants -#define MITSUBISHI_AC_AUTO 0x20U -#define MITSUBISHI_AC_COOL 0x18U -#define MITSUBISHI_AC_DRY 0x10U -#define MITSUBISHI_AC_HEAT 0x08U -#define MITSUBISHI_AC_POWER 0x20U -#define MITSUBISHI_AC_FAN_AUTO 0U -#define MITSUBISHI_AC_FAN_MAX 5U -#define MITSUBISHI_AC_FAN_REAL_MAX 4U -#define MITSUBISHI_AC_FAN_SILENT 6U -#define MITSUBISHI_AC_MIN_TEMP 16U // 16C -#define MITSUBISHI_AC_MAX_TEMP 31U // 31C -#define MITSUBISHI_AC_VANE_AUTO 0U -#define MITSUBISHI_AC_VANE_AUTO_MOVE 7U - -#if SEND_MITSUBISHI_AC -class IRMitsubishiAC { - public: - explicit IRMitsubishiAC(uint16_t pin); - - void stateReset(); - void send(); - void begin(); - void on(); - void off(); - void setPower(bool state); - bool getPower(); - void setTemp(uint8_t temp); - uint8_t getTemp(); - void setFan(uint8_t fan); - uint8_t getFan(); - void setMode(uint8_t mode); - uint8_t getMode(); - void setVane(uint8_t mode); - uint8_t getVane(); - uint8_t* getRaw(); - - private: - uint8_t remote_state[MITSUBISHI_AC_STATE_LENGTH]; - void checksum(); - IRsend _irsend; -}; - -#endif - -#endif // IR_MITSUBISHI_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Nikai.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_Nikai.cpp deleted file mode 100644 index e1afda4c5..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Nikai.cpp +++ /dev/null @@ -1,120 +0,0 @@ -// Copyright 2009 Ken Shirriff -// Copyright 2017 David Conran - -#include -#include "IRrecv.h" -#include "IRsend.h" -#include "IRtimer.h" -#include "IRutils.h" - -// NN NN IIIII KK KK AAA IIIII -// NNN NN III KK KK AAAAA III -// NN N NN III KKKK AA AA III -// NN NNN III KK KK AAAAAAA III -// NN NN IIIII KK KK AA AA IIIII - -// Constants -// Ref: -// https://github.com/markszabo/IRremoteESP8266/issues/309 -#define NIKAI_TICK 500U -#define NIKAI_HDR_MARK_TICKS 8U -#define NIKAI_HDR_MARK (NIKAI_HDR_MARK_TICKS * NIKAI_TICK) -#define NIKAI_HDR_SPACE_TICKS 8U -#define NIKAI_HDR_SPACE (NIKAI_HDR_SPACE_TICKS * NIKAI_TICK) -#define NIKAI_BIT_MARK_TICKS 1U -#define NIKAI_BIT_MARK (NIKAI_BIT_MARK_TICKS * NIKAI_TICK) -#define NIKAI_ONE_SPACE_TICKS 2U -#define NIKAI_ONE_SPACE (NIKAI_ONE_SPACE_TICKS * NIKAI_TICK) -#define NIKAI_ZERO_SPACE_TICKS 4U -#define NIKAI_ZERO_SPACE (NIKAI_ZERO_SPACE_TICKS * NIKAI_TICK) -#define NIKAI_MIN_GAP_TICKS 17U -#define NIKAI_MIN_GAP (NIKAI_MIN_GAP_TICKS * NIKAI_TICK) - - -#if SEND_NIKAI -// Send a Nikai TV formatted message. -// -// Args: -// data: The message to be sent. -// nbits: The bit size of the message being sent. typically NIKAI_BITS. -// repeat: The number of times the message is to be repeated. -// -// Status: ALPHA / Untested. -// -// Ref: https://github.com/markszabo/IRremoteESP8266/issues/309 -void IRsend::sendNikai(uint64_t data, uint16_t nbits, uint16_t repeat) { - // Set 38kHz IR carrier frequency & a 1/3 (33%) duty cycle. - enableIROut(38, 33); - // We always send a message, even for repeat=0, hence '<= repeat'. - for (uint16_t i=0; i <= repeat; i++) { - // Header - mark(NIKAI_HDR_MARK); - space(NIKAI_HDR_SPACE); - // Data - sendData(NIKAI_BIT_MARK, NIKAI_ONE_SPACE, NIKAI_BIT_MARK, - NIKAI_ZERO_SPACE, data, nbits, true); - // Footer - mark(NIKAI_BIT_MARK); - space(NIKAI_MIN_GAP); - } -} -#endif - -#if DECODE_NIKAI -// Decode the supplied Nikai message. -// -// Args: -// results: Ptr to the data to decode and where to store the decode result. -// nbits: Nr. of bits to expect in the data portion. -// Typically NIKAI_BITS. -// strict: Flag to indicate if we strictly adhere to the specification. -// Returns: -// boolean: True if it can decode it, false if it can't. -// -// Status: ALPHA / Untested. -// -bool IRrecv::decodeNikai(decode_results *results, uint16_t nbits, bool strict) { - if (results->rawlen < 2 * nbits + HEADER + FOOTER - 1) - return false; // Can't possibly be a valid Nikai message. - if (strict && nbits != NIKAI_BITS) - return false; // We expect Nikai to be a certain sized message. - - uint64_t data = 0; - uint16_t offset = OFFSET_START; - - // Header - if (!matchMark(results->rawbuf[offset], NIKAI_HDR_MARK)) return false; - // Calculate how long the common tick time is based on the header mark. - uint32_t m_tick = results->rawbuf[offset++] * RAWTICK / - NIKAI_HDR_MARK_TICKS; - if (!matchSpace(results->rawbuf[offset], NIKAI_HDR_SPACE)) return false; - // Calculate how long the common tick time is based on the header space. - uint32_t s_tick = results->rawbuf[offset++] * RAWTICK / - NIKAI_HDR_SPACE_TICKS; - // Data - match_result_t data_result = matchData(&(results->rawbuf[offset]), nbits, - NIKAI_BIT_MARK_TICKS * m_tick, - NIKAI_ONE_SPACE_TICKS * s_tick, - NIKAI_BIT_MARK_TICKS * m_tick, - NIKAI_ZERO_SPACE_TICKS * s_tick); - if (data_result.success == false) return false; - data = data_result.data; - offset += data_result.used; - // Footer - if (!matchMark(results->rawbuf[offset++], NIKAI_BIT_MARK_TICKS * m_tick)) - return false; - if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], NIKAI_MIN_GAP_TICKS * s_tick)) - return false; - - // Compliance - - // Success - results->bits = nbits; - results->value = data; - results->decode_type = NIKAI; - results->command = 0; - results->address = 0; - return true; -} -#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Panasonic.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_Panasonic.cpp deleted file mode 100644 index fb1f12234..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Panasonic.cpp +++ /dev/null @@ -1,196 +0,0 @@ -// Copyright 2015 Kristian Lauszus -// Copyright 2017 David Conran - -#include -#include "IRrecv.h" -#include "IRsend.h" -#include "IRtimer.h" -#include "IRutils.h" - -// PPPP AAA N N AAA SSSS OOO N N IIIII CCCC -// P P A A NN N A A S O O NN N I C -// PPPP AAAAA N N N AAAAA SSS O O N N N I C -// P A A N NN A A S O O N NN I C -// P A A N N A A SSSS OOO N N IIIII CCCC - -// Panasonic protocol originally added by Kristian Lauszus from: -// https://github.com/z3t0/Arduino-IRremote -// (Thanks to zenwheel and other people at the original blog post) - -// Constants -// Ref: -// http://www.remotecentral.com/cgi-bin/mboard/rc-pronto/thread.cgi?26152 -#define PANASONIC_TICK 432U -#define PANASONIC_HDR_MARK_TICKS 8U -#define PANASONIC_HDR_MARK (PANASONIC_HDR_MARK_TICKS * PANASONIC_TICK) -#define PANASONIC_HDR_SPACE_TICKS 4U -#define PANASONIC_HDR_SPACE (PANASONIC_HDR_SPACE_TICKS * PANASONIC_TICK) -#define PANASONIC_BIT_MARK_TICKS 1U -#define PANASONIC_BIT_MARK (PANASONIC_BIT_MARK_TICKS * PANASONIC_TICK) -#define PANASONIC_ONE_SPACE_TICKS 3U -#define PANASONIC_ONE_SPACE (PANASONIC_ONE_SPACE_TICKS * PANASONIC_TICK) -#define PANASONIC_ZERO_SPACE_TICKS 1U -#define PANASONIC_ZERO_SPACE (PANASONIC_ZERO_SPACE_TICKS * PANASONIC_TICK) -#define PANASONIC_MIN_COMMAND_LENGTH_TICKS 300UL -#define PANASONIC_MIN_COMMAND_LENGTH (PANASONIC_MIN_COMMAND_LENGTH_TICKS * \ - PANASONIC_TICK) -#define PANASONIC_END_GAP 5000U // See issue #245 -#define PANASONIC_MIN_GAP_TICKS (PANASONIC_MIN_COMMAND_LENGTH_TICKS - \ - (PANASONIC_HDR_MARK_TICKS + PANASONIC_HDR_SPACE_TICKS + \ - PANASONIC_BITS * (PANASONIC_BIT_MARK_TICKS + PANASONIC_ONE_SPACE_TICKS) + \ - PANASONIC_BIT_MARK_TICKS)) -#define PANASONIC_MIN_GAP ((uint32_t)(PANASONIC_MIN_GAP_TICKS * PANASONIC_TICK)) -#if (SEND_PANASONIC || SEND_DENON) -// Send a Panasonic formatted message. -// -// Args: -// data: The message to be sent. -// nbits: The number of bits of the message to be sent. (PANASONIC_BITS). -// repeat: The number of times the command is to be repeated. -// -// Status: BETA / Should be working. -// -// Note: -// This protocol is a modified version of Kaseikyo. -void IRsend::sendPanasonic64(uint64_t data, uint16_t nbits, uint16_t repeat) { - enableIROut(36700U); // Set IR carrier frequency of 36.7kHz. - IRtimer usecTimer = IRtimer(); - - for (uint16_t i = 0; i <= repeat; i++) { - usecTimer.reset(); - // Header - mark(PANASONIC_HDR_MARK); - space(PANASONIC_HDR_SPACE); - // Data - sendData(PANASONIC_BIT_MARK, PANASONIC_ONE_SPACE, - PANASONIC_BIT_MARK, PANASONIC_ZERO_SPACE, - data, nbits, true); - // Footer - mark(PANASONIC_BIT_MARK); - space(std::max((uint32_t) PANASONIC_MIN_COMMAND_LENGTH - - usecTimer.elapsed(), - PANASONIC_MIN_GAP)); - } -} - -// Send a Panasonic formatted message. -// -// Args: -// address: The manufacturer code. -// data: The data portion to be sent. -// nbits: The number of bits of the message to be sent. (PANASONIC_BITS). -// repeat: The number of times the command is to be repeated. -// -// Status: STABLE. -// -// Note: -// This protocol is a modified version of Kaseikyo. -void IRsend::sendPanasonic(uint16_t address, uint32_t data, uint16_t nbits, - uint16_t repeat) { - sendPanasonic64(((uint64_t) address << 32) | (uint64_t) data, nbits, repeat); -} - -// Calculate the raw Panasonic data based on device, subdevice, & function. -// -// Args: -// manufacturer: A 16-bit manufacturer code. e.g. 0x4004 is Panasonic. -// device: An 8-bit code. -// subdevice: An 8-bit code. -// function: An 8-bit code. -// Returns: -// A raw uint64_t Panasonic message. -// -// Status: BETA / Should be working.. -// -// Note: -// Panasonic 48-bit protocol is a modified version of Kaseikyo. -// Ref: -// http://www.remotecentral.com/cgi-bin/mboard/rc-pronto/thread.cgi?2615 -uint64_t IRsend::encodePanasonic(uint16_t manufacturer, - uint8_t device, - uint8_t subdevice, - uint8_t function) { - uint8_t checksum = device ^ subdevice ^ function; - return (((uint64_t) manufacturer << 32) | - ((uint64_t) device << 24) | - ((uint64_t) subdevice << 16) | - ((uint64_t) function << 8) | - checksum); -} -#endif // (SEND_PANASONIC || SEND_DENON) - -#if (DECODE_PANASONIC || DECODE_DENON) -// Decode the supplied Panasonic message. -// -// Args: -// results: Ptr to the data to decode and where to store the decode result. -// nbits: Nr. of data bits to expect. -// strict: Flag indicating if we should perform strict matching. -// Returns: -// boolean: True if it can decode it, false if it can't. -// -// Status: BETA / Should be working. -// Note: -// Panasonic 48-bit protocol is a modified version of Kaseikyo. -// Ref: -// http://www.remotecentral.com/cgi-bin/mboard/rc-pronto/thread.cgi?26152 -// http://www.hifi-remote.com/wiki/index.php?title=Panasonic -bool IRrecv::decodePanasonic(decode_results *results, uint16_t nbits, - bool strict, uint32_t manufacturer) { - if (results->rawlen < 2 * nbits + HEADER + FOOTER - 1) - return false; // Not enough entries to be a Panasonic message. - if (strict && nbits != PANASONIC_BITS) - return false; // Request is out of spec. - - uint64_t data = 0; - uint16_t offset = OFFSET_START; - - // Header - if (!matchMark(results->rawbuf[offset], PANASONIC_HDR_MARK)) return false; - // Calculate how long the common tick time is based on the header mark. - uint32_t m_tick = results->rawbuf[offset++] * RAWTICK / - PANASONIC_HDR_MARK_TICKS; - if (!matchSpace(results->rawbuf[offset], PANASONIC_HDR_SPACE)) return false; - // Calculate how long the common tick time is based on the header space. - uint32_t s_tick = results->rawbuf[offset++] * RAWTICK / - PANASONIC_HDR_SPACE_TICKS; - - // Data - match_result_t data_result = matchData(&(results->rawbuf[offset]), nbits, - PANASONIC_BIT_MARK_TICKS * m_tick, - PANASONIC_ONE_SPACE_TICKS * s_tick, - PANASONIC_BIT_MARK_TICKS * m_tick, - PANASONIC_ZERO_SPACE_TICKS * s_tick); - if (data_result.success == false) return false; - data = data_result.data; - offset += data_result.used; - - // Footer - if (!match(results->rawbuf[offset++], PANASONIC_BIT_MARK_TICKS * m_tick)) - return false; - if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], PANASONIC_END_GAP)) - return false; - - // Compliance - uint32_t address = data >> 32; - uint32_t command = data & 0xFFFFFFFF; - if (strict) { - if (address != manufacturer) // Verify the Manufacturer code. - return false; - // Verify the checksum. - uint8_t checksumOrig = data & 0xFF; - uint8_t checksumCalc = ((data >> 24) ^ (data >> 16) ^ (data >> 8)) & 0xFF; - if (checksumOrig != checksumCalc) - return false; - } - - // Success - results->value = data; - results->address = address; - results->command = command; - results->decode_type = PANASONIC; - results->bits = nbits; - return true; -} -#endif // (DECODE_PANASONIC || DECODE_DENON) diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Samsung.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_Samsung.cpp deleted file mode 100644 index dbd94bcd4..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Samsung.cpp +++ /dev/null @@ -1,175 +0,0 @@ -// Copyright 2009 Ken Shirriff -// Copyright 2017 David Conran - -#include -#include "IRrecv.h" -#include "IRsend.h" -#include "IRtimer.h" -#include "IRutils.h" - -// SSSS AAA MMM SSSS U U N N GGGG -// S A A M M M S U U NN N G -// SSS AAAAA M M M SSS U U N N N G GG -// S A A M M S U U N NN G G -// SSSS A A M M SSSS UUU N N GGG - -// Samsung originally added from https://github.com/shirriff/Arduino-IRremote/ - -// Constants -// Ref: -// http://elektrolab.wz.cz/katalog/samsung_protocol.pdf -#define SAMSUNG_TICK 560U -#define SAMSUNG_HDR_MARK_TICKS 8U -#define SAMSUNG_HDR_MARK (SAMSUNG_HDR_MARK_TICKS * SAMSUNG_TICK) -#define SAMSUNG_HDR_SPACE_TICKS 8U -#define SAMSUNG_HDR_SPACE (SAMSUNG_HDR_SPACE_TICKS * SAMSUNG_TICK) -#define SAMSUNG_BIT_MARK_TICKS 1U -#define SAMSUNG_BIT_MARK (SAMSUNG_BIT_MARK_TICKS * SAMSUNG_TICK) -#define SAMSUNG_ONE_SPACE_TICKS 3U -#define SAMSUNG_ONE_SPACE (SAMSUNG_ONE_SPACE_TICKS * SAMSUNG_TICK) -#define SAMSUNG_ZERO_SPACE_TICKS 1U -#define SAMSUNG_ZERO_SPACE (SAMSUNG_ZERO_SPACE_TICKS * SAMSUNG_TICK) -#define SAMSUNG_RPT_SPACE_TICKS 4U -#define SAMSUNG_RPT_SPACE (SAMSUNG_RPT_SPACE_TICKS * SAMSUNG_TICK) -#define SAMSUNG_MIN_MESSAGE_LENGTH_TICKS 193U -#define SAMSUNG_MIN_MESSAGE_LENGTH (SAMSUNG_MIN_MESSAGE_LENGTH_TICKS * \ - SAMSUNG_TICK) -#define SAMSUNG_MIN_GAP_TICKS (SAMSUNG_MIN_MESSAGE_LENGTH_TICKS - \ - (SAMSUNG_HDR_MARK_TICKS + SAMSUNG_HDR_SPACE_TICKS + \ - SAMSUNG_BITS * (SAMSUNG_BIT_MARK_TICKS + SAMSUNG_ONE_SPACE_TICKS) + \ - SAMSUNG_BIT_MARK_TICKS)) -#define SAMSUNG_MIN_GAP (SAMSUNG_MIN_GAP_TICKS * SAMSUNG_TICK) - - - -#if SEND_SAMSUNG -// Send a Samsung formatted message. -// Samsung has a separate message to indicate a repeat, like NEC does. -// TODO(crankyoldgit): Confirm that is actually how Samsung sends a repeat. -// The refdoc doesn't indicate it is true. -// -// Args: -// data: The message to be sent. -// nbits: The bit size of the message being sent. typically SAMSUNG_BITS. -// repeat: The number of times the message is to be repeated. -// -// Status: BETA / Should be working. -// -// Ref: http://elektrolab.wz.cz/katalog/samsung_protocol.pdf -void IRsend::sendSAMSUNG(uint64_t data, uint16_t nbits, uint16_t repeat) { - // Set 38kHz IR carrier frequency & a 1/3 (33%) duty cycle. - enableIROut(38, 33); - IRtimer usecTimer = IRtimer(); - // We always send a message, even for repeat=0, hence '<= repeat'. - for (uint16_t i=0; i <= repeat; i++) { - usecTimer.reset(); - // Header - mark(SAMSUNG_HDR_MARK); - space(SAMSUNG_HDR_SPACE); - // Data - sendData(SAMSUNG_BIT_MARK, SAMSUNG_ONE_SPACE, SAMSUNG_BIT_MARK, - SAMSUNG_ZERO_SPACE, data, nbits, true); - // Footer - mark(SAMSUNG_BIT_MARK); - space(std::max((uint32_t) SAMSUNG_MIN_GAP, - (uint32_t) (SAMSUNG_MIN_MESSAGE_LENGTH - - usecTimer.elapsed()))); - } -} - -// Construct a raw Samsung message from the supplied customer(address) & -// command. -// -// Args: -// customer: The customer code. (aka. Address) -// command: The command code. -// Returns: -// A raw 32-bit Samsung message suitable for sendSAMSUNG(). -// -// Status: BETA / Should be working. -uint32_t IRsend::encodeSAMSUNG(uint8_t customer, uint8_t command) { - customer = reverseBits(customer, sizeof(customer) * 8); - command = reverseBits(command, sizeof(command) * 8); - return((command ^ 0xFF) | (command << 8) | - (customer << 16) | (customer << 24)); -} -#endif - -#if DECODE_SAMSUNG -// Decode the supplied Samsung message. -// Samsung messages whilst 32 bits in size, only contain 16 bits of distinct -// data. e.g. In transmition order: -// customer_byte + customer_byte(same) + address_byte + invert(address_byte) -// -// Args: -// results: Ptr to the data to decode and where to store the decode result. -// nbits: Nr. of bits to expect in the data portion. Typically SAMSUNG_BITS. -// strict: Flag to indicate if we strictly adhere to the specification. -// Returns: -// boolean: True if it can decode it, false if it can't. -// -// Status: STABLE -// -// Note: -// LG 32bit protocol appears near identical to the Samsung protocol. -// They differ on their compliance criteria and how they repeat. -// Ref: -// http://elektrolab.wz.cz/katalog/samsung_protocol.pdf -bool IRrecv::decodeSAMSUNG(decode_results *results, uint16_t nbits, - bool strict) { - if (results->rawlen < 2 * nbits + HEADER + FOOTER - 1) - return false; // Can't possibly be a valid Samsung message. - if (strict && nbits != SAMSUNG_BITS) - return false; // We expect Samsung to be 32 bits of message. - - uint64_t data = 0; - uint16_t offset = OFFSET_START; - - // Header - if (!matchMark(results->rawbuf[offset], SAMSUNG_HDR_MARK)) return false; - // Calculate how long the common tick time is based on the header mark. - uint32_t m_tick = results->rawbuf[offset++] * RAWTICK / - SAMSUNG_HDR_MARK_TICKS; - if (!matchSpace(results->rawbuf[offset], SAMSUNG_HDR_SPACE)) return false; - // Calculate how long the common tick time is based on the header space. - uint32_t s_tick = results->rawbuf[offset++] * RAWTICK / - SAMSUNG_HDR_SPACE_TICKS; - // Data - match_result_t data_result = matchData(&(results->rawbuf[offset]), nbits, - SAMSUNG_BIT_MARK_TICKS * m_tick, - SAMSUNG_ONE_SPACE_TICKS * s_tick, - SAMSUNG_BIT_MARK_TICKS * m_tick, - SAMSUNG_ZERO_SPACE_TICKS * s_tick); - if (data_result.success == false) return false; - data = data_result.data; - offset += data_result.used; - // Footer - if (!matchMark(results->rawbuf[offset++], SAMSUNG_BIT_MARK_TICKS * m_tick)) - return false; - if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], SAMSUNG_MIN_GAP_TICKS * s_tick)) - return false; - - // Compliance - - // According to the spec, the customer (address) code is the first 8 - // transmitted bits. It's then repeated. Check for that. - uint8_t address = data >> 24; - if (strict && address != ((data >> 16) & 0xFF)) - return false; - // Spec says the command code is the 3rd block of transmitted 8-bits, - // followed by the inverted command code. - uint8_t command = (data & 0xFF00) >> 8; - if (strict && command != ((data & 0xFF) ^ 0xFF)) - return false; - - // Success - results->bits = nbits; - results->value = data; - results->decode_type = SAMSUNG; - // command & address need to be reversed as they are transmitted LSB first, - results->command = reverseBits(command, sizeof(command) * 8); - results->address = reverseBits(address, sizeof(address) * 8); - return true; -} -#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Trotec.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_Trotec.cpp deleted file mode 100644 index ef8e9efa6..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Trotec.cpp +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright 2017 stufisher - -#include "ir_Trotec.h" -#include "IRremoteESP8266.h" -#include "IRutils.h" - -// Constants -#define TROTEC_HDR_MARK 5952U -#define TROTEC_HDR_SPACE 7364U -#define TROTEC_ONE_MARK 592U -#define TROTEC_ONE_SPACE 1560U -#define TROTEC_ZERO_MARK 592U -#define TROTEC_ZERO_SPACE 592U -#define TROTEC_GAP 6184U -#define TROTEC_GAP_END 1500U // made up value - -#if SEND_TROTEC - -void IRsend::sendTrotec(unsigned char data[], uint16_t nbytes, - uint16_t repeat) { - if (nbytes < TROTEC_COMMAND_LENGTH) - return; - - enableIROut(36); - - for (uint16_t r = 0; r <= repeat; r++) { - // Header - mark(TROTEC_HDR_MARK); - space(TROTEC_HDR_SPACE); - - // Data - for (uint16_t i = 0; i < nbytes; i++) - sendData(TROTEC_ONE_MARK, TROTEC_ONE_SPACE, TROTEC_ZERO_MARK, - TROTEC_ZERO_SPACE, data[i], 8, false); - - // Footer - mark(TROTEC_ONE_MARK); - space(TROTEC_GAP); - mark(TROTEC_ONE_MARK); - space(TROTEC_GAP_END); - } -} - -IRTrotecESP::IRTrotecESP(uint16_t pin) : _irsend(pin) { - stateReset(); -} - -void IRTrotecESP::begin() { - _irsend.begin(); -} - -void IRTrotecESP::send() { - checksum(); - _irsend.sendTrotec(trotec); -} - -void IRTrotecESP::checksum() { - uint8_t sum = 0; - uint8_t i; - - for (i = 2; i < 8; i++) sum += trotec[i]; - - trotec[8] = sum & 0xFF; -} - -void IRTrotecESP::stateReset() { - for (uint8_t i = 2; i < TROTEC_COMMAND_LENGTH; i++) - trotec[i] = 0x0; - - trotec[0] = TROTEC_INTRO1; - trotec[1] = TROTEC_INTRO2; - - setPower(false); - setTemp(TROTEC_DEF_TEMP); - setSpeed(TROTEC_FAN_MED); - setMode(TROTEC_AUTO); -} - -uint8_t* IRTrotecESP::getRaw() { - checksum(); - return trotec; -} - -void IRTrotecESP::setPower(bool state) { - if (state) - trotec[2] |= (TROTEC_ON << 3); - else - trotec[2] &= ~(TROTEC_ON << 3); -} - -uint8_t IRTrotecESP::getPower() { - return trotec[2] & (TROTEC_ON << 3); -} - -void IRTrotecESP::setSpeed(uint8_t speed) { - trotec[2] = (trotec[2] & 0xcf) | (speed << 4); -} - -uint8_t IRTrotecESP::getSpeed() { - return trotec[2] & 0x30; -} - -void IRTrotecESP::setMode(uint8_t mode) { - trotec[2] = (trotec[2] & 0xfc) | mode; -} - -uint8_t IRTrotecESP::getMode() { - return trotec[2] & 0x03; -} - -void IRTrotecESP::setTemp(uint8_t temp) { - if (temp < TROTEC_MIN_TEMP) - temp = TROTEC_MIN_TEMP; - else if (temp > TROTEC_MAX_TEMP) - temp = TROTEC_MAX_TEMP; - - trotec[3] = (trotec[3] & 0x80) | (temp - TROTEC_MIN_TEMP); -} - -uint8_t IRTrotecESP::getTemp() { - return trotec[3] & 0x7f; -} - -void IRTrotecESP::setSleep(bool sleep) { - if (sleep) - trotec[3] |= (TROTEC_SLEEP_ON << 7); - else - trotec[3] &= ~(TROTEC_SLEEP_ON << 7); -} - -bool IRTrotecESP::getSleep(void) { - return trotec[3] & (TROTEC_SLEEP_ON << 7); -} - -void IRTrotecESP::setTimer(uint8_t timer) { - if (timer > TROTEC_MAX_TIMER) timer = TROTEC_MAX_TIMER; - - if (timer) { - trotec[5] |= (TROTEC_TIMER_ON << 6); - trotec[6] = timer; - } else { - trotec[5] &= ~(TROTEC_TIMER_ON << 6); - trotec[6] = 0; - } -} - -uint8_t IRTrotecESP::getTimer() { - return trotec[6]; -} - -#endif // SEND_TROTEC diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Trotec.h b/lib/IRremoteESP8266-2.2.1.02/src/ir_Trotec.h deleted file mode 100644 index 01ac13c59..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Trotec.h +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2017 stufisher - -#ifndef IR_TROTEC_H_ -#define IR_TROTEC_H_ - -#include "IRremoteESP8266.h" -#include "IRsend.h" - -// Constants -// Byte 0 -#define TROTEC_INTRO1 0x12 - -// Byte 1 -#define TROTEC_INTRO2 0x34 - -// Byte 2 -#define TROTEC_AUTO 0 -#define TROTEC_COOL 1 -#define TROTEC_DRY 2 -#define TROTEC_FAN 3 - -#define TROTEC_ON 1 -#define TROTEC_OFF 0 - -#define TROTEC_FAN_LOW 1 -#define TROTEC_FAN_MED 2 -#define TROTEC_FAN_HIGH 3 - -// Byte 3 -#define TROTEC_MIN_TEMP 18 -#define TROTEC_MAX_TEMP 32 -#define TROTEC_DEF_TEMP 25 - -#define TROTEC_SLEEP_ON 1 - -// Byte 5 -#define TROTEC_TIMER_ON 1 - -// Byte 6 -#define TROTEC_MIN_TIMER 0 -#define TROTEC_MAX_TIMER 23 - -#if SEND_TROTEC - -class IRTrotecESP { - public: - explicit IRTrotecESP(uint16_t pin); - - void send(); - void begin(); - - void setPower(bool state); - uint8_t getPower(); - - void setTemp(uint8_t temp); - uint8_t getTemp(); - - void setSpeed(uint8_t fan); - uint8_t getSpeed(); - - uint8_t getMode(); - void setMode(uint8_t mode); - - bool getSleep(); - void setSleep(bool sleep); - - uint8_t getTimer(); - void setTimer(uint8_t timer); - - uint8_t* getRaw(); - - private: - uint8_t trotec[TROTEC_COMMAND_LENGTH]; - void stateReset(); - void checksum(); - IRsend _irsend; -}; -#endif - -#endif // IR_TROTEC_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Whynter.cpp b/lib/IRremoteESP8266-2.2.1.02/src/ir_Whynter.cpp deleted file mode 100644 index 4efb2c570..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Whynter.cpp +++ /dev/null @@ -1,144 +0,0 @@ -// Copyright 2009 Ken Shirriff -// Copyright 2017 David Conran - -#include -#include "IRrecv.h" -#include "IRsend.h" -#include "IRtimer.h" -#include "IRutils.h" - -// W W H H Y Y N N TTTTT EEEEE RRRRR -// W W H H Y Y NN N T E R R -// W W W HHHHH Y N N N T EEE RRRR -// W W W H H Y N NN T E R R -// WWW H H Y N N T EEEEE R R - -// Whynter A/C ARC-110WD added by Francesco Meschia -// Whynter originally added from https://github.com/shirriff/Arduino-IRremote/ - -// Constants -#define WHYNTER_TICK 50U -#define WHYNTER_HDR_MARK_TICKS 57U -#define WHYNTER_HDR_MARK (WHYNTER_HDR_MARK_TICKS * WHYNTER_TICK) -#define WHYNTER_HDR_SPACE_TICKS 57U -#define WHYNTER_HDR_SPACE (WHYNTER_HDR_SPACE_TICKS * \ - WHYNTER_TICK) -#define WHYNTER_BIT_MARK_TICKS 15U -#define WHYNTER_BIT_MARK (WHYNTER_BIT_MARK_TICKS * WHYNTER_TICK) -#define WHYNTER_ONE_SPACE_TICKS 43U -#define WHYNTER_ONE_SPACE (WHYNTER_ONE_SPACE_TICKS * \ - WHYNTER_TICK) -#define WHYNTER_ZERO_SPACE_TICKS 15U -#define WHYNTER_ZERO_SPACE (WHYNTER_ZERO_SPACE_TICKS * \ - WHYNTER_TICK) -#define WHYNTER_MIN_COMMAND_LENGTH_TICKS 2160U // Completely made up value. -#define WHYNTER_MIN_COMMAND_LENGTH (WHYNTER_MIN_COMMAND_LENGTH_TICKS * \ - WHYNTER_TICK) -#define WHYNTER_MIN_GAP_TICKS (WHYNTER_MIN_COMMAND_LENGTH_TICKS - \ - (2 * (WHYNTER_BIT_MARK_TICKS + WHYNTER_ZERO_SPACE_TICKS) + \ - WHYNTER_BITS * (WHYNTER_BIT_MARK_TICKS + WHYNTER_ONE_SPACE_TICKS))) -#define WHYNTER_MIN_GAP (WHYNTER_MIN_GAP_TICKS * WHYNTER_TICK) - -#if SEND_WHYNTER -// Send a Whynter message. -// -// Args: -// data: message to be sent. -// nbits: Nr. of bits of the message to be sent. -// repeat: Nr. of additional times the message is to be sent. -// -// Status: STABLE -// -// Ref: -// https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Whynter.cpp -void IRsend::sendWhynter(uint64_t data, uint16_t nbits, uint16_t repeat) { - // Set IR carrier frequency - enableIROut(38); - IRtimer usecTimer = IRtimer(); - - for (uint16_t i = 0; i <= repeat; i++) { - usecTimer.reset(); - // Header - mark(WHYNTER_BIT_MARK); - space(WHYNTER_ZERO_SPACE); - mark(WHYNTER_HDR_MARK); - space(WHYNTER_HDR_SPACE); - // Data - sendData(WHYNTER_BIT_MARK, WHYNTER_ONE_SPACE, WHYNTER_BIT_MARK, - WHYNTER_ZERO_SPACE, data, nbits, true); - // Footer - mark(WHYNTER_BIT_MARK); - space(std::max(WHYNTER_MIN_COMMAND_LENGTH - usecTimer.elapsed(), - WHYNTER_MIN_GAP)); - } -} -#endif - -#if DECODE_WHYNTER -// Decode the supplied Whynter message. -// -// Args: -// results: Ptr to the data to decode and where to store the decode result. -// nbits: Nr. of data bits to expect. -// strict: Flag indicating if we should perform strict matching. -// Returns: -// boolean: True if it can decode it, false if it can't. -// -// Status: BETA Strict mode is ALPHA. -// -// Ref: -// https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Whynter.cpp -bool IRrecv::decodeWhynter(decode_results *results, uint16_t nbits, - bool strict) { - if (results->rawlen < 2 * nbits + 2 * HEADER + FOOTER - 1) - return false; // We don't have enough entries to possibly match. - - // Compliance - if (strict && nbits != WHYNTER_BITS) - return false; // Incorrect nr. of bits per spec. - - uint16_t offset = OFFSET_START; - - // Header - // Sequence begins with a bit mark and a zero space. - // These are typically small, so we'll prefer to do the calibration - // on the much larger header mark & space that are next. - if (!matchMark(results->rawbuf[offset++], WHYNTER_BIT_MARK)) return false; - if (!matchSpace(results->rawbuf[offset++], WHYNTER_ZERO_SPACE)) return false; - // Main header mark and space - if (!matchMark(results->rawbuf[offset], WHYNTER_HDR_MARK)) return false; - // Calculate how long the common tick time is based on the header mark. - uint32_t m_tick = results->rawbuf[offset++] * RAWTICK / - WHYNTER_HDR_MARK_TICKS; - if (!matchSpace(results->rawbuf[offset], WHYNTER_HDR_SPACE)) return false; - // Calculate how long the common tick time is based on the header space. - uint32_t s_tick = results->rawbuf[offset++] * RAWTICK / - WHYNTER_HDR_SPACE_TICKS; - - // Data - uint64_t data = 0; - match_result_t data_result = matchData(&(results->rawbuf[offset]), nbits, - WHYNTER_BIT_MARK_TICKS * m_tick, - WHYNTER_ONE_SPACE_TICKS * s_tick, - WHYNTER_BIT_MARK_TICKS * m_tick, - WHYNTER_ZERO_SPACE_TICKS * s_tick); - if (data_result.success == false) return false; - data = data_result.data; - offset += data_result.used; - - // Footer - if (!matchMark(results->rawbuf[offset++], WHYNTER_BIT_MARK_TICKS * m_tick)) - return false; - if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], WHYNTER_MIN_GAP_TICKS * s_tick)) - return false; - - // Success - results->decode_type = WHYNTER; - results->bits = nbits; - results->value = data; - results->address = 0; - results->command = 0; - return true; -} -#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/test/IRsend_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/IRsend_test.cpp deleted file mode 100644 index 3b18ae582..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/IRsend_test.cpp +++ /dev/null @@ -1,139 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRsend_test.h" -#include "IRsend.h" -#include "gtest/gtest.h" - -// Tests sendData(). - -// Test sending zero bits. -TEST(TestSendData, SendZeroBits) { - IRsendTest irsend(4); - irsend.begin(); - irsend.sendData(1, 2, 3, 4, 0b1, 0, true); - EXPECT_EQ("", irsend.outputStr()); -} - -// Test sending zero and one. -TEST(TestSendData, SendSingleBit) { - IRsendTest irsend(4); - irsend.begin(); - irsend.sendData(1, 2, 3, 4, 0b1, 1, true); - EXPECT_EQ("m1s2", irsend.outputStr()); - irsend.sendData(1, 2, 3, 4, 0b0, 1, true); - EXPECT_EQ("m3s4", irsend.outputStr()); -} - -// Test sending bit order. -TEST(TestSendData, TestingBitSendOrder) { - IRsendTest irsend(4); - irsend.begin(); - irsend.sendData(1, 2, 3, 4, 0b10, 2, true); - EXPECT_EQ("m1s2m3s4", irsend.outputStr()); - irsend.sendData(1, 2, 3, 4, 0b10, 2, false); - EXPECT_EQ("m3s4m1s2", irsend.outputStr()); - irsend.sendData(1, 2, 3, 4, 0b0001, 4, false); - EXPECT_EQ("m1s2m3s4m3s4m3s4", irsend.outputStr()); -} - -// Test sending typical data. -TEST(TestSendData, SendTypicalData) { - IRsendTest irsend(4); - irsend.begin(); - irsend.sendData(1, 2, 3, 4, 0b1010110011110000, 16, true); - EXPECT_EQ("m1s2m3s4m1s2m3s4m1s2m1s2m3s4m3s4m1s2m1s2m1s2m1s2m3s4m3s4m3s4m3s4", - irsend.outputStr()); - irsend.sendData(1, 2, 3, 4, 0x1234567890ABCDEF, 64, true); - EXPECT_EQ("m3s4m3s4m3s4m1s2m3s4m3s4m1s2m3s4m3s4m3s4m1s2m1s2m3s4m1s2m3s4m3s4" - "m3s4m1s2m3s4m1s2m3s4m1s2m1s2m3s4m3s4m1s2m1s2m1s2m1s2m3s4m3s4m3s4" - "m1s2m3s4m3s4m1s2m3s4m3s4m3s4m3s4m1s2m3s4m1s2m3s4m1s2m3s4m1s2m1s2" - "m1s2m1s2m3s4m3s4m1s2m1s2m3s4m1s2m1s2m1s2m1s2m3s4m1s2m1s2m1s2m1s2", - irsend.outputStr()); -} - -// Test sending more than expected bits. -TEST(TestSendData, SendOverLargeData) { - IRsendTest irsend(4); - irsend.begin(); - irsend.sendData(1, 2, 3, 4, 0xFFFFFFFFFFFFFFFF, 70, true); - EXPECT_EQ("m3s4m3s4m3s4m3s4m3s4m3s4" - "m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2" - "m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2" - "m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2" - "m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2", - irsend.outputStr()); -} - -// Test inverting the output. -TEST(TestIRSend, InvertedOutput) { - IRsendTest irsend(4, true); - irsend.begin(); - irsend.sendData(1, 2, 3, 4, 0b1, 1, true); - EXPECT_EQ("s1m2", irsend.outputStr()); - irsend.sendData(1, 2, 3, 4, 0b0, 1, true); - EXPECT_EQ("s3m4", irsend.outputStr()); -} - -// Test typical use of sendRaw(). -TEST(TestSendRaw, GeneralUse) { - IRsendTest irsend(4); - IRrecv irrecv(0); - - irsend.begin(); - // NEC C3E0E0E8 as measured in #204 - uint16_t rawData[67] = {8950, 4500, 550, 1650, 600, 1650, 550, 550, 600, 500, - 600, 550, 550, 550, 600, 1650, 550, 1650, 600, 1650, - 600, 1650, 550, 1700, 550, 550, 600, 550, 550, 550, - 600, 500, 600, 550, 550, 1650, 600, 1650, 600, 1650, - 550, 550, 600, 500, 600, 500, 600, 550, 550, 550, - 600, 1650, 550, 1650, 600, 1650, 600, 500, 650, 1600, - 600, 500, 600, 550, 550, 550, 600}; - - irsend.sendRaw(rawData, 67, 38); - EXPECT_EQ( - "m8950s4500" - "m550s1650m600s1650m550s550m600s500m600s550m550s550m600s1650m550s1650" - "m600s1650m600s1650m550s1700m550s550m600s550m550s550m600s500m600s550" - "m550s1650m600s1650m600s1650m550s550m600s500m600s500m600s550m550s550" - "m600s1650m550s1650m600s1650m600s500m650s1600m600s500m600s550m550s550" - "m600", irsend.outputStr()); - - irsend.reset(); - irsend.sendRaw(rawData, 67, 38); - irsend.makeDecodeResult(); - EXPECT_EQ( - "m8950s4500" - "m550s1650m600s1650m550s550m600s500m600s550m550s550m600s1650m550s1650" - "m600s1650m600s1650m550s1700m550s550m600s550m550s550m600s500m600s550" - "m550s1650m600s1650m600s1650m550s550m600s500m600s500m600s550m550s550" - "m600s1650m550s1650m600s1650m600s500m650s1600m600s500m600s550m550s550" - "m600", irsend.outputStr()); - ASSERT_TRUE(irrecv.decodeNEC(&irsend.capture, NEC_BITS, false)); - EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(32, irsend.capture.bits); - EXPECT_EQ(0xC3E0E0E8, irsend.capture.value); -} - -// Incorrect handling of decodes from Raw. i.e. There is no gap recorded at -// the end of a command when using the interrupt code. sendRaw() best emulates -// this for unit testing purposes. sendGC() and sendXXX() will add the trailing -// gap. Users won't see this in normal use. -TEST(TestSendRaw, NoTrailingGap) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - uint16_t rawData[67] = {9000, 4500, 650, 550, 650, 1650, 600, 550, 650, 550, - 600, 1650, 650, 550, 600, 1650, 650, 1650, 650, 1650, - 600, 550, 650, 1650, 650, 1650, 650, 550, 600, 1650, - 650, 1650, 650, 550, 650, 550, 650, 1650, 650, 550, - 650, 550, 650, 550, 600, 550, 650, 550, 650, 550, - 650, 1650, 600, 550, 650, 1650, 650, 1650, 650, 1650, - 650, 1650, 650, 1650, 650, 1650, 600}; - irsend.sendRaw(rawData, 67, 38); - irsend.makeDecodeResult(); - EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); - EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/IRsend_test.h b/lib/IRremoteESP8266-2.2.1.02/test/IRsend_test.h deleted file mode 100644 index 94de487af..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/IRsend_test.h +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright 2017 David Conran - -#ifndef TEST_IRSEND_TEST_H_ -#define TEST_IRSEND_TEST_H_ - -#define __STDC_LIMIT_MACROS -#include -#include -#include -#include -#include "IRrecv.h" -#include "IRsend.h" - -#define OUTPUT_BUF 1000U -#define RAW_BUF 1000U -class IRsendTest: public IRsend { - public: - uint32_t output[OUTPUT_BUF]; - uint16_t last; - uint16_t rawbuf[RAW_BUF]; - decode_results capture; - - explicit IRsendTest(uint16_t x, bool i = false) : IRsend(x, i) { - reset(); - } - - void reset() { - last = 0; - output[last] = 0; - } - - std::string outputStr() { - std::stringstream result; - if (last == 0 && output[0] == 0) - return ""; - for (uint16_t i = 0; i <= last; i++) { - if ((i & 1) != outputOff ) // Odd XOR outputOff - result << "s"; - else - result << "m"; - result << output[i]; - } - reset(); - return result.str(); - } - - void makeDecodeResult(uint16_t offset = 0) { - capture.decode_type = UNKNOWN; - capture.bits = 0; - capture.rawlen = last + 1 - offset; - capture.overflow = (last - offset >= (int16_t) RAW_BUF); - capture.repeat = false; - capture.address = 0; - capture.command = 0; - capture.value = 0; - capture.rawbuf = rawbuf; - for (uint16_t i = 0; - (i < RAW_BUF - 1) && (offset < OUTPUT_BUF); - i++, offset++) - if (output[offset] / RAWTICK > UINT16_MAX) - rawbuf[i + 1] = UINT16_MAX; - else - rawbuf[i + 1] = output[offset] / RAWTICK; - } - - void dumpRawResult() { - std::cout << std::dec; - if (capture.rawlen == 0) return; - std::cout << "uint16_t rawbuf["<< capture.rawlen - 1 << "] = {"; - for (uint16_t i = 1; i < capture.rawlen; i++) { - if (i % 8 == 1) - std::cout << std::endl << " "; - std::cout << (capture.rawbuf[i] * RAWTICK); - // std::cout << "(" << capture.rawbuf[i] << ")"; - if (i < capture.rawlen - 1) - std::cout << ", "; - } - std::cout << "};" << std::endl; - } - - void addGap(uint32_t usecs) { - space(usecs); - } - - protected: - uint16_t mark(uint16_t usec) { - if (last >= OUTPUT_BUF) - return 0; - if (last & 1) // Is odd? (i.e. last call was a space()) - output[++last] = usec; - else - output[last] += usec; - return 0; - } - - void space(uint32_t time) { - if (last >= OUTPUT_BUF) - return; - if (last & 1) { // Is odd? (i.e. last call was a space()) - output[last] += time; - } else { - output[++last] = time; - } - } -}; -#endif // TEST_IRSEND_TEST_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/test/IRutils_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/IRutils_test.cpp deleted file mode 100644 index 3b4c4145a..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/IRutils_test.cpp +++ /dev/null @@ -1,91 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRutils.h" -#include -#include "gtest/gtest.h" - -// Tests reverseBits(). - -// Tests reverseBits for typical use. -TEST(ReverseBitsTest, TypicalUse) { - EXPECT_EQ(0xF, reverseBits(0xF0, 8)); - EXPECT_EQ(0xFFFF, reverseBits(0xFFFF0000, 32)); - EXPECT_EQ(0x555500005555FFFF, reverseBits(0xFFFFAAAA0000AAAA, 64)); - EXPECT_EQ(0, reverseBits(0, 64)); - EXPECT_EQ(0xFFFFFFFFFFFFFFFF, reverseBits(0xFFFFFFFFFFFFFFFF, 64)); -} - -// Tests reverseBits for bit size values <= 1 -TEST(ReverseBitsTest, LessThanTwoBitsReversed) { - EXPECT_EQ(0x12345678, reverseBits(0x12345678, 1)); - EXPECT_EQ(1234, reverseBits(1234, 0)); -} - -// Tests reverseBits for bit size larger than a uint64_t. -TEST(ReverseBitsTest, LargerThan64BitsReversed) { - EXPECT_EQ(0, reverseBits(0, 65)); - EXPECT_EQ(0xFFFFFFFFFFFFFFFF, reverseBits(0xFFFFFFFFFFFFFFFF, 100)); - EXPECT_EQ(0x555500005555FFFF, reverseBits(0xFFFFAAAA0000AAAA, 3000)); -} - -// Tests reverseBits for bit sizes less than all the data stored. -TEST(ReverseBitsTest, LessBitsReversedThanInputHasSet) { - EXPECT_EQ(0xF8, reverseBits(0xF1, 4)); - EXPECT_EQ(0xF5, reverseBits(0xFA, 4)); - EXPECT_EQ(0x12345678FFFF0000, reverseBits(0x123456780000FFFF, 32)); -} - -// Tests for uint64ToString() - -TEST(TestUint64ToString, TrivialCases) { - EXPECT_EQ("0", uint64ToString(0)); // Default base (10) - EXPECT_EQ("0", uint64ToString(0, 2)); // Base-2 - EXPECT_EQ("0", uint64ToString(0, 8)); // Base-8 - EXPECT_EQ("0", uint64ToString(0, 10)); // Base-10 - EXPECT_EQ("0", uint64ToString(0, 16)); // Base-16 - - EXPECT_EQ("1", uint64ToString(1, 2)); // Base-2 - EXPECT_EQ("2", uint64ToString(2, 8)); // Base-8 - EXPECT_EQ("3", uint64ToString(3, 10)); // Base-10 - EXPECT_EQ("4", uint64ToString(4, 16)); // Base-16 -} - -TEST(TestUint64ToString, NormalUse) { - EXPECT_EQ("12345", uint64ToString(12345)); - EXPECT_EQ("100", uint64ToString(4, 2)); - EXPECT_EQ("3039", uint64ToString(12345, 16)); - EXPECT_EQ("123456", uint64ToString(123456)); - EXPECT_EQ("1E240", uint64ToString(123456, 16)); - EXPECT_EQ("FEEDDEADBEEF", uint64ToString(0xfeeddeadbeef, 16)); -} - -TEST(TestUint64ToString, Max64Bit) { - EXPECT_EQ("18446744073709551615", uint64ToString(UINT64_MAX)); // Default - EXPECT_EQ("1111111111111111111111111111111111111111111111111111111111111111", - uint64ToString(UINT64_MAX, 2)); // Base-2 - EXPECT_EQ("1777777777777777777777", uint64ToString(UINT64_MAX, 8)); // Base-8 - EXPECT_EQ("18446744073709551615", uint64ToString(UINT64_MAX, 10)); // Base-10 - EXPECT_EQ("FFFFFFFFFFFFFFFF", uint64ToString(UINT64_MAX, 16)); // Base-16 -} - -TEST(TestUint64ToString, Max32Bit) { - EXPECT_EQ("4294967295", uint64ToString(UINT32_MAX)); // Default - EXPECT_EQ("37777777777", uint64ToString(UINT32_MAX, 8)); // Base-8 - EXPECT_EQ("4294967295", uint64ToString(UINT32_MAX, 10)); // Base-10 - EXPECT_EQ("FFFFFFFF", uint64ToString(UINT32_MAX, 16)); // Base-16 -} - -TEST(TestUint64ToString, InterestingCases) { - // Previous hacky-code didn't handle leading zeros in the lower 32 bits. - EXPECT_EQ("100000000", uint64ToString(0x100000000, 16)); - EXPECT_EQ("100000001", uint64ToString(0x100000001, 16)); -} - -TEST(TestUint64ToString, SillyBases) { - // If we are given a silly base, we should defer to Base-10. - EXPECT_EQ("12345", uint64ToString(12345, 0)); // Super silly, makes no sense. - EXPECT_EQ("12345", uint64ToString(12345, 1)); // We don't do unary. - EXPECT_EQ("12345", uint64ToString(12345, 100)); // We can't print base-100. - EXPECT_EQ("12345", uint64ToString(12345, 37)); // Base-37 is one to far. - EXPECT_EQ("9IX", uint64ToString(12345, 36)); // But we *can* do base-36. -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Daikin_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/ir_Daikin_test.cpp deleted file mode 100644 index b516008c1..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Daikin_test.cpp +++ /dev/null @@ -1,419 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRsend.h" -#include "IRsend_test.h" -#include "ir_Daikin.h" -#include "gtest/gtest.h" - -// Tests for sendDaikin(). - -// Test sending typical data only. -TEST(TestSendDaikin, SendDataOnly) { - IRsendTest irsend(4); - irsend.begin(); - - uint8_t daikin_code[DAIKIN_COMMAND_LENGTH] = { - 0x11, 0xDA, 0x27, 0xF0, 0x00, 0x00, 0x00, 0x20, - 0x11, 0xDA, 0x27, 0x00, 0x00, 0x41, 0x1E, 0x00, - 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xE3}; - - irsend.reset(); - irsend.sendDaikin(daikin_code); - EXPECT_EQ( - "m3650s1623" - "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" - "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" - "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s1280m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s1280m428s428m428s428" - "m428s29428" - "m3650s1623" - "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" - "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" - "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s1280m428s428m428s428m428s428m428s428m428s428m428s1280m428s428" - "m428s428m428s1280m428s1280m428s1280m428s1280m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s428m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s1280m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s1280m428s1280m428s428m428s428m428s428m428s1280m428s1280m428s1280" - "m428s29428", irsend.outputStr()); -} - -// Test sending with repeats. -TEST(TestSendDaikin, SendWithRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - uint8_t daikin_code[DAIKIN_COMMAND_LENGTH] = { - 0x11, 0xDA, 0x27, 0xF0, 0x00, 0x00, 0x00, 0x20, - 0x11, 0xDA, 0x27, 0x00, 0x00, 0x41, 0x1E, 0x00, - 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xE3}; - irsend.reset(); - - irsend.sendDaikin(daikin_code, DAIKIN_COMMAND_LENGTH, 1); - EXPECT_EQ( - "m3650s1623" - "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" - "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" - "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s1280m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s1280m428s428m428s428" - "m428s29428" - "m3650s1623" - "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" - "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" - "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s1280m428s428m428s428m428s428m428s428m428s428m428s1280m428s428" - "m428s428m428s1280m428s1280m428s1280m428s1280m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s428m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s1280m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s1280m428s1280m428s428m428s428m428s428m428s1280m428s1280m428s1280" - "m428s29428" - "m3650s1623" - "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" - "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" - "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s1280m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s1280m428s428m428s428" - "m428s29428" - "m3650s1623" - "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" - "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" - "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s1280m428s428m428s428m428s428m428s428m428s428m428s1280m428s428" - "m428s428m428s1280m428s1280m428s1280m428s1280m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s428m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s1280m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s1280m428s1280m428s428m428s428m428s428m428s1280m428s1280m428s1280" - "m428s29428", irsend.outputStr()); -} - -// Test sending atypical sizes. -TEST(TestSendDaikin, SendUnexpectedSizes) { - IRsendTest irsend(4); - irsend.begin(); - - uint8_t daikin_short_code[DAIKIN_COMMAND_LENGTH - 1] = { - 0x11, 0xDA, 0x27, 0xF0, 0x00, 0x00, 0x00, 0x20, - 0x11, 0xDA, 0x27, 0x00, 0x00, 0x41, 0x1E, 0x00, - 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00}; - - irsend.reset(); - irsend.sendDaikin(daikin_short_code, DAIKIN_COMMAND_LENGTH - 1); - ASSERT_EQ("", irsend.outputStr()); - - uint8_t daikin_long_code[DAIKIN_COMMAND_LENGTH + 1] = { - 0x11, 0xDA, 0x27, 0xF0, 0x00, 0x00, 0x00, 0x20, - 0x11, 0xDA, 0x27, 0x00, 0x00, 0x41, 0x1E, 0x00, - 0xB0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xE3, 0x11}; - irsend.reset(); - irsend.sendDaikin(daikin_long_code, DAIKIN_COMMAND_LENGTH + 1); - ASSERT_EQ( - "m3650s1623" - "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" - "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" - "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s1280m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s1280m428s428m428s428" - "m428s29428" - "m3650s1623" - "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" - "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" - "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s1280m428s428m428s428m428s428m428s428m428s428m428s1280m428s428" - "m428s428m428s1280m428s1280m428s1280m428s1280m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s428m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s1280m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s1280m428s1280m428s428m428s428m428s428m428s1280m428s1280m428s1280" - "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" - "m428s29428", irsend.outputStr()); -} - -// Tests for IRDaikinESP class. - -TEST(TestDaikinClass, Power) { - IRDaikinESP irdaikin(0); - irdaikin.begin(); - - irdaikin.on(); - EXPECT_TRUE(irdaikin.getPower()); - - irdaikin.off(); - EXPECT_FALSE(irdaikin.getPower()); - - irdaikin.setPower(true); - EXPECT_TRUE(irdaikin.getPower()); - - irdaikin.setPower(false); - EXPECT_FALSE(irdaikin.getPower()); -} - -TEST(TestDaikinClass, Temperature) { - IRDaikinESP irdaikin(0); - irdaikin.begin(); - - irdaikin.setTemp(0); - EXPECT_EQ(DAIKIN_MIN_TEMP, irdaikin.getTemp()); - - irdaikin.setTemp(255); - EXPECT_EQ(DAIKIN_MAX_TEMP, irdaikin.getTemp()); - - irdaikin.setTemp(DAIKIN_MIN_TEMP); - EXPECT_EQ(DAIKIN_MIN_TEMP, irdaikin.getTemp()); - - irdaikin.setTemp(DAIKIN_MAX_TEMP); - EXPECT_EQ(DAIKIN_MAX_TEMP, irdaikin.getTemp()); - - irdaikin.setTemp(DAIKIN_MIN_TEMP - 1); - EXPECT_EQ(DAIKIN_MIN_TEMP, irdaikin.getTemp()); - - irdaikin.setTemp(DAIKIN_MAX_TEMP + 1); - EXPECT_EQ(DAIKIN_MAX_TEMP, irdaikin.getTemp()); - - irdaikin.setTemp(DAIKIN_MIN_TEMP + 1); - EXPECT_EQ(DAIKIN_MIN_TEMP + 1, irdaikin.getTemp()); - - irdaikin.setTemp(21); - EXPECT_EQ(21, irdaikin.getTemp()); - - irdaikin.setTemp(25); - EXPECT_EQ(25, irdaikin.getTemp()); - - irdaikin.setTemp(29); - EXPECT_EQ(29, irdaikin.getTemp()); -} - -TEST(TestDaikinClass, OperatingMode) { - IRDaikinESP irdaikin(0); - irdaikin.begin(); - - irdaikin.setMode(DAIKIN_AUTO); - EXPECT_EQ(DAIKIN_AUTO, irdaikin.getMode()); - - irdaikin.setMode(DAIKIN_COOL); - EXPECT_EQ(DAIKIN_COOL, irdaikin.getMode()); - - irdaikin.setMode(DAIKIN_HEAT); - EXPECT_EQ(DAIKIN_HEAT, irdaikin.getMode()); - - irdaikin.setMode(DAIKIN_DRY); - EXPECT_EQ(DAIKIN_DRY, irdaikin.getMode()); - - irdaikin.setMode(DAIKIN_FAN); - EXPECT_EQ(DAIKIN_FAN, irdaikin.getMode()); - - irdaikin.setMode(DAIKIN_FAN + 1); - EXPECT_EQ(DAIKIN_AUTO, irdaikin.getMode()); - - irdaikin.setMode(DAIKIN_AUTO + 1); - EXPECT_EQ(DAIKIN_AUTO, irdaikin.getMode()); - - irdaikin.setMode(255); - EXPECT_EQ(DAIKIN_AUTO, irdaikin.getMode()); -} - -TEST(TestDaikinClass, VaneSwing) { - IRDaikinESP irdaikin(0); - irdaikin.begin(); - - irdaikin.setSwingHorizontal(true); - irdaikin.setSwingVertical(false); - - irdaikin.setSwingHorizontal(true); - EXPECT_TRUE(irdaikin.getSwingHorizontal()); - EXPECT_FALSE(irdaikin.getSwingVertical()); - - irdaikin.setSwingVertical(true); - EXPECT_TRUE(irdaikin.getSwingHorizontal()); - EXPECT_TRUE(irdaikin.getSwingVertical()); - - irdaikin.setSwingHorizontal(false); - EXPECT_FALSE(irdaikin.getSwingHorizontal()); - EXPECT_TRUE(irdaikin.getSwingVertical()); - - irdaikin.setSwingVertical(false); - EXPECT_FALSE(irdaikin.getSwingHorizontal()); - EXPECT_FALSE(irdaikin.getSwingVertical()); -} - -TEST(TestDaikinClass, QuietMode) { - IRDaikinESP irdaikin(0); - irdaikin.begin(); - - irdaikin.setQuiet(true); - EXPECT_TRUE(irdaikin.getQuiet()); - - irdaikin.setQuiet(false); - EXPECT_FALSE(irdaikin.getQuiet()); - - irdaikin.setQuiet(true); - EXPECT_TRUE(irdaikin.getQuiet()); - - irdaikin.setPowerful(true); - EXPECT_FALSE(irdaikin.getQuiet()); -} - -TEST(TestDaikinClass, PowerfulMode) { - IRDaikinESP irdaikin(0); - irdaikin.begin(); - - irdaikin.setPowerful(true); - EXPECT_TRUE(irdaikin.getPowerful()); - - irdaikin.setPowerful(false); - EXPECT_FALSE(irdaikin.getPowerful()); - - irdaikin.setPowerful(true); - EXPECT_TRUE(irdaikin.getPowerful()); - - irdaikin.setQuiet(true); - EXPECT_FALSE(irdaikin.getPowerful()); -} - -TEST(TestDaikinClass, FanSpeed) { - IRDaikinESP irdaikin(0); - irdaikin.begin(); - - irdaikin.setFan(0); - EXPECT_EQ(0, irdaikin.getFan()); - - irdaikin.setFan(255); - EXPECT_EQ(DAIKIN_FAN_MAX, irdaikin.getFan()); - - irdaikin.setFan(DAIKIN_FAN_MAX); - EXPECT_EQ(DAIKIN_FAN_MAX, irdaikin.getFan()); - - irdaikin.setFan(DAIKIN_FAN_MAX + 1); - EXPECT_EQ(DAIKIN_FAN_MAX, irdaikin.getFan()); - - irdaikin.setFan(DAIKIN_FAN_MAX - 1); - EXPECT_EQ(DAIKIN_FAN_MAX - 1, irdaikin.getFan()); - - irdaikin.setFan(DAIKIN_FAN_MIN); - EXPECT_EQ(DAIKIN_FAN_MIN, irdaikin.getFan()); - - irdaikin.setFan(DAIKIN_FAN_MIN + 1); - EXPECT_EQ(DAIKIN_FAN_MIN + 1, irdaikin.getFan()); - - irdaikin.setFan(3); - EXPECT_EQ(3, irdaikin.getFan()); - - irdaikin.setFan(DAIKIN_FAN_AUTO); - EXPECT_EQ(DAIKIN_FAN_AUTO, irdaikin.getFan()); -} - -TEST(TestDaikinClass, MessageConstuction) { - IRDaikinESP irdaikin(0); - IRsendTest irsend(4); - irdaikin.begin(); - irsend.begin(); - - irdaikin.setFan(DAIKIN_FAN_MIN); - irdaikin.setMode(DAIKIN_COOL); - irdaikin.setTemp(27); - irdaikin.setSwingVertical(false); - irdaikin.setSwingHorizontal(true); - irdaikin.setQuiet(false); - irdaikin.setPower(true); - - // Check everything for kicks. - EXPECT_EQ(DAIKIN_FAN_MIN, irdaikin.getFan()); - EXPECT_EQ(DAIKIN_COOL, irdaikin.getMode()); - EXPECT_EQ(27, irdaikin.getTemp()); - EXPECT_FALSE(irdaikin.getSwingVertical()); - EXPECT_TRUE(irdaikin.getSwingHorizontal()); - EXPECT_FALSE(irdaikin.getQuiet()); - EXPECT_TRUE(irdaikin.getPower()); - - irsend.reset(); - irsend.sendDaikin(irdaikin.getRaw()); - EXPECT_EQ( - "m3650s1623" - "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" - "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" - "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s1280m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s1280m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s29428" - "m3650s1623" - "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" - "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" - "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s1280m428s428m428s428m428s428m428s1280m428s1280m428s428m428s428" - "m428s428m428s1280m428s1280m428s428m428s1280m428s1280m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s428m428s428" - "m428s1280m428s1280m428s1280m428s1280m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s1280m428s1280" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" - "m428s428m428s428m428s428m428s1280m428s1280m428s1280m428s1280m428s428" - "m428s29428", irsend.outputStr()); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Fujitsu_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/ir_Fujitsu_test.cpp deleted file mode 100644 index f1b6c04f6..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Fujitsu_test.cpp +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright 2017 Jonny Graham - -#include "IRsend.h" -#include "IRsend_test.h" -#include "ir_Fujitsu.h" -#include "gtest/gtest.h" - -template -::testing::AssertionResult ArraysMatch(const T (&expected)[size], - const T* actual) { - for (size_t i(0); i < size; ++i) { - if (expected[i] != actual[i]) { - int e = expected[i]; - int a = actual[i]; - return ::testing::AssertionFailure() << "array[" << i - << "] (" << std::hex << a << std::dec << ") != expected[" << i - << "] (" << std::hex << e << std::dec << ")"; - } - } - - return ::testing::AssertionSuccess(); -} -// Tests for Mitsubishi A/C methods. - -// Test sending typical data only. -TEST(TestSendFujitsuAC, GetRawDefault) { - IRFujitsuAC fujitsuACSender = IRFujitsuAC(4); - fujitsuACSender.setCmd(FUJITSU_AC_CMD_TURN_ON); - fujitsuACSender.setSwing(FUJITSU_AC_SWING_BOTH); - fujitsuACSender.setMode(FUJITSU_AC_MODE_COOL); - fujitsuACSender.setFanSpeed(FUJITSU_AC_FAN_HIGH); - fujitsuACSender.setTemp(24); - uint8_t expected[16] = {0x14, 0x63, 0x0, 0x10, 0x10, 0xFE, 0x9, 0x30, - 0x81, 0x1, 0x31, 0x0, 0x0, 0x0, 0x20, 0xFD}; - EXPECT_TRUE(ArraysMatch(expected, fujitsuACSender.getRaw())); -} - -TEST(TestSendFujitsuAC, GetRawTurnOff) { - IRFujitsuAC fujitsuACSender = IRFujitsuAC(4); - fujitsuACSender.off(); - uint8_t expected[7] = {0x14, 0x63, 0x0, 0x10, 0x10, 0x02, 0xFD}; - EXPECT_TRUE(ArraysMatch(expected, fujitsuACSender.getRaw())); -} -TEST(TestSendFujitsuAC, GetRawStepHoriz) { - IRFujitsuAC fujitsuACSender = IRFujitsuAC(4); - fujitsuACSender.stepHoriz(); - uint8_t expected[7] = {0x14, 0x63, 0x0, 0x10, 0x10, 0x79, 0x86}; - EXPECT_TRUE(ArraysMatch(expected, fujitsuACSender.getRaw())); -} -TEST(TestSendFujitsuAC, GetRawStepVert) { - IRFujitsuAC fujitsuACSender = IRFujitsuAC(4); - fujitsuACSender.stepVert(); - uint8_t expected[7] = {0x14, 0x63, 0x0, 0x10, 0x10, 0x6C, 0x93}; - EXPECT_TRUE(ArraysMatch(expected, fujitsuACSender.getRaw())); -} - -TEST(TestSendFujitsuAC, GetRawWithSwingHoriz) { - IRFujitsuAC fujitsuACSender = IRFujitsuAC(4); - fujitsuACSender.setCmd(FUJITSU_AC_CMD_STAY_ON); - fujitsuACSender.setSwing(FUJITSU_AC_SWING_HORIZ); - fujitsuACSender.setMode(FUJITSU_AC_MODE_COOL); - fujitsuACSender.setFanSpeed(FUJITSU_AC_FAN_QUIET); - fujitsuACSender.setTemp(25); - uint8_t expected[16] = {0x14, 0x63, 0x0, 0x10, 0x10, 0xFE, 0x9, 0x30, - 0x90, 0x1, 0x24, 0x0, 0x0, 0x0, 0x20, 0xFB}; - EXPECT_TRUE(ArraysMatch(expected, fujitsuACSender.getRaw())); -} - -TEST(TestSendFujitsuAC, GetRawWithFan) { - IRFujitsuAC fujitsuACSender = IRFujitsuAC(4); - fujitsuACSender.setCmd(FUJITSU_AC_CMD_STAY_ON); - fujitsuACSender.setSwing(FUJITSU_AC_SWING_HORIZ); - fujitsuACSender.setMode(FUJITSU_AC_MODE_FAN); - fujitsuACSender.setFanSpeed(FUJITSU_AC_FAN_MED); - fujitsuACSender.setTemp(20); // temp doesn't matter for fan - // but it is sent by the RC anyway - uint8_t expected[16] = {0x14, 0x63, 0x0, 0x10, 0x10, 0xFE, 0x9, 0x30, - 0x40, 0x3, 0x22, 0x0, 0x0, 0x0, 0x20, 0x4B}; - EXPECT_TRUE(ArraysMatch(expected, fujitsuACSender.getRaw())); -} - -TEST(TestSendFujitsuAC, GenerateMessage) { - IRFujitsuAC fujitsuACSender = IRFujitsuAC(4); - IRsendTest irsend(4); - fujitsuACSender.begin(); - irsend.begin(); - - fujitsuACSender.setCmd(FUJITSU_AC_CMD_STAY_ON); - fujitsuACSender.setSwing(FUJITSU_AC_SWING_BOTH); - fujitsuACSender.setMode(FUJITSU_AC_MODE_COOL); - fujitsuACSender.setFanSpeed(FUJITSU_AC_FAN_HIGH); - fujitsuACSender.setTemp(24); - - EXPECT_EQ(FUJITSU_AC_FAN_HIGH, fujitsuACSender.getFanSpeed()); - EXPECT_EQ(FUJITSU_AC_MODE_COOL, fujitsuACSender.getMode()); - EXPECT_EQ(24, fujitsuACSender.getTemp()); - EXPECT_EQ(FUJITSU_AC_SWING_BOTH, fujitsuACSender.getSwing()); - EXPECT_EQ(FUJITSU_AC_CMD_STAY_ON, fujitsuACSender.getCmd()); - - irsend.reset(); - irsend.sendFujitsuAC(fujitsuACSender.getRaw(), FUJITSU_AC_STATE_LENGTH); - EXPECT_EQ( - "m3224s1574m448s367m448s367m448s1182m448s367m448s1182m448s367m448s367m448" - "s367m448s1182m448s1182m448s367m448s367m448s367m448s1182m448s1182m448s367" - "m448s367m448s367m448s367m448s367m448s367m448s367m448s367m448s367m448" - "s367m448s367m448s367m448s367m448s1182m448s367m448s367m448s367m448s367m448" - "s367m448s367m448s367m448s1182m448s367m448s367m448s367m448s367m448s1182" - "m448s1182m448s1182m448s1182m448s1182m448s1182m448s1182m448s1182m448s367" - "m448s367m448s1182m448s367m448s367m448s367m448s367m448s367m448s367m448s367" - "m448s367m448s1182m448s1182m448s367m448s367m448s367m448s367m448s367m448s367" - "m448s367m448s367m448s367m448s1182m448s1182m448s367m448s367m448s367m448" - "s367m448s367m448s367m448s367m448s1182m448s367m448s367m448s367m448s1182m448" - "s1182m448s367m448s367m448s367m448s367m448s367m448s367m448s367m448s367m448" - "s367m448s367m448s367m448s367m448s367m448s367m448s367m448s367m448s367m448" - "s367m448s367m448s367m448s367m448s367m448s367m448s367m448s367m448s367m448" - "s367m448s367m448s367m448s367m448s367m448s1182m448s367m448s367m448s367m448" - "s1182m448s1182m448s1182m448s1182m448s1182m448s1182m448s1182m448s8100", - irsend.outputStr()); -} -TEST(TestSendFujitsuAC, GenerateShortMessage) { - IRFujitsuAC fujitsuACSender = IRFujitsuAC(4); - IRsendTest irsend(4); - fujitsuACSender.begin(); - irsend.begin(); - - fujitsuACSender.off(); - - EXPECT_EQ(FUJITSU_AC_CMD_TURN_OFF, fujitsuACSender.getCmd()); - - irsend.reset(); - irsend.sendFujitsuAC(fujitsuACSender.getRaw(), FUJITSU_AC_STATE_LENGTH_SHORT); - EXPECT_EQ( - "m3224s1574m448s367m448s367m448s1182m448s367m448s1182m448s367m448s367m448" - "s367m448s1182m448s1182m448s367m448s367m448s367m448s1182m448s1182m448s367" - "m448s367m448s367m448s367m448s367m448s367m448s367m448s367m448s367m448s367" - "m448s367m448s367m448s367m448s1182m448s367m448s367m448s367m448s367m448s367" - "m448s367m448s367m448s1182m448s367m448s367m448s367m448s367m448s1182m448s367" - "m448s367m448s367m448s367m448s367m448s367m448s1182m448s367m448s1182m448" - "s1182m448s1182m448s1182m448s1182m448s1182m448s8100", - irsend.outputStr()); -} - -// Issue #275 -TEST(TestSendFujitsuAC, Issue275) { - IRFujitsuAC fujitsuACSender = IRFujitsuAC(4); - IRsendTest irsend(4); - fujitsuACSender.begin(); - irsend.begin(); - irsend.reset(); - - fujitsuACSender.setCmd(FUJITSU_AC_CMD_TURN_OFF); - irsend.sendFujitsuAC(fujitsuACSender.getRaw(), FUJITSU_AC_STATE_LENGTH_SHORT); - EXPECT_EQ( - // Header - "m3224s1574" - // 0 0 1 0 1 0 0 0 (0x28) - "m448s367m448s367m448s1182m448s367m448s1182m448s367m448s367m448s367" - // 1 1 0 0 0 1 1 0 (0xC6) - "m448s1182m448s1182m448s367m448s367m448s367m448s1182m448s1182m448s367" - // 0 0 0 0 0 0 0 0 (0x00) - "m448s367m448s367m448s367m448s367m448s367m448s367m448s367m448s367" - // 0 0 0 0 1 0 0 0 (0x08) - "m448s367m448s367m448s367m448s367m448s1182m448s367m448s367m448s367" - // 0 0 0 0 1 0 0 0 (0x08) - "m448s367m448s367m448s367m448s367m448s1182m448s367m448s367m448s367" - // 0 1 0 0 0 0 0 0 (0x40) - "m448s367m448s1182m448s367m448s367m448s367m448s367m448s367m448s367" - // 1 0 1 1 1 1 1 1 (0xBF) - "m448s1182m448s367m448s1182m448s1182m448s1182m448s1182m448s1182m448s1182" - // Footer - "m448s8100", irsend.outputStr()); - - irsend.reset(); - // Per report in Issue #275 - uint16_t off[115] = { - 3350, 1650, - 450, 400, 450, 450, 450, 1250, 450, 400, 450, 1250, 450, 400, 450, 400, - 450, 400, 450, 1250, 450, 1250, 450, 400, 450, 400, 450, 400, 450, 1250, - 450, 1250, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, - 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, - 450, 1250, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, - 450, 400, 450, 1250, 450, 400, 450, 400, 450, 400, 450, 400, 450, 1250, - 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 1250, - 450, 400, 450, 1250, 450, 1250, 450, 1250, 450, 1250, 450, 1250, - 450, 1250, 450}; - irsend.sendRaw(off, 115, 38); - EXPECT_EQ( - // Header - "m3350s1650" - // 0 0 1 0 1 0 0 0 (0x28) - "m450s400m450s450m450s1250m450s400m450s1250m450s400m450s400m450s400" - // 1 1 0 0 0 1 1 0 (0xC6) - "m450s1250m450s1250m450s400m450s400m450s400m450s1250m450s1250m450s400" - // 0 0 0 0 0 0 0 0 (0x00) - "m450s400m450s400m450s400m450s400m450s400m450s400m450s400m450s400" - // 0 0 0 0 1 0 0 0 (0x08) - "m450s400m450s400m450s400m450s400m450s1250m450s400m450s400m450s400" - // 0 0 0 0 1 0 0 0 (0x08) - "m450s400m450s400m450s400m450s400m450s1250m450s400m450s400m450s400" - // 0 1 0 0 0 0 0 0 (0x40) - "m450s400m450s1250m450s400m450s400m450s400m450s400m450s400m450s400" - // 1 0 1 1 1 1 1 1 (0xBF) - "m450s1250m450s400m450s1250m450s1250m450s1250m450s1250m450s1250m450s1250" - // Footer - "m450", - irsend.outputStr()); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_GlobalCache_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/ir_GlobalCache_test.cpp deleted file mode 100644 index c2e9762a2..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_GlobalCache_test.cpp +++ /dev/null @@ -1,68 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRsend.h" -#include "IRsend_test.h" -#include "gtest/gtest.h" - -// Tests for sendGlobalCache(). - -// Test sending a typical command wihtout a repeat. -TEST(TestSendGlobalCache, NonRepeatingCode) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - irsend.reset(); - - // Modified NEC TV "Power On" from Global Cache with no repeats - uint16_t gc_test[71] = {38000, 1, 1, 342, 172, 21, 22, 21, 21, 21, 65, 21, 21, - 21, 22, 21, 22, 21, 21, 21, 22, 21, 65, 21, 65, 21, - 22, 21, 65, 21, 65, 21, 65, 21, 65, 21, 65, 21, 65, - 21, 22, 21, 22, 21, 21, 21, 22, 21, 22, 21, 65, 21, - 22, 21, 21, 21, 65, 21, 65, 21, 65, 21, 64, 22, 65, - 21, 22, 21, 65, 21, 1519}; - irsend.sendGC(gc_test, 71); - irsend.makeDecodeResult(); - EXPECT_EQ("m8892s4472m546s572m546s546m546s1690m546s546m546s572m546s572" - "m546s546m546s572m546s1690m546s1690m546s572m546s1690m546s1690" - "m546s1690m546s1690m546s1690m546s1690m546s572m546s572m546s546" - "m546s572m546s572m546s1690m546s572m546s546m546s1690m546s1690" - "m546s1690m546s1664m572s1690m546s572m546s1690m546s39494", - irsend.outputStr()); - EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); - EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); - EXPECT_EQ(0x20DF827D, irsend.capture.value); - EXPECT_EQ(0x4, irsend.capture.address); - EXPECT_EQ(0x41, irsend.capture.command); -} - -// Test sending typical command with repeats. -TEST(TestSendGlobalCache, RepeatCode) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - irsend.reset(); - - // Sherwood (NEC-like) "Power On" from Global Cache with 2 repeats - uint16_t gc_test[75] = {38000, 2, 69, 341, 171, 21, 64, 21, 64, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 64, 21, 64, 21, 21, - 21, 64, 21, 21, 21, 21, 21, 21, 21, 64, 21, 21, 21, - 64, 21, 21, 21, 21, 21, 21, 21, 64, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 64, 21, 64, 21, 64, 21, 21, 21, - 64, 21, 64, 21, 64, 21, 1600, 341, 85, 21, 3647}; - irsend.sendGC(gc_test, 75); - irsend.makeDecodeResult(); - EXPECT_EQ("m8866s4446m546s1664m546s1664m546s546m546s546m546s546m546s546" - "m546s546m546s1664m546s1664m546s546m546s1664m546s546m546s546" - "m546s546m546s1664m546s546m546s1664m546s546m546s546m546s546" - "m546s1664m546s546m546s546m546s546m546s546m546s1664m546s1664" - "m546s1664m546s546m546s1664m546s1664m546s1664m546s41600" - "m8866s2210m546s94822" - "m8866s2210m546s94822", irsend.outputStr()); - EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); - EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); - EXPECT_EQ(0xC1A28877, irsend.capture.value); - EXPECT_EQ(0x4583, irsend.capture.address); - EXPECT_EQ(0x11, irsend.capture.command); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Gree_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/ir_Gree_test.cpp deleted file mode 100644 index 80a3dec1d..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Gree_test.cpp +++ /dev/null @@ -1,192 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRsend.h" -#include "IRsend_test.h" -#include "gtest/gtest.h" - -// Tests for sendGree(). - -// Test sending typical data only. -TEST(TestSendGreeChars, SendData) { - IRsendTest irsend(4); - irsend.begin(); - - uint8_t gree_code[GREE_STATE_LENGTH] = { - 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF}; - irsend.reset(); - irsend.sendGree(gree_code); - EXPECT_EQ( - "m9000s4000" - "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" - "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" - "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" - "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" - "m620s540m620s1600m620s540" - "m620s19000" - "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" - "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" - "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" - "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" - "m620s19000", irsend.outputStr()); -} - -TEST(TestSendGreeUint64, SendData) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendGree(0x1234567890ABCDEF); - EXPECT_EQ( - "m9000s4000" - "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" - "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" - "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" - "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" - "m620s540m620s1600m620s540" - "m620s19000" - "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" - "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" - "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" - "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" - "m620s19000", irsend.outputStr()); -} - -// Test sending with repeats. -TEST(TestSendGreeChars, SendWithRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - uint8_t gree_code[GREE_STATE_LENGTH] = { - 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF}; - irsend.reset(); - - irsend.sendGree(gree_code, GREE_STATE_LENGTH, 1); - EXPECT_EQ( - "m9000s4000" - "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" - "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" - "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" - "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" - "m620s540m620s1600m620s540" - "m620s19000" - "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" - "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" - "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" - "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" - "m620s19000" - "m9000s4000" - "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" - "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" - "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" - "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" - "m620s540m620s1600m620s540" - "m620s19000" - "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" - "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" - "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" - "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" - "m620s19000", irsend.outputStr()); -} - -TEST(TestSendGreeUint64, SendWithRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendGree(0x1234567890ABCDEF, GREE_BITS, 1); - EXPECT_EQ( - "m9000s4000" - "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" - "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" - "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" - "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" - "m620s540m620s1600m620s540" - "m620s19000" - "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" - "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" - "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" - "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" - "m620s19000" - "m9000s4000" - "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" - "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" - "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" - "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" - "m620s540m620s1600m620s540" - "m620s19000" - "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" - "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" - "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" - "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" - "m620s19000", irsend.outputStr()); -} - -// Test sending atypical sizes. -TEST(TestSendGreeChars, SendUnexpectedSizes) { - IRsendTest irsend(4); - irsend.begin(); - - uint8_t gree_short_code[GREE_STATE_LENGTH - 1] = { - 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD}; - uint8_t gree_long_code[GREE_STATE_LENGTH + 1] = { - 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF, 0x12}; - irsend.reset(); - irsend.sendGree(gree_short_code, GREE_STATE_LENGTH - 1); - ASSERT_EQ("", irsend.outputStr()); - - irsend.reset(); - irsend.sendGree(gree_long_code, GREE_STATE_LENGTH + 1); - ASSERT_EQ( - "m9000s4000" - "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" - "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" - "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" - "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" - "m620s540m620s1600m620s540" - "m620s19000" - "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" - "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" - "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" - "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" - "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" - "m620s19000", irsend.outputStr()); -} - -TEST(TestSendGreeUint64, SendUnexpectedSizes) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendGree(0x1234567890ABCDEF, GREE_BITS - 1); - ASSERT_EQ("", irsend.outputStr()); - - irsend.reset(); - irsend.sendGree(0x1234567890ABCDEF, GREE_BITS + 1); - ASSERT_EQ("", irsend.outputStr()); -} - -TEST(TestSendGree, CompareUint64ToCharResults) { - IRsendTest irsend_chars(4); - IRsendTest irsend_uint64(0); - - uint8_t gree_code[GREE_STATE_LENGTH] = { - 0x12, 0x34, 0x56, 0x78, 0x90, 0xAB, 0xCD, 0xEF}; - - irsend_chars.begin(); - irsend_uint64.begin(); - - irsend_chars.reset(); - irsend_uint64.reset(); - irsend_chars.sendGree(gree_code); - irsend_uint64.sendGree(0x1234567890ABCDEF); - ASSERT_EQ(irsend_chars.outputStr(), irsend_uint64.outputStr()); - - uint8_t gree_zero_code[GREE_STATE_LENGTH] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; - irsend_chars.reset(); - irsend_uint64.reset(); - irsend_chars.sendGree(gree_zero_code); - irsend_uint64.sendGree((uint64_t) 0x0); - ASSERT_EQ(irsend_chars.outputStr(), irsend_uint64.outputStr()); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Kelvinator_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/ir_Kelvinator_test.cpp deleted file mode 100644 index c409c20ba..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Kelvinator_test.cpp +++ /dev/null @@ -1,432 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRsend.h" -#include "IRsend_test.h" -#include "ir_Kelvinator.h" -#include "gtest/gtest.h" - -// Tests for sendKelvinator(). - -// Test sending typical data only. -TEST(TestSendKelvinator, SendDataOnly) { - IRsendTest irsend(4); - irsend.begin(); - - uint8_t kelv_code[KELVINATOR_STATE_LENGTH] = { - 0x19, 0x0B, 0x80, 0x50, 0x00, 0x00, 0x00, 0xE0, - 0x19, 0x0B, 0x80, 0x70, 0x00, 0x00, 0x10, 0xf0}; - irsend.reset(); - irsend.sendKelvinator(kelv_code); - EXPECT_EQ( - "m8990s4490" - "m675s1560m675s520m675s520m675s1560m675s1560m675s520m675s520m675s520" - "m675s1560m675s1560m675s520m675s1560m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s1560" - "m675s520m675s520m675s520m675s520m675s1560m675s520m675s1560m675s520" - "m675s520m675s1560m675s520" - "m675s19950" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560" - "m675s39900" - "m8990s4490" - "m675s1560m675s520m675s520m675s1560m675s1560m675s520m675s520m675s520" - "m675s1560m675s1560m675s520m675s1560m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s1560" - "m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560m675s520" - "m675s520m675s1560m675s520" - "m675s19950" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s1560m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560m675s1560" - "m675s39900", irsend.outputStr()); -} - -// Test sending with repeats. -TEST(TestSendKelvinator, SendWithRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - uint8_t kelv_code[KELVINATOR_STATE_LENGTH] = { - 0x19, 0x0B, 0x80, 0x50, 0x00, 0x00, 0x00, 0xE0, - 0x19, 0x0B, 0x80, 0x70, 0x00, 0x00, 0x10, 0xf0}; - irsend.reset(); - - irsend.sendKelvinator(kelv_code, KELVINATOR_STATE_LENGTH, 1); - EXPECT_EQ( - "m8990s4490" - "m675s1560m675s520m675s520m675s1560m675s1560m675s520m675s520m675s520" - "m675s1560m675s1560m675s520m675s1560m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s1560" - "m675s520m675s520m675s520m675s520m675s1560m675s520m675s1560m675s520" - "m675s520m675s1560m675s520" - "m675s19950" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560" - "m675s39900" - "m8990s4490" - "m675s1560m675s520m675s520m675s1560m675s1560m675s520m675s520m675s520" - "m675s1560m675s1560m675s520m675s1560m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s1560" - "m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560m675s520" - "m675s520m675s1560m675s520" - "m675s19950" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s1560m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560m675s1560" - "m675s39900" - "m8990s4490" - "m675s1560m675s520m675s520m675s1560m675s1560m675s520m675s520m675s520" - "m675s1560m675s1560m675s520m675s1560m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s1560" - "m675s520m675s520m675s520m675s520m675s1560m675s520m675s1560m675s520" - "m675s520m675s1560m675s520" - "m675s19950" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560" - "m675s39900" - "m8990s4490" - "m675s1560m675s520m675s520m675s1560m675s1560m675s520m675s520m675s520" - "m675s1560m675s1560m675s520m675s1560m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s1560" - "m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560m675s520" - "m675s520m675s1560m675s520" - "m675s19950" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s1560m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560m675s1560" - "m675s39900", irsend.outputStr()); -} - -// Test sending atypical sizes. -TEST(TestSendKelvinator, SendUnexpectedSizes) { - IRsendTest irsend(4); - irsend.begin(); - - uint8_t kelv_short_code[15] = {0x19, 0x0B, 0x80, 0x50, 0x00, 0x00, 0x00, 0xE0, - 0x19, 0x0B, 0x80, 0x70, 0x00, 0x00, 0x10}; - uint8_t kelv_long_code[17] = {0x19, 0x0B, 0x80, 0x50, 0x00, 0x00, 0x00, 0xE0, - 0x19, 0x0B, 0x80, 0x70, 0x00, 0x00, 0x10, 0xf0, - 0x00}; - irsend.reset(); - irsend.sendKelvinator(kelv_short_code, 15); - ASSERT_EQ("", irsend.outputStr()); - - irsend.reset(); - // Shouldn't be different from the SendDataOnly. We just don't send the - // extra data. - irsend.sendKelvinator(kelv_long_code, 17); - ASSERT_EQ( - "m8990s4490" - "m675s1560m675s520m675s520m675s1560m675s1560m675s520m675s520m675s520" - "m675s1560m675s1560m675s520m675s1560m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s1560" - "m675s520m675s520m675s520m675s520m675s1560m675s520m675s1560m675s520" - "m675s520m675s1560m675s520" - "m675s19950" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560" - "m675s39900" - "m8990s4490" - "m675s1560m675s520m675s520m675s1560m675s1560m675s520m675s520m675s520" - "m675s1560m675s1560m675s520m675s1560m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s1560" - "m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560m675s520" - "m675s520m675s1560m675s520" - "m675s19950" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s1560m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560m675s1560" - "m675s39900", irsend.outputStr()); -} - - -// Tests for IRKelvinatorAC class. - -TEST(TestKelvinatorClass, Power) { - IRKelvinatorAC irkelv(0); - irkelv.begin(); - - irkelv.on(); - EXPECT_TRUE(irkelv.getPower()); - - irkelv.off(); - EXPECT_FALSE(irkelv.getPower()); - - irkelv.setPower(true); - EXPECT_TRUE(irkelv.getPower()); - - irkelv.setPower(false); - EXPECT_FALSE(irkelv.getPower()); -} - -TEST(TestKelvinatorClass, Temperature) { - IRKelvinatorAC irkelv(0); - irkelv.begin(); - - irkelv.setTemp(0); - EXPECT_EQ(KELVINATOR_MIN_TEMP, irkelv.getTemp()); - - irkelv.setTemp(255); - EXPECT_EQ(KELVINATOR_MAX_TEMP, irkelv.getTemp()); - - irkelv.setTemp(KELVINATOR_MIN_TEMP); - EXPECT_EQ(KELVINATOR_MIN_TEMP, irkelv.getTemp()); - - irkelv.setTemp(KELVINATOR_MAX_TEMP); - EXPECT_EQ(KELVINATOR_MAX_TEMP, irkelv.getTemp()); - - irkelv.setTemp(KELVINATOR_MIN_TEMP - 1); - EXPECT_EQ(KELVINATOR_MIN_TEMP, irkelv.getTemp()); - - irkelv.setTemp(KELVINATOR_MAX_TEMP + 1); - EXPECT_EQ(KELVINATOR_MAX_TEMP, irkelv.getTemp()); - - irkelv.setTemp(17); - EXPECT_EQ(17, irkelv.getTemp()); - - irkelv.setTemp(21); - EXPECT_EQ(21, irkelv.getTemp()); - - irkelv.setTemp(25); - EXPECT_EQ(25, irkelv.getTemp()); - - irkelv.setTemp(29); - EXPECT_EQ(29, irkelv.getTemp()); -} - -TEST(TestKelvinatorClass, OperatingMode) { - IRKelvinatorAC irkelv(0); - irkelv.begin(); - - irkelv.setTemp(24); - irkelv.setMode(KELVINATOR_AUTO); - EXPECT_EQ(KELVINATOR_AUTO, irkelv.getMode()); - EXPECT_EQ(KELVINATOR_AUTO_TEMP, irkelv.getTemp()); - - irkelv.setMode(KELVINATOR_COOL); - EXPECT_EQ(KELVINATOR_COOL, irkelv.getMode()); - - irkelv.setMode(KELVINATOR_HEAT); - EXPECT_EQ(KELVINATOR_HEAT, irkelv.getMode()); - - irkelv.setTemp(24); - irkelv.setMode(KELVINATOR_DRY); - EXPECT_EQ(KELVINATOR_DRY, irkelv.getMode()); - EXPECT_EQ(KELVINATOR_AUTO_TEMP, irkelv.getTemp()); - - irkelv.setMode(KELVINATOR_FAN); - EXPECT_EQ(KELVINATOR_FAN, irkelv.getMode()); - - irkelv.setMode(KELVINATOR_HEAT + 1); - EXPECT_EQ(KELVINATOR_AUTO, irkelv.getMode()); - - irkelv.setMode(255); - EXPECT_EQ(KELVINATOR_AUTO, irkelv.getMode()); -} - -TEST(TestKelvinatorClass, VaneSwing) { - IRKelvinatorAC irkelv(0); - irkelv.begin(); - - irkelv.setSwingHorizontal(true); - irkelv.setSwingVertical(false); - - irkelv.setSwingHorizontal(true); - EXPECT_TRUE(irkelv.getSwingHorizontal()); - EXPECT_FALSE(irkelv.getSwingVertical()); - - irkelv.setSwingVertical(true); - EXPECT_TRUE(irkelv.getSwingHorizontal()); - EXPECT_TRUE(irkelv.getSwingVertical()); - - irkelv.setSwingHorizontal(false); - EXPECT_FALSE(irkelv.getSwingHorizontal()); - EXPECT_TRUE(irkelv.getSwingVertical()); - - irkelv.setSwingVertical(false); - EXPECT_FALSE(irkelv.getSwingHorizontal()); - EXPECT_FALSE(irkelv.getSwingVertical()); -} - -TEST(TestKelvinatorClass, QuietMode) { - IRKelvinatorAC irkelv(0); - irkelv.begin(); - - irkelv.setQuiet(true); - EXPECT_TRUE(irkelv.getQuiet()); - - irkelv.setQuiet(false); - EXPECT_FALSE(irkelv.getQuiet()); - - irkelv.setQuiet(true); - EXPECT_TRUE(irkelv.getQuiet()); -} - -TEST(TestKelvinatorClass, IonFilter) { - IRKelvinatorAC irkelv(0); - irkelv.begin(); - - irkelv.setIonFilter(true); - EXPECT_TRUE(irkelv.getIonFilter()); - - irkelv.setIonFilter(false); - EXPECT_FALSE(irkelv.getIonFilter()); - - irkelv.setIonFilter(true); - EXPECT_TRUE(irkelv.getIonFilter()); -} - -TEST(TestKelvinatorClass, Light) { - IRKelvinatorAC irkelv(0); - irkelv.begin(); - - irkelv.setLight(true); - EXPECT_TRUE(irkelv.getLight()); - - irkelv.setLight(false); - EXPECT_FALSE(irkelv.getLight()); - - irkelv.setLight(true); - EXPECT_TRUE(irkelv.getLight()); -} - -TEST(TestKelvinatorClass, XFan) { - IRKelvinatorAC irkelv(0); - irkelv.begin(); - - irkelv.setXFan(true); - EXPECT_TRUE(irkelv.getXFan()); - - irkelv.setXFan(false); - EXPECT_FALSE(irkelv.getXFan()); - - irkelv.setXFan(true); - EXPECT_TRUE(irkelv.getXFan()); -} - -TEST(TestKelvinatorClass, TurboFan) { - IRKelvinatorAC irkelv(0); - irkelv.begin(); - - irkelv.setTurbo(true); - EXPECT_TRUE(irkelv.getTurbo()); - - irkelv.setTurbo(false); - EXPECT_FALSE(irkelv.getTurbo()); - - irkelv.setFan(2); - irkelv.setTurbo(true); - EXPECT_TRUE(irkelv.getTurbo()); - - // Turbo mode is turned off if the temperature is changed. - irkelv.setFan(3); - EXPECT_FALSE(irkelv.getTurbo()); - - // But only when it is changed, not set to the same value again. - irkelv.setTurbo(true); - irkelv.setFan(3); - EXPECT_TRUE(irkelv.getTurbo()); -} - -TEST(TestKelvinatorClass, FanSpeed) { - IRKelvinatorAC irkelv(0); - irkelv.begin(); - - irkelv.setFan(0); - EXPECT_EQ(0, irkelv.getFan()); - - irkelv.setFan(255); - EXPECT_EQ(KELVINATOR_FAN_MAX, irkelv.getFan()); - - irkelv.setFan(KELVINATOR_FAN_MAX); - EXPECT_EQ(KELVINATOR_FAN_MAX, irkelv.getFan()); - - irkelv.setFan(KELVINATOR_FAN_MAX + 1); - EXPECT_EQ(KELVINATOR_FAN_MAX, irkelv.getFan()); - - irkelv.setFan(KELVINATOR_FAN_MAX - 1); - EXPECT_EQ(KELVINATOR_FAN_MAX - 1, irkelv.getFan()); - - irkelv.setFan(1); - EXPECT_EQ(1, irkelv.getFan()); - - irkelv.setFan(1); - EXPECT_EQ(1, irkelv.getFan()); - - irkelv.setFan(3); - EXPECT_EQ(3, irkelv.getFan()); -} - - -TEST(TestKelvinatorClass, MessageConstuction) { - IRKelvinatorAC irkelv(0); - IRsendTest irsend(4); - irkelv.begin(); - irsend.begin(); - - irkelv.setFan(1); - irkelv.setMode(KELVINATOR_COOL); - irkelv.setTemp(27); - irkelv.setSwingVertical(false); - irkelv.setSwingHorizontal(true); - irkelv.setIonFilter(true); - irkelv.setQuiet(false); - irkelv.setLight(false); - irkelv.setPower(true); - irkelv.setTurbo(false); - irkelv.setXFan(true); - - // Check everything for kicks. - EXPECT_EQ(1, irkelv.getFan()); - EXPECT_EQ(KELVINATOR_COOL, irkelv.getMode()); - EXPECT_EQ(27, irkelv.getTemp()); - EXPECT_FALSE(irkelv.getSwingVertical()); - EXPECT_TRUE(irkelv.getSwingHorizontal()); - EXPECT_TRUE(irkelv.getIonFilter()); - EXPECT_FALSE(irkelv.getQuiet()); - EXPECT_FALSE(irkelv.getLight()); - EXPECT_TRUE(irkelv.getPower()); - EXPECT_FALSE(irkelv.getTurbo()); - EXPECT_TRUE(irkelv.getXFan()); - - irsend.reset(); - irsend.sendKelvinator(irkelv.getRaw()); - EXPECT_EQ( - "m8990s4490" - "m675s1560m675s520m675s520m675s1560m675s1560m675s520m675s1560m675s520" - "m675s1560m675s1560m675s520m675s1560m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s1560m675s1560" - "m675s520m675s520m675s520m675s520m675s1560m675s520m675s1560m675s520" - "m675s520m675s1560m675s520" - "m675s19950" - "m675s520m675s520m675s520m675s520m675s1560m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560m675s1560" - "m675s39900" - "m8990s4490" - "m675s1560m675s520m675s520m675s1560m675s1560m675s520m675s1560m675s520" - "m675s1560m675s1560m675s520m675s1560m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s1560m675s1560" - "m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560m675s520" - "m675s520m675s1560m675s520" - "m675s19950" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s520m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s1560m675s520m675s520m675s520" - "m675s520m675s520m675s520m675s520m675s1560m675s1560m675s1560m675s1560" - "m675s39900", irsend.outputStr()); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Mitsubishi_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/ir_Mitsubishi_test.cpp deleted file mode 100644 index 2f28657fb..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Mitsubishi_test.cpp +++ /dev/null @@ -1,694 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRsend.h" -#include "IRsend_test.h" -#include "ir_Mitsubishi.h" -#include "gtest/gtest.h" - -// Tests for sendMitsubishi(). - -// Test sending typical data only. -TEST(TestSendMitsubishi, SendDataOnly) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendMitsubishi(0xE242); - EXPECT_EQ( - "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" - "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" - "m300s53580" - "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" - "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" - "m300s53580", irsend.outputStr()); - - irsend.reset(); - irsend.sendMitsubishi(0x0); - EXPECT_EQ( - "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" - "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" - "m300s53580" - "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" - "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" - "m300s53580", irsend.outputStr()); - - irsend.reset(); - irsend.sendMitsubishi(0x4321); - EXPECT_EQ( - "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s2100" - "m300s900m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100" - "m300s53580" - "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s2100" - "m300s900m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100" - "m300s53580", irsend.outputStr()); -} - -// Test sending with different repeats. -TEST(TestSendMitsubishi, SendWithRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendMitsubishi(0xE242, MITSUBISHI_BITS, 0); // 0 repeat. - EXPECT_EQ( - "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" - "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" - "m300s53580", irsend.outputStr()); - - irsend.reset(); - irsend.sendMitsubishi(0xE242, MITSUBISHI_BITS, 1); // 1 repeat. - EXPECT_EQ( - "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" - "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" - "m300s53580" - "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" - "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" - "m300s53580", irsend.outputStr()); - irsend.sendMitsubishi(0xE242, MITSUBISHI_BITS, 2); // 2 repeats. - EXPECT_EQ( - "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" - "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" - "m300s53580" - "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" - "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" - "m300s53580" - "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" - "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" - "m300s53580", irsend.outputStr()); -} - -// Test sending an atypical data size. -TEST(TestSendMitsubishi, SendUsualSize) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendMitsubishi(0x0, 8); - EXPECT_EQ( - "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" - "m300s53580" - "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" - "m300s53580", irsend.outputStr()); - - irsend.reset(); - irsend.sendMitsubishi(0x1234567890ABCDEF, 64); - EXPECT_EQ( - "m300s900m300s900m300s900m300s2100m300s900m300s900m300s2100m300s900" - "m300s900m300s900m300s2100m300s2100m300s900m300s2100m300s900m300s900" - "m300s900m300s2100m300s900m300s2100m300s900m300s2100m300s2100m300s900" - "m300s900m300s2100m300s2100m300s2100m300s2100m300s900m300s900m300s900" - "m300s2100m300s900m300s900m300s2100m300s900m300s900m300s900m300s900" - "m300s2100m300s900m300s2100m300s900m300s2100m300s900m300s2100m300s2100" - "m300s2100m300s2100m300s900m300s900m300s2100m300s2100m300s900m300s2100" - "m300s2100m300s2100m300s2100m300s900m300s2100m300s2100m300s2100m300s2100" - "m300s53580" - "m300s900m300s900m300s900m300s2100m300s900m300s900m300s2100m300s900" - "m300s900m300s900m300s2100m300s2100m300s900m300s2100m300s900m300s900" - "m300s900m300s2100m300s900m300s2100m300s900m300s2100m300s2100m300s900" - "m300s900m300s2100m300s2100m300s2100m300s2100m300s900m300s900m300s900" - "m300s2100m300s900m300s900m300s2100m300s900m300s900m300s900m300s900" - "m300s2100m300s900m300s2100m300s900m300s2100m300s900m300s2100m300s2100" - "m300s2100m300s2100m300s900m300s900m300s2100m300s2100m300s900m300s2100" - "m300s2100m300s2100m300s2100m300s900m300s2100m300s2100m300s2100m300s2100" - "m300s53580", irsend.outputStr()); -} - -// Decode normal Mitsubishi messages. -TEST(TestDecodeMitsubishi, NormalDecodeWithStrict) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - // Normal Mitsubishi 16-bit message. - irsend.reset(); - irsend.sendMitsubishi(0xC2B8); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, MITSUBISHI_BITS, true)); - EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); - EXPECT_EQ(MITSUBISHI_BITS, irsend.capture.bits); - EXPECT_EQ(0xC2B8, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); - - irsend.reset(); - irsend.sendMitsubishi(0x0); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, MITSUBISHI_BITS, true)); - EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); - EXPECT_EQ(MITSUBISHI_BITS, irsend.capture.bits); - EXPECT_EQ(0x0, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); - - irsend.reset(); - irsend.sendMitsubishi(0xFFFF); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, MITSUBISHI_BITS, true)); - EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); - EXPECT_EQ(MITSUBISHI_BITS, irsend.capture.bits); - EXPECT_EQ(0xFFFF, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); - - // Non-standard Mitsubishi sizes should fail with strict. - irsend.reset(); - // 12 bits. - irsend.sendMitsubishi(0xFFF, 12); - irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, MITSUBISHI_BITS, true)); - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 12, true)); - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 64, true)); - - // 32 bits. - irsend.sendMitsubishi(0xFFF, 32); - irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, MITSUBISHI_BITS, true)); - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 12, true)); - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 32, true)); - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 64, true)); -} - -// Decode normal repeated Mitsubishi messages. -TEST(TestDecodeMitsubishi, NormalDecodeWithRepeatAndStrict) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - // Normal Mitsubishi 16-bit message with 2 repeats. - irsend.reset(); - irsend.sendMitsubishi(0xC2B8, MITSUBISHI_BITS, 2); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, MITSUBISHI_BITS, true)); - EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); - EXPECT_EQ(MITSUBISHI_BITS, irsend.capture.bits); - EXPECT_EQ(0xC2B8, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); - - // Normal Mitsubishi 16-bit message with 0 repeats. - irsend.reset(); - irsend.sendMitsubishi(0xC2B8, MITSUBISHI_BITS, 0); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, MITSUBISHI_BITS, true)); - EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); - EXPECT_EQ(MITSUBISHI_BITS, irsend.capture.bits); - EXPECT_EQ(0xC2B8, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); -} - -// Decode unsupported Mitsubishi messages. -TEST(TestDecodeMitsubishi, DecodeWithNonStrictValues) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - irsend.sendMitsubishi(0x0, 8); // Illegal sized Mitsubishi 8-bit message. - irsend.makeDecodeResult(); - // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, MITSUBISHI_BITS, true)); - // Should pass if strict off. - ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, 8, false)); - EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); - EXPECT_EQ(8, irsend.capture.bits); - EXPECT_EQ(0x0, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 64, false)); - - irsend.reset(); - // Illegal sized Mitsubishi 64-bit message. - irsend.sendMitsubishi(0xFEDCBA9876543210, 64); - irsend.makeDecodeResult(); - // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, MITSUBISHI_BITS, true)); - // Should pass if strict off. - ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, 64, false)); - EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); - EXPECT_EQ(64, irsend.capture.bits); - EXPECT_EQ(0xFEDCBA9876543210, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - // Should fail when we are after a shorter message than we got. - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 8, false)); -} - -// Decode a 'real' example via GlobalCache -TEST(TestDecodeMitsubishi, DecodeGlobalCacheExample) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - // Mitsubishi "Power On" (16-bit) code from Global Cache. - uint16_t gc_test[37] = {33000, 1, 1, 10, 70, 10, 70, 10, 70, 10, 30, 10, 30, - 10, 30, 10, 70, 10, 30, 10, 30, 10, 70, 10, 30, - 10, 30, 10, 30, 10, 30, 10, 70, 10, 30, 10, 936}; - irsend.sendGC(gc_test, 37); - irsend.makeDecodeResult(); - - ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture)); - EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); - EXPECT_EQ(MITSUBISHI_BITS, irsend.capture.bits); - EXPECT_EQ(0xE242, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); -} - -// Fail to decode a non-Mitsubishi example via GlobalCache -TEST(TestDecodeMitsubishi, FailToDecodeNonMitsubishiExample) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - // Modified a few entries to unexpected values, based on previous test case. - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; - irsend.sendGC(gc_test, 39); - irsend.makeDecodeResult(); - - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, MITSUBISHI_BITS, - false)); -} - -// Tests for Mitsubishi A/C methods. - -// Test sending typical data only. -TEST(TestSendMitsubishiAC, SendDataOnly) { - IRsendTest irsend(4); - irsend.begin(); - - uint8_t mitsub_code[MITSUBISHI_AC_STATE_LENGTH] = { - 0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, 0x08, 0x06, 0x30, - 0x45, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F}; - irsend.reset(); - irsend.sendMitsubishiAC(mitsub_code); - EXPECT_EQ( - "m3400s1750" - "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" - "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" - "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" - "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" - "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" - "m440s17100" - "m3400s1750" - "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" - "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" - "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" - "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" - "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" - "m440s17100", irsend.outputStr()); -} - -// Test sending with repeats. -TEST(TestSendMitsubishiAC, SendWithRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - uint8_t mitsub_code[MITSUBISHI_AC_STATE_LENGTH] = { - 0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, 0x08, 0x06, 0x30, - 0x45, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F}; - - irsend.sendMitsubishiAC(mitsub_code, MITSUBISHI_AC_STATE_LENGTH, 0); - EXPECT_EQ( - "m3400s1750" - "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" - "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" - "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" - "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" - "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" - "m440s17100", irsend.outputStr()); - - irsend.reset(); - irsend.sendMitsubishiAC(mitsub_code, MITSUBISHI_AC_STATE_LENGTH, 2); - EXPECT_EQ( - "m3400s1750" - "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" - "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" - "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" - "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" - "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" - "m440s17100" - "m3400s1750" - "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" - "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" - "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" - "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" - "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" - "m440s17100" - "m3400s1750" - "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" - "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" - "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" - "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" - "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" - "m440s17100", irsend.outputStr()); -} - -// Test sending atypical sizes. -TEST(TestSendMitsubishiAC, SendUnexpectedSizes) { - IRsendTest irsend(4); - irsend.begin(); - - uint8_t mitsub_short_code[17] = {0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, - 0x08, 0x06, 0x30, 0x45, 0x67, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00}; - uint8_t mitsub_long_code[19] = {0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, - 0x08, 0x06, 0x30, 0x45, 0x67, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F, - 0x00}; - irsend.reset(); - irsend.sendMitsubishiAC(mitsub_short_code, 17); - ASSERT_EQ("", irsend.outputStr()); - - irsend.reset(); - irsend.sendMitsubishiAC(mitsub_long_code, 19); - ASSERT_EQ( - "m3400s1750" - "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" - "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" - "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" - "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" - "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m440s17100" - "m3400s1750" - "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" - "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" - "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" - "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" - "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m440s17100", irsend.outputStr()); -} - -// Tests for IRMitsubishiAC class. - -TEST(TestMitsubishiACClass, Power) { - IRMitsubishiAC mitsub(0); - mitsub.begin(); - - mitsub.on(); - EXPECT_TRUE(mitsub.getPower()); - - mitsub.off(); - EXPECT_FALSE(mitsub.getPower()); - - mitsub.setPower(true); - EXPECT_TRUE(mitsub.getPower()); - - mitsub.setPower(false); - EXPECT_FALSE(mitsub.getPower()); -} - -TEST(TestMitsubishiACClass, Temperature) { - IRMitsubishiAC mitsub(0); - mitsub.begin(); - - mitsub.setTemp(0); - EXPECT_EQ(MITSUBISHI_AC_MIN_TEMP, mitsub.getTemp()); - - mitsub.setTemp(255); - EXPECT_EQ(MITSUBISHI_AC_MAX_TEMP, mitsub.getTemp()); - - mitsub.setTemp(MITSUBISHI_AC_MIN_TEMP); - EXPECT_EQ(MITSUBISHI_AC_MIN_TEMP, mitsub.getTemp()); - - mitsub.setTemp(MITSUBISHI_AC_MAX_TEMP); - EXPECT_EQ(MITSUBISHI_AC_MAX_TEMP, mitsub.getTemp()); - - mitsub.setTemp(MITSUBISHI_AC_MIN_TEMP - 1); - EXPECT_EQ(MITSUBISHI_AC_MIN_TEMP, mitsub.getTemp()); - - mitsub.setTemp(MITSUBISHI_AC_MAX_TEMP + 1); - EXPECT_EQ(MITSUBISHI_AC_MAX_TEMP, mitsub.getTemp()); - - mitsub.setTemp(17); - EXPECT_EQ(17, mitsub.getTemp()); - - mitsub.setTemp(21); - EXPECT_EQ(21, mitsub.getTemp()); - - mitsub.setTemp(25); - EXPECT_EQ(25, mitsub.getTemp()); - - mitsub.setTemp(30); - EXPECT_EQ(30, mitsub.getTemp()); -} - -TEST(TestMitsubishiACClass, OperatingMode) { - IRMitsubishiAC mitsub(0); - mitsub.begin(); - - mitsub.setMode(MITSUBISHI_AC_AUTO); - EXPECT_EQ(MITSUBISHI_AC_AUTO, mitsub.getMode()); - - mitsub.setMode(MITSUBISHI_AC_COOL); - EXPECT_EQ(MITSUBISHI_AC_COOL, mitsub.getMode()); - - mitsub.setMode(MITSUBISHI_AC_HEAT); - EXPECT_EQ(MITSUBISHI_AC_HEAT, mitsub.getMode()); - - mitsub.setMode(MITSUBISHI_AC_DRY); - EXPECT_EQ(MITSUBISHI_AC_DRY, mitsub.getMode()); - - mitsub.setMode(MITSUBISHI_AC_AUTO + 1); - EXPECT_EQ(MITSUBISHI_AC_AUTO, mitsub.getMode()); - - mitsub.setMode(255); - EXPECT_EQ(MITSUBISHI_AC_AUTO, mitsub.getMode()); -} - -TEST(TestMitsubishiACClass, VaneMode) { - IRMitsubishiAC mitsub(0); - mitsub.begin(); - - mitsub.setVane(MITSUBISHI_AC_VANE_AUTO); - EXPECT_EQ(MITSUBISHI_AC_VANE_AUTO, mitsub.getVane()); - - mitsub.setVane(MITSUBISHI_AC_VANE_AUTO + 1); - EXPECT_EQ(MITSUBISHI_AC_VANE_AUTO + 1, mitsub.getVane()); - - mitsub.setVane(MITSUBISHI_AC_VANE_AUTO_MOVE); - EXPECT_EQ(MITSUBISHI_AC_VANE_AUTO_MOVE, mitsub.getVane()); - - mitsub.setVane(MITSUBISHI_AC_VANE_AUTO_MOVE + 1); - EXPECT_EQ(MITSUBISHI_AC_VANE_AUTO_MOVE, mitsub.getVane()); - - mitsub.setVane(MITSUBISHI_AC_VANE_AUTO_MOVE - 1); - EXPECT_EQ(MITSUBISHI_AC_VANE_AUTO_MOVE - 1, mitsub.getVane()); -} - -TEST(TestMitsubishiACClass, FanSpeed) { - IRMitsubishiAC mitsub(0); - mitsub.begin(); - - mitsub.setFan(MITSUBISHI_AC_FAN_AUTO); - EXPECT_EQ(MITSUBISHI_AC_FAN_AUTO, mitsub.getFan()); - - mitsub.setFan(255); - EXPECT_EQ(MITSUBISHI_AC_FAN_REAL_MAX, mitsub.getFan()); - - mitsub.setFan(MITSUBISHI_AC_FAN_MAX); - EXPECT_EQ(MITSUBISHI_AC_FAN_REAL_MAX, mitsub.getFan()); - - mitsub.setFan(MITSUBISHI_AC_FAN_MAX - 1); - EXPECT_EQ(MITSUBISHI_AC_FAN_MAX - 1, mitsub.getFan()); - - mitsub.setFan(1); - EXPECT_EQ(1, mitsub.getFan()); - - mitsub.setFan(2); - EXPECT_EQ(2, mitsub.getFan()); - - mitsub.setFan(3); - EXPECT_EQ(3, mitsub.getFan()); - - mitsub.setFan(4); - EXPECT_EQ(4, mitsub.getFan()); - - mitsub.setFan(MITSUBISHI_AC_FAN_SILENT); - EXPECT_EQ(MITSUBISHI_AC_FAN_SILENT, mitsub.getFan()); - - mitsub.setFan(MITSUBISHI_AC_FAN_SILENT + 1); - EXPECT_EQ(MITSUBISHI_AC_FAN_REAL_MAX, mitsub.getFan()); -} - -TEST(TestMitsubishiACClass, MessageConstuction) { - IRMitsubishiAC mitsub(0); - IRsendTest irsend(4); - mitsub.begin(); - irsend.begin(); - - mitsub.setFan(1); - mitsub.setMode(MITSUBISHI_AC_COOL); - mitsub.setTemp(27); - mitsub.setVane(3); - mitsub.on(); - - // Check everything for kicks. - EXPECT_EQ(1, mitsub.getFan()); - EXPECT_EQ(MITSUBISHI_AC_COOL, mitsub.getMode()); - EXPECT_EQ(27, mitsub.getTemp()); - EXPECT_EQ(3, mitsub.getVane()); - EXPECT_TRUE(mitsub.getPower()); - - irsend.reset(); - irsend.sendMitsubishiAC(mitsub.getRaw()); - EXPECT_EQ( - "m3400s1750" - "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" - "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s1300m450s1300m450s420m450s1300m450s420" - "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s420m450s420m450s1300m450s420" - "m440s17100" - "m3400s1750" - "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" - "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420m450s420" - "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" - "m450s1300m450s420m450s420m450s1300m450s1300m450s420m450s1300m450s420" - "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" - "m450s420m450s420m450s420m450s1300m450s420m450s420m450s1300m450s420" - "m440s17100", irsend.outputStr()); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Nikai_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/ir_Nikai_test.cpp deleted file mode 100644 index 0eea2bc40..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Nikai_test.cpp +++ /dev/null @@ -1,210 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRsend.h" -#include "IRsend_test.h" -#include "gtest/gtest.h" - -// Tests for sendNikai(). -// Test sending typical data only. -TEST(TestSendNikai, SendDataOnly) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendNikai(0xD5F2A); // Nikai TV Power Off. - EXPECT_EQ("m4000s4000" - "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" - "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" - "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" - "m500s2000m500s1000m500s2000m500s8500", - irsend.outputStr()); - - irsend.reset(); -} - -// Test sending with different repeats. -TEST(TestSendNikai, SendWithRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendNikai(0xD5F2A, NIKAI_BITS, 1); // 1 repeat. - EXPECT_EQ("m4000s4000" - "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" - "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" - "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" - "m500s2000m500s1000m500s2000m500s8500" - "m4000s4000" - "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" - "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" - "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" - "m500s2000m500s1000m500s2000m500s8500", - irsend.outputStr()); - irsend.sendNikai(0xD5F2A, NIKAI_BITS, 2); // 2 repeat. - EXPECT_EQ("m4000s4000" - "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" - "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" - "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" - "m500s2000m500s1000m500s2000m500s8500" - "m4000s4000" - "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" - "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" - "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" - "m500s2000m500s1000m500s2000m500s8500" - "m4000s4000" - "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" - "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" - "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" - "m500s2000m500s1000m500s2000m500s8500", - irsend.outputStr()); -} - -// Tests for decodeNikai(). - -// Decode normal Nikai messages. -TEST(TestDecodeNikai, NormalDecodeWithStrict) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - // Normal Nikai 24-bit message. - irsend.reset(); - irsend.sendNikai(0x123456); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeNikai(&irsend.capture, NIKAI_BITS, true)); - EXPECT_EQ(NIKAI, irsend.capture.decode_type); - EXPECT_EQ(NIKAI_BITS, irsend.capture.bits); - EXPECT_EQ(0x123456, irsend.capture.value); - - irsend.reset(); - irsend.sendNikai(0x101); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeNikai(&irsend.capture, NIKAI_BITS, true)); - EXPECT_EQ(NIKAI, irsend.capture.decode_type); - EXPECT_EQ(NIKAI_BITS, irsend.capture.bits); - EXPECT_EQ(0x101, irsend.capture.value); -} - -// Decode normal repeated Nikai messages. -TEST(TestDecodeNikai, NormalDecodeWithRepeatAndStrict) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - // Normal Nikai 24-bit message. - irsend.reset(); - irsend.sendNikai(0xD5F2A, NIKAI_BITS, 2); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeNikai(&irsend.capture, NIKAI_BITS, true)); - EXPECT_EQ(NIKAI, irsend.capture.decode_type); - EXPECT_EQ(NIKAI_BITS, irsend.capture.bits); - EXPECT_EQ(0xD5F2A, irsend.capture.value); -} - -TEST(TestDecodeNikai, NormalDecodeWithNonStrict) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - // Illegal under length (16-bit) message - irsend.reset(); - irsend.sendNikai(0x0, 16); - irsend.makeDecodeResult(); - // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture, NIKAI_BITS, true)); - // And it should fail when we expect more bits. - ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture, NIKAI_BITS, false)); - - // Should pass if strict off if we ask for correct nr. of bits sent. - ASSERT_TRUE(irrecv.decodeNikai(&irsend.capture, 16, false)); - EXPECT_EQ(NIKAI, irsend.capture.decode_type); - EXPECT_EQ(16, irsend.capture.bits); - EXPECT_EQ(0x0, irsend.capture.value); - - // Should fail as we are expecting less bits than there are. - ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture, 12, false)); -} - -// Decode (non-standard) 64-bit messages. -// Decode unsupported Nikai messages. -TEST(TestDecodeNikai, Decode64BitMessages) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - // Illegal size Nikai 64-bit message. - irsend.sendNikai(0xFFFFFFFFFFFFFFFF, 64); - irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture, NIKAI_BITS, true)); - // Should work with a 'normal' match (not strict) - ASSERT_TRUE(irrecv.decodeNikai(&irsend.capture, 64, false)); - EXPECT_EQ(NIKAI, irsend.capture.decode_type); - EXPECT_EQ(64, irsend.capture.bits); - EXPECT_EQ(0xFFFFFFFFFFFFFFFF, irsend.capture.value); -} - -// Decode real example via Issue #309 -TEST(TestDecodeNikai, DecodeExamples) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - // Nikai TV Power Off from Issue #309 - uint16_t rawdata_off[100] = {4060, 3918, - 508, 2004, 508, 2002, 510, 2002, 508, 2004, 506, 1050, 508, 1048, - 510, 2004, 508, 1048, 508, 2002, 510, 1050, 508, 2004, 510, 1048, - 508, 1050, 508, 1048, 508, 1050, 508, 1050, 508, 2004, 508, 2002, - 510, 1048, 508, 2004, 508, 1050, 506, 2004, 508, 1048, 510, 2002, - 456, 8446, - 3956, 3998, - 508, 2004, 508, 2002, 508, 2004, 508, 1978, 532, 1050, 508, 1050, - 508, 2002, 508, 1050, 508, 2004, 508, 1050, 508, 2002, 510, 1050, - 508, 1050, 508, 1048, 508, 1050, 508, 1050, 508, 2002, 510, 2002, - 508, 1050, 508, 2002, 510, 1050, 508, 2002, 508}; - irsend.sendRaw(rawdata_off, 100, 38); - irsend.makeDecodeResult(); - - ASSERT_TRUE(irrecv.decode(&irsend.capture)); - EXPECT_EQ(NIKAI, irsend.capture.decode_type); - EXPECT_EQ(NIKAI_BITS, irsend.capture.bits); - EXPECT_EQ(0xD5F2A, irsend.capture.value); - - // Nikai TV Volume Up from Issue #309 - uint16_t rawdata_volup[52] = {3972, 4002, - 504, 1982, 526, 2010, 502, 2010, 502, 2010, 500, 1056, 502, 1056, - 502, 2010, 500, 1056, 502, 2010, 502, 2010, 500, 2010, 502, 2010, - 502, 1056, 502, 1056, 502, 1056, 500, 1056, 502, 2010, 502, 2010, - 500, 1056, 502, 2008, 502, 1054, 504, 1054, 504, 1054, 500, 1056, - 450}; - - irsend.reset(); - irsend.sendRaw(rawdata_volup, 52, 38); - irsend.makeDecodeResult(); - - ASSERT_TRUE(irrecv.decode(&irsend.capture)); - EXPECT_EQ(NIKAI, irsend.capture.decode_type); - EXPECT_EQ(NIKAI_BITS, irsend.capture.bits); - EXPECT_EQ(0xD0F2F, irsend.capture.value); -} - -// Fail to decode a non-Nikai example via GlobalCache -TEST(TestDecodeNikai, FailToDecodeNonNikaiExample) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - uint16_t gc_test[71] = {38000, 1, 1, 172, 172, 22, 64, 22, 64, 22, 64, 22, 21, - 22, 21, 22, 21, 22, 11, 22, 21, 22, 128, 22, 64, 22, - 64, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 64, - 22, 21, 22, 21, 22, 64, 22, 64, 22, 21, 22, 21, 22, - 64, 22, 21, 22, 64, 22, 64, 22, 21, 22, 21, 22, 64, - 22, 64, 22, 21, 22, 1820}; - irsend.sendGC(gc_test, 71); - irsend.makeDecodeResult(); - - ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture, NIKAI_BITS, false)); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Panasonic_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/ir_Panasonic_test.cpp deleted file mode 100644 index 3f27b90bf..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Panasonic_test.cpp +++ /dev/null @@ -1,457 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRsend.h" -#include "IRsend_test.h" -#include "gtest/gtest.h" - -// Tests for encodePanasonic(). - -TEST(TestEncodePanasonic, General) { - IRsendTest irsend(4); - EXPECT_EQ(0x0, irsend.encodePanasonic(0, 0, 0, 0)); - EXPECT_EQ(0x101010101, irsend.encodePanasonic(1, 1, 1, 1)); - EXPECT_EQ(0xFFFF, irsend.encodePanasonic(0, 0, 0, 0xFF)); - EXPECT_EQ(0xFF00FF, irsend.encodePanasonic(0, 0, 0xFF, 0)); - EXPECT_EQ(0xFF0000FF, irsend.encodePanasonic(0, 0xFF, 0, 0)); - EXPECT_EQ(0xFFFF00000000, irsend.encodePanasonic(0xFFFF, 0, 0, 0)); - EXPECT_EQ(0xFFFFFFFFFFFF, irsend.encodePanasonic(0xFFFF, 0xFF, 0xFF, 0xFF)); - EXPECT_EQ(0x40040190ED7C, irsend.encodePanasonic(0x4004, 0x01, 0x90, 0xED)); -} - - -// Tests for sendPanasonic64(). - -// Test sending typical data only. -TEST(TestSendPanasonic64, SendDataOnly) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendPanasonic64(0x0); - EXPECT_EQ( - "m3456s1728" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s129600", irsend.outputStr()); - - irsend.reset(); - irsend.sendPanasonic64(0x40040190ED7C); - EXPECT_EQ( - "m3456s1728" - "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" - "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" - "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" - "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" - "m432s129600", irsend.outputStr()); - - irsend.reset(); - irsend.sendPanasonic64(0xFFFFFFFFFFFF); - EXPECT_EQ( - "m3456s1728" - "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" - "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" - "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" - "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" - "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" - "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" - "m432s129600", irsend.outputStr()); -} - -// Test sending with different repeats. -TEST(TestSendPanasonic64, SendWithRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendPanasonic64(0x40040190ED7C, PANASONIC_BITS, 0); // 0 repeats. - EXPECT_EQ( - "m3456s1728" - "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" - "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" - "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" - "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" - "m432s129600", irsend.outputStr()); - - irsend.reset(); - irsend.sendPanasonic64(0x40040190ED7C, PANASONIC_BITS, 1); // 1 repeat. - EXPECT_EQ( - "m3456s1728" - "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" - "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" - "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" - "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" - "m432s129600" - "m3456s1728" - "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" - "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" - "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" - "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" - "m432s129600", irsend.outputStr()); - - irsend.sendPanasonic64(0x40040190ED7C, PANASONIC_BITS, 2); // 2 repeats. - EXPECT_EQ( - "m3456s1728" - "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" - "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" - "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" - "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" - "m432s129600" - "m3456s1728" - "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" - "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" - "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" - "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" - "m432s129600" - "m3456s1728" - "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" - "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" - "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" - "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" - "m432s129600", irsend.outputStr()); -} - -// Test sending an atypical data size. -TEST(TestSendPanasonic64, SendUnusualSize) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendPanasonic64(0x0, 8); - EXPECT_EQ( - "m3456s1728" - "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" - "m432s129600", irsend.outputStr()); - - irsend.reset(); - irsend.sendPanasonic64(0x1234567890ABCDEF, 64); - EXPECT_EQ( - "m3456s1728" - "m432s432m432s432m432s432m432s1296m432s432m432s432m432s1296m432s432" - "m432s432m432s432m432s1296m432s1296m432s432m432s1296m432s432m432s432" - "m432s432m432s1296m432s432m432s1296m432s432m432s1296m432s1296m432s432" - "m432s432m432s1296m432s1296m432s1296m432s1296m432s432m432s432m432s432" - "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" - "m432s1296m432s432m432s1296m432s432m432s1296m432s432m432s1296m432s1296" - "m432s1296m432s1296m432s432m432s432m432s1296m432s1296m432s432m432s1296" - "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s1296m432s1296" - "m432s129600", irsend.outputStr()); -} - -// Tests for sendPanasonic(). - -TEST(TestSendPanasonic, CompareToSendPanasonic64) { - IRsendTest panasonic(4); - IRsendTest panasonic64(0); - - panasonic.begin(); - panasonic64.begin(); - - panasonic.reset(); - panasonic64.reset(); - - panasonic.sendPanasonic(0x4004, 0x0190ED7C); - panasonic64.sendPanasonic64(0x40040190ED7C); - EXPECT_EQ(panasonic64.outputStr(), panasonic.outputStr()); - - panasonic.sendPanasonic(0x0, 0x0); - panasonic64.sendPanasonic64(0x0); - EXPECT_EQ(panasonic64.outputStr(), panasonic.outputStr()); - - panasonic.sendPanasonic(0x0, 0x0, 8); - panasonic64.sendPanasonic64(0x0, 8); - EXPECT_EQ(panasonic64.outputStr(), panasonic.outputStr()); - - panasonic.sendPanasonic(0x1234, 0x567890AB, 64); - panasonic64.sendPanasonic64(0x1234567890AB, 64); - EXPECT_EQ(panasonic64.outputStr(), panasonic.outputStr()); - - panasonic.sendPanasonic(0x1234, 0x567890AB, PANASONIC_BITS, 2); - panasonic64.sendPanasonic64(0x1234567890AB, PANASONIC_BITS, 2); - EXPECT_EQ(panasonic64.outputStr(), panasonic.outputStr()); -} - -// Tests for decodePanasonic(). - -// Decode normal Panasonic messages. -TEST(TestDecodePanasonic, NormalDecodeWithStrict) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - // Normal Panasonic 48-bit message. - irsend.reset(); - irsend.sendPanasonic64(0x40040190ED7C); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x40040190ED7C, irsend.capture.value); - EXPECT_EQ(0x4004, irsend.capture.address); - EXPECT_EQ(0x0190ED7C, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); - - // Synthesised Normal Panasonic 48-bit message. - irsend.reset(); - irsend.sendPanasonic64(irsend.encodePanasonic(0x4004, 0x12, 0x34, 0x56)); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x400412345670, irsend.capture.value); - EXPECT_EQ(0x4004, irsend.capture.address); - EXPECT_EQ(0x12345670, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); - - // Synthesised Normal Panasonic 48-bit message. - irsend.reset(); - irsend.sendPanasonic64(irsend.encodePanasonic(0x4004, 0x1, 0x1, 0x1)); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x400401010101, irsend.capture.value); - EXPECT_EQ(0x4004, irsend.capture.address); - EXPECT_EQ(0x1010101, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); -} - -// Decode normal repeated Panasonic messages. -TEST(TestDecodePanasonic, NormalDecodeWithRepeatAndStrict) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - // Normal Panasonic 48-bit message with 2 repeats. - irsend.reset(); - irsend.sendPanasonic64(0x40040190ED7C, PANASONIC_BITS, 2); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x40040190ED7C, irsend.capture.value); - EXPECT_EQ(0x4004, irsend.capture.address); - EXPECT_EQ(0x190ED7C, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); - - irsend.makeDecodeResult(2 * PANASONIC_BITS + 4); - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x40040190ED7C, irsend.capture.value); - - irsend.makeDecodeResult(2 * (2 * PANASONIC_BITS + 4)); - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x40040190ED7C, irsend.capture.value); -} - -// Decode Panasonic messages with unsupported values. -TEST(TestDecodePanasonic, DecodeWithNonStrictValues) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - irsend.sendPanasonic64(0x0); // Illegal value Panasonic 48-bit message. - irsend.makeDecodeResult(); - // Should fail with strict on. - ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); - // Should pass if strict off. - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, false)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x0, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - - irsend.reset(); - // Illegal address/Manufacturer code. The rest is legal. - irsend.sendPanasonic64(irsend.encodePanasonic(0, 1, 2, 3)); - irsend.makeDecodeResult(); - // Should fail with strict on. - ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); - // Should pass if strict off. - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, false)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x1020300, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x1020300, irsend.capture.command); -} - -// Decode Panasonic messages with unsupported size/lengths. -TEST(TestDecodePanasonic, DecodeWithNonStrictSize) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - irsend.sendPanasonic64(0x12345678, 32); // Illegal size Panasonic message. - irsend.makeDecodeResult(); - - ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); - - irsend.makeDecodeResult(); - // Should fail with strict when we ask for the wrong bit size. - ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, 32, true)); - // Should pass if strict off. - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, 32, false)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(32, irsend.capture.bits); - EXPECT_EQ(0x12345678, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x12345678, irsend.capture.command); - - // Illegal over length (56-bit) message. - irsend.reset(); - irsend.sendPanasonic64(irsend.encodePanasonic(0x4004, 1, 2, 3), 56); - irsend.makeDecodeResult(); - - ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); - // Shouldn't pass if strict off and wrong bit size. - ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, false)); - // Re-decode with correct bit size. - ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, 56, true)); - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, 56, false)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(56, irsend.capture.bits); - EXPECT_EQ(0x400401020300, irsend.capture.value); - EXPECT_EQ(0x4004, irsend.capture.address); - EXPECT_EQ(0x01020300, irsend.capture.command); -} - -// Decode (non-standard) 64-bit messages. -TEST(TestDecodePanasonic, Decode64BitMessages) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - // Illegal value & size Panasonic 64-bit message. - irsend.sendPanasonic64(0xFFFFFFFFFFFFFFFF, 64); - irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, 64, true)); - // Should work with a 'normal' match (not strict) - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, 64, false)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(64, irsend.capture.bits); - EXPECT_EQ(0xFFFFFFFFFFFFFFFF, irsend.capture.value); - EXPECT_EQ(0xFFFFFFFF, irsend.capture.address); - EXPECT_EQ(0xFFFFFFFF, irsend.capture.command); -} - -// Decode a 'real' example via GlobalCache -TEST(TestDecodePanasonic, DecodeGlobalCacheExample) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - // Panasonic code from Global Cache. - uint16_t gc_test[103] = {37000, 1, 1, 126, 64, 16, 17, 16, 49, 15, 16, 16, 16, - 16, 16, 16, 17, 15, 17, 15, 17, 15, 17, 15, 16, 16, - 16, 16, 16, 16, 17, 15, 49, 16, 16, 16, 16, 16, 17, - 15, 17, 15, 17, 15, 17, 15, 16, 16, 16, 16, 16, 16, - 49, 15, 49, 16, 17, 15, 17, 15, 49, 16, 16, 16, 17, - 16, 17, 15, 17, 15, 49, 16, 49, 15, 49, 16, 17, 16, - 49, 15, 49, 16, 17, 15, 48, 16, 16, 16, 49, 15, 48, - 16, 49, 15, 49, 16, 49, 15, 17, 15, 16, 16, 2721}; - irsend.sendGC(gc_test, 103); - irsend.makeDecodeResult(); - - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x40040190ED7C, irsend.capture.value); - EXPECT_EQ(0x4004, irsend.capture.address); - EXPECT_EQ(0x0190ED7C, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); - - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x40040190ED7C, irsend.capture.value); - EXPECT_EQ(0x4004, irsend.capture.address); - EXPECT_EQ(0x0190ED7C, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); -} - -// Fail to decode a non-Panasonic example via GlobalCache -TEST(TestDecodePanasonic, FailToDecodeNonPanasonicExample) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - // Modified a few entries to unexpected values, based on previous test case. - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; - irsend.sendGC(gc_test, 39); - irsend.makeDecodeResult(); - - ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture)); - ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, false)); -} - -// Failing to decode Panasonic in Issue #245 -TEST(TestDecodePanasonic, DecodeIssue245) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - - uint16_t rawData[100] = {3550, 1750, 500, 450, 500, 1300, 500, 450, 500, 450, - 500, 450, 500, 450, 500, 450, 500, 450, 500, 450, - 500, 450, 500, 450, 500, 450, 500, 450, 500, 1300, - 500, 450, 500, 450, 500, 450, 500, 450, 500, 450, - 500, 450, 500, 450, 500, 450, 500, 450, 500, 1300, - 500, 450, 500, 450, 500, 450, 500, 450, 500, 450, - 500, 450, 500, 450, 500, 450, 500, 1300, 500, 450, - 500, 1300, 500, 1300, 500, 1300, 500, 1300, 500, 450, - 500, 450, 500, 1300, 500, 450, 500, 1300, 500, 1300, - 500, 1300, 500, 1300, 500, 450, 500, 1300, 500, 5000}; - - irsend.sendRaw(rawData, 100, 37); - irsend.makeDecodeResult(); - - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x40040100BCBD, irsend.capture.value); - EXPECT_EQ(0x4004, irsend.capture.address); - EXPECT_EQ(0x100BCBD, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); - - irsend.reset(); - irsend.sendRaw(rawData, 99, 37); - irsend.makeDecodeResult(); - - ASSERT_TRUE(irrecv.decode(&irsend.capture)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x40040100BCBD, irsend.capture.value); - EXPECT_EQ(0x4004, irsend.capture.address); - EXPECT_EQ(0x100BCBD, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Samsung_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/ir_Samsung_test.cpp deleted file mode 100644 index 8c35ebebf..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Samsung_test.cpp +++ /dev/null @@ -1,276 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRsend.h" -#include "IRsend_test.h" -#include "gtest/gtest.h" - -// Tests for sendSAMSUNG(). - -// Test sending typical data only. -TEST(TestSendSamsung, SendDataOnly) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendSAMSUNG(0xE0E09966); // Samsung TV Power On. - EXPECT_EQ("m4480s4480" - "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" - "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" - "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" - "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" - "m560s560m560s1680m560s1680m560s560m560s108080", - irsend.outputStr()); - - irsend.reset(); -} - -// Test sending with different repeats. -TEST(TestSendSamsung, SendWithRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendSAMSUNG(0xE0E09966, SAMSUNG_BITS, 1); // 1 repeat. - EXPECT_EQ("m4480s4480" - "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" - "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" - "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" - "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" - "m560s560m560s1680m560s1680m560s560m560s108080" - "m4480s4480" - "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" - "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" - "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" - "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" - "m560s560m560s1680m560s1680m560s560m560s108080" - , irsend.outputStr()); - irsend.sendSAMSUNG(0xE0E09966, SAMSUNG_BITS, 2); // 2 repeats. - EXPECT_EQ("m4480s4480" - "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" - "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" - "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" - "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" - "m560s560m560s1680m560s1680m560s560m560s108080" - "m4480s4480" - "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" - "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" - "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" - "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" - "m560s560m560s1680m560s1680m560s560m560s108080" - "m4480s4480" - "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" - "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" - "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" - "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" - "m560s560m560s1680m560s1680m560s560m560s108080" - , irsend.outputStr()); -} - -// Tests for encodeSAMSUNG(). - -TEST(TestEncodeSamsung, NormalEncoding) { - IRsendTest irsend(4); - EXPECT_EQ(0xFF, irsend.encodeSAMSUNG(0, 0)); - EXPECT_EQ(0x8080807F, irsend.encodeSAMSUNG(1, 1)); - EXPECT_EQ(0xF8F805FA, irsend.encodeSAMSUNG(0x1F, 0xA0)); - EXPECT_EQ(0xA0A0CC33, irsend.encodeSAMSUNG(0x05, 0x33)); - EXPECT_EQ(0xFFFFFF00, irsend.encodeSAMSUNG(0xFF, 0xFF)); - EXPECT_EQ(0xE0E09966, irsend.encodeSAMSUNG(0x07, 0x99)); -} - -// Tests for decodeSAMSUNG(). - -// Decode normal Samsung messages. -TEST(TestDecodeSamsung, NormalDecodeWithStrict) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - // Normal Samsung 32-bit message. - irsend.reset(); - irsend.sendSAMSUNG(0xE0E09966); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, true)); - EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); - EXPECT_EQ(SAMSUNG_BITS, irsend.capture.bits); - EXPECT_EQ(0xE0E09966, irsend.capture.value); - EXPECT_EQ(0x07, irsend.capture.address); - EXPECT_EQ(0x99, irsend.capture.command); - - // Synthesised Normal Samsung 32-bit message. - irsend.reset(); - irsend.sendSAMSUNG(irsend.encodeSAMSUNG(0x07, 0x99)); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, true)); - EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); - EXPECT_EQ(SAMSUNG_BITS, irsend.capture.bits); - EXPECT_EQ(0xE0E09966, irsend.capture.value); - EXPECT_EQ(0x07, irsend.capture.address); - EXPECT_EQ(0x99, irsend.capture.command); - - // Synthesised Normal Samsung 32-bit message. - irsend.reset(); - irsend.sendSAMSUNG(irsend.encodeSAMSUNG(0x1, 0x1)); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, true)); - EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); - EXPECT_EQ(SAMSUNG_BITS, irsend.capture.bits); - EXPECT_EQ(0x8080807F, irsend.capture.value); - EXPECT_EQ(0x1, irsend.capture.address); - EXPECT_EQ(0x1, irsend.capture.command); -} - -// Decode normal repeated Samsung messages. -TEST(TestDecodeSamsung, NormalDecodeWithRepeatAndStrict) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - // Normal Samsung 32-bit message. - irsend.reset(); - irsend.sendSAMSUNG(0xE0E09966, SAMSUNG_BITS, 2); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, true)); - EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); - EXPECT_EQ(SAMSUNG_BITS, irsend.capture.bits); - EXPECT_EQ(0xE0E09966, irsend.capture.value); - EXPECT_EQ(0x07, irsend.capture.address); - EXPECT_EQ(0x99, irsend.capture.command); -} - -// Decode unsupported Samsung messages. -TEST(TestDecodeSamsung, DecodeWithNonStrictValues) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - irsend.sendSAMSUNG(0x0); // Illegal value Samsung 32-bit message. - irsend.makeDecodeResult(); - // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, true)); - // Should pass if strict off. - ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, false)); - EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); - EXPECT_EQ(SAMSUNG_BITS, irsend.capture.bits); - EXPECT_EQ(0x0, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - - irsend.reset(); - irsend.sendSAMSUNG(0x12345678); // Illegal value Samsung 32-bit message. - irsend.makeDecodeResult(); - // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, true)); - // Should pass if strict off. - ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, false)); - EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); - EXPECT_EQ(SAMSUNG_BITS, irsend.capture.bits); - EXPECT_EQ(0x12345678, irsend.capture.value); - EXPECT_EQ(0x48, irsend.capture.address); - EXPECT_EQ(0x6A, irsend.capture.command); - - // Illegal over length (36-bit) message. - irsend.reset(); - irsend.sendSAMSUNG(irsend.encodeSAMSUNG(0, 0), 36); - irsend.makeDecodeResult(); - // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, true)); - // Shouldn't pass if strict off and wrong expected bit size. - ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, false)); - // Re-decode with correct bit size. - ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, 36, true)); - ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, 36, false)); - EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); - EXPECT_EQ(36, irsend.capture.bits); - EXPECT_EQ(0xFF, irsend.capture.value); // We told it to expect 8 bits less. - EXPECT_EQ(0x00, irsend.capture.address); - EXPECT_EQ(0x00, irsend.capture.command); - - // Illegal under length (16-bit) message - irsend.reset(); - irsend.sendSAMSUNG(irsend.encodeSAMSUNG(0x0, 0x0), 16); - irsend.makeDecodeResult(); - // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, true)); - // And it should fail when we expect more bits. - ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, false)); - - // Should pass if strict off if we ask for correct nr. of bits sent. - ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, 16, false)); - EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); - EXPECT_EQ(16, irsend.capture.bits); - EXPECT_EQ(0xFF, irsend.capture.value); // We told it to expect 4 bits less. - EXPECT_EQ(0x00, irsend.capture.address); - EXPECT_EQ(0x00, irsend.capture.command); - - // Should fail as we are expecting less bits than there are. - ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, 12, false)); -} - -// Decode (non-standard) 64-bit messages. -// Decode unsupported Samsung messages. -TEST(TestDecodeSamsung, Decode64BitMessages) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - // Illegal value & size Samsung 64-bit message. - irsend.sendSAMSUNG(0xFFFFFFFFFFFFFFFF, 64); - irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, true)); - // Should work with a 'normal' match (not strict) - ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, 64, false)); - EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); - EXPECT_EQ(64, irsend.capture.bits); - EXPECT_EQ(0xFFFFFFFFFFFFFFFF, irsend.capture.value); - EXPECT_EQ(0xFF, irsend.capture.address); - EXPECT_EQ(0xFF, irsend.capture.command); -} - -// Decode a 'real' example via GlobalCache -TEST(TestDecodeSamsung, DecodeGlobalCacheExample) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - // Samsung TV Power On from Global Cache. - uint16_t gc_test[71] = {38000, 1, 1, 172, 172, 22, 64, 22, 64, 22, 64, 22, 21, - 22, 21, 22, 21, 22, 21, 22, 21, 22, 64, 22, 64, 22, - 64, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 64, - 22, 21, 22, 21, 22, 64, 22, 64, 22, 21, 22, 21, 22, - 64, 22, 21, 22, 64, 22, 64, 22, 21, 22, 21, 22, 64, - 22, 64, 22, 21, 22, 1820}; - irsend.sendGC(gc_test, 71); - irsend.makeDecodeResult(); - - ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture)); - EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); - EXPECT_EQ(SAMSUNG_BITS, irsend.capture.bits); - EXPECT_EQ(0xE0E09966, irsend.capture.value); - EXPECT_EQ(0x07, irsend.capture.address); - EXPECT_EQ(0x99, irsend.capture.command); -} - -// Fail to decode a non-Samsung example via GlobalCache -TEST(TestDecodeSamsung, FailToDecodeNonSamsungExample) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - // Modified a few entries to unexpected values, based on previous test case. - uint16_t gc_test[71] = {38000, 1, 1, 172, 172, 22, 64, 22, 64, 22, 64, 22, 21, - 22, 21, 22, 21, 22, 11, 22, 21, 22, 128, 22, 64, 22, - 64, 22, 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 64, - 22, 21, 22, 21, 22, 64, 22, 64, 22, 21, 22, 21, 22, - 64, 22, 21, 22, 64, 22, 64, 22, 21, 22, 21, 22, 64, - 22, 64, 22, 21, 22, 1820}; - irsend.sendGC(gc_test, 71); - irsend.makeDecodeResult(); - - ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, SAMSUNG_BITS, false)); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Sherwood_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/ir_Sherwood_test.cpp deleted file mode 100644 index b5750b3b1..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Sherwood_test.cpp +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRsend.h" -#include "IRsend_test.h" -#include "gtest/gtest.h" - -// Tests for sendSherwood(). - -// Test sending typical data only. -TEST(TestSendSherwood, SendDataOnly) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendSherwood(0xC1A28877); - EXPECT_EQ("m8960s4480m560s1680m560s1680m560s560m560s560m560s560m560s560" - "m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560" - "m560s560m560s1680m560s560m560s1680m560s560m560s560m560s560" - "m560s1680m560s560m560s560m560s560m560s560m560s1680m560s1680" - "m560s1680m560s560m560s1680m560s1680m560s1680m560s108080" - "m8960s2240m560s108080", irsend.outputStr()); -} - -// Test sending typical data with extra repeats. -TEST(TestSendSherwood, SendDataWithRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendSherwood(0xC1A28877, 32, 2); - EXPECT_EQ("m8960s4480m560s1680m560s1680m560s560m560s560m560s560m560s560" - "m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560" - "m560s560m560s1680m560s560m560s1680m560s560m560s560m560s560" - "m560s1680m560s560m560s560m560s560m560s560m560s1680m560s1680" - "m560s1680m560s560m560s1680m560s1680m560s1680m560s108080" - "m8960s2240m560s108080" - "m8960s2240m560s108080", irsend.outputStr()); -} - -// Test sending typical data with explicit no repeats. -TEST(TestSendSherwood, SendDataWithZeroRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendSherwood(0xC1A28877, 32, 0); - // Should have a single NEC repeat, as we always send one. - EXPECT_EQ("m8960s4480m560s1680m560s1680m560s560m560s560m560s560m560s560" - "m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560" - "m560s560m560s1680m560s560m560s1680m560s560m560s560m560s560" - "m560s1680m560s560m560s560m560s560m560s560m560s1680m560s1680" - "m560s1680m560s560m560s1680m560s1680m560s1680m560s108080" - "m8960s2240m560s108080", irsend.outputStr()); -} - -// Test that a typical Sherwood send decodes as the appropriate NEC value. -TEST(TestSendSherwood, DecodesAsNEC) { - IRsendTest irsend(4); - IRrecv irrecv(0); - irsend.begin(); - - irsend.reset(); - irsend.sendSherwood(0xC1A28877); - irsend.makeDecodeResult(); - - EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); - EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); - EXPECT_EQ(0xC1A28877, irsend.capture.value); - EXPECT_EQ(0x4583, irsend.capture.address); - EXPECT_EQ(0x11, irsend.capture.command); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Sony_test.cpp b/lib/IRremoteESP8266-2.2.1.02/test/ir_Sony_test.cpp deleted file mode 100644 index 76d351441..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Sony_test.cpp +++ /dev/null @@ -1,323 +0,0 @@ -// Copyright 2017 David Conran - -#include "IRsend.h" -#include "IRsend_test.h" -#include "gtest/gtest.h" - -// Tests for sendSony(). - -// Test sending typical data only. -TEST(TestSendSony, SendDataOnly) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendSony(0); - // We expect three 20-bit commands to be sent. - EXPECT_EQ("m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m600s600m600s600m600s600m600s45600" - "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m600s600m600s600m600s600m600s45600" - "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m600s600m600s600m600s600m600s45600", irsend.outputStr()); - - irsend.reset(); - irsend.sendSony(0x240C, SONY_20_BITS); - // We expect three 20-bit commands to be sent. - EXPECT_EQ("m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m1200s600m1200s600m600s600m600s45600" - "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m1200s600m1200s600m600s600m600s45600" - "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m1200s600m1200s600m600s600m600s45600", irsend.outputStr()); - - irsend.reset(); - irsend.sendSony(0x240C, SONY_15_BITS); - // We expect three 15-bit commands to be sent. - EXPECT_EQ("m2400s600m600s600m1200s600m600s600m600s600m1200s600m600s600" - "m600s600m600s600m600s600m600s600m600s600m1200s600m1200s600m600s600" - "m600s45600" - "m2400s600m600s600m1200s600m600s600m600s600m1200s600m600s600" - "m600s600m600s600m600s600m600s600m600s600m1200s600m1200s600m600s600" - "m600s45600" - "m2400s600m600s600m1200s600m600s600m600s600m1200s600m600s600" - "m600s600m600s600m600s600m600s600m600s600m1200s600m1200s600m600s600" - "m600s45600", irsend.outputStr()); - - irsend.reset(); - irsend.sendSony(0xA90, SONY_12_BITS); - // We expect three 15-bit commands to be sent. - EXPECT_EQ("m2400s600m1200s600m600s600m1200s600m600s600m1200s600m600s600" - "m600s600m1200s600m600s600m600s600m600s600m600s45600" - "m2400s600m1200s600m600s600m1200s600m600s600m1200s600m600s600" - "m600s600m1200s600m600s600m600s600m600s600m600s45600" - "m2400s600m1200s600m600s600m1200s600m600s600m1200s600m600s600" - "m600s600m1200s600m600s600m600s600m600s600m600s45600", - irsend.outputStr()); -} - -// Test sending with different repeats. -TEST(TestSendSony, SendWithDiffRepeats) { - IRsendTest irsend(4); - irsend.begin(); - - irsend.reset(); - irsend.sendSony(0x240C, SONY_20_BITS, 0); // Send a command with 0 repeats. - EXPECT_EQ("m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m1200s600m1200s600m600s600m600s45600", irsend.outputStr()); - irsend.sendSony(0x240C, SONY_20_BITS, 1); // Send a command with 1 repeat. - EXPECT_EQ("m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m1200s600m1200s600m600s600m600s45600" - "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m1200s600m1200s600m600s600m600s45600", irsend.outputStr()); - irsend.sendSony(0x240C, SONY_20_BITS, 3); // Send a command with 3 repeats. - EXPECT_EQ("m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m1200s600m1200s600m600s600m600s45600" - "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m1200s600m1200s600m600s600m600s45600" - "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m1200s600m1200s600m600s600m600s45600" - "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" - "m600s600m1200s600m1200s600m600s600m600s45600", irsend.outputStr()); -} - -// Tests for encodeSony(). - -TEST(TestEncodeSony, NormalSonyEncoding) { - IRsendTest irsend(4); - EXPECT_EQ(0x0, irsend.encodeSony(SONY_12_BITS, 0, 0)); - EXPECT_EQ(0xA90, irsend.encodeSony(SONY_12_BITS, 21, 1)); - EXPECT_EQ(0xFFF, irsend.encodeSony(SONY_12_BITS, 0x7F, 0x1F)); - - EXPECT_EQ(0x0, irsend.encodeSony(SONY_15_BITS, 0, 0)); - EXPECT_EQ(0x5480, irsend.encodeSony(SONY_15_BITS, 21, 1)); - EXPECT_EQ(0x5455, irsend.encodeSony(SONY_15_BITS, 21, 0xAA)); - EXPECT_EQ(0x7FFF, irsend.encodeSony(SONY_15_BITS, 0x7F, 0xFF)); - - EXPECT_EQ(0x0, irsend.encodeSony(SONY_20_BITS, 0, 0, 0)); - EXPECT_EQ(0x81080, irsend.encodeSony(SONY_20_BITS, 1, 1, 1)); - EXPECT_EQ(0xFFFFF, irsend.encodeSony(SONY_20_BITS, 0x7F, 0x1F, 0xFF)); -} - -TEST(TestEncodeSony, SonyEncodingWithOversizedValues) { - IRsendTest irsend(4); - EXPECT_EQ(0xFFF, irsend.encodeSony(SONY_12_BITS, 0xFFFF, 0xFFFF)); - - EXPECT_EQ(0x7FFF, irsend.encodeSony(SONY_15_BITS, 0xFFFF, 0xFFFF)); - - EXPECT_EQ(0xFFFFF, irsend.encodeSony(SONY_20_BITS, 0xFFFF, 0xFFFF, 0xFFFF)); -} - -// Tests for decodeSony(). - -// Decode normal Sony messages. -TEST(TestDecodeSony, NormalSonyDecodeWithStrict) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - // Synthesised Normal Sony 20-bit message. - irsend.reset(); - irsend.sendSony(irsend.encodeSony(SONY_20_BITS, 0x1, 0x1, 0x1)); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, SONY_20_BITS, true)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_20_BITS, irsend.capture.bits); - EXPECT_EQ(0x81080, irsend.capture.value); - EXPECT_EQ(0x1, irsend.capture.address); - EXPECT_EQ(0x81, irsend.capture.command); - - // Synthesised Normal Sony 15-bit message. - irsend.reset(); - irsend.sendSony(irsend.encodeSony(SONY_15_BITS, 21, 1), SONY_15_BITS); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, SONY_15_BITS, true)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_15_BITS, irsend.capture.bits); - EXPECT_EQ(0x5480, irsend.capture.value); - EXPECT_EQ(1, irsend.capture.address); - EXPECT_EQ(21, irsend.capture.command); - - // Synthesised Normal Sony 12-bit message. - irsend.reset(); - irsend.sendSony(irsend.encodeSony(SONY_12_BITS, 21, 1), SONY_12_BITS); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, SONY_12_BITS, true)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_12_BITS, irsend.capture.bits); - EXPECT_EQ(0xA90, irsend.capture.value); - EXPECT_EQ(1, irsend.capture.address); - EXPECT_EQ(21, irsend.capture.command); -} - -// Decode unexpected Sony messages. i.e longer than minimum etc. -TEST(TestDecodeSony, SonyDecodeWithUnexpectedLegalSize) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - // Synthesised Normal Sony 20-bit message decoded when looking for 12-bits - irsend.reset(); - irsend.sendSony(irsend.encodeSony(SONY_20_BITS, 0x1, 0x1, 0x1)); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, SONY_MIN_BITS)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_20_BITS, irsend.capture.bits); - EXPECT_EQ(0x81080, irsend.capture.value); - EXPECT_EQ(0x1, irsend.capture.address); - EXPECT_EQ(0x81, irsend.capture.command); - - // Synthesised Normal Sony 12-bit message when expecting 20-bits. - irsend.reset(); - irsend.sendSony(irsend.encodeSony(SONY_12_BITS, 21, 1), SONY_12_BITS); - irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, SONY_20_BITS)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_12_BITS, irsend.capture.bits); - EXPECT_EQ(0xA90, irsend.capture.value); - EXPECT_EQ(1, irsend.capture.address); - EXPECT_EQ(21, irsend.capture.command); - - // 12-bit message should be regected when using strict and a different size. - irsend.reset(); - irsend.sendSony(irsend.encodeSony(SONY_12_BITS, 21, 1), SONY_12_BITS); - irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_20_BITS, true)); - ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_15_BITS, true)); - - // 15-bit message should be regected when using strict and a different size. - irsend.reset(); - irsend.sendSony(irsend.encodeSony(SONY_15_BITS, 21, 1), SONY_15_BITS); - irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_12_BITS, true)); - ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_20_BITS, true)); - - // 20-bit message should be regected when using strict and a different size. - irsend.reset(); - irsend.sendSony(irsend.encodeSony(SONY_20_BITS, 1, 1, 1), SONY_20_BITS); - irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_12_BITS, true)); - ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_15_BITS, true)); -} - -// Decode unsupported Sony messages. i.e non-standard sizes. -TEST(TestDecodeSony, SonyDecodeWithIllegalSize) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - irsend.sendSony(0xFF, 8); // Illegal 8-bit Sony-like message. - irsend.makeDecodeResult(); - // Should fail with strict on. - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_MIN_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_12_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_15_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_20_BITS, true)); - // Should work with a 'normal' match (not strict) - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(8, irsend.capture.bits); - EXPECT_EQ(0xFF, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - - irsend.reset(); - irsend.sendSony(0x1FFF, 13); // Illegal 13-bit Sony-like message. - irsend.makeDecodeResult(); - // Should fail with strict on. - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_MIN_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_12_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_15_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_20_BITS, true)); - // Should work with a 'normal' match (not strict) - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(13, irsend.capture.bits); - EXPECT_EQ(0x1FFF, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - - irsend.reset(); - irsend.sendSony(0x1FFFF, 17); // Illegal 17-bit Sony-like message. - irsend.makeDecodeResult(); - // Should fail with strict on. - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_MIN_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_12_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_15_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_20_BITS, true)); - // Should work with a 'normal' match (not strict) - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(17, irsend.capture.bits); - EXPECT_EQ(0x1FFFF, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - - irsend.reset(); - irsend.sendSony(0x1FFFFF, 21); // Illegal 21-bit Sony-like message. - irsend.makeDecodeResult(); - // Should fail with strict on. - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_MIN_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_12_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_15_BITS, true)); - EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, SONY_20_BITS, true)); - // Should work with a 'normal' match (not strict) - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(21, irsend.capture.bits); - EXPECT_EQ(0x1FFFFF, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - - irsend.reset(); - // Illegal 64-bit (max) Sony-like message. - irsend.sendSony(0xFFFFFFFFFFFFFFFF, 64, 0); - irsend.makeDecodeResult(); - // Should work with a 'normal' match (not strict) - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(64, irsend.capture.bits); - EXPECT_EQ(0xFFFFFFFFFFFFFFFF, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); -} - - -// Decode unsupported Sony messages. i.e non-standard sizes. -TEST(TestDecodeSony, DecodeGlobalCacheExample) { - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - - irsend.reset(); - // Sony "Power On" from Global Cache. - uint16_t gc_test[29] = {40000, 1, 1, 96, 24, 24, 24, 48, 24, 48, 24, 48, 24, - 24, 24, 48, 24, 24, 24, 48, 24, 24, 24, 24, 24, 24, - 24, 24, 1013}; - irsend.sendGC(gc_test, 29); - irsend.makeDecodeResult(); - - // Without strict. - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(12, irsend.capture.bits); - EXPECT_EQ(0x750, irsend.capture.value); - EXPECT_EQ(0x1, irsend.capture.address); - EXPECT_EQ(0x2E, irsend.capture.command); - // With strict and correct size. - ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, SONY_12_BITS, true)); -} diff --git a/lib/IRremoteESP8266-2.2.1.02/tools/gc_decode.cpp b/lib/IRremoteESP8266-2.2.1.02/tools/gc_decode.cpp deleted file mode 100644 index 9c3d316ca..000000000 --- a/lib/IRremoteESP8266-2.2.1.02/tools/gc_decode.cpp +++ /dev/null @@ -1,106 +0,0 @@ -// Quick and dirty tool to decode GlobalCache (GC) codes -// Copyright 2017 Jorge Cisneros - -#include -#include -#include -#include -#include "IRsend.h" -#include "IRsend_test.h" - -#define MAX_GC_CODE_LENGHT 512 - -void str_to_uint16(char *str, uint16_t *res) { - char *end; - errno = 0; - intmax_t val = strtoimax(str, &end, 10); - if (errno == ERANGE || val < 0 || val > UINT16_MAX || - end == str || *end != '\0') - return; - *res = (uint16_t) val; -} - -std::string encoding(decode_results *results) { - switch (results->decode_type) { - default: - case UNKNOWN: return "UNKNOWN"; break; - case NEC: return "NEC"; break; - case NEC_LIKE: return "NEC (non-strict)"; break; - case SONY: return "SONY"; break; - case RC5: return "RC5"; break; - case RC5X: return "RC5X"; break; - case RC6: return "RC6"; break; - case RCMM: return "RCMM"; break; - case DISH: return "DISH"; break; - case SHARP: return "SHARP"; break; - case JVC: return "JVC"; break; - case SANYO: return "SANYO"; break; - case SANYO_LC7461: return "SANYO_LC7461"; break; - case MITSUBISHI: return "MITSUBISHI"; break; - case SAMSUNG: return "SAMSUNG"; break; - case LG: return "LG"; break; - case WHYNTER: return "WHYNTER"; break; - case AIWA_RC_T501: return "AIWA_RC_T501"; break; - case PANASONIC: return "PANASONIC"; break; - case DENON: return "DENON"; break; - case COOLIX: return "COOLIX"; break; - case NIKAI: return "NIKAI"; break; - } -} - -void usage_error(char * name) { - std::cerr << "Usage: " << name << " [-raw] " << std::endl; -} - -int main(int argc, char * argv[]) { - int argv_offset = 1; - bool dumpraw = false; - - // Check the invocation/calling usage. - if (argc < 2 || argc > 3) { - usage_error(argv[0]); - return 1; - } - if (strncmp("-raw", argv[argv_offset], 4) == 0) { - dumpraw = true; - argv_offset++; - } - if (argc - argv_offset != 1) { - usage_error(argv[0]); - return 1; - } - - uint16_t gc_test[MAX_GC_CODE_LENGHT]; - int index = 0; - char *pch; - char *saveptr1; - - pch = strtok_r(argv[argv_offset], ",", &saveptr1); - while (pch != NULL && index < MAX_GC_CODE_LENGHT) { - str_to_uint16(pch, &gc_test[index]); - pch = strtok_r(NULL, ",", &saveptr1); - index++; - } - - IRsendTest irsend(4); - IRrecv irrecv(4); - irsend.begin(); - irsend.reset(); - - irsend.sendGC(gc_test, index); - irsend.makeDecodeResult(); - irrecv.decode(&irsend.capture); - - std::cout << "Code GC length " << index << std::endl - << "Code type " << irsend.capture.decode_type - << " (" << encoding(&irsend.capture) << ")" << std::endl - << "Code bits " << irsend.capture.bits << std::endl - << "Code value 0x" << std::hex << irsend.capture.value << std::endl - << "Code address 0x" << std::hex << irsend.capture.address << std::endl - << "Code command 0x" << std::hex << irsend.capture.command << std::endl; - - if (dumpraw || irsend.capture.decode_type == UNKNOWN) - irsend.dumpRawResult(); - - return 0; -} diff --git a/lib/IRremoteESP8266-2.2.1.02/.github/CONTRIBUTING.md b/lib/IRremoteESP8266-2.5.2.03/.github/CONTRIBUTING.md similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/.github/CONTRIBUTING.md rename to lib/IRremoteESP8266-2.5.2.03/.github/CONTRIBUTING.md diff --git a/lib/IRremoteESP8266-2.2.1.02/.github/Contributors.md b/lib/IRremoteESP8266-2.5.2.03/.github/Contributors.md similarity index 91% rename from lib/IRremoteESP8266-2.2.1.02/.github/Contributors.md rename to lib/IRremoteESP8266-2.5.2.03/.github/Contributors.md index 151a0c03d..5f75ea3b4 100644 --- a/lib/IRremoteESP8266-2.2.1.02/.github/Contributors.md +++ b/lib/IRremoteESP8266-2.5.2.03/.github/Contributors.md @@ -10,6 +10,8 @@ - [Jonny Graham](https://github.com/jonnygraham/) - [Stu Fisher](https://github.com/stufisher/) - [Jorge Cisneros](https://github.com/jorgecis/) +- [Denes Varga](https://github.com/denxhun/) +- [Brett T. Warden](https://github.com/bwarden/) All contributors can be found on the [contributors site](https://github.com/markszabo/IRremoteESP8266/graphs/contributors). diff --git a/lib/IRremoteESP8266-2.2.1.02/.github/issue_template.md b/lib/IRremoteESP8266-2.5.2.03/.github/issue_template.md similarity index 84% rename from lib/IRremoteESP8266-2.2.1.02/.github/issue_template.md rename to lib/IRremoteESP8266-2.5.2.03/.github/issue_template.md index 664b99570..024a0398c 100644 --- a/lib/IRremoteESP8266-2.2.1.02/.github/issue_template.md +++ b/lib/IRremoteESP8266-2.5.2.03/.github/issue_template.md @@ -1,7 +1,7 @@ _(Please use this template for reporting issues. You can delete what ever is not relevant. Giving us this information will help us help you faster. Please also read the [FAQ](https://github.com/markszabo/IRremoteESP8266/wiki/Frequently-Asked-Questions) & [Troubleshooting Guide](https://github.com/markszabo/IRremoteESP8266/wiki/Troubleshooting-Guide). Your problem may already have an answer there.)_ ### Version/revison of the library used -_Typically located in the `library.json` file in the root directory of the library. +_Typically located in the `library.json` & `src/IRremoteESP8266.h` files in the root directory of the library. e.g. v2.0.0, or 'master' as at 1st of June, 2017. etc._ ### Expected behavior @@ -30,10 +30,13 @@ _What can we do to (pref. reliably) repeat what is happening?_ _Include all relevant code snippets or links to the actual code files. Tip: [How to quote your code so it is still readable](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet#code)._ #### Circuit diagram and hardware used (if applicable) -_Link to an image of the circuit diagram used._ +_Link to an image of the circuit diagram used. Part number of the IR receiver module etc._ ### I have followed the steps in the [Troubleshooting Guide](https://github.com/markszabo/IRremoteESP8266/wiki/Troubleshooting-Guide) & read the [FAQ](https://github.com/markszabo/IRremoteESP8266/wiki/Frequently-Asked-Questions) _Yes/No._ +### Has this library/code previously worked as expected for you? +_Yes/No. If "Yes", which version last worked for you?_ + ### Other useful information _More information is always welcome. Be verbose._ diff --git a/lib/IRremoteESP8266-2.2.1.02/.gitignore b/lib/IRremoteESP8266-2.5.2.03/.gitignore similarity index 88% rename from lib/IRremoteESP8266-2.2.1.02/.gitignore rename to lib/IRremoteESP8266-2.5.2.03/.gitignore index 6d57ebaab..23e21ca3e 100644 --- a/lib/IRremoteESP8266-2.2.1.02/.gitignore +++ b/lib/IRremoteESP8266-2.5.2.03/.gitignore @@ -23,6 +23,9 @@ lib/googletest/**/* # GCC pre-compiled headers. **/*.gch +# Python compiled files +**/*.pyc + # Unit Test builds test/*.o test/*.a @@ -32,8 +35,12 @@ test/*_test tools/*.o tools/*.a tools/gc_decode +tools/mode2_decode .pioenvs .piolibdeps .clang_complete .gcc-flags.json + +#Cygwin builds +*.exe diff --git a/lib/IRremoteESP8266-2.2.1.02/.gitmodules b/lib/IRremoteESP8266-2.5.2.03/.gitmodules similarity index 85% rename from lib/IRremoteESP8266-2.2.1.02/.gitmodules rename to lib/IRremoteESP8266-2.5.2.03/.gitmodules index 80925b865..c28fe0509 100644 --- a/lib/IRremoteESP8266-2.2.1.02/.gitmodules +++ b/lib/IRremoteESP8266-2.5.2.03/.gitmodules @@ -1,3 +1,4 @@ [submodule "lib/googletest"] path = lib/googletest url = https://github.com/google/googletest.git + branch = v1.8.x diff --git a/lib/IRremoteESP8266-2.5.2.03/.style.yapf b/lib/IRremoteESP8266-2.5.2.03/.style.yapf new file mode 100644 index 000000000..65fa0ee33 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/.style.yapf @@ -0,0 +1,3 @@ +[style] +based_on_style: google +indent_width: 2 diff --git a/lib/IRremoteESP8266-2.2.1.02/.travis.yml b/lib/IRremoteESP8266-2.5.2.03/.travis.yml similarity index 94% rename from lib/IRremoteESP8266-2.2.1.02/.travis.yml rename to lib/IRremoteESP8266-2.5.2.03/.travis.yml index 33d91ba47..4331425e9 100644 --- a/lib/IRremoteESP8266-2.2.1.02/.travis.yml +++ b/lib/IRremoteESP8266-2.5.2.03/.travis.yml @@ -20,6 +20,7 @@ install: - arduino --board $BD --save-prefs - arduino --pref "compiler.warning_level=all" --save-prefs - sudo apt-get install jq + - sudo pip install pylint script: # Check that everything compiles. - arduino --verify --board $BD $PWD/examples/IRrecvDemo/IRrecvDemo.ino @@ -38,14 +39,17 @@ script: - arduino --verify --board $BD $PWD/examples/LGACSend/LGACSend.ino - arduino --verify --board $BD $PWD/examples/TurnOnArgoAC/TurnOnArgoAC.ino - arduino --verify --board $BD $PWD/examples/IRMQTTServer/IRMQTTServer.ino + - arduino --verify --board $BD $PWD/examples/TurnOnToshibaAC/TurnOnToshibaAC.ino # Also check the tools programs compile. - (cd tools; make all) # Check for lint issues. - shopt -s nullglob - python cpplint.py --extensions=c,cc,cpp,ino --headers=h,hpp {src,test,tools}/*.{h,c,cc,cpp,hpp,ino} examples/*/*.{h,c,cc,cpp,hpp,ino} + - pylint {src,test,tools}/*.py - shopt -u nullglob # Build and run the unit tests. - (cd test; make run) + - (cd tools; make run_tests) # Check the version numbers match. - LIB_VERSION=$(egrep "^#define\s+_IRREMOTEESP8266_VERSION_\s+" src/IRremoteESP8266.h | cut -d\" -f2) - test ${LIB_VERSION} == "$(jq -r .version library.json)" diff --git a/lib/IRremoteESP8266-2.2.1.02/CPPLINT.cfg b/lib/IRremoteESP8266-2.5.2.03/CPPLINT.cfg similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/CPPLINT.cfg rename to lib/IRremoteESP8266-2.5.2.03/CPPLINT.cfg diff --git a/lib/IRremoteESP8266-2.2.1.02/LICENSE.txt b/lib/IRremoteESP8266-2.5.2.03/LICENSE.txt similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/LICENSE.txt rename to lib/IRremoteESP8266-2.5.2.03/LICENSE.txt diff --git a/lib/IRremoteESP8266-2.5.2.03/README.md b/lib/IRremoteESP8266-2.5.2.03/README.md new file mode 100644 index 000000000..bb9d5a9d8 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/README.md @@ -0,0 +1,78 @@ +# IRremote ESP8266 Library + +[![Build Status](https://travis-ci.org/markszabo/IRremoteESP8266.svg?branch=master)](https://travis-ci.org/markszabo/IRremoteESP8266) +[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/markszabo/IRremoteESP8266.svg)](http://isitmaintained.com/project/markszabo/IRremoteESP8266 "Average time to resolve an issue") +[![Percentage of issues still open](http://isitmaintained.com/badge/open/markszabo/IRremoteESP8266.svg)](http://isitmaintained.com/project/markszabo/IRremoteESP8266 "Percentage of issues still open") +[![GitLicense](https://gitlicense.com/badge/markszabo/IRremoteESP8266)](https://gitlicense.com/license/markszabo/IRremoteESP8266) + +This library enables you to **send _and_ receive** infra-red signals on an [ESP8266 using the Arduino framework](https://github.com/esp8266/Arduino) using common 940nm IR LEDs and common IR receiver modules. e.g. TSOP{17,22,24,36,38,44,48}* etc. + +## v2.5.2 Now Available +Version 2.5.2 of the library is now [available](https://github.com/markszabo/IRremoteESP8266/releases/latest). You can view the [Release Notes](ReleaseNotes.md) for all the significant changes. + +#### Upgrading from pre-v2.0 +Usage of the library has been slightly changed in v2.0. You will need to change your usage to work with v2.0 and beyond. You can read more about the changes required on our [Upgrade to v2.0](https://github.com/markszabo/IRremoteESP8266/wiki/Upgrading-to-v2.0) page. + +#### Upgrading from pre-v2.5 +The library has changed from using constants declared as `#define` to +[const](https://google.github.io/styleguide/cppguide.html#Constant_Names) with +the appropriate naming per the +[C++ style guide](https://google.github.io/styleguide/cppguide.html). +This may potentially cause old programs to not compile. +The most likely externally used `#define`s have been _aliased_ for limited +backward compatibility for projects using the old style. Going forward, only the +new `kConstantName` style will be supported for new protocol additions. + +In the unlikely case it does break your code, then you may have been referencing +something you likely should not have. You should be able to quickly determine +the new name from the old. e.g. `CONSTANT_NAME` to `kConstantName`. +Use common sense or examining the library's code if this does affect code. + +## Troubleshooting +Before reporting an issue or asking for help, please try to follow our [Troubleshooting Guide](https://github.com/markszabo/IRremoteESP8266/wiki/Troubleshooting-Guide) first. + +## Frequently Asked Questions +Some common answers to common questions and problems are on our [F.A.Q. wiki page](https://github.com/markszabo/IRremoteESP8266/wiki/Frequently-Asked-Questions). + +## Installation +##### Official releases via the Arduino IDE v1.8+ (Windows & Linux) +1. Click the _"Sketch"_ -> _"Include Library"_ -> _"Manage Libraries..."_ Menu items. +1. Enter `IRremoteESP8266` into the _"Filter your search..."_ top right search box. +1. Click on the IRremoteESP8266 result of the search. +1. Select the version you wish to install and click _"Install"_. + +##### Manual Installation for Windows +1. Click on _"Clone or Download"_ button, then _"[Download ZIP](https://github.com/markszabo/IRremoteESP8266/archive->master.zip)"_ on the page. +1. Extract the contents of the downloaded zip file. +1. Rename the extracted folder to _"IRremoteESP8266"_. +1. Move this folder to your libraries directory. (under windows: `C:\Users\YOURNAME\Documents\Arduino\libraries\`) +1. Restart your Arduino IDE. +1. Check out the examples. + +##### Using Git to install library ( Linux ) +``` +cd ~/Arduino/libraries +git clone https://github.com/markszabo/IRremoteESP8266.git +``` +###### To Update to the latest version of the library +``` +cd ~/Arduino/libraries/IRremoteESP8266 && git pull +``` + +## Contributing +If you want to [contribute](.github/CONTRIBUTING.md#how-can-i-contribute) to this project, consider: +- [Report](.github/CONTRIBUTING.md#reporting-bugs) bugs and errors +- Ask for enhancements +- Improve our documentation +- [Create issues](.github/CONTRIBUTING.md#reporting-bugs) and [pull requests](.github/CONTRIBUTING.md#pull-requests) +- Tell other people about this library + +## Contributors +Available [here](.github/Contributors.md) + +## Library History +This library was originally based on Ken Shirriff's work (https://github.com/shirriff/Arduino-IRremote/) + +[Mark Szabo](https://github.com/markszabo/IRremoteESP8266) has updated the IRsend class to work on ESP8266 and [Sebastien Warin](https://github.com/sebastienwarin/IRremoteESP8266) the receiving & decoding part (IRrecv class). + +As of v2.0, the library was almost entirely re-written with the ESP8266's resources in mind. diff --git a/lib/IRremoteESP8266-2.5.2.03/ReleaseNotes.md b/lib/IRremoteESP8266-2.5.2.03/ReleaseNotes.md new file mode 100644 index 000000000..56e84dd89 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/ReleaseNotes.md @@ -0,0 +1,308 @@ +# Release Notes + +## _v2.5.2 (20181021)_ + +**[Bug Fixes]** +- Add missing send() method to IRPanasonicAC class. (#545) +- Add missing sendWhirlpoolAC() to IRMQTTServer.ino (#558) + +**[Features]** +- Add IR receiving support to IRMQTTServer. (#543) +- Pioneer support (#547) +- Add support for a second LG protocol variant. (#552) +- Support for short Panasonic A/C messages. (#553) +- Add support for Panasonic CKP series A/Cs. (#554) +- Experimental timer/clock support for Panasonic A/Cs. (#546) +- Add Made With Magic (MWM) support (#557) + +**[Misc]** +- Grammar and typo fixes (#541, #549) +- Increase Panasonic A/C message tolerances. (#542) +- Added command mode2_decode in tools/ (#557) +- General code style cleanup (#560) + + +## _v2.5.1 (20181002)_ + +**[Bug Fixes]** +- Correct the byte used for Samsung AC Swing. (#529) +- Fix not sending Samsung A/C messages in IRMQTTServer. (#529) + +**[Features]** +- Experimental support for Electra A/C messages. (#528) +- Experimental support for Panasonic A/C messages. (#535) +- Samsung A/C fixes & improvements (#529) +- IRMQTTServer v0.6.0 (#530) + +**[Misc]** +- Change required WifiManager lib version to v0.14 +- Add alias for RAWTICK to kRawTick. (#535) +- Update sendLutron() status. (#515) +- Remove leftover debug message in IRrecvDumpV2 (#526) + + +## _v2.5.0 (20180919)_ + +**[Bug Fixes]** +- Fix HTML menu error for GICABLE in IRMQTTServer. (#516) +- Fix Mitsubishi A/C mode setting. (#514) +- Add missing ',' in auto analyse tool generated code. (#513) +- Fix Fujitsu checksum validation. (#501) +- Remove errant Repeat debug statement in IRMQTTServer. (#507) + +**[Features]** +- Mitsubishi A/C decode improvements. (#514) +- Basic support for Whirlpool A/C messages. (#511) +- Basic support for Samsung A/C messages. (#512) +- Experimental support for detailed Samsung A/C messages. (#521) +- Experimental support for detailed Coolix A/C messages. (#518) +- Experimental support for Lutron protocol. (#516) +- Calculate and use average values for timings in analysing tool. (#513) + +**[Misc]** +- Style change from using #define's for constants to `const kConstantName`. +- Improve the JVC example code. + + +## _v2.4.3 (20180727)_ + +**[Bug Fixes]** +- Handle Space Gaps better in auto analyse tool. (#482) +- Correct min repeat for GICABLE in IRMQTTServer. (#494) + +**[Features]** +- Add static IP config option to IRMQTTServer (#480) +- Full decoding/encoding support for the Haier YRW02 A/C. (#485 #486 #487) + +**[Misc]** +- Update LG (28-bit) HDR mark and space timings. (#492) +- Spelling and grammar fixes (#491) + + +## _v2.4.2 (20180601)_ + +**[Bug Fixes]** +- Timing Fix: Update the period offset compensation. + +**[Features]** +- Improvements for IRMQTTServer example (#466) + + +## _v2.4.1 (20180520)_ + +**[Bug Fixes]** +- Fix crash in IRMQTTServer when compiled under Arduino IDE. (#455) +- Default bit length not set for RCMM in IRMQTTServer example. (#456) +- Bad acknowledgements for some A/C protocols in IRMQTTServer example. (#460) + +**[Features]** +- Allow disabling the use of delay() calls. (#450) +- Initial support for G.I. Cable protocol. (#458) +- Support of Hitachi A/C 13 & 53 byte messages. (#461) + +**[Misc]** +- Auto Analyse Raw Data script converted to Python. (#454) + +## _v2.4.0 (20180407)_ + +**[Bug Fixes]** +- Add missing WiFi.begin() call to IRGCTCPServer example. (#433) +- Add missing sendHaierAC() to IRMQTTServer example. (#434 & #444) +- Make mqtt clientid unique in IRMQTTServer example. (#444) + +**[Features]** + +- Initial Mitsubishi projector protocol support. (#442) +- Experimental support of Hitachi A/C messages. (#445) +- Improve transmission pulse modulation support. + Allow disabling of transmission frequency modulation.(#439) + +**[Misc]** +- IRMQTTServer example improvements. (#444) + + +## _v2.3.3 (20180302)_ + +**[Bug Fixes]** +- Ensure the IR LED is off before we start. (#405) + +**[Features]** +- Experimental decode support for Gree HVAC units (#397) +- Initial support for Haier A/Cs. (#409) +- Improve timing accuracy of unit tests. (#403) +- Rework matchData() to handle equal total data bit time protocols. (#408) + +**[Misc]** +- Add startup text to IRrecvDumpV2 and IRrecvDemo (#412) +- Tweak timings on Fujitsu A/C header (#418) +- AutoAnalyseRawData.sh: Add some support for handling larger than 64 bit codes. (#419) +- Use better comments for send GPIO in examples. (#425) + + +## _v2.3.2 (20180126)_ + +**[Bug Fixes]** +- Integer underflow caused device not to respond in `sendJVC()` (#401) + +**[Features]** +- Initial support for sending & receiving Carrier HVAC codes. (#387) +- Add Pronto HEX code support to _gc_decode_ tool. (#388) + +**[Misc]** +- Make mDNS independent of MQTT in IRMQTTServer example code. (#390 #391) + + +## _v2.3.1 (20171229)_ + +**[Bug Fixes]** +- Setting `#define SEND_FUJITSU_AC false` caused a compilation error (#375) +- Integer underflow caused huge `space()` in `sendGeneric()` (#381) + +**[Features]** +- Support sending & receiving Lasertag codes. (#374) +- Reduce the library footprint by using a new `sendGeneric()` routine. (#373) + +**[Misc]** +- Lots of grammar & typo fixes. (#378) +- Update keywords.txt for Arduino IDE users (#371) +- Update pins in examples so they are compatible with Adafruit boards. (#383) + + +## _v2.3.0 (20171208)_ + +**[Bug Fixes]** +- Panasonic-based protocols had incorrect message gap. (#358) +- Formatting error for large rawData values in example code. (#355) +- Off-by-one error in payload_copy malloc. (#337) +- Off-by-one error in unit test helper routines (#363) + +**[Features]** +- Support sending and receiving Midea A/C codes. +- Support for receiving Kelvinator A/C codes. (#332) +- Support more operation features for Daikin A/Cs. +- Support for decoding Daikin A/Cs. +- Support sending and receiving Toshiba A/Cs. (#333) +- Support sending and receiving AR-DB1 Fujitsu A/C codes. (#367) +- Add new AutoAnalyseRawData.sh & RawToGlobalCache.sh tools (#345) (#343) +- Support for MagiQuest wands. (#365) + +**[Misc]** +- Add checksum verification to Kelvinator A/C decodes. (#348) +- Changes to the threshold reporting of UNKNOWN messages (#347) +- Major re-work of Daikin A/C support. +- Sending for all A/Cs added to MQTT example code. +- MQTT example code improvements. (#334) +- IRrecvDumpV2 significant output improvements. (#363) +- Improved unit test coverage for the library. + + +## _v2.2.1 (20171025)_ + +**[Features]** +- Support for sending and decoding Nikai TV messages. (#311, #313) +- gc_decode: External utility to decode Global Cache codes. (#308, #312) +- IRMQTTServer: Example code to send IR messages via HTTP & MQTT. (#316, #323) +- Improve converting 64bit values to hexadecimal. (#318) + +**[Misc]** +- IRrecvDump.ino code is now deprecated. Use IRrecvDumpV2.ino instead. (#314) + + +## _v2.2.0 (20170922)_ + +**[Bug Fixes]** +- Add printing output of RC-MM and RC-5X protocols in example code. (#284) +- LG timing improvements based on observations (#291) + +**[Features]** +- Automatic capture timing calibration for some protocols. (#268) +- Support for creating & sending Trotec AC codes. (#279) +- Support for creating & sending Argo Ulisse 13 DCI codes. (#280 #300) +- Move to 2 microsecond timing resolution for capture of codes. (#287) +- Capture buffer changes: +- Size at runtime. (#276) +- Message timeout at runtime. (#294) +- Simplify creating & using a second buffer (#303) +- New example code: + - Trotec A/C (#279) + - LG A/C units (#289) + - Argo Ulisse 13 DCI codes. (#300) + + +## _v2.1.1 (20170711)_ + +**[Bug Fixes]** +- GlobalCache incorrectly using hardware offset for period calc. (#267) + +**[Features]** +- Support reporting of 'NEC'-like 32-bit protocols. e.g. Apple TV remote (#265) +- Add an example of sendRaw() to IRsendDemo.ino (#270) + + +## _v2.1.0 (20170704)_ + +**[Features]** +- Support for sending Pronto IR codes. (#248) +- Support for sending Fujitsu A/C codes. (#88) +- Minor improvements to examples. + + +## _v2.0.3 (20170618)_ + +**[Bug fixes]** +- Capture buffer could become corrupt after large message, breaking subsequent decodes. (#253) + + +## _v2.0.2 (20170615)_ + +**[Bug fixes]** +- Correct decode issue introduced in v2.0.1 affecting multiple protocol decoders (#243) +- Correct post-message gap for the Panasonic protocol(s) (#245) +- Incorrect display of the decoded uint64_t value in the example code. (#245) + + +## _v2.0.1 (20170614)_ + +**[Bug fixes]** +- Decoding protocols when it doesn't detect a post-command gap, and there is no more data. (#243) +- Incorrect minimum size calculation when there is no post-command gap. (#243) + + +## _v2.0.0 - 64 bit support and major improvements (20170612)_ + +**[Misc]** +- This is almost a complete re-write of the library. + +**[Features]** +- All suitable protocols now handle 64-bit data messages and are repeatable via an optional argument. +- Unit tests for all protocols. +- Far better and stricter decoding for most protocols. +- Address & command decoding for protocols where that information is available. +- Much more precise timing for generation of signals sent. +- Lower duty-cycles for some protocols. +- Several new protocols added, and some new sending and decoding routines for existing ones. +- Ability to optionally chose which protocols are included, enabling faster decoding and smaller code footprints if desired. +- Support for far larger capture buffers. (e.g. RAWLEN > 256) + +**[Bug fixes]** +- Numerous bug fixes. + + +## _v1.2.0 (20170429)_ + +**[Features]** +- Add ability to copy IR capture buffer, and continue capturing. Means faster and better IR command decoding. +- Reduce IRAM usage by 28 bytes. +- Improve capture of RC-MM & Panasonic protocols. +- Upgrade IRrecvDumpV2 to new IR capture buffer. Much fewer corrupted/truncated IR messages. + + +## _v1.1.1 (20170413)_ + +**[Bug fixes]** +- Fix a reported problem when sending the LG protocol. Preemptive fix for possible similar cases. +- Fix minor issues in examples. + +**[Features]** +- Add documentation to some examples to aid new people. +- Add ALPHA support for RC-MM protocol. (Known to be currently not 100% working.) diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRGCSendDemo/IRGCSendDemo.ino b/lib/IRremoteESP8266-2.5.2.03/examples/IRGCSendDemo/IRGCSendDemo.ino similarity index 66% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRGCSendDemo/IRGCSendDemo.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/IRGCSendDemo/IRGCSendDemo.ino index b36938e3d..03c80e18b 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/IRGCSendDemo/IRGCSendDemo.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/IRGCSendDemo/IRGCSendDemo.ino @@ -11,7 +11,8 @@ * Based on Ken Shirriff's IrsendDemo * Version 0.1 July, 2009 * - * An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2). + * An IR LED circuit *MUST* be connected to the ESP8266 on a pin + * as specified by IR_LED below. * * TL;DR: The IR LED needs to be driven by a transistor for a good result. * @@ -23,12 +24,13 @@ * have enough current to drive the IR LED effectively. * * Make sure you have the IR LED polarity correct. * See: https://learn.sparkfun.com/tutorials/polarity/diode-and-led-polarity - * * Typical digital camera/phones can be used to see if the IR LED is flashed. - * Replace the IR LED with a normal LED if you don't have a digital camera - * when debugging. + * * Typical digital camera/phones can be used to see if the IR LED is + * flashed. Replace the IR LED with a normal LED if you don't have a digital + * camera when debugging. * * Avoid using the following pins unless you really know what you are doing: * * Pin 0/D3: Can interfere with the boot/program mode & support circuits. - * * Pin 1/TX/TXD0: Any serial transmissions from the ESP8266 will interfere. + * * Pin 1/TX/TXD0: Any serial transmissions from the ESP8266 will + * interfere. * * Pin 3/RX/RXD0: Any serial transmissions to the ESP8266 will interfere. * * ESP-01 modules are tricky. We suggest you use a module with more GPIOs * for your first time. e.g. ESP-12 etc. @@ -44,12 +46,15 @@ // These codes can be found in GC's Control Tower database. uint16_t Samsung_power_toggle[71] = { - 38000, 1, 1, 170, 170, 20, 63, 20, 63, 20, 63, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 20, 63, 20, 63, 20, 63, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, - 20, 20, 20, 63, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 63, 20, - 20, 20, 63, 20, 63, 20, 63, 20, 63, 20, 63, 20, 63, 20, 1798}; + 38000, 1, 1, 170, 170, 20, 63, 20, 63, 20, 63, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 63, 20, 63, 20, 63, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 63, 20, 20, 20, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 20, 63, 20, 20, 20, 63, 20, + 63, 20, 63, 20, 63, 20, 63, 20, 63, 20, 1798}; -IRsend irsend(4); // An IR LED is controlled by GPIO pin 4 (D2) +#define IR_LED 4 // ESP8266 GPIO pin to use. Recommended: 4 (D2). + +IRsend irsend(IR_LED); // Set the GPIO to be used to sending the message. void setup() { irsend.begin(); @@ -58,6 +63,10 @@ void setup() { void loop() { Serial.println("Toggling power"); +#if SEND_GLOBALCACHE irsend.sendGC(Samsung_power_toggle, 71); +#else // SEND_GLOBALCACHE + Serial.println("Can't send because SEND_GLOBALCACHE has been disabled."); +#endif // SEND_GLOBALCACHE delay(10000); } diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRGCSendDemo/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/IRGCSendDemo/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRGCSendDemo/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/IRGCSendDemo/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRGCTCPServer/IRGCTCPServer.ino b/lib/IRremoteESP8266-2.5.2.03/examples/IRGCTCPServer/IRGCTCPServer.ino similarity index 89% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRGCTCPServer/IRGCTCPServer.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/IRGCTCPServer/IRGCTCPServer.ino index 2fd38be42..69f7299fb 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/IRGCTCPServer/IRGCTCPServer.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/IRGCTCPServer/IRGCTCPServer.ino @@ -9,7 +9,7 @@ * For more codes, visit: https://irdb.globalcache.com/ * * How to use this program: - * 1) Update "ssid" and "password" below for your WIFI network. + * 1) Update "kSsid" and "kPassword" below for your WIFI network. * 2) Compile and upload the sketch to your ESP8266 module. * 3) (Optional) Use the serial connection to confirm it started and get the * IP address. @@ -46,14 +46,16 @@ #include #include -const char* ssid = "..."; // Put your WIFI SSID here. -const char* password = "..."; // Put your WIFI password here. +const char* kSsid = "..."; // Put your WIFI SSID here. +const char* kPassword = "..."; // Put your WIFI Password here. WiFiServer server(4998); // Uses port 4998. WiFiClient client; uint16_t *code_array; -IRsend irsend(4); // An IR LED is controlled by GPIO pin 4 (D2) +#define IR_LED 4 // ESP8266 GPIO pin to use. Recommended: 4 (D2). + +IRsend irsend(IR_LED); // Set the GPIO to be used to sending the message. void sendGCString(String str) { int16_t index; @@ -89,7 +91,9 @@ void sendGCString(String str) { count++; } while (index != -1); +#if SEND_GLOBALCACHE irsend.sendGC(code_array, count); // All done. Send it. +#endif // SEND_GLOBALCACHE free(code_array); // Free up the memory allocated. } @@ -99,7 +103,7 @@ void setup() { delay(100); Serial.println(" "); Serial.println("IR TCP Server"); - + WiFi.begin(kSsid, kPassword); while (WiFi.status() != WL_CONNECTED) { delay(900); Serial.print("."); @@ -107,7 +111,7 @@ void setup() { server.begin(); IPAddress myAddress = WiFi.localIP(); - Serial.println(myAddress); + Serial.println(myAddress.toString()); irsend.begin(); } diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRGCTCPServer/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/IRGCTCPServer/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRGCTCPServer/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/IRGCTCPServer/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRMQTTServer/IRMQTTServer.ino b/lib/IRremoteESP8266-2.5.2.03/examples/IRMQTTServer/IRMQTTServer.ino similarity index 55% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRMQTTServer/IRMQTTServer.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/IRMQTTServer/IRMQTTServer.ino index e2c1f81d8..7851cf5dc 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/IRMQTTServer/IRMQTTServer.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/IRMQTTServer/IRMQTTServer.ino @@ -1,9 +1,11 @@ /* - * Send arbitary IR codes via a web server or MQTT. - * Copyright David Conran 2016 - * Version 0.3 Oct, 2017 + * Send & receive arbitrary IR codes via a web server or MQTT. + * Copyright David Conran 2016, 2017, 2018 * - * NOTE: An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2). See IR_LED + * NOTE: An IR LED circuit *MUST* be connected to ESP8266 GPIO4 (D2) if + * you want to send IR messages. See IR_LED below. + * A compatible IR RX modules *MUST* be connected to ESP8266 GPIO14 (D5) + * if you want to capture & decode IR nessages. See IR_RX below. * * WARN: This is very advanced & complicated example code. Not for beginners. * You are strongly suggested to try & look at other example code first. @@ -11,10 +13,14 @@ * # Instructions * * ## Before First Boot (i.e. Compile time) - * - Set the MQTT_SERVER define below to the address of your MQTT server. + * - Either: + * o Set the MQTT_SERVER define below to the address of your MQTT server. + * or + * o Disable MQTT by commenting out the line "#define MQTT_ENABLE" down below. + * * - Arduino IDE: * o Install the following libraries via Library Manager - * - WiFiManager (https://github.com/tzapu/WiFiManager) + * - WiFiManager (https://github.com/tzapu/WiFiManager) (Version >= 0.14) * - PubSubClient (https://pubsubclient.knolleary.net/) * o You MUST change to have the following (or larger) value: * #define MQTT_MAX_PACKET_SIZE 512 @@ -63,13 +69,17 @@ * GlobalCache (31) & "40000,1,1,96,..." (Sony Vol Up) * 25,Rrepeats,hex_code_string e.g. 25,R1,0000,006E,0022,0002,0155,00AA,0015,0040,0015,0040,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0040,0015,0040,0015,0015,0015,0040,0015,0015,0015,0015,0015,0015,0015,0040,0015,0015,0015,0015,0015,0040,0015,0040,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0015,0040,0015,0015,0015,0015,0015,0040,0015,0040,0015,0040,0015,0040,0015,0040,0015,0640,0155,0055,0015,0E40 * Pronto (25), 1 repeat, & "0000 006E 0022 0002 ..." (Sherwood Amp Tape Input) - * 18,really_long_hexcode e.g. 18,190B8050000000E0190B8070000010f0 + * ac_protocol_num,really_long_hexcode e.g. 18,190B8050000000E0190B8070000010F0 * Kelvinator (18) Air Con on, Low Fan, 25 deg etc. + * NOTE: Ensure you zero-pad to the correct number of + * digits for the bit/byte size you want to send + * as some A/C units have units have different + * sized messages. e.g. Fujitsu A/C units. * In short: * No spaces after/before commas. * Values are comma separated. * The first value is always in Decimal. - * For simple protocols, the next value (hexcode) is always hexidecimal. + * For simple protocols, the next value (hexcode) is always hexadecimal. * The optional bit size is in decimal. * * Unix command line usage example: @@ -87,6 +97,19 @@ * # Listen to MQTT acknowledgements. * $ mosquitto_sub -h 10.20.0.253 -t ir_server/sent * + * Incoming IR messages (from an IR remote control) will be transmitted to + * the MQTT topic 'ir_server/received'. The MQTT message will be formatted + * similar to what is required to for the 'sent' topic. + * e.g. "3,C1A2F00F,32" (Protocol,Value,Bits) for simple codes + * or "18,110B805000000060110B807000001070" (Protocol,Value) for complex codes + * Note: If the protocol is listed as -1, then that is an UNKNOWN IR protocol. + * You can't use that to recreate/resend an IR message. It's only for + * matching purposes and shouldn't be trusted. + * + * Unix command line usage example: + * # Listen via MQTT for IR messages captured by this server. + * $ mosquitto_sub -h 10.20.0.253 -t ir_server/received + * * If DEBUG is turned on, there is additional information printed on the Serial * Port. * @@ -111,6 +134,7 @@ #include #include #include +#include #include #include #ifdef MQTT_ENABLE @@ -124,22 +148,43 @@ #include #include -// Configuration paramters -#define IR_LED 4 // GPIO the IR LED is connected to/controlled by. GPIO 4 = D2. -#define HTTP_PORT 80 // The port the HTTP server is listening on. +// Configuration parameters +// GPIO the IR LED is connected to/controlled by. GPIO 4 = D2. +#define IR_LED 4 +// define IR_LED 3 // For an ESP-01 we suggest you use RX/GPIO3/Pin 7. +// +// GPIO the IR RX module is connected to/controlled by. GPIO 14 = D5. +// Comment this out to disable receiving/decoding IR messages entirely. +#define IR_RX 14 +const uint16_t kHttpPort = 80; // The TCP port the HTTP server is listening on. +// Name of the device you want in mDNS. +// NOTE: Changing this will change the MQTT path too unless you override it +// via MQTTprefix below. +#define HOSTNAME "ir_server" + +// We obtain our network config via DHCP by default but allow an easy way to +// use a static IP config. +#define USE_STATIC_IP false // Change to 'true' if you don't want to use DHCP. +#if USE_STATIC_IP +const IPAddress kIPAddress = IPAddress(10, 0, 1, 78); +const IPAddress kGateway = IPAddress(10, 0, 1, 1); +const IPAddress kSubnetMask = IPAddress(255, 255, 255, 0); +#endif // USE_STATIC_IP #ifdef MQTT_ENABLE // Address of your MQTT server. #define MQTT_SERVER "10.20.0.253" // <=- CHANGE ME -#define MQTT_PORT 1883 // Default port used by MQTT servers. +const uint16_t kMqttPort = 1883; // Default port used by MQTT servers. // Set if your MQTT server requires a Username & Password to connect. const char* mqtt_user = ""; const char* mqtt_password = ""; -#define MQTT_RECONNECT_TIME 5000 // Delay(ms) between reconnect tries. +const uint32_t kMqttReconnectTime = 5000; // Delay(ms) between reconnect tries. -#define MQTTprefix "ir_server" +#define MQTTprefix HOSTNAME // Change this if you want the MQTT topic to be + // independent of the hostname. #define MQTTack MQTTprefix "/sent" // Topic we send back acknowledgements on #define MQTTcommand MQTTprefix "/send" // Topic we get new commands from. +#define MQTTrecv MQTTprefix "/received" // Topic we send received IRs to. #endif // MQTT_ENABLE // HTML arguments we will parse for IR code information. @@ -147,27 +192,71 @@ const char* mqtt_password = ""; #define argData "code" #define argBits "bits" #define argRepeat "repeats" -#define DEBUG True +// Let's use a larger than normal buffer so we can handle AirCon remote codes. +const uint16_t kCaptureBufferSize = 1024; +#if DECODE_AC +// Some A/C units have gaps in their protocols of ~40ms. e.g. Kelvinator +// A value this large may swallow repeats of some protocols +const uint8_t kCaptureTimeout = 50; +#else // DECODE_AC +// Suits most messages, while not swallowing many repeats. +const uint8_t kCaptureTimeout = 15; +#endif // DECODE_AC +// Ignore unknown messages with <10 pulses +const uint16_t kMinUnknownSize = 20; + +#define _MY_VERSION_ "v0.7.0" + +// Disable debug output if any of the IR pins are on the TX (D1) pin. +#if (IR_LED != 1 && IR_RX != 1) +#undef DEBUG +#define DEBUG true // Change to 'false' to disable all serial output. +#else +#undef DEBUG +#define DEBUG false +#endif +// NOTE: Make sure you set your Serial Monitor to the same speed. +#define BAUD_RATE 115200 // Serial port Baud rate. // Globals -ESP8266WebServer server(HTTP_PORT); +ESP8266WebServer server(kHttpPort); IRsend irsend = IRsend(IR_LED); +#ifdef IR_RX +IRrecv irrecv(IR_RX, kCaptureBufferSize, kCaptureTimeout, true); +decode_results capture; // Somewhere to store inbound IR messages. +#endif // IR_RX MDNSResponder mdns; WiFiClient espClient; WiFiManager wifiManager; uint16_t *codeArray; -uint32_t lastReconnectAttempt = 0; // MQTT last attemps reconnection number +uint32_t lastReconnectAttempt = 0; // MQTT last attempt reconnection number bool boot = true; -bool ir_lock = false; // Primative locking for gating the IR LED. +bool ir_lock = false; // Primitive locking for gating the IR LED. +uint32_t sendReqCounter = 0; +bool lastSendSucceeded = false; // Store the success status of the last send. +uint32_t lastSendTime = 0; +int8_t offset; // The calculated period offset for this chip and library. #ifdef MQTT_ENABLE +String lastMqttCmd = "None"; +uint32_t lastMqttCmdTime = 0; +uint32_t lastConnectedTime = 0; +uint32_t lastDisconnectedTime = 0; +uint32_t mqttDisconnectCounter = 0; +bool wasConnected = true; +#ifdef IR_RX +String lastIrReceived = "None"; +uint32_t lastIrReceivedTime = 0; +uint32_t irRecvCounter = 0; +#endif // IR_RX + + // MQTT client parameters void callback(char* topic, byte* payload, unsigned int length); -PubSubClient mqtt_client(MQTT_SERVER, MQTT_PORT, callback, espClient); +PubSubClient mqtt_client(MQTT_SERVER, kMqttPort, callback, espClient); // Create a unique MQTT client id. -const char* mqtt_clientid = String(MQTTprefix + - String(ESP.getChipId(), HEX)).c_str(); +String mqtt_clientid = MQTTprefix + String(ESP.getChipId(), HEX); #endif // MQTT_ENABLE // Debug messages get sent to the serial port. @@ -178,6 +267,50 @@ void debug(String str) { #endif // DEBUG } +String timeSince(uint32_t const start) { + if (start == 0) + return "Never"; + uint32_t diff = 0; + uint32_t now = millis(); + if (start < now) + diff = now - start; + else + diff = UINT32_MAX - start + now; + diff /= 1000; // Convert to seconds. + if (diff == 0) return "Now"; + + // Note: millis() can only count up to 45 days, so uint8_t is safe. + uint8_t days = diff / (60 * 60 * 24); + uint8_t hours = (diff / (60 * 60)) % 24; + uint8_t minutes = (diff / 60) % 60; + uint8_t seconds = diff % 60; + + String result = ""; + if (days) + result += String(days) + " day"; + if (days > 1) result += "s"; + if (hours) + result += " " + String(hours) + " hour"; + if (hours > 1) result += "s"; + if (minutes) + result += " " + String(minutes) + " minute"; + if (minutes > 1) result += "s"; + if (seconds) + result += " " + String(seconds) + " second"; + if (seconds > 1) result += "s"; + result.trim(); + return result + " ago"; +} + +// Quick and dirty check for any unsafe chars in a string +// that may cause HTML shenanigans. e.g. An XSS. +bool hasUnsafeHTMLChars(String input) { + static char unsafe[] = "';!-\"<>=&{}()"; + for (uint8_t i = 0; unsafe[i]; i++) + if (input.indexOf(unsafe[i]) != -1) return true; + return false; +} + // Root web page with example usage etc. void handleRoot() { server.send(200, "text/html", @@ -185,13 +318,43 @@ void handleRoot() { "" "

ESP8266 IR MQTT Server

" "

" - "

Connection details

" - "

IP address: " + WiFi.localIP().toString() + "

" + "

Information

" + "

IP address: " + WiFi.localIP().toString() + "
" + "Booted: " + timeSince(1) + "
" + + "Version: " _MY_VERSION_ "
" + "Period Offset: " + String(offset) + "us
" + "IR Lib Version: " _IRREMOTEESP8266_VERSION_ "
" + "ESP8266 Core Version: " + ESP.getCoreVersion() + "
" + "IR Send GPIO: " + String(IR_LED) + "
" + "Total send requests: " + String(sendReqCounter) + "
" + "Last message sent: " + String(lastSendSucceeded ? "Ok" : "FAILED") + + " (" + timeSince(lastSendTime) + ")
" +#ifdef IR_RX + "IR Recv GPIO: " + String(IR_RX) + "
" + "Total IR Received: " + String(irRecvCounter) + "
" + "Last IR Received: " + lastIrReceived + + " (" + timeSince(lastIrReceivedTime) + ")
" +#endif // IR_RX + "

" #ifdef MQTT_ENABLE - "

MQTT server: " MQTT_SERVER ":" + String(MQTT_PORT) + " ("+ - (mqtt_client.connected() ? "Connected" : "Disconnected") + ")
" + "

MQTT Information

" + "

Server: " MQTT_SERVER ":" + String(kMqttPort) + " (" + + (mqtt_client.connected() ? "Connected " + timeSince(lastDisconnectedTime) + : "Disconnected " + timeSince(lastConnectedTime)) + + ")
" + "Disconnections: " + String(mqttDisconnectCounter - 1) + "
" + "Client id: " + mqtt_clientid + "
" "Command topic: " MQTTcommand "
" - "Acknowledgements topic: " MQTTack "

" + "Acknowledgements topic: " MQTTack "
" +#ifdef IR_RX + "IR Received topic: " MQTTrecv "
" +#endif // IR_RX + "Last MQTT command seen: " + + // lastMqttCmd is unescaped untrusted input. + // Avoid any possible HTML/XSS when displaying it. + (hasUnsafeHTMLChars(lastMqttCmd) ? + "Contains unsafe HTML characters" : lastMqttCmd) + + " (" + timeSince(lastMqttCmdTime) + ")

" #endif // MQTT_ENABLE "

" "

Hardcoded examples

" @@ -222,15 +385,24 @@ void handleRoot() { "Type: " "" " Repeats: " @@ -305,11 +479,32 @@ void handleRoot() { " " "" "

" - "

Send a Kelvinator A/C IR message

" + "

Send an Air Conditioner IR message

" "

" - "" - "State code: 0x" + "Type: " + "" + " State code: 0x" + "" " " "
" "

" @@ -340,26 +535,245 @@ void handleReset() { delay(1000); } -// Parse a Kelvinator A/C Hex String/code and send it. -void parseStringAndSendKelv(const String str) { - // str should be a 32 digit hexidecimal string. - uint8_t offset = 0; - uint8_t codeArray[16] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; +// Parse an Air Conditioner A/C Hex String/code and send it. +// Args: +// irType: Nr. of the protocol we need to send. +// str: A hexadecimal string containing the state to be sent. +// Returns: +// bool: Successfully sent or not. +bool parseStringAndSendAirCon(const uint16_t irType, const String str) { + uint8_t strOffset = 0; + uint8_t state[kStateSizeMax] = {0}; // All array elements are set to 0. + uint16_t stateSize = 0; + if (str.startsWith("0x") || str.startsWith("0X")) - offset = 2; - for (int i = 0; i < 32; i++) { - unsigned char c = tolower(str[i + offset]); - uint8_t entry = 0; + strOffset = 2; + // Calculate how many hexadecimal characters there are. + uint16_t inputLength = str.length() - strOffset; + if (inputLength == 0) { + debug("Zero length AirCon code encountered. Ignored."); + return false; // No input. Abort. + } + + switch (irType) { // Get the correct state size for the protocol. + case KELVINATOR: + stateSize = kKelvinatorStateLength; + break; + case TOSHIBA_AC: + stateSize = kToshibaACStateLength; + break; + case DAIKIN: + stateSize = kDaikinStateLength; + break; + case ELECTRA_AC: + stateSize = kElectraAcStateLength; + break; + case MITSUBISHI_AC: + stateSize = kMitsubishiACStateLength; + break; + case PANASONIC_AC: + stateSize = kPanasonicAcStateLength; + break; + case TROTEC: + stateSize = kTrotecStateLength; + break; + case ARGO: + stateSize = kArgoStateLength; + break; + case GREE: + stateSize = kGreeStateLength; + break; + case FUJITSU_AC: + // Fujitsu has four distinct & different size states, so make a best guess + // which one we are being presented with based on the number of + // hexadecimal digits provided. i.e. Zero-pad if you need to to get + // the correct length/byte size. + stateSize = inputLength / 2; // Every two hex chars is a byte. + // Use at least the minimum size. + stateSize = std::max(stateSize, + (uint16_t) (kFujitsuAcStateLengthShort - 1)); + // If we think it isn't a "short" message. + if (stateSize > kFujitsuAcStateLengthShort) + // Then it has to be at least the smaller version of the "normal" size. + stateSize = std::max(stateSize, (uint16_t) (kFujitsuAcStateLength - 1)); + // Lastly, it should never exceed the maximum "normal" size. + stateSize = std::min(stateSize, kFujitsuAcStateLength); + break; + case HAIER_AC: + stateSize = kHaierACStateLength; + break; + case HAIER_AC_YRW02: + stateSize = kHaierACYRW02StateLength; + break; + case HITACHI_AC: + stateSize = kHitachiAcStateLength; + break; + case HITACHI_AC1: + stateSize = kHitachiAc1StateLength; + break; + case HITACHI_AC2: + stateSize = kHitachiAc2StateLength; + break; + case WHIRLPOOL_AC: + stateSize = kWhirlpoolAcStateLength; + break; + case SAMSUNG_AC: + // Samsung has two distinct & different size states, so make a best guess + // which one we are being presented with based on the number of + // hexadecimal digits provided. i.e. Zero-pad if you need to to get + // the correct length/byte size. + stateSize = inputLength / 2; // Every two hex chars is a byte. + // Use at least the minimum size. + stateSize = std::max(stateSize, (uint16_t) (kSamsungAcStateLength)); + // If we think it isn't a "normal" message. + if (stateSize > kSamsungAcStateLength) + // Then it probably the extended size. + stateSize = std::max(stateSize, + (uint16_t) (kSamsungAcExtendedStateLength)); + // Lastly, it should never exceed the maximum "extended" size. + stateSize = std::min(stateSize, kSamsungAcExtendedStateLength); + break; + case MWM: + // MWM has variable size states, so make a best guess + // which one we are being presented with based on the number of + // hexadecimal digits provided. i.e. Zero-pad if you need to to get + // the correct length/byte size. + stateSize = inputLength / 2; // Every two hex chars is a byte. + // Use at least the minimum size. + stateSize = std::max(stateSize, (uint16_t) 3); + // Cap the maximum size. + stateSize = std::min(stateSize, kStateSizeMax); + break; + default: // Not a protocol we expected. Abort. + debug("Unexpected AirCon protocol detected. Ignoring."); + return false; + } + if (inputLength > stateSize * 2) { + debug("AirCon code to large for the given protocol."); + return false; + } + + // Ptr to the least significant byte of the resulting state for this protocol. + uint8_t *statePtr = &state[stateSize - 1]; + + // Convert the string into a state array of the correct length. + for (uint16_t i = 0; i < inputLength; i++) { + // Grab the next least sigificant hexadecimal digit from the string. + uint8_t c = tolower(str[inputLength + strOffset - i - 1]); if (isxdigit(c)) { if (isdigit(c)) - codeArray[i / 2] += c - '0'; + c -= '0'; else - codeArray[i / 2] += c - 'a' + 10; + c = c - 'a' + 10; + } else { + debug("Aborting! Non-hexadecimal char found in AirCon state: " + str); + return false; + } + if (i % 2 == 1) { // Odd: Upper half of the byte. + *statePtr += (c << 4); + statePtr--; // Advance up to the next least significant byte of state. + } else { // Even: Lower half of the byte. + *statePtr = c; } - if (i % 2 == 0) - codeArray[i / 2] <<= 4; } - irsend.sendKelvinator(reinterpret_cast(codeArray)); + + // Make the appropriate call for the protocol type. + switch (irType) { +#if SEND_KELVINATOR + case KELVINATOR: + irsend.sendKelvinator(reinterpret_cast(state)); + break; +#endif +#if SEND_TOSHIBA_AC + case TOSHIBA_AC: + irsend.sendToshibaAC(reinterpret_cast(state)); + break; +#endif +#if SEND_DAIKIN + case DAIKIN: + irsend.sendDaikin(reinterpret_cast(state)); + break; +#endif +#if MITSUBISHI_AC + case MITSUBISHI_AC: + irsend.sendMitsubishiAC(reinterpret_cast(state)); + break; +#endif +#if SEND_TROTEC + case TROTEC: + irsend.sendTrotec(reinterpret_cast(state)); + break; +#endif +#if SEND_ARGO + case ARGO: + irsend.sendArgo(reinterpret_cast(state)); + break; +#endif +#if SEND_GREE + case GREE: + irsend.sendGree(reinterpret_cast(state)); + break; +#endif +#if SEND_FUJITSU_AC + case FUJITSU_AC: + irsend.sendFujitsuAC(reinterpret_cast(state), stateSize); + break; +#endif +#if SEND_HAIER_AC + case HAIER_AC: + irsend.sendHaierAC(reinterpret_cast(state)); + break; +#endif +#if SEND_HAIER_AC_YRW02 + case HAIER_AC_YRW02: + irsend.sendHaierACYRW02(reinterpret_cast(state)); + break; +#endif +#if SEND_HITACHI_AC + case HITACHI_AC: + irsend.sendHitachiAC(reinterpret_cast(state)); + break; +#endif +#if SEND_HITACHI_AC1 + case HITACHI_AC1: + irsend.sendHitachiAC1(reinterpret_cast(state)); + break; +#endif +#if SEND_HITACHI_AC2 + case HITACHI_AC2: + irsend.sendHitachiAC2(reinterpret_cast(state)); + break; +#endif +#if SEND_WHIRLPOOL_AC + case WHIRLPOOL_AC: + irsend.sendWhirlpoolAC(reinterpret_cast(state)); + break; +#endif +#if SEND_SAMSUNG_AC + case SAMSUNG_AC: + irsend.sendSamsungAC(reinterpret_cast(state), stateSize); + break; +#endif +#if SEND_ELECTRA_AC + case ELECTRA_AC: + irsend.sendElectraAC(reinterpret_cast(state)); + break; +#endif +#if SEND_PANASONIC_AC + case PANASONIC_AC: + irsend.sendPanasonicAC(reinterpret_cast(state)); + break; +#endif +#if SEND_MWM_ + case MWM: + irsend.sendMWM(reinterpret_cast(state), stateSize); + break; +#endif + default: + debug("Unexpected AirCon type in send request. Not sent."); + return false; + } + return true; // We were successful as far as we can tell. } // Count how many values are in the String. @@ -399,6 +813,7 @@ uint16_t * newCodeArray(const uint16_t size) { return result; } +#if SEND_GLOBALCACHE // Parse a GlobalCache String/code and send it. // Args: // str: A GlobalCache formatted String of comma separated numbers. @@ -407,7 +822,9 @@ uint16_t * newCodeArray(const uint16_t size) { // 20,20,20,20,20,20,20,20,20,20,20,20,20,63,20,20,20,63,20,63,20, // 63,20,63,20,63,20,63,20,1798" // Note: The leading "1:1,1," of normal GC codes should be removed. -void parseStringAndSendGC(const String str) { +// Returns: +// bool: Successfully sent or not. +bool parseStringAndSendGC(const String str) { uint16_t count; uint16_t *code_array; String tmp_str; @@ -437,22 +854,29 @@ void parseStringAndSendGC(const String str) { irsend.sendGC(code_array, count); // All done. Send it. free(code_array); // Free up the memory allocated. + if (count > 0) + return true; // We sent something. + return false; // We probably didn't. } +#endif // SEND_GLOBALCACHE +#if SEND_PRONTO // Parse a Pronto Hex String/code and send it. // Args: -// str: A comma-separated String of nr. of repeats, then hexidecimal numbers. +// str: A comma-separated String of nr. of repeats, then hexadecimal numbers. // e.g. "R1,0000,0067,0000,0015,0060,0018,0018,0018,0030,0018,0030,0018, // 0030,0018,0018,0018,0030,0018,0018,0018,0018,0018,0030,0018, // 0018,0018,0030,0018,0030,0018,0030,0018,0018,0018,0018,0018, // 0030,0018,0018,0018,0018,0018,0030,0018,0018,03f6" // or // "0000,0067,0000,0015,0060,0018". i.e. without the Repeat value -// Requires at least PRONTO_MIN_LENGTH comma-separated values. +// Requires at least kProntoMinLength comma-separated values. // sendPronto() only supports raw pronto code types, thus so does this. // repeats: Nr. of times the message is to be repeated. // This value is ignored if an embeddd repeat is found in str. -void parseStringAndSendPronto(const String str, uint16_t repeats) { +// Returns: +// bool: Successfully sent or not. +bool parseStringAndSendPronto(const String str, uint16_t repeats) { uint16_t count; uint16_t *code_array; int16_t index = -1; @@ -470,8 +894,8 @@ void parseStringAndSendPronto(const String str, uint16_t repeats) { count--; // We don't count the repeats value as part of the code array. } - // We need at least PRONTO_MIN_LENGTH values for the code part. - if (count < PRONTO_MIN_LENGTH) return; + // We need at least kProntoMinLength values for the code part. + if (count < kProntoMinLength) return false; // Now we know how many there are, allocate the memory to store them all. code_array = newCodeArray(count); @@ -481,7 +905,7 @@ void parseStringAndSendPronto(const String str, uint16_t repeats) { count = 0; do { index = str.indexOf(',', start_from); - // Convert the hexidecimal value string to an unsigned integer. + // Convert the hexadecimal value string to an unsigned integer. code_array[count] = strtoul(str.substring(start_from, index).c_str(), NULL, 16); start_from = index + 1; @@ -490,15 +914,22 @@ void parseStringAndSendPronto(const String str, uint16_t repeats) { irsend.sendPronto(code_array, count, repeats); // All done. Send it. free(code_array); // Free up the memory allocated. + if (count > 0) + return true; // We sent something. + return false; // We probably didn't. } +#endif // SEND_PRONTO -// Parse a IRremote Raw Hex String/code and send it. +#if SEND_RAW +// Parse an IRremote Raw Hex String/code and send it. // Args: // str: A comma-separated String containing the freq and raw IR data. // e.g. "38000,9000,4500,600,1450,600,900,650,1500,..." // Requires at least two comma-separated values. // First value is the transmission frequency in Hz or kHz. -void parseStringAndSendRaw(const String str) { +// Returns: +// bool: Successfully sent or not. +bool parseStringAndSendRaw(const String str) { uint16_t count; uint16_t freq = 38000; // Default to 38kHz. uint16_t *raw_array; @@ -508,7 +939,7 @@ void parseStringAndSendRaw(const String str) { // We expect the frequency as the first comma separated value, so we need at // least two values. If not, bail out. - if (count < 2) return; + if (count < 2) return false; count--; // We don't count the frequency value as part of the raw array. // Now we know how many there are, allocate the memory to store them all. @@ -530,7 +961,11 @@ void parseStringAndSendRaw(const String str) { irsend.sendRaw(raw_array, count, freq); // All done. Send it. free(raw_array); // Free up the memory allocated. + if (count > 0) + return true; // We sent something. + return false; // We probably didn't. } +#endif // SEND_RAW // Parse the URL args to find the IR code. void handleIr() { @@ -553,7 +988,8 @@ void handleIr() { repeat = atoi(server.arg(i).c_str()); } debug("New code received via HTTP"); - sendIRCode(ir_type, data, data_str.c_str(), nbits, repeat); + lastSendSucceeded = sendIRCode(ir_type, data, data_str.c_str(), nbits, + repeat); handleRoot(); } @@ -576,6 +1012,10 @@ void setup_wifi() { // We start by connecting to a WiFi network wifiManager.setTimeout(300); // Time out after 5 mins. +#if USE_STATIC_IP + // Use a static IP config rather than the one supplied via DHCP. + wifiManager.setSTAStaticIPConfig(kIPAddress, kGateway, kSubnetMask); +#endif // USE_STATIC_IP if (!wifiManager.autoConnect()) { debug("Wifi failed to connect and hit timeout."); delay(3000); @@ -584,14 +1024,27 @@ void setup_wifi() { delay(5000); } - debug("WiFi connected. IP address: " + WiFi.localIP()); + debug("WiFi connected. IP address: " + WiFi.localIP().toString()); } void setup(void) { irsend.begin(); + offset = irsend.calibrate(); +#if IR_RX +#if DECODE_HASH + // Ignore messages with less than minimum on or off pulses. + irrecv.setUnknownThreshold(kMinUnknownSize); +#endif // DECODE_HASH + irrecv.enableIRIn(); // Start the receiver +#endif // IR_RX #ifdef DEBUG - Serial.begin(115200); + // Use SERIAL_TX_ONLY so that the RX pin can be freed up for GPIO/IR use. + Serial.begin(BAUD_RATE, SERIAL_8N1, SERIAL_TX_ONLY); + while (!Serial) // Wait for the serial connection to be establised. + delay(50); + Serial.println(); + debug("IRMQTTServer " _MY_VERSION_" has booted."); #endif // DEBUG setup_wifi(); @@ -601,7 +1054,7 @@ void setup(void) { lastReconnectAttempt = 0; - if (mdns.begin(MQTTprefix, WiFi.localIP())) { + if (mdns.begin(HOSTNAME, WiFi.localIP())) { debug("MDNS responder started"); } @@ -667,12 +1120,13 @@ bool reconnect() { while (!mqtt_client.connected() && tries <= 3) { int connected = false; // Attempt to connect - debug("Attempting MQTT connection to " MQTT_SERVER ":" + String(MQTT_PORT) + + debug("Attempting MQTT connection to " MQTT_SERVER ":" + String(kMqttPort) + "... "); if (mqtt_user && mqtt_password) - connected = mqtt_client.connect(mqtt_clientid, mqtt_user, mqtt_password); + connected = mqtt_client.connect(mqtt_clientid.c_str(), mqtt_user, + mqtt_password); else - connected = mqtt_client.connect(mqtt_clientid); + connected = mqtt_client.connect(mqtt_clientid.c_str()); if (connected) { // Once connected, publish an announcement... mqtt_client.publish(MQTTack, "Connected"); @@ -692,32 +1146,57 @@ bool reconnect() { #endif // MQTT_ENABLE void loop(void) { - server.handleClient(); + server.handleClient(); // Handle any web activity #ifdef MQTT_ENABLE + uint32_t now = millis(); // MQTT client connection management if (!mqtt_client.connected()) { - uint32_t now = millis(); - // Reconnect if it's longer than MQTT_RECONNECT_TIME since we last tried. - if (now - lastReconnectAttempt > MQTT_RECONNECT_TIME) { + if (wasConnected) { + lastDisconnectedTime = now; + wasConnected = false; + mqttDisconnectCounter++; + } + // Reconnect if it's longer than kMqttReconnectTime since we last tried. + if (now - lastReconnectAttempt > kMqttReconnectTime) { lastReconnectAttempt = now; debug("client mqtt not connected, trying to connect"); // Attempt to reconnect if (reconnect()) { lastReconnectAttempt = 0; + wasConnected = true; if (boot) { mqtt_client.publish(MQTTack, "IR Server just booted"); boot = false; } else { - mqtt_client.publish(MQTTack, "IR Server just (re)connected to MQTT"); + String text = "IR Server just (re)connected to MQTT. " + "Lost connection about " + timeSince(lastConnectedTime); + mqtt_client.publish(MQTTack, text.c_str()); } + lastConnectedTime = now; + debug("successful client mqtt connection"); } } } else { + lastConnectedTime = now; // MQTT loop mqtt_client.loop(); } #endif // MQTT_ENABLE +#ifdef IR_RX + // Check if an IR code has been received via the IR RX module. + if (irrecv.decode(&capture)) { + lastIrReceivedTime = millis(); + lastIrReceived = String(capture.decode_type) + "," + + resultToHexidecimal(&capture); + // If it isn't an AC code, add the bits. + if (!hasACState(capture.decode_type)) + lastIrReceived += "," + String(capture.bits); + mqtt_client.publish(MQTTrecv, lastIrReceived.c_str()); + irRecvCounter++; + debug("Incoming IR message sent to MQTT: " + lastIrReceived); + } +#endif // IR_RX delay(100); } @@ -749,149 +1228,291 @@ uint64_t getUInt64fromHex(char const *str) { // code_str: The unparsed code to be sent. Used by complex protocol encodings. // bits: Nr. of bits in the protocol. 0 means use the protocol's default. // repeat: Nr. of times the message is to be repeated. (Not all protcols.) -void sendIRCode(int const ir_type, uint64_t const code, char const * code_str, +// Returns: +// bool: Successfully sent or not. +bool sendIRCode(int const ir_type, uint64_t const code, char const * code_str, uint16_t bits, uint16_t repeat) { // Create a pseudo-lock so we don't try to send two codes at the same time. while (ir_lock) delay(20); ir_lock = true; + bool success = true; // Assume success. + // send the IR message. switch (ir_type) { +#if SEND_RC5 case RC5: // 1 if (bits == 0) - bits = RC5_BITS; + bits = kRC5Bits; irsend.sendRC5(code, bits, repeat); break; +#endif +#if SEND_RC6 case RC6: // 2 if (bits == 0) - bits = RC6_MODE0_BITS; + bits = kRC6Mode0Bits; irsend.sendRC6(code, bits, repeat); break; +#endif +#if SEND_NEC case NEC: // 3 if (bits == 0) - bits = NEC_BITS; + bits = kNECBits; irsend.sendNEC(code, bits, repeat); break; +#endif +#if SEND_SONY case SONY: // 4 if (bits == 0) - bits = SONY_12_BITS; - repeat = std::max(repeat, (uint16_t) SONY_MIN_REPEAT); + bits = kSony12Bits; + repeat = std::max(repeat, kSonyMinRepeat); irsend.sendSony(code, bits, repeat); break; +#endif +#if SEND_PANASONIC case PANASONIC: // 5 if (bits == 0) - bits = PANASONIC_BITS; + bits = kPanasonicBits; irsend.sendPanasonic64(code, bits, repeat); break; +#endif +#if SEND_JVC case JVC: // 6 if (bits == 0) - bits = JVC_BITS; + bits = kJvcBits; irsend.sendJVC(code, bits, repeat); break; +#endif +#if SEND_SAMSUNG case SAMSUNG: // 7 if (bits == 0) - bits = SAMSUNG_BITS; + bits = kSamsungBits; irsend.sendSAMSUNG(code, bits, repeat); break; +#endif +#if SEND_WHYNTER case WHYNTER: // 8 if (bits == 0) - bits = WHYNTER_BITS; + bits = kWhynterBits; irsend.sendWhynter(code, bits, repeat); break; +#endif +#if SEND_AIWA_RC_T501 case AIWA_RC_T501: // 9 if (bits == 0) - bits = AIWA_RC_T501_BITS; - repeat = std::max(repeat, (uint16_t) AIWA_RC_T501_MIN_REPEAT); + bits = kAiwaRcT501Bits; + repeat = std::max(repeat, kAiwaRcT501MinRepeats); irsend.sendAiwaRCT501(code, bits, repeat); break; +#endif +#if SEND_LG case LG: // 10 if (bits == 0) - bits = LG_BITS; + bits = kLgBits; irsend.sendLG(code, bits, repeat); break; +#endif +#if SEND_MITSUBISHI case MITSUBISHI: // 12 if (bits == 0) - bits = MITSUBISHI_BITS; - repeat = std::max(repeat, (uint16_t) MITSUBISHI_MIN_REPEAT); + bits = kMitsubishiBits; + repeat = std::max(repeat, kMitsubishiMinRepeat); irsend.sendMitsubishi(code, bits, repeat); break; +#endif +#if SEND_DISH case DISH: // 13 if (bits == 0) - bits = DISH_BITS; - repeat = std::max(repeat, (uint16_t) DISH_MIN_REPEAT); + bits = kDishBits; + repeat = std::max(repeat, kDishMinRepeat); irsend.sendDISH(code, bits, repeat); break; +#endif +#if SEND_SHARP case SHARP: // 14 if (bits == 0) - bits = SHARP_BITS; + bits = kSharpBits; irsend.sendSharpRaw(code, bits, repeat); break; +#endif +#if SEND_COOLIX case COOLIX: // 15 if (bits == 0) - bits = COOLIX_BITS; + bits = kCoolixBits; irsend.sendCOOLIX(code, bits, repeat); break; +#endif + case DAIKIN: // 16 + case KELVINATOR: // 18 + case MITSUBISHI_AC: // 20 + case GREE: // 24 + case ARGO: // 27 + case TROTEC: // 28 + case TOSHIBA_AC: // 32 + case FUJITSU_AC: // 33 + case HAIER_AC: // 38 + case HAIER_AC_YRW02: // 44 + case HITACHI_AC: // 40 + case HITACHI_AC1: // 41 + case HITACHI_AC2: // 42 + case WHIRLPOOL_AC: // 45 + case SAMSUNG_AC: // 46 + case ELECTRA_AC: // 48 + case PANASONIC_AC: // 49 + case MWM: // 52 + success = parseStringAndSendAirCon(ir_type, code_str); + break; +#if SEND_DENON case DENON: // 17 if (bits == 0) bits = DENON_BITS; irsend.sendDenon(code, bits, repeat); break; - case KELVINATOR: // 18 - parseStringAndSendKelv(code_str); - break; +#endif +#if SEND_SHERWOOD case SHERWOOD: // 19 if (bits == 0) - bits = SHERWOOD_BITS; - repeat = std::max(repeat, (uint16_t) SHERWOOD_MIN_REPEAT); + bits = kSherwoodBits; + repeat = std::max(repeat, kSherwoodMinRepeat); irsend.sendSherwood(code, bits, repeat); break; +#endif +#if SEND_RCMM case RCMM: // 21 if (bits == 0) - bits == RCMM_BITS; + bits = kRCMMBits; irsend.sendRCMM(code, bits, repeat); break; +#endif +#if SEND_SANYO case SANYO_LC7461: // 22 if (bits == 0) - bits = SANYO_LC7461_BITS; + bits = kSanyoLC7461Bits; irsend.sendSanyoLC7461(code, bits, repeat); break; +#endif +#if SEND_RC5 case RC5X: // 23 if (bits == 0) - bits = RC5X_BITS; + bits = kRC5XBits; irsend.sendRC5(code, bits, repeat); - case PRONTO: // 25 - parseStringAndSendPronto(code_str, repeat); break; +#endif +#if SEND_PRONTO + case PRONTO: // 25 + success = parseStringAndSendPronto(code_str, repeat); + break; +#endif +#if SEND_NIKAI case NIKAI: // 29 if (bits == 0) - bits = NIKAI_BITS; + bits = kNikaiBits; irsend.sendNikai(code, bits, repeat); break; +#endif +#if SEND_RAW case RAW: // 30 - parseStringAndSendRaw(code_str); + success = parseStringAndSendRaw(code_str); break; +#endif +#if SEND_GLOBALCACHE case GLOBALCACHE: // 31 - parseStringAndSendGC(code_str); + success = parseStringAndSendGC(code_str); break; - } +#endif +#if SEND_MIDEA + case MIDEA: // 34 + if (bits == 0) + bits = kMideaBits; + irsend.sendMidea(code, bits, repeat); + break; +#endif +#if SEND_MAGIQUEST + case MAGIQUEST: // 35 + if (bits == 0) + bits = kMagiquestBits; + irsend.sendMagiQuest(code, bits, repeat); + break; +#endif +#if SEND_LASERTAG + case LASERTAG: // 36 + if (bits == 0) + bits = kLasertagBits; + irsend.sendLasertag(code, bits, repeat); + break; +#endif +#if SEND_CARRIER_AC + case CARRIER_AC: // 37 + if (bits == 0) + bits = kCarrierAcBits; + irsend.sendCarrierAC(code, bits, repeat); + break; +#endif +#if SEND_MITSUBISHI2 + case MITSUBISHI2: // 39 + if (bits == 0) + bits = kMitsubishiBits; + repeat = std::max(repeat, kMitsubishiMinRepeat); + irsend.sendMitsubishi2(code, bits, repeat); + break; +#endif +#if SEND_GICABLE + case GICABLE: // 43 + if (bits == 0) + bits = kGicableBits; + repeat = std::max(repeat, kGicableMinRepeat); + irsend.sendGICable(code, bits, repeat); + break; +#endif +#if SEND_LUTRON + case LUTRON: // 47 + if (bits == 0) + bits = kLutronBits; + irsend.sendLutron(code, bits, repeat); + break; +#endif +#if SEND_PIONEER + case PIONEER: // 50 + if (bits == 0) + bits = kPioneerBits; + irsend.sendPioneer(code, bits, repeat); + break; +#endif +#if SEND_LG + case LG2: // 51 + if (bits == 0) + bits = kLgBits; + irsend.sendLG2(code, bits, repeat); + break; +#endif + default: + // If we got here, we didn't know how to send it. + success = false; + } + lastSendTime = millis(); // Release the lock. ir_lock = false; - // Indicate that we sent the message. - debug("Sent the IR message."); + // Indicate that we sent the message or not. + if (success) { + sendReqCounter++; + debug("Sent the IR message:"); + } else { + debug("Failed to send IR Message:"); + } debug("Type: " + String(ir_type)); - switch (ir_type) { - case KELVINATOR: - case PRONTO: - case RAW: - case GLOBALCACHE: - debug("Code: "); - debug(code_str); - debug("Repeats: " + String(repeat)); - // Confirm what we were asked to send was sent. + // For "long" codes we basically repeat what we got. + if (hasACState((decode_type_t) ir_type) || + ir_type == PRONTO || + ir_type == RAW || + ir_type == GLOBALCACHE) { + debug("Code: "); + debug(code_str); + // Confirm what we were asked to send was sent. #ifdef MQTT_ENABLE + if (success) { if (ir_type == PRONTO && repeat > 0) mqtt_client.publish(MQTTack, (String(ir_type) + ",R" + String(repeat) + "," + @@ -899,20 +1520,21 @@ void sendIRCode(int const ir_type, uint64_t const code, char const * code_str, else mqtt_client.publish(MQTTack, (String(ir_type) + "," + String(code_str)).c_str()); + } #endif // MQTT_ENABLE - break; - default: - debug("Code: 0x" + uint64ToString(code, 16)); - debug("Bits: " + String(bits)); - debug("Repeats: " + String(repeat)); - + } else { // For "short" codes, we break it down a bit more before we report. + debug("Code: 0x" + uint64ToString(code, 16)); + debug("Bits: " + String(bits)); + debug("Repeats: " + String(repeat)); #ifdef MQTT_ENABLE + if (success) mqtt_client.publish(MQTTack, (String(ir_type) + "," + uint64ToString(code, 16) + "," + String(bits) + "," + String(repeat)).c_str()); #endif // MQTT_ENABLE } + return success; } #ifdef MQTT_ENABLE @@ -924,9 +1546,12 @@ void receivingMQTT(String const topic_name, String const callback_str) { debug("Receiving data by MQTT topic " + topic_name); - // Make a copy of the callback string as strtok destorys it. + // Make a copy of the callback string as strtok destroys it. char* callback_c_str = strdup(callback_str.c_str()); debug("MQTT Payload (raw): " + callback_str); + // Save the message as the last command seen (global). + lastMqttCmd = callback_str; + lastMqttCmdTime = millis(); // Get the numeric protocol type. int ir_type = strtoul(strtok_r(callback_c_str, ",", &tok_ptr), NULL, 10); @@ -952,9 +1577,10 @@ void receivingMQTT(String const topic_name, String const callback_str) { // send received MQTT value by IR signal - sendIRCode(ir_type, code, - callback_str.substring(callback_str.indexOf(",") + 1).c_str(), - nbits, repeat); + lastSendSucceeded = sendIRCode( + ir_type, code, + callback_str.substring(callback_str.indexOf(",") + 1).c_str(), + nbits, repeat); } // Callback function, when the gateway receive an MQTT value on the topics diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRMQTTServer/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/IRMQTTServer/platformio.ini similarity index 96% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRMQTTServer/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/IRMQTTServer/platformio.ini index c87e56962..27b44ddca 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/IRMQTTServer/platformio.ini +++ b/lib/IRremoteESP8266-2.5.2.03/examples/IRMQTTServer/platformio.ini @@ -7,7 +7,7 @@ build_flags = -DMQTT_MAX_PACKET_SIZE=512 lib_deps_builtin = lib_deps_external = PubSubClient - WifiManager@0.12 + WifiManager@0.14 [env:nodemcuv2] platform = espressif8266 diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRServer/IRServer.ino b/lib/IRremoteESP8266-2.5.2.03/examples/IRServer/IRServer.ino similarity index 88% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRServer/IRServer.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/IRServer/IRServer.ino index 82f2e7dd7..b378d3bd5 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/IRServer/IRServer.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/IRServer/IRServer.ino @@ -3,7 +3,8 @@ * Version 0.2 June, 2017 * Copyright 2015 Mark Szabo * - * An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2). + * An IR LED circuit *MUST* be connected to the ESP8266 on a pin + * as specified by kIrLed below. * * TL;DR: The IR LED needs to be driven by a transistor for a good result. * @@ -35,13 +36,15 @@ #include #include -const char* ssid = "....."; -const char* password = "....."; +const char* kSsid = "....."; +const char* kPassword = "....."; MDNSResponder mdns; ESP8266WebServer server(80); -IRsend irsend(4); // An IR LED is controlled by GPIO pin 4 (D2) +const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2). + +IRsend irsend(kIrLed); // Set the GPIO to be used to sending the message. void handleRoot() { server.send(200, "text/html", @@ -61,7 +64,9 @@ void handleIr() { for (uint8_t i = 0; i < server.args(); i++) { if (server.argName(i) == "code") { uint32_t code = strtoul(server.arg(i).c_str(), NULL, 10); +#if SEND_NEC irsend.sendNEC(code, 32); +#endif // SEND_NEC } } handleRoot(); @@ -85,7 +90,7 @@ void setup(void) { irsend.begin(); Serial.begin(115200); - WiFi.begin(ssid, password); + WiFi.begin(kSsid, kPassword); Serial.println(""); // Wait for connection @@ -95,9 +100,9 @@ void setup(void) { } Serial.println(""); Serial.print("Connected to "); - Serial.println(ssid); + Serial.println(kSsid); Serial.print("IP address: "); - Serial.println(WiFi.localIP()); + Serial.println(WiFi.localIP().toString()); if (mdns.begin("esp8266", WiFi.localIP())) { Serial.println("MDNS responder started"); diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRServer/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/IRServer/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRServer/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/IRServer/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDemo/IRrecvDemo.ino b/lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDemo/IRrecvDemo.ino similarity index 66% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDemo/IRrecvDemo.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDemo/IRrecvDemo.ino index ae9ed66f9..09babe4fe 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDemo/IRrecvDemo.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDemo/IRrecvDemo.ino @@ -1,6 +1,9 @@ /* * IRremoteESP8266: IRrecvDemo - demonstrates receiving IR codes with IRrecv - * An IR detector/demodulator must be connected to the input RECV_PIN. + * This is very simple teaching code to show you how to use the library. + * If you are trying to decode your Infra-Red remote(s) for later replay, + * use the IRrecvDumpV2.ino example code instead of this. + * An IR detector/demodulator must be connected to the input kRecvPin. * Copyright 2009 Ken Shirriff, http://arcfn.com * Example circuit diagram: * https://github.com/markszabo/IRremoteESP8266/wiki#ir-receiving @@ -22,15 +25,20 @@ // An IR detector/demodulator is connected to GPIO pin 14(D5 on a NodeMCU // board). -uint16_t RECV_PIN = 14; +const uint16_t kRecvPin = 14; -IRrecv irrecv(RECV_PIN); +IRrecv irrecv(kRecvPin); decode_results results; void setup() { Serial.begin(115200); irrecv.enableIRIn(); // Start the receiver + while (!Serial) // Wait for the serial connection to be establised. + delay(50); + Serial.println(); + Serial.print("IRrecvDemo is now running and waiting for IR message on Pin "); + Serial.println(kRecvPin); } void loop() { diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDemo/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDemo/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDemo/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDemo/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDump/IRrecvDump.ino b/lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDump/IRrecvDump.ino similarity index 96% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDump/IRrecvDump.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDump/IRrecvDump.ino index 856449695..34f10dc83 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDump/IRrecvDump.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDump/IRrecvDump.ino @@ -86,10 +86,10 @@ void dump(decode_results *results) { if (i % 100 == 0) yield(); // Preemptive yield every 100th entry to feed the WDT. if (i & 1) { - Serial.print(results->rawbuf[i] * RAWTICK, DEC); + Serial.print(results->rawbuf[i] * kRawTick, DEC); } else { Serial.print(", "); - Serial.print((uint32_t) results->rawbuf[i] * RAWTICK, DEC); + Serial.print((uint32_t) results->rawbuf[i] * kRawTick, DEC); } } Serial.println("};"); diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDump/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDump/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDump/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDump/platformio.ini diff --git a/lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDumpV2/IRrecvDumpV2.ino b/lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDumpV2/IRrecvDumpV2.ino new file mode 100644 index 000000000..d72e0814c --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDumpV2/IRrecvDumpV2.ino @@ -0,0 +1,262 @@ +/* + * IRremoteESP8266: IRrecvDumpV2 - dump details of IR codes with IRrecv + * An IR detector/demodulator must be connected to the input kRecvPin. + * + * Copyright 2009 Ken Shirriff, http://arcfn.com + * Copyright 2017 David Conran + * + * Example circuit diagram: + * https://github.com/markszabo/IRremoteESP8266/wiki#ir-receiving + * + * Changes: + * Version 0.4 July, 2018 + * - Minor improvements and more A/C unit support. + * Version 0.3 November, 2017 + * - Support for A/C decoding for some protcols. + * Version 0.2 April, 2017 + * - Decode from a copy of the data so we can start capturing faster thus + * reduce the likelihood of miscaptures. + * Based on Ken Shirriff's IrsendDemo Version 0.1 July, 2009, + */ + +#ifndef UNIT_TEST +#include +#endif +#include +#include +#include +// The following are only needed for extended decoding of A/C Messages +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// ==================== start of TUNEABLE PARAMETERS ==================== +// An IR detector/demodulator is connected to GPIO pin 14 +// e.g. D5 on a NodeMCU board. +const uint16_t kRecvPin = 14; + +// The Serial connection baud rate. +// i.e. Status message will be sent to the PC at this baud rate. +// Try to avoid slow speeds like 9600, as you will miss messages and +// cause other problems. 115200 (or faster) is recommended. +// NOTE: Make sure you set your Serial Monitor to the same speed. +const uint32_t kBaudRate = 115200; + +// As this program is a special purpose capture/decoder, let us use a larger +// than normal buffer so we can handle Air Conditioner remote codes. +const uint16_t kCaptureBufferSize = 1024; + +// kTimeout is the Nr. of milli-Seconds of no-more-data before we consider a +// message ended. +// This parameter is an interesting trade-off. The longer the timeout, the more +// complex a message it can capture. e.g. Some device protocols will send +// multiple message packets in quick succession, like Air Conditioner remotes. +// Air Coniditioner protocols often have a considerable gap (20-40+ms) between +// packets. +// The downside of a large timeout value is a lot of less complex protocols +// send multiple messages when the remote's button is held down. The gap between +// them is often also around 20+ms. This can result in the raw data be 2-3+ +// times larger than needed as it has captured 2-3+ messages in a single +// capture. Setting a low timeout value can resolve this. +// So, choosing the best kTimeout value for your use particular case is +// quite nuanced. Good luck and happy hunting. +// NOTE: Don't exceed kMaxTimeoutMs. Typically 130ms. +#if DECODE_AC +// Some A/C units have gaps in their protocols of ~40ms. e.g. Kelvinator +// A value this large may swallow repeats of some protocols +const uint8_t kTimeout = 50; +#else // DECODE_AC +// Suits most messages, while not swallowing many repeats. +const uint8_t kTimeout = 15; +#endif // DECODE_AC +// Alternatives: +// const uint8_t kTimeout = 90; +// Suits messages with big gaps like XMP-1 & some aircon units, but can +// accidentally swallow repeated messages in the rawData[] output. +// +// const uint8_t kTimeout = kMaxTimeoutMs; +// This will set it to our currently allowed maximum. +// Values this high are problematic because it is roughly the typical boundary +// where most messages repeat. +// e.g. It will stop decoding a message and start sending it to serial at +// precisely the time when the next message is likely to be transmitted, +// and may miss it. + +// Set the smallest sized "UNKNOWN" message packets we actually care about. +// This value helps reduce the false-positive detection rate of IR background +// noise as real messages. The chances of background IR noise getting detected +// as a message increases with the length of the kTimeout value. (See above) +// The downside of setting this message too large is you can miss some valid +// short messages for protocols that this library doesn't yet decode. +// +// Set higher if you get lots of random short UNKNOWN messages when nothing +// should be sending a message. +// Set lower if you are sure your setup is working, but it doesn't see messages +// from your device. (e.g. Other IR remotes work.) +// NOTE: Set this value very high to effectively turn off UNKNOWN detection. +const uint16_t kMinUnknownSize = 12; +// ==================== end of TUNEABLE PARAMETERS ==================== + +// Use turn on the save buffer feature for more complete capture coverage. +IRrecv irrecv(kRecvPin, kCaptureBufferSize, kTimeout, true); + +decode_results results; // Somewhere to store the results + +// Display the human readable state of an A/C message if we can. +void dumpACInfo(decode_results *results) { + String description = ""; +#if DECODE_DAIKIN + if (results->decode_type == DAIKIN) { + IRDaikinESP ac(0); + ac.setRaw(results->state); + description = ac.toString(); + } +#endif // DECODE_DAIKIN +#if DECODE_FUJITSU_AC + if (results->decode_type == FUJITSU_AC) { + IRFujitsuAC ac(0); + ac.setRaw(results->state, results->bits / 8); + description = ac.toString(); + } +#endif // DECODE_FUJITSU_AC +#if DECODE_KELVINATOR + if (results->decode_type == KELVINATOR) { + IRKelvinatorAC ac(0); + ac.setRaw(results->state); + description = ac.toString(); + } +#endif // DECODE_KELVINATOR +#if DECODE_MITSUBISHI_AC + if (results->decode_type == MITSUBISHI_AC) { + IRMitsubishiAC ac(0); + ac.setRaw(results->state); + description = ac.toString(); + } +#endif // DECODE_MITSUBISHI_AC +#if DECODE_TOSHIBA_AC + if (results->decode_type == TOSHIBA_AC) { + IRToshibaAC ac(0); + ac.setRaw(results->state); + description = ac.toString(); + } +#endif // DECODE_TOSHIBA_AC +#if DECODE_GREE + if (results->decode_type == GREE) { + IRGreeAC ac(0); + ac.setRaw(results->state); + description = ac.toString(); + } +#endif // DECODE_GREE +#if DECODE_MIDEA + if (results->decode_type == MIDEA) { + IRMideaAC ac(0); + ac.setRaw(results->value); // Midea uses value instead of state. + description = ac.toString(); + } +#endif // DECODE_MIDEA +#if DECODE_HAIER_AC + if (results->decode_type == HAIER_AC) { + IRHaierAC ac(0); + ac.setRaw(results->state); + description = ac.toString(); + } +#endif // DECODE_HAIER_AC +#if DECODE_HAIER_AC_YRW02 + if (results->decode_type == HAIER_AC_YRW02) { + IRHaierACYRW02 ac(0); + ac.setRaw(results->state); + description = ac.toString(); + } +#endif // DECODE_HAIER_AC_YRW02 +#if DECODE_SAMSUNG_AC + if (results->decode_type == SAMSUNG_AC) { + IRSamsungAc ac(0); + ac.setRaw(results->state); + description = ac.toString(); + } +#endif // DECODE_SAMSUNG_AC +#if DECODE_COOLIX + if (results->decode_type == COOLIX) { + IRCoolixAC ac(0); + ac.setRaw(results->value); // Coolix uses value instead of state. + description = ac.toString(); + } +#endif // DECODE_COOLIX +#if DECODE_PANASONIC_AC + if (results->decode_type == PANASONIC_AC && + results->bits > kPanasonicAcShortBits) { + IRPanasonicAc ac(0); + ac.setRaw(results->state); + description = ac.toString(); + } +#endif // DECODE_PANASONIC_AC +#if DECODE_HITACHI_AC + if (results->decode_type == HITACHI_AC) { + IRHitachiAc ac(0); + ac.setRaw(results->state); + description = ac.toString(); + } +#endif // DECODE_HITACHI_AC + // If we got a human-readable description of the message, display it. + if (description != "") Serial.println("Mesg Desc.: " + description); +} + +// The section of code run only once at start-up. +void setup() { + Serial.begin(kBaudRate, SERIAL_8N1, SERIAL_TX_ONLY); + while (!Serial) // Wait for the serial connection to be establised. + delay(50); + Serial.println(); + Serial.print("IRrecvDumpV2 is now running and waiting for IR input on Pin "); + Serial.println(kRecvPin); + +#if DECODE_HASH + // Ignore messages with less than minimum on or off pulses. + irrecv.setUnknownThreshold(kMinUnknownSize); +#endif // DECODE_HASH + irrecv.enableIRIn(); // Start the receiver +} + +// The repeating section of the code +// +void loop() { + // Check if the IR code has been received. + if (irrecv.decode(&results)) { + // Display a crude timestamp. + uint32_t now = millis(); + Serial.printf("Timestamp : %06u.%03u\n", now / 1000, now % 1000); + if (results.overflow) + Serial.printf( + "WARNING: IR code is too big for buffer (>= %d). " + "This result shouldn't be trusted until this is resolved. " + "Edit & increase kCaptureBufferSize.\n", + kCaptureBufferSize); + // Display the basic output of what we found. + Serial.print(resultToHumanReadableBasic(&results)); + dumpACInfo(&results); // Display any extra A/C info if we have it. + yield(); // Feed the WDT as the text output can take a while to print. + + // Display the library version the message was captured with. + Serial.print("Library : v"); + Serial.println(_IRREMOTEESP8266_VERSION_); + Serial.println(); + + // Output RAW timing info of the result. + Serial.println(resultToTimingInfo(&results)); + yield(); // Feed the WDT (again) + + // Output the results as source code + Serial.println(resultToSourceCode(&results)); + Serial.println(""); // Blank line between entries + yield(); // Feed the WDT (again) + } +} diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDumpV2/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDumpV2/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRrecvDumpV2/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/IRrecvDumpV2/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRsendDemo/IRsendDemo.ino b/lib/IRremoteESP8266-2.5.2.03/examples/IRsendDemo/IRsendDemo.ino similarity index 87% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRsendDemo/IRsendDemo.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/IRsendDemo/IRsendDemo.ino index 1a688cba3..892016b3e 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/IRsendDemo/IRsendDemo.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/IRsendDemo/IRsendDemo.ino @@ -4,7 +4,8 @@ * Based on Ken Shirriff's IrsendDemo Version 0.1 July, 2009, * Copyright 2009 Ken Shirriff, http://arcfn.com * - * An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2). + * An IR LED circuit *MUST* be connected to the ESP8266 on a pin + * as specified by kIrLed below. * * TL;DR: The IR LED needs to be driven by a transistor for a good result. * @@ -33,7 +34,9 @@ #include #include -IRsend irsend(4); // An IR LED is controlled by GPIO pin 4 (D2) +const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2). + +IRsend irsend(kIrLed); // Set the GPIO to be used to sending the message. // Example of data captured by IRrecvDumpV2.ino uint16_t rawData[67] = {9000, 4500, 650, 550, 650, 1650, 600, 550, 650, 550, @@ -50,13 +53,19 @@ void setup() { } void loop() { +#if SEND_NEC Serial.println("NEC"); irsend.sendNEC(0x00FFE01FUL, 32); +#endif // SEND_NEC delay(2000); +#if SEND_SONY Serial.println("Sony"); irsend.sendSony(0xa90, 12, 2); +#endif // SEND_SONY delay(2000); +#if SEND_RAW Serial.println("a rawData capture from IRrecvDumpV2"); irsend.sendRaw(rawData, 67, 38); // Send a raw data capture at 38kHz. +#endif // SEND_RAW delay(2000); } diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRsendDemo/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/IRsendDemo/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRsendDemo/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/IRsendDemo/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRsendProntoDemo/IRsendProntoDemo.ino b/lib/IRremoteESP8266-2.5.2.03/examples/IRsendProntoDemo/IRsendProntoDemo.ino similarity index 93% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRsendProntoDemo/IRsendProntoDemo.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/IRsendProntoDemo/IRsendProntoDemo.ino index 0a7a014a7..3bef2179e 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/IRsendProntoDemo/IRsendProntoDemo.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/IRsendProntoDemo/IRsendProntoDemo.ino @@ -6,7 +6,7 @@ * Version 1.0 June, 2017 * * An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2), unless you - * change the irsend() value below. + * change the kIrLed value below. * * TL;DR: The IR LED needs to be driven by a transistor for a good result. * @@ -35,7 +35,9 @@ #include #include -IRsend irsend(4); // An IR LED is controlled by GPIO pin 4 (D2) +const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2). + +IRsend irsend(kIrLed); // Set the GPIO to be used to sending the message. // Panasonic Plasma TV Descrete code (Power On). // Acquired from: @@ -96,10 +98,15 @@ void setup() { } void loop() { +#if SEND_PRONTO Serial.println("Sending a Samsung TV 'on' command."); irsend.sendPronto(samsungProntoCode, 72); delay(2000); Serial.println("Sending a Panasonic Plasma TV 'on' command."); irsend.sendPronto(panasonicProntoCode, 104); delay(2000); +#else // SEND_PRONTO + Serial.println("Can't send because SEND_PRONTO has been disabled."); + delay(10000); +#endif // SEND_PRONTO } diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/IRsendProntoDemo/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/IRsendProntoDemo/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/IRsendProntoDemo/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/IRsendProntoDemo/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/JVCPanasonicSendDemo/JVCPanasonicSendDemo.ino b/lib/IRremoteESP8266-2.5.2.03/examples/JVCPanasonicSendDemo/JVCPanasonicSendDemo.ino similarity index 64% rename from lib/IRremoteESP8266-2.2.1.02/examples/JVCPanasonicSendDemo/JVCPanasonicSendDemo.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/JVCPanasonicSendDemo/JVCPanasonicSendDemo.ino index 9c7068000..ee2422915 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/JVCPanasonicSendDemo/JVCPanasonicSendDemo.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/JVCPanasonicSendDemo/JVCPanasonicSendDemo.ino @@ -4,7 +4,8 @@ * Based on Ken Shirriff's IrsendDemo Version 0.1 July, 2009, Copyright 2009 Ken Shirriff, http://arcfn.com * JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post) * - * An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2). + * An IR LED circuit *MUST* be connected to the ESP8266 on a pin + * as specified by kIrLed below. * * TL;DR: The IR LED needs to be driven by a transistor for a good result. * @@ -33,12 +34,13 @@ #include #include -#define PanasonicAddress 0x4004 // Panasonic address (Pre data) -#define PanasonicPower 0x100BCBD // Panasonic Power button +const uint16_t kPanasonicAddress = 0x4004; // Panasonic address (Pre data) +const uint32_t kPanasonicPower = 0x100BCBD; // Panasonic Power button +const uint16_t kJVCPower = 0xC5E8; -#define JVCPower 0xC5E8 +const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2). -IRsend irsend(4); // An IR LED is controlled by GPIO pin 4 (D2) +IRsend irsend(kIrLed); // Set the GPIO to be used to sending the message. void setup() { irsend.begin(); @@ -46,11 +48,16 @@ void setup() { void loop() { // This should turn your TV on and off - irsend.sendPanasonic(PanasonicAddress, PanasonicPower); +#if SEND_PANASONIC + irsend.sendPanasonic(kPanasonicAddress, kPanasonicPower); +#else // SEND_PANASONIC + Serial.println("Can't send because SEND_PANASONIC has been disabled."); +#endif // SEND_PANASONIC - irsend.sendJVC(JVCPower, 16, 0); // hex value, 16 bits, no repeat - // see http://www.sbprojects.com/knowledge/ir/jvc.php for information - delayMicroseconds(50); - irsend.sendJVC(JVCPower, 16, 1); // hex value, 16 bits, repeat - delayMicroseconds(50); +#if SEND_JVC + irsend.sendJVC(kJVCPower, 16, 1); // hex value, 16 bits, single repeat +#else // SEND_JVC + Serial.println("Can't send because SEND_JVC has been disabled."); +#endif // SEND_JVC + delay(10000); // Wait 10 seconds before we repeat everything. } diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/JVCPanasonicSendDemo/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/JVCPanasonicSendDemo/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/JVCPanasonicSendDemo/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/JVCPanasonicSendDemo/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/LGACSend/LGACSend.ino b/lib/IRremoteESP8266-2.5.2.03/examples/LGACSend/LGACSend.ino similarity index 95% rename from lib/IRremoteESP8266-2.2.1.02/examples/LGACSend/LGACSend.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/LGACSend/LGACSend.ino index 7cced0c88..9139983c9 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/LGACSend/LGACSend.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/LGACSend/LGACSend.ino @@ -45,7 +45,11 @@ void Ac_Send_Code(uint32_t code) { Serial.print(" : "); Serial.println(code, HEX); +#if SEND_LG irsend.sendLG(code, 28); +#else // SEND_LG + Serial.println("Can't send because SEND_LG has been disabled."); +#endif // SEND_LG } void Ac_Activate(unsigned int temperature, unsigned int air_flow, @@ -60,9 +64,9 @@ void Ac_Activate(unsigned int temperature, unsigned int air_flow, else ac_msbits4 = 0; // cooling unsigned int ac_msbits5 = (temperature < 15) ? 0 : temperature - 15; - unsigned int ac_msbits6; + unsigned int ac_msbits6 = 0; - if (0 <= air_flow && air_flow <= 2) { + if (air_flow <= 2) { if (kAc_Type == 0) ac_msbits6 = kAc_Flow_Tower[air_flow]; else @@ -128,7 +132,7 @@ void setup() { } void loop() { - char b; + char b = ' '; Serial.println("# a : mode or temp b : air_flow, temp, swing, clean," " cooling/heating"); Serial.println("# 0 : off 0"); @@ -158,7 +162,7 @@ void loop() { default: Serial.println("b="); // Prompt User for input while (Serial.available() == 0) {} - char b = Serial.read(); + b = Serial.read(); } /* @@ -171,8 +175,8 @@ void loop() { # 4 : air_flow 0 ~ 3 : flow # + : temp + 1 # - : temp - 1 - # c : cooling - # h : heating + # c : cooling + # h : heating # m : change cooling to air clean, air clean to cooling */ Serial.print("a : "); @@ -194,7 +198,7 @@ void loop() { Ac_Change_Air_Swing(1); break; case '3': // 1 : clean on, power on - if (b == '0' | b == '1') + if (b == '0' || b == '1') Ac_Air_Clean(b); break; case '4': diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnArgoAC/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/LGACSend/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/TurnOnArgoAC/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/LGACSend/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnArgoAC/TurnOnArgoAC.ino b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnArgoAC/TurnOnArgoAC.ino similarity index 72% rename from lib/IRremoteESP8266-2.2.1.02/examples/TurnOnArgoAC/TurnOnArgoAC.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/TurnOnArgoAC/TurnOnArgoAC.ino index a2e450ac5..3993d1151 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnArgoAC/TurnOnArgoAC.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnArgoAC/TurnOnArgoAC.ino @@ -1,5 +1,6 @@ -/* Copyright 2017 crankyoldgit -* An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2). +/* Copyright 2017, 2018 crankyoldgit +* An IR LED circuit *MUST* be connected to the ESP8266 on a pin +* as specified by kIrLed below. * * TL;DR: The IR LED needs to be driven by a transistor for a good result. * @@ -29,10 +30,11 @@ #include #include -IRArgoAC argoir(4); // An IR LED is controlled by GPIO pin 4 (D2) +const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2). +IRArgoAC ac(kIrLed); // Set the GPIO to be used to sending the message. void setup() { - argoir.begin(); + ac.begin(); Serial.begin(115200); } @@ -40,13 +42,17 @@ void loop() { Serial.println("Sending..."); // Set up what we want to send. See ir_Argo.cpp for all the options. - argoir.setPower(true); - argoir.setFan(ARGO_FAN_1); - argoir.setCoolMode(ARGO_COOL_AUTO); - argoir.setTemp(25); + ac.setPower(true); + ac.setFan(kArgoFan1); + ac.setCoolMode(kArgoCoolAuto); + ac.setTemp(25); +#if SEND_ARGO // Now send the IR signal. - argoir.send(); + ac.send(); +#else // SEND_ARGO + Serial.println("Can't send because SEND_ARGO has been disabled."); +#endif // SEND_ARGO delay(5000); } diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnDaikinAC/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnArgoAC/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/TurnOnDaikinAC/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/TurnOnArgoAC/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnDaikinAC/TurnOnDaikinAC.ino b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnDaikinAC/TurnOnDaikinAC.ino similarity index 64% rename from lib/IRremoteESP8266-2.2.1.02/examples/TurnOnDaikinAC/TurnOnDaikinAC.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/TurnOnDaikinAC/TurnOnDaikinAC.ino index eb5cda5e7..b3ab757de 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnDaikinAC/TurnOnDaikinAC.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnDaikinAC/TurnOnDaikinAC.ino @@ -1,6 +1,7 @@ -/* Copyright 2016 sillyfrog +/* Copyright 2017 sillyfrog * -* An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2). +* An IR LED circuit *MUST* be connected to the ESP8266 on a pin +* as specified by kIrLed below. * * TL;DR: The IR LED needs to be driven by a transistor for a good result. * @@ -30,10 +31,11 @@ #include #include -IRDaikinESP dakinir(D2); // An IR LED is controlled by GPIO pin 4 (D2) +const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2). +IRDaikinESP ac(kIrLed); // Set the GPIO to be used to sending the message void setup() { - dakinir.begin(); + ac.begin(); Serial.begin(115200); } @@ -42,15 +44,26 @@ void loop() { Serial.println("Sending..."); // Set up what we want to send. See ir_Daikin.cpp for all the options. - dakinir.on(); - dakinir.setFan(1); - dakinir.setMode(DAIKIN_COOL); - dakinir.setTemp(25); - dakinir.setSwingVertical(0); - dakinir.setSwingHorizontal(0); + ac.on(); + ac.setFan(1); + ac.setMode(kDaikinCool); + ac.setTemp(25); + ac.setSwingVertical(false); + ac.setSwingHorizontal(false); + + // Set the current time to 1:33PM (13:33) + // Time works in minutes past midnight + ac.setCurrentTime(13 * 60 + 33); + // Turn off about 1 hour later at 2:30PM (14:30) + ac.enableOffTimer(14 * 60 + 30); + + // Display what we are going to send. + Serial.println(ac.toString()); // Now send the IR signal. - dakinir.send(); +#if SEND_DAIKIN + ac.send(); +#endif // SEND_DAIKIN - delay(5000); + delay(15000); } diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnFujitsuAC/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnDaikinAC/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/TurnOnFujitsuAC/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/TurnOnDaikinAC/platformio.ini diff --git a/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnFujitsuAC/TurnOnFujitsuAC.ino b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnFujitsuAC/TurnOnFujitsuAC.ino new file mode 100644 index 000000000..823a3f485 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnFujitsuAC/TurnOnFujitsuAC.ino @@ -0,0 +1,50 @@ +// Copyright 2017 Jonny Graham, 2018 David Conran +#ifndef UNIT_TEST +#include +#endif +#include +#include +#include + +const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2). +IRFujitsuAC ac(kIrLed); + +void printState() { + // Display the settings. + Serial.println("Fujitsu A/C remote is in the following state:"); + Serial.printf(" %s\n", ac.toString().c_str()); + // Display the encoded IR sequence. + unsigned char* ir_code = ac.getRaw(); + Serial.print("IR Code: 0x"); + for (uint8_t i = 0; i < ac.getStateLength(); i++) + Serial.printf("%02X", ir_code[i]); + Serial.println(); +} + +void setup() { + ac.begin(); + Serial.begin(115200); + delay(200); + + // Set up what we want to send. See ir_Fujitsu.cpp for all the options. + Serial.println("Default state of the remote."); + printState(); + Serial.println("Setting desired state for A/C."); + ac.setCmd(kFujitsuAcCmdTurnOn); + ac.setSwing(kFujitsuAcSwingBoth); + ac.setMode(kFujitsuAcModeCool); + ac.setFanSpeed(kFujitsuAcFanHigh); + ac.setTemp(24); // 24C +} + +void loop() { + // Now send the IR signal. + Serial.println("Sending IR command to A/C ..."); +#if SEND_FUJITSU_AC + ac.send(); +#else // SEND_FUJITSU_AC + Serial.println("Can't send because SEND_FUJITSU_AC has been disabled."); +#endif // SEND_FUJITSU_AC + printState(); + delay(5000); +} diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnKelvinatorAC/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnFujitsuAC/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/TurnOnKelvinatorAC/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/TurnOnFujitsuAC/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnKelvinatorAC/TurnOnKelvinatorAC.ino b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnKelvinatorAC/TurnOnKelvinatorAC.ino similarity index 63% rename from lib/IRremoteESP8266-2.2.1.02/examples/TurnOnKelvinatorAC/TurnOnKelvinatorAC.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/TurnOnKelvinatorAC/TurnOnKelvinatorAC.ino index 393ba28ff..b9b700741 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnKelvinatorAC/TurnOnKelvinatorAC.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnKelvinatorAC/TurnOnKelvinatorAC.ino @@ -1,6 +1,7 @@ -/* Copyright 2016 David Conran +/* Copyright 2016, 2018 David Conran * -* An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2). +* An IR LED circuit *MUST* be connected to the ESP8266 on a pin +* as specified by kIrLed below. * * TL;DR: The IR LED needs to be driven by a transistor for a good result. * @@ -29,29 +30,23 @@ #include #include -IRKelvinatorAC kelvir(D2); // An IR LED is controlled by GPIO pin 4 (D2) +const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2). +IRKelvinatorAC ac(kIrLed); // Set the GPIO to be used for sending messages. void printState() { // Display the settings. Serial.println("Kelvinator A/C remote is in the following state:"); - Serial.printf(" Basic\n Power: %d, Mode: %d, Temp: %dC, Fan Speed: %d\n", - kelvir.getPower(), kelvir.getMode(), kelvir.getTemp(), - kelvir.getFan()); - Serial.printf(" Options\n X-Fan: %d, Light: %d, Ion Filter: %d\n", - kelvir.getXFan(), kelvir.getLight(), kelvir.getIonFilter()); - Serial.printf(" Swing (V): %d, Swing (H): %d, Turbo: %d, Quiet: %d\n", - kelvir.getSwingVertical(), kelvir.getSwingHorizontal(), - kelvir.getTurbo(), kelvir.getQuiet()); + Serial.printf(" %s\n", ac.toString().c_str()); // Display the encoded IR sequence. - unsigned char* ir_code = kelvir.getRaw(); + unsigned char* ir_code = ac.getRaw(); Serial.print("IR Code: 0x"); - for (uint8_t i = 0; i < KELVINATOR_STATE_LENGTH; i++) + for (uint8_t i = 0; i < kKelvinatorStateLength; i++) Serial.printf("%02X", ir_code[i]); Serial.println(); } void setup() { - kelvir.begin(); + ac.begin(); Serial.begin(115200); delay(200); @@ -60,21 +55,23 @@ void setup() { Serial.println("Default state of the remote."); printState(); Serial.println("Setting desired state for A/C."); - kelvir.on(); - kelvir.setFan(1); - kelvir.setMode(KELVINATOR_COOL); - kelvir.setTemp(26); - kelvir.setSwingVertical(false); - kelvir.setSwingHorizontal(true); - kelvir.setXFan(true); - kelvir.setIonFilter(false); - kelvir.setLight(true); + ac.on(); + ac.setFan(1); + ac.setMode(kKelvinatorCool); + ac.setTemp(26); + ac.setSwingVertical(false); + ac.setSwingHorizontal(true); + ac.setXFan(true); + ac.setIonFilter(false); + ac.setLight(true); } void loop() { // Now send the IR signal. +#if SEND_KELVINATOR Serial.println("Sending IR command to A/C ..."); - kelvir.send(); + ac.send(); +#endif // SEND_KELVINATOR printState(); delay(5000); } diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnMitsubishiAC/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnKelvinatorAC/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/TurnOnMitsubishiAC/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/TurnOnKelvinatorAC/platformio.ini diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnMitsubishiAC/TurnOnMitsubishiAC.ino b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnMitsubishiAC/TurnOnMitsubishiAC.ino similarity index 72% rename from lib/IRremoteESP8266-2.2.1.02/examples/TurnOnMitsubishiAC/TurnOnMitsubishiAC.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/TurnOnMitsubishiAC/TurnOnMitsubishiAC.ino index 1ea9b0d31..e719af68e 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnMitsubishiAC/TurnOnMitsubishiAC.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnMitsubishiAC/TurnOnMitsubishiAC.ino @@ -1,6 +1,7 @@ -/* Copyright 2017 David Conran +/* Copyright 2017, 2018 David Conran * -* An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2). +* An IR LED circuit *MUST* be connected to the ESP8266 on a pin +* as specified by kIrLed below. * * TL;DR: The IR LED needs to be driven by a transistor for a good result. * @@ -29,25 +30,23 @@ #include #include -IRMitsubishiAC mitsubir(D2); // An IR LED is controlled by GPIO pin 4 (D2) +const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2). +IRMitsubishiAC ac(kIrLed); // Set the GPIO used for sending messages. void printState() { // Display the settings. Serial.println("Mitsubishi A/C remote is in the following state:"); - Serial.printf(" Power: %d, Mode: %d, Temp: %dC, Fan Speed: %d," \ - " Vane Mode: %d\n", - mitsubir.getPower(), mitsubir.getMode(), mitsubir.getTemp(), - mitsubir.getFan(), mitsubir.getVane()); + Serial.printf(" %s\n", ac.toString().c_str()); // Display the encoded IR sequence. - unsigned char* ir_code = mitsubir.getRaw(); + unsigned char* ir_code = ac.getRaw(); Serial.print("IR Code: 0x"); - for (uint8_t i = 0; i < MITSUBISHI_AC_STATE_LENGTH; i++) + for (uint8_t i = 0; i < kMitsubishiACStateLength; i++) Serial.printf("%02X", ir_code[i]); Serial.println(); } void setup() { - mitsubir.begin(); + ac.begin(); Serial.begin(115200); delay(200); @@ -55,17 +54,19 @@ void setup() { Serial.println("Default state of the remote."); printState(); Serial.println("Setting desired state for A/C."); - mitsubir.on(); - mitsubir.setFan(1); - mitsubir.setMode(MITSUBISHI_AC_COOL); - mitsubir.setTemp(26); - mitsubir.setVane(MITSUBISHI_AC_VANE_AUTO); + ac.on(); + ac.setFan(1); + ac.setMode(kMitsubishiAcCool); + ac.setTemp(26); + ac.setVane(kMitsubishiAcVaneAuto); } void loop() { // Now send the IR signal. +#if SEND_MITSUBISHI_AC Serial.println("Sending IR command to A/C ..."); - mitsubir.send(); + ac.send(); +#endif // SEND_MITSUBISHI_AC printState(); delay(5000); } diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnTrotecAC/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnMitsubishiAC/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/examples/TurnOnTrotecAC/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/examples/TurnOnMitsubishiAC/platformio.ini diff --git a/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnToshibaAC/TurnOnToshibaAC.ino b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnToshibaAC/TurnOnToshibaAC.ino new file mode 100644 index 000000000..d78178098 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnToshibaAC/TurnOnToshibaAC.ino @@ -0,0 +1,71 @@ +/* Copyright 2017, 2018 David Conran +* +* An IR LED circuit *MUST* be connected to the ESP8266 on a pin +* as specified by kIrLed below. +* +* TL;DR: The IR LED needs to be driven by a transistor for a good result. +* +* Suggested circuit: +* https://github.com/markszabo/IRremoteESP8266/wiki#ir-sending +* +* Common mistakes & tips: +* * Don't just connect the IR LED directly to the pin, it won't +* have enough current to drive the IR LED effectively. +* * Make sure you have the IR LED polarity correct. +* See: https://learn.sparkfun.com/tutorials/polarity/diode-and-led-polarity +* * Typical digital camera/phones can be used to see if the IR LED is flashed. +* Replace the IR LED with a normal LED if you don't have a digital camera +* when debugging. +* * Avoid using the following pins unless you really know what you are doing: +* * Pin 0/D3: Can interfere with the boot/program mode & support circuits. +* * Pin 1/TX/TXD0: Any serial transmissions from the ESP8266 will interfere. +* * Pin 3/RX/RXD0: Any serial transmissions to the ESP8266 will interfere. +* * ESP-01 modules are tricky. We suggest you use a module with more GPIOs +* for your first time. e.g. ESP-12 etc. +*/ +#ifndef UNIT_TEST +#include +#endif +#include +#include +#include + +const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2). +IRToshibaAC ac(kIrLed); // Set the GPIO to be used for sending messages. + +void printState() { + // Display the settings. + Serial.println("Toshiba A/C remote is in the following state:"); + Serial.printf(" %s\n", ac.toString().c_str()); + // Display the encoded IR sequence. + unsigned char* ir_code = ac.getRaw(); + Serial.print("IR Code: 0x"); + for (uint8_t i = 0; i < kToshibaACStateLength; i++) + Serial.printf("%02X", ir_code[i]); + Serial.println(); +} + +void setup() { + ac.begin(); + Serial.begin(115200); + delay(200); + + // Set up what we want to send. See ir_Toshiba.cpp for all the options. + Serial.println("Default state of the remote."); + printState(); + Serial.println("Setting desired state for A/C."); + ac.on(); + ac.setFan(1); + ac.setMode(kToshibaAcCool); + ac.setTemp(26); +} + +void loop() { + // Now send the IR signal. +#if SEND_TOSHIBA_AC + Serial.println("Sending IR command to A/C ..."); + ac.send(); +#endif // SEND_TOSHIBA_AC + printState(); + delay(5000); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnToshibaAC/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnToshibaAC/platformio.ini new file mode 100644 index 000000000..eeb8d1f2e --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnToshibaAC/platformio.ini @@ -0,0 +1,17 @@ +[platformio] +lib_extra_dirs = ../../ +src_dir=. + +[common] +build_flags = +lib_deps_builtin = +lib_deps_external = + +[env:nodemcuv2] +platform = espressif8266 +framework = arduino +board = nodemcuv2 +build_flags = ${common.build_flags} +lib_deps = + ${common.lib_deps_builtin} + ${common.lib_deps_external} diff --git a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnTrotecAC/TurnOnTrotecAC.ino b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnTrotecAC/TurnOnTrotecAC.ino similarity index 74% rename from lib/IRremoteESP8266-2.2.1.02/examples/TurnOnTrotecAC/TurnOnTrotecAC.ino rename to lib/IRremoteESP8266-2.5.2.03/examples/TurnOnTrotecAC/TurnOnTrotecAC.ino index 2476ff557..b7881eead 100644 --- a/lib/IRremoteESP8266-2.2.1.02/examples/TurnOnTrotecAC/TurnOnTrotecAC.ino +++ b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnTrotecAC/TurnOnTrotecAC.ino @@ -1,5 +1,6 @@ /* Copyright 2017 stufisher -* An IR LED circuit *MUST* be connected to ESP8266 pin 4 (D2). +* An IR LED circuit *MUST* be connected to the ESP8266 on a pin +* as specified by kIrLed below. * * TL;DR: The IR LED needs to be driven by a transistor for a good result. * @@ -29,10 +30,11 @@ #include #include -IRTrotecESP trotecir(D2); // An IR LED is controlled by GPIO pin 4 (D2) +const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2). +IRTrotecESP ac(kIrLed); // Set the GPIO to be used for sending messages. void setup() { - trotecir.begin(); + ac.begin(); Serial.begin(115200); } @@ -40,13 +42,17 @@ void loop() { Serial.println("Sending..."); // Set up what we want to send. See ir_Trotec.cpp for all the options. - trotecir.setPower(true); - trotecir.setSpeed(TROTEC_FAN_LOW); - trotecir.setMode(TROTEC_COOL); - trotecir.setTemp(25); + ac.setPower(true); + ac.setSpeed(kTrotecFanLow); + ac.setMode(kTrotecCool); + ac.setTemp(25); // Now send the IR signal. - trotecir.send(); +#if SEND_TROTEC + ac.send(); +#else // SEND_TROTEC + Serial.println("Can't send because SEND_TROTEC has been disabled."); +#endif // SEND_TROTEC delay(5000); } diff --git a/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnTrotecAC/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnTrotecAC/platformio.ini new file mode 100644 index 000000000..eeb8d1f2e --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/examples/TurnOnTrotecAC/platformio.ini @@ -0,0 +1,17 @@ +[platformio] +lib_extra_dirs = ../../ +src_dir=. + +[common] +build_flags = +lib_deps_builtin = +lib_deps_external = + +[env:nodemcuv2] +platform = espressif8266 +framework = arduino +board = nodemcuv2 +build_flags = ${common.build_flags} +lib_deps = + ${common.lib_deps_builtin} + ${common.lib_deps_external} diff --git a/lib/IRremoteESP8266-2.5.2.03/keywords.txt b/lib/IRremoteESP8266-2.5.2.03/keywords.txt new file mode 100644 index 000000000..ac3f43fe1 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/keywords.txt @@ -0,0 +1,1645 @@ +######################################### +# Syntax Coloring Map For IRremoteESP8266 +######################################### + +################################################ +# WARNING: Do NOT edit this file directly. +# It is generated by 'tools/mkkeywords' +# e.g. tools/mkkeywords > keywords.txt +################################################ + +####################################################### +# The Arduino IDE requires the use of a tab separator +# between the name and identifier. Without this tab the +# keyword is not highlighted. +# +# Reference: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords +####################################################### + +####################################### +# Datatypes & Classes (KEYWORD1) +####################################### + +IRArgoAC KEYWORD1 +IRCoolixAC KEYWORD1 +IRDaikinESP KEYWORD1 +IRFujitsuAC KEYWORD1 +IRGreeAC KEYWORD1 +IRHaierAC KEYWORD1 +IRHaierACYRW02 KEYWORD1 +IRKelvinatorAC KEYWORD1 +IRMideaAC KEYWORD1 +IRMitsubishiAC KEYWORD1 +IRPanasonicAc KEYWORD1 +IRSamsungAc KEYWORD1 +IRToshibaAC KEYWORD1 +IRTrotecESP KEYWORD1 +IRrecv KEYWORD1 +IRsend KEYWORD1 +IRtimer KEYWORD1 +decode_results KEYWORD1 +ir_params_t KEYWORD1 +match_result_t KEYWORD1 + +####################################### +# Methods and Functions (KEYWORD2) +####################################### + +_delayMicroseconds KEYWORD2 +add KEYWORD2 +addbit KEYWORD2 +begin KEYWORD2 +buildFromState KEYWORD2 +buildState KEYWORD2 +calcBlockChecksum KEYWORD2 +calcChecksum KEYWORD2 +calcLGChecksum KEYWORD2 +calcUSecPeriod KEYWORD2 +calculateChecksum KEYWORD2 +calibrate KEYWORD2 +cancelOffTimer KEYWORD2 +cancelOnTimer KEYWORD2 +cancelTimers KEYWORD2 +checkheader KEYWORD2 +checksum KEYWORD2 +clearBit KEYWORD2 +clearSensorTemp KEYWORD2 +compare KEYWORD2 +copyIrParams KEYWORD2 +decode KEYWORD2 +decodeAiwaRCT501 KEYWORD2 +decodeCOOLIX KEYWORD2 +decodeCarrierAC KEYWORD2 +decodeDISH KEYWORD2 +decodeDaikin KEYWORD2 +decodeDenon KEYWORD2 +decodeElectraAC KEYWORD2 +decodeFujitsuAC KEYWORD2 +decodeGICable KEYWORD2 +decodeGree KEYWORD2 +decodeHaierAC KEYWORD2 +decodeHaierACYRW02 KEYWORD2 +decodeHash KEYWORD2 +decodeHitachiAC KEYWORD2 +decodeJVC KEYWORD2 +decodeKelvinator KEYWORD2 +decodeLG KEYWORD2 +decodeLasertag KEYWORD2 +decodeLutron KEYWORD2 +decodeMWM KEYWORD2 +decodeMagiQuest KEYWORD2 +decodeMidea KEYWORD2 +decodeMitsubishi KEYWORD2 +decodeMitsubishi2 KEYWORD2 +decodeMitsubishiAC KEYWORD2 +decodeNEC KEYWORD2 +decodeNikai KEYWORD2 +decodePanasonic KEYWORD2 +decodePanasonicAC KEYWORD2 +decodePioneer KEYWORD2 +decodeRC5 KEYWORD2 +decodeRC6 KEYWORD2 +decodeRCMM KEYWORD2 +decodeSAMSUNG KEYWORD2 +decodeSamsungAC KEYWORD2 +decodeSanyo KEYWORD2 +decodeSanyoLC7461 KEYWORD2 +decodeSharp KEYWORD2 +decodeSony KEYWORD2 +decodeToshibaAC KEYWORD2 +decodeWhirlpoolAC KEYWORD2 +decodeWhynter KEYWORD2 +disableIRIn KEYWORD2 +disableOffTimer KEYWORD2 +disableOnTimer KEYWORD2 +elapsed KEYWORD2 +enableIRIn KEYWORD2 +enableIROut KEYWORD2 +enableOffTimer KEYWORD2 +enableOnTimer KEYWORD2 +encodeJVC KEYWORD2 +encodeLG KEYWORD2 +encodeMagiQuest KEYWORD2 +encodeNEC KEYWORD2 +encodePanasonic KEYWORD2 +encodePioneer KEYWORD2 +encodeRC5 KEYWORD2 +encodeRC5X KEYWORD2 +encodeRC6 KEYWORD2 +encodeSAMSUNG KEYWORD2 +encodeSanyoLC7461 KEYWORD2 +encodeSharp KEYWORD2 +encodeSony KEYWORD2 +encodeTime KEYWORD2 +fixChecksum KEYWORD2 +fixup KEYWORD2 +getBeep KEYWORD2 +getBit KEYWORD2 +getBufSize KEYWORD2 +getButton KEYWORD2 +getClean KEYWORD2 +getClock KEYWORD2 +getCmd KEYWORD2 +getCommand KEYWORD2 +getCoolMode KEYWORD2 +getCorrectedRawLength KEYWORD2 +getCurrTime KEYWORD2 +getCurrentTime KEYWORD2 +getEcono KEYWORD2 +getEye KEYWORD2 +getFan KEYWORD2 +getFanSpeed KEYWORD2 +getFlap KEYWORD2 +getHealth KEYWORD2 +getHeatMode KEYWORD2 +getIonFilter KEYWORD2 +getLed KEYWORD2 +getLight KEYWORD2 +getMax KEYWORD2 +getMode KEYWORD2 +getMold KEYWORD2 +getNight KEYWORD2 +getOffTime KEYWORD2 +getOffTimer KEYWORD2 +getOffTimerEnabled KEYWORD2 +getOnTime KEYWORD2 +getOnTimer KEYWORD2 +getOnTimerEnabled KEYWORD2 +getPower KEYWORD2 +getPowerful KEYWORD2 +getQuiet KEYWORD2 +getRClevel KEYWORD2 +getRaw KEYWORD2 +getSensor KEYWORD2 +getSensorTemp KEYWORD2 +getSleep KEYWORD2 +getSpeed KEYWORD2 +getStartClock KEYWORD2 +getStateLength KEYWORD2 +getStopClock KEYWORD2 +getSwing KEYWORD2 +getSwingHorizontal KEYWORD2 +getSwingVertical KEYWORD2 +getSwingVerticalAuto KEYWORD2 +getSwingVerticalPosition KEYWORD2 +getTemp KEYWORD2 +getTempRaw KEYWORD2 +getTime KEYWORD2 +getTimer KEYWORD2 +getTurbo KEYWORD2 +getVane KEYWORD2 +getXFan KEYWORD2 +getZoneFollow KEYWORD2 +getiFeel KEYWORD2 +hasACState KEYWORD2 +invertBits KEYWORD2 +isOffTimerEnabled KEYWORD2 +isOnTimerEnabled KEYWORD2 +ledOff KEYWORD2 +ledOn KEYWORD2 +mark KEYWORD2 +match KEYWORD2 +matchAtLeast KEYWORD2 +matchData KEYWORD2 +matchMark KEYWORD2 +matchSpace KEYWORD2 +off KEYWORD2 +on KEYWORD2 +printState KEYWORD2 +readbits KEYWORD2 +renderTime KEYWORD2 +reset KEYWORD2 +resultToHexidecimal KEYWORD2 +resultToHumanReadableBasic KEYWORD2 +resultToSourceCode KEYWORD2 +resultToTimingInfo KEYWORD2 +resume KEYWORD2 +reverseBits KEYWORD2 +send KEYWORD2 +sendAiwaRCT501 KEYWORD2 +sendArgo KEYWORD2 +sendCOOLIX KEYWORD2 +sendCarrierAC KEYWORD2 +sendDISH KEYWORD2 +sendDaikin KEYWORD2 +sendData KEYWORD2 +sendDenon KEYWORD2 +sendElectraAC KEYWORD2 +sendExtended KEYWORD2 +sendFujitsuAC KEYWORD2 +sendGC KEYWORD2 +sendGICable KEYWORD2 +sendGeneric KEYWORD2 +sendGree KEYWORD2 +sendHaierAC KEYWORD2 +sendHaierACYRW02 KEYWORD2 +sendHitachiAC KEYWORD2 +sendHitachiAC1 KEYWORD2 +sendHitachiAC2 KEYWORD2 +sendJVC KEYWORD2 +sendKelvinator KEYWORD2 +sendLG KEYWORD2 +sendLG2 KEYWORD2 +sendLasertag KEYWORD2 +sendLutron KEYWORD2 +sendMWM KEYWORD2 +sendMagiQuest KEYWORD2 +sendMidea KEYWORD2 +sendMitsubishi KEYWORD2 +sendMitsubishi2 KEYWORD2 +sendMitsubishiAC KEYWORD2 +sendNEC KEYWORD2 +sendNikai KEYWORD2 +sendPanasonic KEYWORD2 +sendPanasonic64 KEYWORD2 +sendPanasonicAC KEYWORD2 +sendPioneer KEYWORD2 +sendPronto KEYWORD2 +sendRC5 KEYWORD2 +sendRC6 KEYWORD2 +sendRCMM KEYWORD2 +sendRaw KEYWORD2 +sendSAMSUNG KEYWORD2 +sendSamsungAC KEYWORD2 +sendSanyoLC7461 KEYWORD2 +sendSharp KEYWORD2 +sendSharpRaw KEYWORD2 +sendSherwood KEYWORD2 +sendSony KEYWORD2 +sendToshibaAC KEYWORD2 +sendTrotec KEYWORD2 +sendWhirlpoolAC KEYWORD2 +sendWhynter KEYWORD2 +serialPrintUint64 KEYWORD2 +setBeep KEYWORD2 +setBit KEYWORD2 +setButton KEYWORD2 +setClean KEYWORD2 +setClock KEYWORD2 +setCmd KEYWORD2 +setCommand KEYWORD2 +setCoolMode KEYWORD2 +setCurrTime KEYWORD2 +setCurrentTime KEYWORD2 +setEcono KEYWORD2 +setEye KEYWORD2 +setFan KEYWORD2 +setFanSpeed KEYWORD2 +setFlap KEYWORD2 +setHealth KEYWORD2 +setHeatMode KEYWORD2 +setIonFilter KEYWORD2 +setLed KEYWORD2 +setLight KEYWORD2 +setMax KEYWORD2 +setMode KEYWORD2 +setModel KEYWORD2 +setMold KEYWORD2 +setNight KEYWORD2 +setOffTimer KEYWORD2 +setOnTimer KEYWORD2 +setPower KEYWORD2 +setPowerful KEYWORD2 +setQuiet KEYWORD2 +setRaw KEYWORD2 +setRoomTemp KEYWORD2 +setSensor KEYWORD2 +setSensorTemp KEYWORD2 +setSensorTempRaw KEYWORD2 +setSleep KEYWORD2 +setSpeed KEYWORD2 +setStartClock KEYWORD2 +setStopClock KEYWORD2 +setSwing KEYWORD2 +setSwingHorizontal KEYWORD2 +setSwingVertical KEYWORD2 +setTemp KEYWORD2 +setTempRaw KEYWORD2 +setTime KEYWORD2 +setTimer KEYWORD2 +setTurbo KEYWORD2 +setUnknownThreshold KEYWORD2 +setVane KEYWORD2 +setXFan KEYWORD2 +setZoneFollow KEYWORD2 +setiFeel KEYWORD2 +space KEYWORD2 +stateReset KEYWORD2 +stepHoriz KEYWORD2 +stepVert KEYWORD2 +sumBytes KEYWORD2 +ticksHigh KEYWORD2 +ticksLow KEYWORD2 +timeToString KEYWORD2 +toString KEYWORD2 +toggleRC5 KEYWORD2 +toggleRC6 KEYWORD2 +typeToString KEYWORD2 +uint64ToString KEYWORD2 +validChecksum KEYWORD2 + +####################################### +# Constants (LITERAL1) +####################################### + +AIWA_RC_T501 LITERAL1 +AIWA_RC_T501_BITS LITERAL1 +ALLOW_DELAY_CALLS LITERAL1 +ARDB1 LITERAL1 +ARGO LITERAL1 +ARGO_COMMAND_LENGTH LITERAL1 +ARGO_COOL_AUTO LITERAL1 +ARGO_COOL_OFF LITERAL1 +ARGO_COOL_ON LITERAL1 +ARGO_COOl_HUM LITERAL1 +ARGO_FAN_1 LITERAL1 +ARGO_FAN_2 LITERAL1 +ARGO_FAN_3 LITERAL1 +ARGO_FAN_AUTO LITERAL1 +ARGO_FLAP_1 LITERAL1 +ARGO_FLAP_2 LITERAL1 +ARGO_FLAP_3 LITERAL1 +ARGO_FLAP_4 LITERAL1 +ARGO_FLAP_5 LITERAL1 +ARGO_FLAP_6 LITERAL1 +ARGO_FLAP_AUTO LITERAL1 +ARGO_FLAP_FULL LITERAL1 +ARGO_HEAT_AUTO LITERAL1 +ARGO_HEAT_BLINK LITERAL1 +ARGO_HEAT_ON LITERAL1 +ARGO_MAX_TEMP LITERAL1 +ARGO_MIN_TEMP LITERAL1 +ARRAH2E LITERAL1 +CARRIER_AC LITERAL1 +CARRIER_AC_BITS LITERAL1 +COOLIX LITERAL1 +COOLIX_BITS LITERAL1 +DAIKIN LITERAL1 +DAIKIN_AUTO LITERAL1 +DAIKIN_COMMAND_LENGTH LITERAL1 +DAIKIN_COOL LITERAL1 +DAIKIN_DEBUG LITERAL1 +DAIKIN_DRY LITERAL1 +DAIKIN_FAN LITERAL1 +DAIKIN_FAN_AUTO LITERAL1 +DAIKIN_FAN_MAX LITERAL1 +DAIKIN_FAN_MIN LITERAL1 +DAIKIN_FAN_QUIET LITERAL1 +DAIKIN_HEAT LITERAL1 +DAIKIN_MAX_TEMP LITERAL1 +DAIKIN_MIN_TEMP LITERAL1 +DECODE_AC LITERAL1 +DECODE_AIWA_RC_T501 LITERAL1 +DECODE_ARGO LITERAL1 +DECODE_CARRIER_AC LITERAL1 +DECODE_COOLIX LITERAL1 +DECODE_DAIKIN LITERAL1 +DECODE_DENON LITERAL1 +DECODE_DISH LITERAL1 +DECODE_ELECTRA_AC LITERAL1 +DECODE_FUJITSU_AC LITERAL1 +DECODE_GICABLE LITERAL1 +DECODE_GLOBALCACHE LITERAL1 +DECODE_GREE LITERAL1 +DECODE_HAIER_AC LITERAL1 +DECODE_HAIER_AC_YRW02 LITERAL1 +DECODE_HASH LITERAL1 +DECODE_HITACHI_AC LITERAL1 +DECODE_HITACHI_AC1 LITERAL1 +DECODE_HITACHI_AC2 LITERAL1 +DECODE_JVC LITERAL1 +DECODE_KELVINATOR LITERAL1 +DECODE_LASERTAG LITERAL1 +DECODE_LG LITERAL1 +DECODE_LUTRON LITERAL1 +DECODE_MAGIQUEST LITERAL1 +DECODE_MIDEA LITERAL1 +DECODE_MITSUBISHI LITERAL1 +DECODE_MITSUBISHI2 LITERAL1 +DECODE_MITSUBISHI_AC LITERAL1 +DECODE_MWM LITERAL1 +DECODE_NEC LITERAL1 +DECODE_NIKAI LITERAL1 +DECODE_PANASONIC LITERAL1 +DECODE_PANASONIC_AC LITERAL1 +DECODE_PIONEER LITERAL1 +DECODE_PRONTO LITERAL1 +DECODE_RC5 LITERAL1 +DECODE_RC6 LITERAL1 +DECODE_RCMM LITERAL1 +DECODE_SAMSUNG LITERAL1 +DECODE_SAMSUNG_AC LITERAL1 +DECODE_SANYO LITERAL1 +DECODE_SHARP LITERAL1 +DECODE_SHERWOOD LITERAL1 +DECODE_SONY LITERAL1 +DECODE_TOSHIBA_AC LITERAL1 +DECODE_TROTEC LITERAL1 +DECODE_WHIRLPOOL_AC LITERAL1 +DECODE_WHYNTER LITERAL1 +DENON LITERAL1 +DENON_48_BITS LITERAL1 +DENON_BITS LITERAL1 +DENON_LEGACY_BITS LITERAL1 +DISH LITERAL1 +DISH_BITS LITERAL1 +ELECTRA_AC LITERAL1 +FUJITSU_AC LITERAL1 +FUJITSU_AC_BITS LITERAL1 +FUJITSU_AC_CMD_STAY_ON LITERAL1 +FUJITSU_AC_CMD_STEP_HORIZ LITERAL1 +FUJITSU_AC_CMD_STEP_VERT LITERAL1 +FUJITSU_AC_CMD_TURN_OFF LITERAL1 +FUJITSU_AC_CMD_TURN_ON LITERAL1 +FUJITSU_AC_FAN_AUTO LITERAL1 +FUJITSU_AC_FAN_HIGH LITERAL1 +FUJITSU_AC_FAN_LOW LITERAL1 +FUJITSU_AC_FAN_MED LITERAL1 +FUJITSU_AC_FAN_QUIET LITERAL1 +FUJITSU_AC_MAX_TEMP LITERAL1 +FUJITSU_AC_MIN_BITS LITERAL1 +FUJITSU_AC_MIN_REPEAT LITERAL1 +FUJITSU_AC_MIN_TEMP LITERAL1 +FUJITSU_AC_MODE_AUTO LITERAL1 +FUJITSU_AC_MODE_COOL LITERAL1 +FUJITSU_AC_MODE_DRY LITERAL1 +FUJITSU_AC_MODE_FAN LITERAL1 +FUJITSU_AC_MODE_HEAT LITERAL1 +FUJITSU_AC_STATE_LENGTH LITERAL1 +FUJITSU_AC_STATE_LENGTH_SHORT LITERAL1 +FUJITSU_AC_SWING_BOTH LITERAL1 +FUJITSU_AC_SWING_HORIZ LITERAL1 +FUJITSU_AC_SWING_OFF LITERAL1 +FUJITSU_AC_SWING_VERT LITERAL1 +GICABLE LITERAL1 +GICABLE_BITS LITERAL1 +GLOBALCACHE LITERAL1 +GREE LITERAL1 +GREE_AUTO LITERAL1 +GREE_COOL LITERAL1 +GREE_DRY LITERAL1 +GREE_FAN LITERAL1 +GREE_FAN_MAX LITERAL1 +GREE_HEAT LITERAL1 +GREE_MAX_TEMP LITERAL1 +GREE_MIN_TEMP LITERAL1 +GREE_STATE_LENGTH LITERAL1 +GREE_SWING_AUTO LITERAL1 +GREE_SWING_DOWN LITERAL1 +GREE_SWING_DOWN_AUTO LITERAL1 +GREE_SWING_LAST_POS LITERAL1 +GREE_SWING_MIDDLE LITERAL1 +GREE_SWING_MIDDLE_AUTO LITERAL1 +GREE_SWING_MIDDLE_DOWN LITERAL1 +GREE_SWING_MIDDLE_UP LITERAL1 +GREE_SWING_UP LITERAL1 +GREE_SWING_UP_AUTO LITERAL1 +HAIER_AC LITERAL1 +HAIER_AC_AUTO LITERAL1 +HAIER_AC_CMD_FAN LITERAL1 +HAIER_AC_CMD_HEALTH LITERAL1 +HAIER_AC_CMD_MODE LITERAL1 +HAIER_AC_CMD_OFF LITERAL1 +HAIER_AC_CMD_ON LITERAL1 +HAIER_AC_CMD_SLEEP LITERAL1 +HAIER_AC_CMD_SWING LITERAL1 +HAIER_AC_CMD_TEMP_DOWN LITERAL1 +HAIER_AC_CMD_TEMP_UP LITERAL1 +HAIER_AC_CMD_TIMER_CANCEL LITERAL1 +HAIER_AC_CMD_TIMER_SET LITERAL1 +HAIER_AC_COOL LITERAL1 +HAIER_AC_DEF_TEMP LITERAL1 +HAIER_AC_DRY LITERAL1 +HAIER_AC_FAN LITERAL1 +HAIER_AC_FAN_AUTO LITERAL1 +HAIER_AC_FAN_HIGH LITERAL1 +HAIER_AC_FAN_LOW LITERAL1 +HAIER_AC_FAN_MED LITERAL1 +HAIER_AC_HEAT LITERAL1 +HAIER_AC_MAX_TEMP LITERAL1 +HAIER_AC_MIN_TEMP LITERAL1 +HAIER_AC_STATE_LENGTH LITERAL1 +HAIER_AC_SWING_CHG LITERAL1 +HAIER_AC_SWING_DOWN LITERAL1 +HAIER_AC_SWING_OFF LITERAL1 +HAIER_AC_SWING_UP LITERAL1 +HAIER_AC_YRW02 LITERAL1 +HAIER_AC_YRW02_AUTO LITERAL1 +HAIER_AC_YRW02_BUTTON_FAN LITERAL1 +HAIER_AC_YRW02_BUTTON_HEALTH LITERAL1 +HAIER_AC_YRW02_BUTTON_MODE LITERAL1 +HAIER_AC_YRW02_BUTTON_POWER LITERAL1 +HAIER_AC_YRW02_BUTTON_SLEEP LITERAL1 +HAIER_AC_YRW02_BUTTON_SWING LITERAL1 +HAIER_AC_YRW02_BUTTON_TEMP_DOWN LITERAL1 +HAIER_AC_YRW02_BUTTON_TEMP_UP LITERAL1 +HAIER_AC_YRW02_BUTTON_TURBO LITERAL1 +HAIER_AC_YRW02_COOL LITERAL1 +HAIER_AC_YRW02_DRY LITERAL1 +HAIER_AC_YRW02_FAN LITERAL1 +HAIER_AC_YRW02_FAN_AUTO LITERAL1 +HAIER_AC_YRW02_FAN_HIGH LITERAL1 +HAIER_AC_YRW02_FAN_LOW LITERAL1 +HAIER_AC_YRW02_FAN_MED LITERAL1 +HAIER_AC_YRW02_HEAT LITERAL1 +HAIER_AC_YRW02_STATE_LENGTH LITERAL1 +HAIER_AC_YRW02_SWING_AUTO LITERAL1 +HAIER_AC_YRW02_SWING_BOTTOM LITERAL1 +HAIER_AC_YRW02_SWING_DOWN LITERAL1 +HAIER_AC_YRW02_SWING_MIDDLE LITERAL1 +HAIER_AC_YRW02_SWING_OFF LITERAL1 +HAIER_AC_YRW02_SWING_TOP LITERAL1 +HAIER_AC_YRW02_TURBO_HIGH LITERAL1 +HAIER_AC_YRW02_TURBO_LOW LITERAL1 +HAIER_AC_YRW02_TURBO_OFF LITERAL1 +HIGH LITERAL1 +HITACHI_AC LITERAL1 +HITACHI_AC1 LITERAL1 +HITACHI_AC1_BITS LITERAL1 +HITACHI_AC1_STATE_LENGTH LITERAL1 +HITACHI_AC2 LITERAL1 +HITACHI_AC2_BITS LITERAL1 +HITACHI_AC2_STATE_LENGTH LITERAL1 +HITACHI_AC_BITS LITERAL1 +HITACHI_AC_STATE_LENGTH LITERAL1 +ICACHE_RAM_ATTR LITERAL1 +JVC LITERAL1 +JVC_BITS LITERAL1 +KELVINATOR LITERAL1 +KELVINATOR_AUTO LITERAL1 +KELVINATOR_AUTO_TEMP LITERAL1 +KELVINATOR_BASIC_FAN_MAX LITERAL1 +KELVINATOR_COOL LITERAL1 +KELVINATOR_DRY LITERAL1 +KELVINATOR_FAN LITERAL1 +KELVINATOR_FAN_AUTO LITERAL1 +KELVINATOR_FAN_MAX LITERAL1 +KELVINATOR_HEAT LITERAL1 +KELVINATOR_MAX_TEMP LITERAL1 +KELVINATOR_MIN_TEMP LITERAL1 +KELVINATOR_STATE_LENGTH LITERAL1 +LASERTAG LITERAL1 +LASERTAG_BITS LITERAL1 +LG LITERAL1 +LG2 LITERAL1 +LG32_BITS LITERAL1 +LG_BITS LITERAL1 +LOW LITERAL1 +LUTRON LITERAL1 +MAGIQUEST LITERAL1 +MAGIQUEST_BITS LITERAL1 +MIDEA LITERAL1 +MIDEA_AC_AUTO LITERAL1 +MIDEA_AC_COOL LITERAL1 +MIDEA_AC_DRY LITERAL1 +MIDEA_AC_FAN LITERAL1 +MIDEA_AC_FAN_AUTO LITERAL1 +MIDEA_AC_FAN_HI LITERAL1 +MIDEA_AC_FAN_LOW LITERAL1 +MIDEA_AC_FAN_MED LITERAL1 +MIDEA_AC_HEAT LITERAL1 +MIDEA_AC_MAX_TEMP_C LITERAL1 +MIDEA_AC_MAX_TEMP_F LITERAL1 +MIDEA_AC_MIN_TEMP_C LITERAL1 +MIDEA_AC_MIN_TEMP_F LITERAL1 +MIDEA_AC_POWER LITERAL1 +MIDEA_AC_SLEEP LITERAL1 +MIDEA_BITS LITERAL1 +MITSUBISHI LITERAL1 +MITSUBISHI2 LITERAL1 +MITSUBISHI_AC LITERAL1 +MITSUBISHI_AC_AUTO LITERAL1 +MITSUBISHI_AC_COOL LITERAL1 +MITSUBISHI_AC_DRY LITERAL1 +MITSUBISHI_AC_FAN_AUTO LITERAL1 +MITSUBISHI_AC_FAN_MAX LITERAL1 +MITSUBISHI_AC_FAN_REAL_MAX LITERAL1 +MITSUBISHI_AC_FAN_SILENT LITERAL1 +MITSUBISHI_AC_HEAT LITERAL1 +MITSUBISHI_AC_MAX_TEMP LITERAL1 +MITSUBISHI_AC_MIN_TEMP LITERAL1 +MITSUBISHI_AC_POWER LITERAL1 +MITSUBISHI_AC_STATE_LENGTH LITERAL1 +MITSUBISHI_AC_VANE_AUTO LITERAL1 +MITSUBISHI_AC_VANE_AUTO_MOVE LITERAL1 +MITSUBISHI_BITS LITERAL1 +MWM LITERAL1 +NEC LITERAL1 +NEC_BITS LITERAL1 +NEC_LIKE LITERAL1 +NIKAI LITERAL1 +NIKAI_BITS LITERAL1 +ONCE LITERAL1 +PANASONIC LITERAL1 +PANASONIC_AC LITERAL1 +PANASONIC_BITS LITERAL1 +PIONEER LITERAL1 +PRONTO LITERAL1 +RAW LITERAL1 +RAWTICK LITERAL1 +RC5 LITERAL1 +RC5X LITERAL1 +RC5X_BITS LITERAL1 +RC5_BITS LITERAL1 +RC6 LITERAL1 +RC6_36_BITS LITERAL1 +RC6_MODE0_BITS LITERAL1 +RCMM LITERAL1 +RCMM_BITS LITERAL1 +SAMSUNG LITERAL1 +SAMSUNG_AC LITERAL1 +SAMSUNG_BITS LITERAL1 +SANYO LITERAL1 +SANYO_LC7461 LITERAL1 +SANYO_LC7461_BITS LITERAL1 +SANYO_SA8650B_BITS LITERAL1 +SEND_AIWA_RC_T501 LITERAL1 +SEND_ARGO LITERAL1 +SEND_CARRIER_AC LITERAL1 +SEND_COOLIX LITERAL1 +SEND_DAIKIN LITERAL1 +SEND_DENON LITERAL1 +SEND_DISH LITERAL1 +SEND_ELECTRA_AC LITERAL1 +SEND_FUJITSU_AC LITERAL1 +SEND_GICABLE LITERAL1 +SEND_GLOBALCACHE LITERAL1 +SEND_GREE LITERAL1 +SEND_HAIER_AC LITERAL1 +SEND_HAIER_AC_YRW02 LITERAL1 +SEND_HITACHI_AC LITERAL1 +SEND_HITACHI_AC1 LITERAL1 +SEND_HITACHI_AC2 LITERAL1 +SEND_JVC LITERAL1 +SEND_KELVINATOR LITERAL1 +SEND_LASERTAG LITERAL1 +SEND_LG LITERAL1 +SEND_LUTRON LITERAL1 +SEND_MAGIQUEST LITERAL1 +SEND_MIDEA LITERAL1 +SEND_MITSUBISHI LITERAL1 +SEND_MITSUBISHI2 LITERAL1 +SEND_MITSUBISHI_AC LITERAL1 +SEND_MWM LITERAL1 +SEND_NEC LITERAL1 +SEND_NIKAI LITERAL1 +SEND_PANASONIC LITERAL1 +SEND_PANASONIC_AC LITERAL1 +SEND_PIONEER LITERAL1 +SEND_PRONTO LITERAL1 +SEND_RAW LITERAL1 +SEND_RC5 LITERAL1 +SEND_RC6 LITERAL1 +SEND_RCMM LITERAL1 +SEND_SAMSUNG LITERAL1 +SEND_SAMSUNG_AC LITERAL1 +SEND_SANYO LITERAL1 +SEND_SHARP LITERAL1 +SEND_SHERWOOD LITERAL1 +SEND_SONY LITERAL1 +SEND_TOSHIBA_AC LITERAL1 +SEND_TROTEC LITERAL1 +SEND_WHIRLPOOL_AC LITERAL1 +SEND_WHYNTER LITERAL1 +SHARP LITERAL1 +SHARP_BITS LITERAL1 +SHERWOOD LITERAL1 +SHERWOOD_BITS LITERAL1 +SONY LITERAL1 +SONY_12_BITS LITERAL1 +SONY_15_BITS LITERAL1 +SONY_20_BITS LITERAL1 +TIMEOUT_MS LITERAL1 +TOSHIBA_AC LITERAL1 +TOSHIBA_AC_AUTO LITERAL1 +TOSHIBA_AC_COOL LITERAL1 +TOSHIBA_AC_DRY LITERAL1 +TOSHIBA_AC_FAN_AUTO LITERAL1 +TOSHIBA_AC_FAN_MAX LITERAL1 +TOSHIBA_AC_HEAT LITERAL1 +TOSHIBA_AC_MAX_TEMP LITERAL1 +TOSHIBA_AC_MIN_TEMP LITERAL1 +TOSHIBA_AC_POWER LITERAL1 +TOSHIBA_AC_STATE_LENGTH LITERAL1 +TROTEC LITERAL1 +TROTEC_AUTO LITERAL1 +TROTEC_COMMAND_LENGTH LITERAL1 +TROTEC_COOL LITERAL1 +TROTEC_DRY LITERAL1 +TROTEC_FAN LITERAL1 +TROTEC_FAN_HIGH LITERAL1 +TROTEC_FAN_LOW LITERAL1 +TROTEC_FAN_MED LITERAL1 +TROTEC_MAX_TEMP LITERAL1 +TROTEC_MAX_TIMER LITERAL1 +TROTEC_MIN_TEMP LITERAL1 +TROTEC_MIN_TIMER LITERAL1 +UNKNOWN LITERAL1 +UNUSED LITERAL1 +WHIRLPOOL_AC LITERAL1 +WHYNTER LITERAL1 +WHYNTER_BITS LITERAL1 +kAiwaRcT501Bits LITERAL1 +kAiwaRcT501MinRepeats LITERAL1 +kAiwaRcT501PostBits LITERAL1 +kAiwaRcT501PostData LITERAL1 +kAiwaRcT501PreBits LITERAL1 +kAiwaRcT501PreData LITERAL1 +kArgoBitMark LITERAL1 +kArgoCoolAuto LITERAL1 +kArgoCoolHum LITERAL1 +kArgoCoolOff LITERAL1 +kArgoCoolOn LITERAL1 +kArgoFan1 LITERAL1 +kArgoFan2 LITERAL1 +kArgoFan3 LITERAL1 +kArgoFanAuto LITERAL1 +kArgoFlap1 LITERAL1 +kArgoFlap2 LITERAL1 +kArgoFlap3 LITERAL1 +kArgoFlap4 LITERAL1 +kArgoFlap5 LITERAL1 +kArgoFlap6 LITERAL1 +kArgoFlapAuto LITERAL1 +kArgoFlapFull LITERAL1 +kArgoHdrMark LITERAL1 +kArgoHdrSpace LITERAL1 +kArgoHeatAuto LITERAL1 +kArgoHeatBlink LITERAL1 +kArgoHeatOn LITERAL1 +kArgoMaxTemp LITERAL1 +kArgoMinTemp LITERAL1 +kArgoOneSpace LITERAL1 +kArgoStateLength LITERAL1 +kArgoZeroSpace LITERAL1 +kCarrierAcBitMark LITERAL1 +kCarrierAcBits LITERAL1 +kCarrierAcGap LITERAL1 +kCarrierAcHdrMark LITERAL1 +kCarrierAcHdrSpace LITERAL1 +kCarrierAcMinRepeat LITERAL1 +kCarrierAcOneSpace LITERAL1 +kCarrierAcZeroSpace LITERAL1 +kCoolixAuto LITERAL1 +kCoolixBitMark LITERAL1 +kCoolixBitMarkTicks LITERAL1 +kCoolixBits LITERAL1 +kCoolixClean LITERAL1 +kCoolixCool LITERAL1 +kCoolixDefaultState LITERAL1 +kCoolixDry LITERAL1 +kCoolixFan LITERAL1 +kCoolixFanAuto LITERAL1 +kCoolixFanFixed LITERAL1 +kCoolixFanMask LITERAL1 +kCoolixFanMax LITERAL1 +kCoolixFanMed LITERAL1 +kCoolixFanMin LITERAL1 +kCoolixFanTempCode LITERAL1 +kCoolixFanZoneFollow LITERAL1 +kCoolixHdrMark LITERAL1 +kCoolixHdrMarkTicks LITERAL1 +kCoolixHdrSpace LITERAL1 +kCoolixHdrSpaceTicks LITERAL1 +kCoolixHeat LITERAL1 +kCoolixLed LITERAL1 +kCoolixMinGap LITERAL1 +kCoolixMinGapTicks LITERAL1 +kCoolixModeMask LITERAL1 +kCoolixOff LITERAL1 +kCoolixOneSpace LITERAL1 +kCoolixOneSpaceTicks LITERAL1 +kCoolixPrefix LITERAL1 +kCoolixSensorTempIgnoreCode LITERAL1 +kCoolixSensorTempMask LITERAL1 +kCoolixSensorTempMax LITERAL1 +kCoolixSensorTempMin LITERAL1 +kCoolixSleep LITERAL1 +kCoolixSwing LITERAL1 +kCoolixTempMap LITERAL1 +kCoolixTempMask LITERAL1 +kCoolixTempMax LITERAL1 +kCoolixTempMin LITERAL1 +kCoolixTempRange LITERAL1 +kCoolixTick LITERAL1 +kCoolixTurbo LITERAL1 +kCoolixUnknown LITERAL1 +kCoolixZeroSpace LITERAL1 +kCoolixZeroSpaceTicks LITERAL1 +kCoolixZoneFollowMask LITERAL1 +kDaikinAuto LITERAL1 +kDaikinBitEcono LITERAL1 +kDaikinBitEye LITERAL1 +kDaikinBitMark LITERAL1 +kDaikinBitMold LITERAL1 +kDaikinBitOffTimer LITERAL1 +kDaikinBitOnTimer LITERAL1 +kDaikinBitPower LITERAL1 +kDaikinBitPowerful LITERAL1 +kDaikinBitSensor LITERAL1 +kDaikinBitSilent LITERAL1 +kDaikinBits LITERAL1 +kDaikinByteEcono LITERAL1 +kDaikinByteEye LITERAL1 +kDaikinByteMold LITERAL1 +kDaikinByteOffTimer LITERAL1 +kDaikinByteOnTimer LITERAL1 +kDaikinBytePower LITERAL1 +kDaikinBytePowerful LITERAL1 +kDaikinByteSensor LITERAL1 +kDaikinByteSilent LITERAL1 +kDaikinCool LITERAL1 +kDaikinCurBit LITERAL1 +kDaikinCurIndex LITERAL1 +kDaikinDry LITERAL1 +kDaikinFan LITERAL1 +kDaikinFanAuto LITERAL1 +kDaikinFanMax LITERAL1 +kDaikinFanMin LITERAL1 +kDaikinFanQuiet LITERAL1 +kDaikinFirstHeader64 LITERAL1 +kDaikinGap LITERAL1 +kDaikinHdrMark LITERAL1 +kDaikinHdrSpace LITERAL1 +kDaikinHeat LITERAL1 +kDaikinMarkExcess LITERAL1 +kDaikinMaxTemp LITERAL1 +kDaikinMinTemp LITERAL1 +kDaikinOneSpace LITERAL1 +kDaikinRawBits LITERAL1 +kDaikinStateLength LITERAL1 +kDaikinTolerance LITERAL1 +kDaikinZeroSpace LITERAL1 +kDenonBitMark LITERAL1 +kDenonBitMarkTicks LITERAL1 +kDenonBits LITERAL1 +kDenonHdrMark LITERAL1 +kDenonHdrMarkTicks LITERAL1 +kDenonHdrSpace LITERAL1 +kDenonHdrSpaceTicks LITERAL1 +kDenonLegacyBits LITERAL1 +kDenonManufacturer LITERAL1 +kDenonMinCommandLengthTicks LITERAL1 +kDenonMinGap LITERAL1 +kDenonMinGapTicks LITERAL1 +kDenonOneSpace LITERAL1 +kDenonOneSpaceTicks LITERAL1 +kDenonTick LITERAL1 +kDenonZeroSpace LITERAL1 +kDenonZeroSpaceTicks LITERAL1 +kDishBitMark LITERAL1 +kDishBitMarkTicks LITERAL1 +kDishBits LITERAL1 +kDishHdrMark LITERAL1 +kDishHdrMarkTicks LITERAL1 +kDishHdrSpace LITERAL1 +kDishHdrSpaceTicks LITERAL1 +kDishMinRepeat LITERAL1 +kDishOneSpace LITERAL1 +kDishOneSpaceTicks LITERAL1 +kDishRptSpace LITERAL1 +kDishRptSpaceTicks LITERAL1 +kDishTick LITERAL1 +kDishZeroSpace LITERAL1 +kDishZeroSpaceTicks LITERAL1 +kDutyDefault LITERAL1 +kDutyMax LITERAL1 +kElectraAcBitMark LITERAL1 +kElectraAcBits LITERAL1 +kElectraAcHdrMark LITERAL1 +kElectraAcHdrSpace LITERAL1 +kElectraAcMessageGap LITERAL1 +kElectraAcOneSpace LITERAL1 +kElectraAcStateLength LITERAL1 +kElectraAcZeroSpace LITERAL1 +kFnvBasis32 LITERAL1 +kFnvPrime32 LITERAL1 +kFooter LITERAL1 +kFujitsuAcBitMark LITERAL1 +kFujitsuAcBits LITERAL1 +kFujitsuAcCmdStayOn LITERAL1 +kFujitsuAcCmdStepHoriz LITERAL1 +kFujitsuAcCmdStepVert LITERAL1 +kFujitsuAcCmdTurnOff LITERAL1 +kFujitsuAcCmdTurnOn LITERAL1 +kFujitsuAcFanAuto LITERAL1 +kFujitsuAcFanHigh LITERAL1 +kFujitsuAcFanLow LITERAL1 +kFujitsuAcFanMed LITERAL1 +kFujitsuAcFanQuiet LITERAL1 +kFujitsuAcHdrMark LITERAL1 +kFujitsuAcHdrSpace LITERAL1 +kFujitsuAcMaxTemp LITERAL1 +kFujitsuAcMinBits LITERAL1 +kFujitsuAcMinGap LITERAL1 +kFujitsuAcMinRepeat LITERAL1 +kFujitsuAcMinTemp LITERAL1 +kFujitsuAcModeAuto LITERAL1 +kFujitsuAcModeCool LITERAL1 +kFujitsuAcModeDry LITERAL1 +kFujitsuAcModeFan LITERAL1 +kFujitsuAcModeHeat LITERAL1 +kFujitsuAcOneSpace LITERAL1 +kFujitsuAcStateLength LITERAL1 +kFujitsuAcStateLengthShort LITERAL1 +kFujitsuAcSwingBoth LITERAL1 +kFujitsuAcSwingHoriz LITERAL1 +kFujitsuAcSwingOff LITERAL1 +kFujitsuAcSwingVert LITERAL1 +kFujitsuAcZeroSpace LITERAL1 +kGicableBitMark LITERAL1 +kGicableBits LITERAL1 +kGicableHdrMark LITERAL1 +kGicableHdrSpace LITERAL1 +kGicableMinCommandLength LITERAL1 +kGicableMinGap LITERAL1 +kGicableMinRepeat LITERAL1 +kGicableOneSpace LITERAL1 +kGicableRptSpace LITERAL1 +kGicableZeroSpace LITERAL1 +kGlobalCacheFreqIndex LITERAL1 +kGlobalCacheMaxRepeat LITERAL1 +kGlobalCacheMinUsec LITERAL1 +kGlobalCacheRptIndex LITERAL1 +kGlobalCacheRptStartIndex LITERAL1 +kGlobalCacheStartIndex LITERAL1 +kGreeAuto LITERAL1 +kGreeBitMark LITERAL1 +kGreeBits LITERAL1 +kGreeBlockFooter LITERAL1 +kGreeBlockFooterBits LITERAL1 +kGreeCool LITERAL1 +kGreeDry LITERAL1 +kGreeFan LITERAL1 +kGreeFanMask LITERAL1 +kGreeFanMax LITERAL1 +kGreeHdrMark LITERAL1 +kGreeHdrSpace LITERAL1 +kGreeHeat LITERAL1 +kGreeLightMask LITERAL1 +kGreeMaxTemp LITERAL1 +kGreeMinTemp LITERAL1 +kGreeModeMask LITERAL1 +kGreeMsgSpace LITERAL1 +kGreeOneSpace LITERAL1 +kGreePower1Mask LITERAL1 +kGreePower2Mask LITERAL1 +kGreeSleepMask LITERAL1 +kGreeStateLength LITERAL1 +kGreeSwingAuto LITERAL1 +kGreeSwingAutoMask LITERAL1 +kGreeSwingDown LITERAL1 +kGreeSwingDownAuto LITERAL1 +kGreeSwingLastPos LITERAL1 +kGreeSwingMiddle LITERAL1 +kGreeSwingMiddleAuto LITERAL1 +kGreeSwingMiddleDown LITERAL1 +kGreeSwingMiddleUp LITERAL1 +kGreeSwingPosMask LITERAL1 +kGreeSwingUp LITERAL1 +kGreeSwingUpAuto LITERAL1 +kGreeTurboMask LITERAL1 +kGreeXfanMask LITERAL1 +kGreeZeroSpace LITERAL1 +kHaierACBits LITERAL1 +kHaierACStateLength LITERAL1 +kHaierACYRW02Bits LITERAL1 +kHaierACYRW02StateLength LITERAL1 +kHaierAcAuto LITERAL1 +kHaierAcBitMark LITERAL1 +kHaierAcCmdFan LITERAL1 +kHaierAcCmdHealth LITERAL1 +kHaierAcCmdMode LITERAL1 +kHaierAcCmdOff LITERAL1 +kHaierAcCmdOn LITERAL1 +kHaierAcCmdSleep LITERAL1 +kHaierAcCmdSwing LITERAL1 +kHaierAcCmdTempDown LITERAL1 +kHaierAcCmdTempUp LITERAL1 +kHaierAcCmdTimerCancel LITERAL1 +kHaierAcCmdTimerSet LITERAL1 +kHaierAcCool LITERAL1 +kHaierAcDefTemp LITERAL1 +kHaierAcDry LITERAL1 +kHaierAcFan LITERAL1 +kHaierAcFanAuto LITERAL1 +kHaierAcFanHigh LITERAL1 +kHaierAcFanLow LITERAL1 +kHaierAcFanMed LITERAL1 +kHaierAcHdr LITERAL1 +kHaierAcHdrGap LITERAL1 +kHaierAcHeat LITERAL1 +kHaierAcMaxTemp LITERAL1 +kHaierAcMaxTime LITERAL1 +kHaierAcMinGap LITERAL1 +kHaierAcMinTemp LITERAL1 +kHaierAcOneSpace LITERAL1 +kHaierAcPrefix LITERAL1 +kHaierAcSwingChg LITERAL1 +kHaierAcSwingDown LITERAL1 +kHaierAcSwingOff LITERAL1 +kHaierAcSwingUp LITERAL1 +kHaierAcYrw02Auto LITERAL1 +kHaierAcYrw02ButtonFan LITERAL1 +kHaierAcYrw02ButtonHealth LITERAL1 +kHaierAcYrw02ButtonMode LITERAL1 +kHaierAcYrw02ButtonPower LITERAL1 +kHaierAcYrw02ButtonSleep LITERAL1 +kHaierAcYrw02ButtonSwing LITERAL1 +kHaierAcYrw02ButtonTempDown LITERAL1 +kHaierAcYrw02ButtonTempUp LITERAL1 +kHaierAcYrw02ButtonTurbo LITERAL1 +kHaierAcYrw02Cool LITERAL1 +kHaierAcYrw02Dry LITERAL1 +kHaierAcYrw02Fan LITERAL1 +kHaierAcYrw02FanAuto LITERAL1 +kHaierAcYrw02FanHigh LITERAL1 +kHaierAcYrw02FanLow LITERAL1 +kHaierAcYrw02FanMed LITERAL1 +kHaierAcYrw02Heat LITERAL1 +kHaierAcYrw02Power LITERAL1 +kHaierAcYrw02Prefix LITERAL1 +kHaierAcYrw02Sleep LITERAL1 +kHaierAcYrw02SwingAuto LITERAL1 +kHaierAcYrw02SwingBottom LITERAL1 +kHaierAcYrw02SwingDown LITERAL1 +kHaierAcYrw02SwingMiddle LITERAL1 +kHaierAcYrw02SwingOff LITERAL1 +kHaierAcYrw02SwingTop LITERAL1 +kHaierAcYrw02TurboHigh LITERAL1 +kHaierAcYrw02TurboLow LITERAL1 +kHaierAcYrw02TurboOff LITERAL1 +kHaierAcZeroSpace LITERAL1 +kHeader LITERAL1 +kHitachiAc1Bits LITERAL1 +kHitachiAc1HdrMark LITERAL1 +kHitachiAc1HdrSpace LITERAL1 +kHitachiAc1StateLength LITERAL1 +kHitachiAc2Bits LITERAL1 +kHitachiAc2StateLength LITERAL1 +kHitachiAcBitMark LITERAL1 +kHitachiAcBits LITERAL1 +kHitachiAcHdrMark LITERAL1 +kHitachiAcHdrSpace LITERAL1 +kHitachiAcMinGap LITERAL1 +kHitachiAcOneSpace LITERAL1 +kHitachiAcStateLength LITERAL1 +kHitachiAcZeroSpace LITERAL1 +kIdleState LITERAL1 +kJvcBitMark LITERAL1 +kJvcBitMarkTicks LITERAL1 +kJvcBits LITERAL1 +kJvcHdrMark LITERAL1 +kJvcHdrMarkTicks LITERAL1 +kJvcHdrSpace LITERAL1 +kJvcHdrSpaceTicks LITERAL1 +kJvcMinGap LITERAL1 +kJvcMinGapTicks LITERAL1 +kJvcOneSpace LITERAL1 +kJvcOneSpaceTicks LITERAL1 +kJvcRptLength LITERAL1 +kJvcRptLengthTicks LITERAL1 +kJvcTick LITERAL1 +kJvcZeroSpace LITERAL1 +kJvcZeroSpaceTicks LITERAL1 +kKelvinatorAuto LITERAL1 +kKelvinatorAutoTemp LITERAL1 +kKelvinatorBasicFanMask LITERAL1 +kKelvinatorBasicFanMax LITERAL1 +kKelvinatorBitMark LITERAL1 +kKelvinatorBitMarkTicks LITERAL1 +kKelvinatorBits LITERAL1 +kKelvinatorChecksumStart LITERAL1 +kKelvinatorCmdFooter LITERAL1 +kKelvinatorCmdFooterBits LITERAL1 +kKelvinatorCool LITERAL1 +kKelvinatorDry LITERAL1 +kKelvinatorFan LITERAL1 +kKelvinatorFanAuto LITERAL1 +kKelvinatorFanMask LITERAL1 +kKelvinatorFanMax LITERAL1 +kKelvinatorFanOffset LITERAL1 +kKelvinatorGapSpace LITERAL1 +kKelvinatorGapSpaceTicks LITERAL1 +kKelvinatorHdrMark LITERAL1 +kKelvinatorHdrMarkTicks LITERAL1 +kKelvinatorHdrSpace LITERAL1 +kKelvinatorHdrSpaceTicks LITERAL1 +kKelvinatorHeat LITERAL1 +kKelvinatorIonFilter LITERAL1 +kKelvinatorIonFilterOffset LITERAL1 +kKelvinatorLight LITERAL1 +kKelvinatorLightOffset LITERAL1 +kKelvinatorMaxTemp LITERAL1 +kKelvinatorMinTemp LITERAL1 +kKelvinatorModeMask LITERAL1 +kKelvinatorOneSpace LITERAL1 +kKelvinatorOneSpaceTicks LITERAL1 +kKelvinatorPower LITERAL1 +kKelvinatorQuiet LITERAL1 +kKelvinatorQuietOffset LITERAL1 +kKelvinatorSleep1And3 LITERAL1 +kKelvinatorStateLength LITERAL1 +kKelvinatorTick LITERAL1 +kKelvinatorTurbo LITERAL1 +kKelvinatorTurboOffset LITERAL1 +kKelvinatorVentSwing LITERAL1 +kKelvinatorVentSwingH LITERAL1 +kKelvinatorVentSwingOffset LITERAL1 +kKelvinatorVentSwingV LITERAL1 +kKelvinatorXfan LITERAL1 +kKelvinatorXfanOffset LITERAL1 +kKelvinatorZeroSpace LITERAL1 +kKelvinatorZeroSpaceTicks LITERAL1 +kLasertagBits LITERAL1 +kLasertagDelta LITERAL1 +kLasertagExcess LITERAL1 +kLasertagMinGap LITERAL1 +kLasertagMinRepeat LITERAL1 +kLasertagMinSamples LITERAL1 +kLasertagTick LITERAL1 +kLasertagTolerance LITERAL1 +kLg2BitMark LITERAL1 +kLg2BitMarkTicks LITERAL1 +kLg2HdrMark LITERAL1 +kLg2HdrMarkTicks LITERAL1 +kLg2HdrSpace LITERAL1 +kLg2HdrSpaceTicks LITERAL1 +kLg32Bits LITERAL1 +kLg32HdrMark LITERAL1 +kLg32HdrMarkTicks LITERAL1 +kLg32HdrSpace LITERAL1 +kLg32HdrSpaceTicks LITERAL1 +kLg32RptHdrMark LITERAL1 +kLg32RptHdrMarkTicks LITERAL1 +kLgBitMark LITERAL1 +kLgBitMarkTicks LITERAL1 +kLgBits LITERAL1 +kLgHdrMark LITERAL1 +kLgHdrMarkTicks LITERAL1 +kLgHdrSpace LITERAL1 +kLgHdrSpaceTicks LITERAL1 +kLgMinGap LITERAL1 +kLgMinGapTicks LITERAL1 +kLgMinMessageLength LITERAL1 +kLgMinMessageLengthTicks LITERAL1 +kLgOneSpace LITERAL1 +kLgOneSpaceTicks LITERAL1 +kLgRptSpace LITERAL1 +kLgRptSpaceTicks LITERAL1 +kLgTick LITERAL1 +kLgZeroSpace LITERAL1 +kLgZeroSpaceTicks LITERAL1 +kLutronBits LITERAL1 +kLutronDelta LITERAL1 +kLutronGap LITERAL1 +kLutronTick LITERAL1 +kMWMDelta LITERAL1 +kMWMExcess LITERAL1 +kMWMMaxWidth LITERAL1 +kMWMMinGap LITERAL1 +kMWMMinSamples LITERAL1 +kMWMTick LITERAL1 +kMWMTolerance LITERAL1 +kMagiQuestGap LITERAL1 +kMagiQuestMarkOne LITERAL1 +kMagiQuestMarkZero LITERAL1 +kMagiQuestOneRatio LITERAL1 +kMagiQuestSpaceOne LITERAL1 +kMagiQuestSpaceZero LITERAL1 +kMagiQuestTotalUsec LITERAL1 +kMagiQuestZeroRatio LITERAL1 +kMagiquestBits LITERAL1 +kMark LITERAL1 +kMarkExcess LITERAL1 +kMarkState LITERAL1 +kMaxAccurateUsecDelay LITERAL1 +kMaxTimeoutMs LITERAL1 +kMideaACAuto LITERAL1 +kMideaACChecksumMask LITERAL1 +kMideaACCool LITERAL1 +kMideaACDry LITERAL1 +kMideaACFan LITERAL1 +kMideaACFanAuto LITERAL1 +kMideaACFanHigh LITERAL1 +kMideaACFanLow LITERAL1 +kMideaACFanMask LITERAL1 +kMideaACFanMed LITERAL1 +kMideaACHeat LITERAL1 +kMideaACMaxTempC LITERAL1 +kMideaACMaxTempF LITERAL1 +kMideaACMinTempC LITERAL1 +kMideaACMinTempF LITERAL1 +kMideaACModeMask LITERAL1 +kMideaACPower LITERAL1 +kMideaACSleep LITERAL1 +kMideaACStateMask LITERAL1 +kMideaACTempMask LITERAL1 +kMideaBitMark LITERAL1 +kMideaBitMarkTicks LITERAL1 +kMideaBits LITERAL1 +kMideaHdrMark LITERAL1 +kMideaHdrMarkTicks LITERAL1 +kMideaHdrSpace LITERAL1 +kMideaHdrSpaceTicks LITERAL1 +kMideaMinGap LITERAL1 +kMideaMinGapTicks LITERAL1 +kMideaMinRepeat LITERAL1 +kMideaOneSpace LITERAL1 +kMideaOneSpaceTicks LITERAL1 +kMideaTick LITERAL1 +kMideaTolerance LITERAL1 +kMideaZeroSpace LITERAL1 +kMideaZeroSpaceTicks LITERAL1 +kMitsubishi2BitMark LITERAL1 +kMitsubishi2HdrMark LITERAL1 +kMitsubishi2HdrSpace LITERAL1 +kMitsubishi2MinGap LITERAL1 +kMitsubishi2OneSpace LITERAL1 +kMitsubishi2ZeroSpace LITERAL1 +kMitsubishiACBits LITERAL1 +kMitsubishiACMinRepeat LITERAL1 +kMitsubishiACStateLength LITERAL1 +kMitsubishiAcAuto LITERAL1 +kMitsubishiAcBitMark LITERAL1 +kMitsubishiAcCool LITERAL1 +kMitsubishiAcDry LITERAL1 +kMitsubishiAcFanAuto LITERAL1 +kMitsubishiAcFanMax LITERAL1 +kMitsubishiAcFanRealMax LITERAL1 +kMitsubishiAcFanSilent LITERAL1 +kMitsubishiAcHdrMark LITERAL1 +kMitsubishiAcHdrSpace LITERAL1 +kMitsubishiAcHeat LITERAL1 +kMitsubishiAcMaxTemp LITERAL1 +kMitsubishiAcMinTemp LITERAL1 +kMitsubishiAcNoTimer LITERAL1 +kMitsubishiAcOneSpace LITERAL1 +kMitsubishiAcPower LITERAL1 +kMitsubishiAcRptMark LITERAL1 +kMitsubishiAcRptSpace LITERAL1 +kMitsubishiAcStartStopTimer LITERAL1 +kMitsubishiAcStartTimer LITERAL1 +kMitsubishiAcStopTimer LITERAL1 +kMitsubishiAcVaneAuto LITERAL1 +kMitsubishiAcVaneAutoMove LITERAL1 +kMitsubishiAcZeroSpace LITERAL1 +kMitsubishiBitMark LITERAL1 +kMitsubishiBitMarkTicks LITERAL1 +kMitsubishiBits LITERAL1 +kMitsubishiMinCommandLength LITERAL1 +kMitsubishiMinCommandLengthTicks LITERAL1 +kMitsubishiMinGap LITERAL1 +kMitsubishiMinGapTicks LITERAL1 +kMitsubishiMinRepeat LITERAL1 +kMitsubishiOneSpace LITERAL1 +kMitsubishiOneSpaceTicks LITERAL1 +kMitsubishiTick LITERAL1 +kMitsubishiZeroSpace LITERAL1 +kMitsubishiZeroSpaceTicks LITERAL1 +kNECBits LITERAL1 +kNecBitMark LITERAL1 +kNecBitMarkTicks LITERAL1 +kNecHdrMark LITERAL1 +kNecHdrMarkTicks LITERAL1 +kNecHdrSpace LITERAL1 +kNecHdrSpaceTicks LITERAL1 +kNecMinCommandLength LITERAL1 +kNecMinCommandLengthTicks LITERAL1 +kNecMinGap LITERAL1 +kNecMinGapTicks LITERAL1 +kNecOneSpace LITERAL1 +kNecOneSpaceTicks LITERAL1 +kNecRptLength LITERAL1 +kNecRptSpace LITERAL1 +kNecRptSpaceTicks LITERAL1 +kNecTick LITERAL1 +kNecZeroSpace LITERAL1 +kNecZeroSpaceTicks LITERAL1 +kNikaiBitMark LITERAL1 +kNikaiBitMarkTicks LITERAL1 +kNikaiBits LITERAL1 +kNikaiHdrMark LITERAL1 +kNikaiHdrMarkTicks LITERAL1 +kNikaiHdrSpace LITERAL1 +kNikaiHdrSpaceTicks LITERAL1 +kNikaiMinGap LITERAL1 +kNikaiMinGapTicks LITERAL1 +kNikaiOneSpace LITERAL1 +kNikaiOneSpaceTicks LITERAL1 +kNikaiTick LITERAL1 +kNikaiZeroSpace LITERAL1 +kNikaiZeroSpaceTicks LITERAL1 +kNoRepeat LITERAL1 +kPanasonicAcAuto LITERAL1 +kPanasonicAcBits LITERAL1 +kPanasonicAcChecksumInit LITERAL1 +kPanasonicAcCool LITERAL1 +kPanasonicAcDry LITERAL1 +kPanasonicAcExcess LITERAL1 +kPanasonicAcFan LITERAL1 +kPanasonicAcFanAuto LITERAL1 +kPanasonicAcFanMax LITERAL1 +kPanasonicAcFanMin LITERAL1 +kPanasonicAcFanModeTemp LITERAL1 +kPanasonicAcFanOffset LITERAL1 +kPanasonicAcHeat LITERAL1 +kPanasonicAcMaxTemp LITERAL1 +kPanasonicAcMessageGap LITERAL1 +kPanasonicAcMinTemp LITERAL1 +kPanasonicAcOffTimer LITERAL1 +kPanasonicAcOnTimer LITERAL1 +kPanasonicAcPower LITERAL1 +kPanasonicAcPowerful LITERAL1 +kPanasonicAcPowerfulCkp LITERAL1 +kPanasonicAcQuiet LITERAL1 +kPanasonicAcQuietCkp LITERAL1 +kPanasonicAcSection1Length LITERAL1 +kPanasonicAcSectionGap LITERAL1 +kPanasonicAcShortBits LITERAL1 +kPanasonicAcStateLength LITERAL1 +kPanasonicAcStateShortLength LITERAL1 +kPanasonicAcSwingHAuto LITERAL1 +kPanasonicAcSwingHFullLeft LITERAL1 +kPanasonicAcSwingHFullRight LITERAL1 +kPanasonicAcSwingHLeft LITERAL1 +kPanasonicAcSwingHMiddle LITERAL1 +kPanasonicAcSwingHRight LITERAL1 +kPanasonicAcSwingVAuto LITERAL1 +kPanasonicAcSwingVDown LITERAL1 +kPanasonicAcSwingVUp LITERAL1 +kPanasonicAcTimeMax LITERAL1 +kPanasonicAcTimeSpecial LITERAL1 +kPanasonicAcTolerance LITERAL1 +kPanasonicBitMark LITERAL1 +kPanasonicBitMarkTicks LITERAL1 +kPanasonicBits LITERAL1 +kPanasonicCkp LITERAL1 +kPanasonicDke LITERAL1 +kPanasonicEndGap LITERAL1 +kPanasonicFreq LITERAL1 +kPanasonicHdrMark LITERAL1 +kPanasonicHdrMarkTicks LITERAL1 +kPanasonicHdrSpace LITERAL1 +kPanasonicHdrSpaceTicks LITERAL1 +kPanasonicJke LITERAL1 +kPanasonicKnownGoodState LITERAL1 +kPanasonicLke LITERAL1 +kPanasonicManufacturer LITERAL1 +kPanasonicMinCommandLength LITERAL1 +kPanasonicMinCommandLengthTicks LITERAL1 +kPanasonicMinGap LITERAL1 +kPanasonicMinGapTicks LITERAL1 +kPanasonicNke LITERAL1 +kPanasonicOneSpace LITERAL1 +kPanasonicOneSpaceTicks LITERAL1 +kPanasonicTick LITERAL1 +kPanasonicUnknown LITERAL1 +kPanasonicZeroSpace LITERAL1 +kPanasonicZeroSpaceTicks LITERAL1 +kPeriodOffset LITERAL1 +kPioneerBits LITERAL1 +kProntoDataOffset LITERAL1 +kProntoFreqFactor LITERAL1 +kProntoFreqOffset LITERAL1 +kProntoMinLength LITERAL1 +kProntoSeq1LenOffset LITERAL1 +kProntoSeq2LenOffset LITERAL1 +kProntoTypeOffset LITERAL1 +kRC5Bits LITERAL1 +kRC5RawBits LITERAL1 +kRC5XBits LITERAL1 +kRC6Mode0Bits LITERAL1 +kRC6_36Bits LITERAL1 +kRCMMBits LITERAL1 +kRawBuf LITERAL1 +kRawTick LITERAL1 +kRc5MinCommandLength LITERAL1 +kRc5MinGap LITERAL1 +kRc5SamplesMin LITERAL1 +kRc5T1 LITERAL1 +kRc5ToggleMask LITERAL1 +kRc6HdrMark LITERAL1 +kRc6HdrMarkTicks LITERAL1 +kRc6HdrSpace LITERAL1 +kRc6HdrSpaceTicks LITERAL1 +kRc6RptLength LITERAL1 +kRc6RptLengthTicks LITERAL1 +kRc6Tick LITERAL1 +kRc6ToggleMask LITERAL1 +kRc6_36ToggleMask LITERAL1 +kRcmmBitMark LITERAL1 +kRcmmBitMarkTicks LITERAL1 +kRcmmBitSpace0 LITERAL1 +kRcmmBitSpace0Ticks LITERAL1 +kRcmmBitSpace1 LITERAL1 +kRcmmBitSpace1Ticks LITERAL1 +kRcmmBitSpace2 LITERAL1 +kRcmmBitSpace2Ticks LITERAL1 +kRcmmBitSpace3 LITERAL1 +kRcmmBitSpace3Ticks LITERAL1 +kRcmmExcess LITERAL1 +kRcmmHdrMark LITERAL1 +kRcmmHdrMarkTicks LITERAL1 +kRcmmHdrSpace LITERAL1 +kRcmmHdrSpaceTicks LITERAL1 +kRcmmMinGap LITERAL1 +kRcmmMinGapTicks LITERAL1 +kRcmmRptLength LITERAL1 +kRcmmRptLengthTicks LITERAL1 +kRcmmTick LITERAL1 +kRcmmTolerance LITERAL1 +kRepeat LITERAL1 +kSamsungACSectionLength LITERAL1 +kSamsungAcAuto LITERAL1 +kSamsungAcAutoTemp LITERAL1 +kSamsungAcBeepMask LITERAL1 +kSamsungAcBitMark LITERAL1 +kSamsungAcBits LITERAL1 +kSamsungAcCleanMask10 LITERAL1 +kSamsungAcCleanMask11 LITERAL1 +kSamsungAcCool LITERAL1 +kSamsungAcDry LITERAL1 +kSamsungAcExtendedBits LITERAL1 +kSamsungAcExtendedStateLength LITERAL1 +kSamsungAcFan LITERAL1 +kSamsungAcFanAuto LITERAL1 +kSamsungAcFanAuto2 LITERAL1 +kSamsungAcFanHigh LITERAL1 +kSamsungAcFanLow LITERAL1 +kSamsungAcFanMask LITERAL1 +kSamsungAcFanMed LITERAL1 +kSamsungAcFanTurbo LITERAL1 +kSamsungAcHdrMark LITERAL1 +kSamsungAcHdrSpace LITERAL1 +kSamsungAcHeat LITERAL1 +kSamsungAcMaxTemp LITERAL1 +kSamsungAcMinTemp LITERAL1 +kSamsungAcModeMask LITERAL1 +kSamsungAcOneSpace LITERAL1 +kSamsungAcPowerMask1 LITERAL1 +kSamsungAcPowerMask2 LITERAL1 +kSamsungAcPowerSection LITERAL1 +kSamsungAcQuietMask11 LITERAL1 +kSamsungAcSectionGap LITERAL1 +kSamsungAcSectionMark LITERAL1 +kSamsungAcSectionSpace LITERAL1 +kSamsungAcSections LITERAL1 +kSamsungAcStateLength LITERAL1 +kSamsungAcSwingMask LITERAL1 +kSamsungAcSwingMove LITERAL1 +kSamsungAcSwingStop LITERAL1 +kSamsungAcTempMask LITERAL1 +kSamsungAcZeroSpace LITERAL1 +kSamsungBitMark LITERAL1 +kSamsungBitMarkTicks LITERAL1 +kSamsungBits LITERAL1 +kSamsungHdrMark LITERAL1 +kSamsungHdrMarkTicks LITERAL1 +kSamsungHdrSpace LITERAL1 +kSamsungHdrSpaceTicks LITERAL1 +kSamsungMinGap LITERAL1 +kSamsungMinGapTicks LITERAL1 +kSamsungMinMessageLength LITERAL1 +kSamsungMinMessageLengthTicks LITERAL1 +kSamsungOneSpace LITERAL1 +kSamsungOneSpaceTicks LITERAL1 +kSamsungRptSpace LITERAL1 +kSamsungRptSpaceTicks LITERAL1 +kSamsungTick LITERAL1 +kSamsungZeroSpace LITERAL1 +kSamsungZeroSpaceTicks LITERAL1 +kSanyoLC7461AddressBits LITERAL1 +kSanyoLC7461Bits LITERAL1 +kSanyoLC7461CommandBits LITERAL1 +kSanyoLc7461AddressMask LITERAL1 +kSanyoLc7461BitMark LITERAL1 +kSanyoLc7461CommandMask LITERAL1 +kSanyoLc7461HdrMark LITERAL1 +kSanyoLc7461HdrSpace LITERAL1 +kSanyoLc7461MinCommandLength LITERAL1 +kSanyoLc7461MinGap LITERAL1 +kSanyoLc7461OneSpace LITERAL1 +kSanyoLc7461ZeroSpace LITERAL1 +kSanyoSA8650BBits LITERAL1 +kSanyoSa8650bDoubleSpaceUsecs LITERAL1 +kSanyoSa8650bHdrMark LITERAL1 +kSanyoSa8650bHdrSpace LITERAL1 +kSanyoSa8650bOneMark LITERAL1 +kSanyoSa8650bRptLength LITERAL1 +kSanyoSa8650bZeroMark LITERAL1 +kSharpAddressBits LITERAL1 +kSharpAddressMask LITERAL1 +kSharpBitMark LITERAL1 +kSharpBitMarkTicks LITERAL1 +kSharpBits LITERAL1 +kSharpCommandBits LITERAL1 +kSharpCommandMask LITERAL1 +kSharpGap LITERAL1 +kSharpGapTicks LITERAL1 +kSharpOneSpace LITERAL1 +kSharpOneSpaceTicks LITERAL1 +kSharpTick LITERAL1 +kSharpToggleMask LITERAL1 +kSharpZeroSpace LITERAL1 +kSharpZeroSpaceTicks LITERAL1 +kSherwoodBits LITERAL1 +kSherwoodMinRepeat LITERAL1 +kSingleRepeat LITERAL1 +kSony12Bits LITERAL1 +kSony15Bits LITERAL1 +kSony20Bits LITERAL1 +kSonyHdrMark LITERAL1 +kSonyHdrMarkTicks LITERAL1 +kSonyMinBits LITERAL1 +kSonyMinGap LITERAL1 +kSonyMinGapTicks LITERAL1 +kSonyMinRepeat LITERAL1 +kSonyOneMark LITERAL1 +kSonyOneMarkTicks LITERAL1 +kSonyRptLength LITERAL1 +kSonyRptLengthTicks LITERAL1 +kSonySpace LITERAL1 +kSonySpaceTicks LITERAL1 +kSonyTick LITERAL1 +kSonyZeroMark LITERAL1 +kSonyZeroMarkTicks LITERAL1 +kSpace LITERAL1 +kSpaceState LITERAL1 +kStartOffset LITERAL1 +kStateSizeMax LITERAL1 +kStopState LITERAL1 +kTimeoutMs LITERAL1 +kTolerance LITERAL1 +kToshibaACBits LITERAL1 +kToshibaACMinRepeat LITERAL1 +kToshibaACStateLength LITERAL1 +kToshibaAcAuto LITERAL1 +kToshibaAcBitMark LITERAL1 +kToshibaAcCool LITERAL1 +kToshibaAcDry LITERAL1 +kToshibaAcFanAuto LITERAL1 +kToshibaAcFanMax LITERAL1 +kToshibaAcHdrMark LITERAL1 +kToshibaAcHdrSpace LITERAL1 +kToshibaAcHeat LITERAL1 +kToshibaAcMaxTemp LITERAL1 +kToshibaAcMinGap LITERAL1 +kToshibaAcMinTemp LITERAL1 +kToshibaAcOneSpace LITERAL1 +kToshibaAcPower LITERAL1 +kToshibaAcZeroSpace LITERAL1 +kTrotecAuto LITERAL1 +kTrotecCool LITERAL1 +kTrotecDefTemp LITERAL1 +kTrotecDry LITERAL1 +kTrotecFan LITERAL1 +kTrotecFanHigh LITERAL1 +kTrotecFanLow LITERAL1 +kTrotecFanMed LITERAL1 +kTrotecGap LITERAL1 +kTrotecGapEnd LITERAL1 +kTrotecHdrMark LITERAL1 +kTrotecHdrSpace LITERAL1 +kTrotecIntro1 LITERAL1 +kTrotecIntro2 LITERAL1 +kTrotecMaxTemp LITERAL1 +kTrotecMaxTimer LITERAL1 +kTrotecMinTemp LITERAL1 +kTrotecMinTimer LITERAL1 +kTrotecOff LITERAL1 +kTrotecOn LITERAL1 +kTrotecOneMark LITERAL1 +kTrotecOneSpace LITERAL1 +kTrotecSleepOn LITERAL1 +kTrotecStateLength LITERAL1 +kTrotecTimerOn LITERAL1 +kTrotecZeroMark LITERAL1 +kTrotecZeroSpace LITERAL1 +kUnknownThreshold LITERAL1 +kWhirlpoolAcBitMark LITERAL1 +kWhirlpoolAcBits LITERAL1 +kWhirlpoolAcGap LITERAL1 +kWhirlpoolAcHdrMark LITERAL1 +kWhirlpoolAcHdrSpace LITERAL1 +kWhirlpoolAcMinGap LITERAL1 +kWhirlpoolAcOneSpace LITERAL1 +kWhirlpoolAcSections LITERAL1 +kWhirlpoolAcStateLength LITERAL1 +kWhirlpoolAcZeroSpace LITERAL1 +kWhynterBitMark LITERAL1 +kWhynterBitMarkTicks LITERAL1 +kWhynterBits LITERAL1 +kWhynterHdrMark LITERAL1 +kWhynterHdrMarkTicks LITERAL1 +kWhynterHdrSpace LITERAL1 +kWhynterHdrSpaceTicks LITERAL1 +kWhynterMinCommandLength LITERAL1 +kWhynterMinCommandLengthTicks LITERAL1 +kWhynterMinGap LITERAL1 +kWhynterMinGapTicks LITERAL1 +kWhynterOneSpace LITERAL1 +kWhynterOneSpaceTicks LITERAL1 +kWhynterTick LITERAL1 +kWhynterZeroSpace LITERAL1 +kWhynterZeroSpaceTicks LITERAL1 diff --git a/lib/IRremoteESP8266-2.2.1.02/library.json b/lib/IRremoteESP8266-2.5.2.03/library.json similarity index 97% rename from lib/IRremoteESP8266-2.2.1.02/library.json rename to lib/IRremoteESP8266-2.5.2.03/library.json index b8141a2eb..3fc14f027 100644 --- a/lib/IRremoteESP8266-2.2.1.02/library.json +++ b/lib/IRremoteESP8266-2.5.2.03/library.json @@ -1,6 +1,6 @@ { "name": "IRremoteESP8266", - "version": "2.2.1", + "version": "2.5.2", "keywords": "infrared, ir, remote, esp8266", "description": "Send and receive infrared signals with multiple protocols (ESP8266)", "repository": diff --git a/lib/IRremoteESP8266-2.2.1.02/library.properties b/lib/IRremoteESP8266-2.5.2.03/library.properties similarity index 96% rename from lib/IRremoteESP8266-2.2.1.02/library.properties rename to lib/IRremoteESP8266-2.5.2.03/library.properties index ae6f93da7..e71dc4154 100644 --- a/lib/IRremoteESP8266-2.2.1.02/library.properties +++ b/lib/IRremoteESP8266-2.5.2.03/library.properties @@ -1,5 +1,5 @@ name=IRremoteESP8266 -version=2.2.1 +version=2.5.2 author=Sebastien Warin, Mark Szabo, Ken Shirriff, David Conran maintainer=Mark Szabo, David Conran, Sebastien Warin, Roi Dayan, Massimiliano Pinto sentence=Send and receive infrared signals with multiple protocols (ESP8266) diff --git a/lib/IRremoteESP8266-2.2.1.02/platformio.ini b/lib/IRremoteESP8266-2.5.2.03/platformio.ini similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/platformio.ini rename to lib/IRremoteESP8266-2.5.2.03/platformio.ini diff --git a/lib/IRremoteESP8266-2.5.2.03/pylintrc b/lib/IRremoteESP8266-2.5.2.03/pylintrc new file mode 100644 index 000000000..987c6abf9 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/pylintrc @@ -0,0 +1,12 @@ +[REPORTS] + +# Tells whether to display a full report or only the messages +reports=no + +[FORMAT] + +# Maximum number of characters on a single line. +max-line-length=80 + +# String used as indentation unit. +indent-string=' ' diff --git a/lib/IRremoteESP8266-2.2.1.02/src/CPPLINT.cfg b/lib/IRremoteESP8266-2.5.2.03/src/CPPLINT.cfg similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/src/CPPLINT.cfg rename to lib/IRremoteESP8266-2.5.2.03/src/CPPLINT.cfg diff --git a/lib/IRremoteESP8266-2.2.1.02/src/IRrecv.cpp b/lib/IRremoteESP8266-2.5.2.03/src/IRrecv.cpp similarity index 59% rename from lib/IRremoteESP8266-2.2.1.02/src/IRrecv.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/IRrecv.cpp index d8e390633..b2c984396 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/IRrecv.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/IRrecv.cpp @@ -7,13 +7,14 @@ #include #ifndef UNIT_TEST extern "C" { - #include - #include +#include +#include } #include #endif #include #include "IRremoteESP8266.h" +#include "IRutils.h" #ifdef UNIT_TEST #undef ICACHE_RAM_ATTR @@ -34,8 +35,7 @@ irparams_t *irparams_save; // A copy of the interrupt state while decoding. #ifndef UNIT_TEST static void ICACHE_RAM_ATTR read_timeout(void *arg __attribute__((unused))) { os_intr_lock(); - if (irparams.rawlen) - irparams.rcvstate = STATE_STOP; + if (irparams.rawlen) irparams.rcvstate = kStopState; os_intr_unlock(); } @@ -57,25 +57,24 @@ static void ICACHE_RAM_ATTR gpio_intr() { if (rawlen >= irparams.bufsize) { irparams.overflow = true; - irparams.rcvstate = STATE_STOP; + irparams.rcvstate = kStopState; } - if (irparams.rcvstate == STATE_STOP) - return; + if (irparams.rcvstate == kStopState) return; - if (irparams.rcvstate == STATE_IDLE) { - irparams.rcvstate = STATE_MARK; + if (irparams.rcvstate == kIdleState) { + irparams.rcvstate = kMarkState; irparams.rawbuf[rawlen] = 1; } else { if (now < start) - irparams.rawbuf[rawlen] = (UINT32_MAX - start + now) / RAWTICK; + irparams.rawbuf[rawlen] = (UINT32_MAX - start + now) / kRawTick; else - irparams.rawbuf[rawlen] = (now - start) / RAWTICK; + irparams.rawbuf[rawlen] = (now - start) / kRawTick; } irparams.rawlen++; start = now; - #define ONCE 0 +#define ONCE 0 os_timer_arm(&timer, irparams.timeout, ONCE); } #endif // UNIT_TEST @@ -85,23 +84,24 @@ static void ICACHE_RAM_ATTR gpio_intr() { // Class constructor // Args: // recvpin: GPIO pin the IR receiver module's data pin is connected to. -// bufsize: Nr. of entries to have in the capture buffer. (Default: RAWBUF) +// bufsize: Nr. of entries to have in the capture buffer. (Default: kRawBuf) // timeout: Nr. of milli-Seconds of no signal before we stop capturing data. -// (Default: TIMEOUT_MS) +// (Default: kTimeoutMs) // save_buffer: Use a second (save) buffer to decode from. (Def: false) // Returns: -// A IRrecv class object. +// An IRrecv class object. IRrecv::IRrecv(uint16_t recvpin, uint16_t bufsize, uint8_t timeout, bool save_buffer) { irparams.recvpin = recvpin; irparams.bufsize = bufsize; // Ensure we are going to be able to store all possible values in the // capture buffer. - irparams.timeout = std::min(timeout, (uint8_t) MAX_TIMEOUT_MS); + irparams.timeout = std::min(timeout, (uint8_t)kMaxTimeoutMs); irparams.rawbuf = new uint16_t[bufsize]; if (irparams.rawbuf == NULL) { - DPRINTLN("Could not allocate memory for the primary IR buffer.\n" - "Try a smaller size for CAPTURE_BUFFER_SIZE.\nRebooting!"); + DPRINTLN( + "Could not allocate memory for the primary IR buffer.\n" + "Try a smaller size for CAPTURE_BUFFER_SIZE.\nRebooting!"); #ifndef UNIT_TEST ESP.restart(); // Mem alloc failure. Reboot. #endif @@ -112,8 +112,9 @@ IRrecv::IRrecv(uint16_t recvpin, uint16_t bufsize, uint8_t timeout, irparams_save->rawbuf = new uint16_t[bufsize]; // Check we allocated the memory successfully. if (irparams_save->rawbuf == NULL) { - DPRINTLN("Could not allocate memory for the second IR buffer.\n" - "Try a smaller size for CAPTURE_BUFFER_SIZE.\nRebooting!"); + DPRINTLN( + "Could not allocate memory for the second IR buffer.\n" + "Try a smaller size for CAPTURE_BUFFER_SIZE.\nRebooting!"); #ifndef UNIT_TEST ESP.restart(); // Mem alloc failure. Reboot. #endif @@ -121,13 +122,16 @@ IRrecv::IRrecv(uint16_t recvpin, uint16_t bufsize, uint8_t timeout, } else { irparams_save = NULL; } +#if DECODE_HASH + unknown_threshold = kUnknownThreshold; +#endif // DECODE_HASH } // Class destructor IRrecv::~IRrecv(void) { - delete [] irparams.rawbuf; + delete[] irparams.rawbuf; if (irparams_save != NULL) { - delete [] irparams_save->rawbuf; + delete[] irparams_save->rawbuf; delete irparams_save; } } @@ -156,7 +160,7 @@ void IRrecv::disableIRIn() { } void IRrecv::resume() { - irparams.rcvstate = STATE_IDLE; + irparams.rcvstate = kIdleState; irparams.rawlen = 0; irparams.overflow = false; } @@ -164,15 +168,15 @@ void IRrecv::resume() { // Make a copy of the interrupt state & buffer data. // Needed because irparams is marked as volatile, thus memcpy() isn't allowed. // Only call this when you know the interrupt handlers won't modify anything. -// i.e. In STATE_STOP. +// i.e. In kStopState. // // Args: // src: Pointer to an irparams_t structure to copy from. // dst: Pointer to an irparams_t structure to copy to. void IRrecv::copyIrParams(volatile irparams_t *src, irparams_t *dst) { // Typecast src and dst addresses to (char *) - char *csrc = (char *) src; // NOLINT(readability/casting) - char *cdst = (char *) dst; // NOLINT(readability/casting) + char *csrc = (char *)src; // NOLINT(readability/casting) + char *cdst = (char *)dst; // NOLINT(readability/casting) // Save the pointer to the destination's rawbuf so we don't lose it as // the for-loop/copy after this will overwrite it with src's rawbuf pointer. @@ -181,22 +185,25 @@ void IRrecv::copyIrParams(volatile irparams_t *src, irparams_t *dst) { dst_rawbuf_ptr = dst->rawbuf; // Copy contents of src[] to dst[] - for (uint16_t i = 0; i < sizeof(irparams_t); i++) - cdst[i] = csrc[i]; + for (uint16_t i = 0; i < sizeof(irparams_t); i++) cdst[i] = csrc[i]; // Restore the buffer pointer dst->rawbuf = dst_rawbuf_ptr; // Copy the rawbuf - for (uint16_t i = 0; i < dst->bufsize; i++) - dst->rawbuf[i] = src->rawbuf[i]; + for (uint16_t i = 0; i < dst->bufsize; i++) dst->rawbuf[i] = src->rawbuf[i]; } // Obtain the maximum number of entries possible in the capture buffer. // i.e. It's size. -uint16_t IRrecv::getBufSize() { - return irparams.bufsize; +uint16_t IRrecv::getBufSize() { return irparams.bufsize; } + +#if DECODE_HASH +// Set the minimum length we will consider for reporting UNKNOWN message types. +void IRrecv::setUnknownThreshold(uint16_t length) { + unknown_threshold = length; } +#endif // DECODE_HASH // Decodes the received IR message. // If the interrupt state is saved, we will immediately resume waiting @@ -213,8 +220,7 @@ uint16_t IRrecv::getBufSize() { bool IRrecv::decode(decode_results *results, irparams_t *save) { // Proceed only if an IR message been received. #ifndef UNIT_TEST - if (irparams.rcvstate != STATE_STOP) - return false; + if (irparams.rcvstate != kStopState) return false; #endif // Clear the entry we are currently pointing to when we got the timeout. @@ -230,8 +236,7 @@ bool IRrecv::decode(decode_results *results, irparams_t *save) { bool resumed = false; // Flag indicating if we have resumed. // If we were requested to use a save buffer previously, do so. - if (save == NULL) - save = irparams_save; + if (save == NULL) save = irparams_save; if (save == NULL) { // We haven't been asked to copy it so use the existing memory. @@ -263,8 +268,7 @@ bool IRrecv::decode(decode_results *results, irparams_t *save) { // Try decodeAiwaRCT501() before decodeSanyoLC7461() & decodeNEC() // because the protocols are similar. This protocol is more specific than // those ones, so should got before them. - if (decodeAiwaRCT501(results)) - return true; + if (decodeAiwaRCT501(results)) return true; #endif #if DECODE_SANYO DPRINTLN("Attempting Sanyo LC7461 decode"); @@ -272,97 +276,135 @@ bool IRrecv::decode(decode_results *results, irparams_t *save) { // similar in timings & structure, but the Sanyo one is much longer than the // NEC protocol (42 vs 32 bits) so this one should be tried first to try to // reduce false detection as a NEC packet. - if (decodeSanyoLC7461(results)) - return true; + if (decodeSanyoLC7461(results)) return true; +#endif +#if DECODE_CARRIER_AC + DPRINTLN("Attempting Carrier AC decode"); + // Try decodeCarrierAC() before decodeNEC() because the protocols are + // similar in timings & structure, but the Carrier one is much longer than the + // NEC protocol (3x32 bits vs 1x32 bits) so this one should be tried first to + // try to reduce false detection as a NEC packet. + if (decodeCarrierAC(results)) return true; +#endif +#if DECODE_PIONEER + DPRINTLN("Attempting Pioneer decode"); + // Try decodePioneer() before decodeNEC() because the protocols are + // similar in timings & structure, but the Pioneer one is much longer than the + // NEC protocol (2x32 bits vs 1x32 bits) so this one should be tried first to + // try to reduce false detection as a NEC packet. + if (decodePioneer(results)) return true; #endif #if DECODE_NEC DPRINTLN("Attempting NEC decode"); - if (decodeNEC(results)) - return true; + if (decodeNEC(results)) return true; #endif #if DECODE_SONY DPRINTLN("Attempting Sony decode"); - if (decodeSony(results)) - return true; + if (decodeSony(results)) return true; #endif #if DECODE_MITSUBISHI DPRINTLN("Attempting Mitsubishi decode"); - if (decodeMitsubishi(results)) - return true; + if (decodeMitsubishi(results)) return true; +#endif +#if DECODE_MITSUBISHI_AC + DPRINTLN("Attempting Mitsubishi AC decode"); + if (decodeMitsubishiAC(results)) return true; +#endif +#if DECODE_MITSUBISHI2 + DPRINTLN("Attempting Mitsubishi2 decode"); + if (decodeMitsubishi2(results)) return true; #endif #if DECODE_RC5 DPRINTLN("Attempting RC5 decode"); - if (decodeRC5(results)) - return true; + if (decodeRC5(results)) return true; #endif #if DECODE_RC6 DPRINTLN("Attempting RC6 decode"); - if (decodeRC6(results)) - return true; + if (decodeRC6(results)) return true; #endif #if DECODE_RCMM DPRINTLN("Attempting RC-MM decode"); - if (decodeRCMM(results)) - return true; + if (decodeRCMM(results)) return true; +#endif +#if DECODE_FUJITSU_AC + // Fujitsu A/C needs to precede Panasonic and Denon as it has a short + // message which looks exactly the same as a Panasonic/Denon message. + DPRINTLN("Attempting Fujitsu A/C decode"); + if (decodeFujitsuAC(results)) return true; #endif #if DECODE_DENON // Denon needs to precede Panasonic as it is a special case of Panasonic. -#ifdef DEBUG DPRINTLN("Attempting Denon decode"); -#endif - if (decodeDenon(results, DENON_48_BITS) || - decodeDenon(results, DENON_BITS) || - decodeDenon(results, DENON_LEGACY_BITS)) + if (decodeDenon(results, DENON_48_BITS) || decodeDenon(results, DENON_BITS) || + decodeDenon(results, kDenonLegacyBits)) return true; #endif #if DECODE_PANASONIC DPRINTLN("Attempting Panasonic decode"); - if (decodePanasonic(results)) - return true; + if (decodePanasonic(results)) return true; #endif #if DECODE_LG DPRINTLN("Attempting LG (28-bit) decode"); - if (decodeLG(results, LG_BITS, true)) - return true; + if (decodeLG(results, kLgBits, true)) return true; DPRINTLN("Attempting LG (32-bit) decode"); // LG32 should be tried before Samsung - if (decodeLG(results, LG32_BITS, true)) - return true; + if (decodeLG(results, kLg32Bits, true)) return true; +#endif +#if DECODE_GICABLE + // Note: Needs to happen before JVC decode, because it looks similar except + // with a required NEC-like repeat code. + DPRINTLN("Attempting GICable decode"); + if (decodeGICable(results)) return true; #endif #if DECODE_JVC DPRINTLN("Attempting JVC decode"); - if (decodeJVC(results)) - return true; + if (decodeJVC(results)) return true; #endif #if DECODE_SAMSUNG DPRINTLN("Attempting SAMSUNG decode"); - if (decodeSAMSUNG(results)) - return true; + if (decodeSAMSUNG(results)) return true; #endif #if DECODE_WHYNTER DPRINTLN("Attempting Whynter decode"); - if (decodeWhynter(results)) - return true; + if (decodeWhynter(results)) return true; #endif #if DECODE_DISH DPRINTLN("Attempting DISH decode"); - if (decodeDISH(results)) - return true; + if (decodeDISH(results)) return true; #endif #if DECODE_SHARP DPRINTLN("Attempting Sharp decode"); - if (decodeSharp(results)) - return true; + if (decodeSharp(results)) return true; #endif #if DECODE_COOLIX DPRINTLN("Attempting Coolix decode"); - if (decodeCOOLIX(results)) - return true; + if (decodeCOOLIX(results)) return true; #endif #if DECODE_NIKAI DPRINTLN("Attempting Nikai decode"); - if (decodeNikai(results)) - return true; + if (decodeNikai(results)) return true; +#endif +#if DECODE_KELVINATOR + // Kelvinator based-devices use a similar code to Gree ones, to avoid false + // matches this needs to happen before decodeGree(). + DPRINTLN("Attempting Kelvinator decode"); + if (decodeKelvinator(results)) return true; +#endif +#if DECODE_DAIKIN + DPRINTLN("Attempting Daikin decode"); + if (decodeDaikin(results)) return true; +#endif +#if DECODE_TOSHIBA_AC + DPRINTLN("Attempting Toshiba AC decode"); + if (decodeToshibaAC(results)) return true; +#endif +#if DECODE_MIDEA + DPRINTLN("Attempting Midea decode"); + if (decodeMidea(results)) return true; +#endif +#if DECODE_MAGIQUEST + DPRINTLN("Attempting Magiquest decode"); + if (decodeMagiQuest(results)) return true; #endif /* NOTE: Disabled due to poor quality. #if DECODE_SANYO @@ -380,18 +422,81 @@ bool IRrecv::decode(decode_results *results, irparams_t *save) { // This needs to be done after all other codes that use strict and some // other protocols that are NEC-like as well, as turning off strict may // cause this to match other valid protocols. - DPRINTLN("Attempting NEC (non-stict) decode"); - if (decodeNEC(results, NEC_BITS, false)) { + DPRINTLN("Attempting NEC (non-strict) decode"); + if (decodeNEC(results, kNECBits, false)) { results->decode_type = NEC_LIKE; return true; } #endif +#if DECODE_LASERTAG + DPRINTLN("Attempting Lasertag decode"); + if (decodeLasertag(results)) return true; +#endif +#if DECODE_GREE + // Gree based-devices use a similar code to Kelvinator ones, to avoid false + // matches this needs to happen after decodeKelvinator(). + DPRINTLN("Attempting Gree decode"); + if (decodeGree(results)) return true; +#endif +#if DECODE_HAIER_AC + DPRINTLN("Attempting Haier AC decode"); + if (decodeHaierAC(results)) return true; +#endif +#if DECODE_HAIER_AC_YRW02 + DPRINTLN("Attempting Haier AC YR-W02 decode"); + if (decodeHaierACYRW02(results)) return true; +#endif +#if DECODE_HITACHI_AC2 + // HitachiAC2 should be checked before HitachiAC + DPRINTLN("Attempting Hitachi AC2 decode"); + if (decodeHitachiAC(results, kHitachiAc2Bits)) return true; +#endif +#if DECODE_HITACHI_AC + DPRINTLN("Attempting Hitachi AC decode"); + if (decodeHitachiAC(results, kHitachiAcBits)) return true; +#endif +#if DECODE_HITACHI_AC1 + DPRINTLN("Attempting Hitachi AC1 decode"); + if (decodeHitachiAC(results, kHitachiAc1Bits)) return true; +#endif +#if DECODE_WHIRLPOOL_AC + DPRINTLN("Attempting Whirlpool AC decode"); + if (decodeWhirlpoolAC(results)) return true; +#endif +#if DECODE_SAMSUNG_AC + DPRINTLN("Attempting Samsung AC (extended) decode"); + // Check the extended size first, as it should fail fast due to longer length. + if (decodeSamsungAC(results, kSamsungAcExtendedBits, false)) return true; + // Now check for the more common length. + DPRINTLN("Attempting Samsung AC decode"); + if (decodeSamsungAC(results, kSamsungAcBits)) return true; +#endif +#if DECODE_ELECTRA_AC + DPRINTLN("Attempting Electra AC decode"); + if (decodeElectraAC(results)) return true; +#endif +#if DECODE_PANASONIC_AC + DPRINTLN("Attempting Panasonic AC decode"); + if (decodePanasonicAC(results)) return true; + DPRINTLN("Attempting Panasonic AC short decode"); + if (decodePanasonicAC(results, kPanasonicAcShortBits)) return true; +#endif +#if DECODE_LUTRON + DPRINTLN("Attempting Lutron decode"); + if (decodeLutron(results)) return true; +#endif +#if DECODE_MWM + DPRINTLN("Attempting MWM decode"); + if (decodeMWM(results)) return true; +#endif +#if DECODE_HASH // decodeHash returns a hash on any input. // Thus, it needs to be last in the list. // If you add any decodes, add them before this. if (decodeHash(results)) { return true; } +#endif // DECODE_HASH // Throw away and start over if (!resumed) // Check if we have already resumed. resume(); @@ -403,11 +508,13 @@ bool IRrecv::decode(decode_results *results, irparams_t *save) { // Args: // usecs: Nr. of uSeconds. // tolerance: Percent as an integer. e.g. 10 is 10% +// delta: A non-scaling amount to reduce usecs by. // Returns: // Nr. of ticks. -uint32_t IRrecv::ticksLow(uint32_t usecs, uint8_t tolerance) { +uint32_t IRrecv::ticksLow(uint32_t usecs, uint8_t tolerance, uint16_t delta) { // max() used to ensure the result can't drop below 0 before the cast. - return((uint32_t) std::max((int32_t) (usecs * (1.0 - tolerance / 100.0)), 0)); + return ((uint32_t)std::max( + (int32_t)(usecs * (1.0 - tolerance / 100.0) - delta), 0)); } // Calculate the upper bound of the nr. of ticks. @@ -415,49 +522,52 @@ uint32_t IRrecv::ticksLow(uint32_t usecs, uint8_t tolerance) { // Args: // usecs: Nr. of uSeconds. // tolerance: Percent as an integer. e.g. 10 is 10% +// delta: A non-scaling amount to increase usecs by. // Returns: // Nr. of ticks. -uint32_t IRrecv::ticksHigh(uint32_t usecs, uint8_t tolerance) { - return((uint32_t) (usecs * (1.0 + tolerance / 100.0)) + 1); +uint32_t IRrecv::ticksHigh(uint32_t usecs, uint8_t tolerance, uint16_t delta) { + return ((uint32_t)(usecs * (1.0 + tolerance / 100.0)) + 1 + delta); } // Check if we match a pulse(measured) with the desired within -// +/-tolerance percent. +// +/-tolerance percent and/or +/- a fixed delta range. // // Args: // measured: The recorded period of the signal pulse. // desired: The expected period (in useconds) we are matching against. // tolerance: A percentage expressed as an integer. e.g. 10 is 10%. +// delta: A non-scaling (+/-) error margin (in useconds). // // Returns: // Boolean: true if it matches, false if it doesn't. -bool IRrecv::match(uint32_t measured, uint32_t desired, - uint8_t tolerance) { - measured *= RAWTICK; // Convert to uSecs. +bool IRrecv::match(uint32_t measured, uint32_t desired, uint8_t tolerance, + uint16_t delta) { + measured *= kRawTick; // Convert to uSecs. DPRINT("Matching: "); - DPRINT(ticksLow(desired, tolerance)); + DPRINT(ticksLow(desired, tolerance, delta)); DPRINT(" <= "); DPRINT(measured); DPRINT(" <= "); - DPRINTLN(ticksHigh(desired, tolerance)); - return (measured >= ticksLow(desired, tolerance) && - measured <= ticksHigh(desired, tolerance)); + DPRINTLN(ticksHigh(desired, tolerance, delta)); + return (measured >= ticksLow(desired, tolerance, delta) && + measured <= ticksHigh(desired, tolerance, delta)); } - // Check if we match a pulse(measured) of at least desired within -// +/-tolerance percent. +// tolerance percent and/or a fixed delta margin. // // Args: // measured: The recorded period of the signal pulse. // desired: The expected period (in useconds) we are matching against. // tolerance: A percentage expressed as an integer. e.g. 10 is 10%. +// delta: A non-scaling amount to reduce usecs by. + // // Returns: // Boolean: true if it matches, false if it doesn't. bool IRrecv::matchAtLeast(uint32_t measured, uint32_t desired, - uint8_t tolerance) { - measured *= RAWTICK; // Convert to uSecs. + uint8_t tolerance, uint16_t delta) { + measured *= kRawTick; // Convert to uSecs. DPRINT("Matching ATLEAST "); DPRINT(measured); DPRINT(" vs "); @@ -465,17 +575,18 @@ bool IRrecv::matchAtLeast(uint32_t measured, uint32_t desired, DPRINT(". Matching: "); DPRINT(measured); DPRINT(" >= "); - DPRINT(ticksLow(std::min(desired, MS_TO_USEC(irparams.timeout)), tolerance)); + DPRINT(ticksLow(std::min(desired, MS_TO_USEC(irparams.timeout)), tolerance, + delta)); DPRINT(" [min("); - DPRINT(ticksLow(desired, tolerance)); + DPRINT(ticksLow(desired, tolerance, delta)); DPRINT(", "); - DPRINT(ticksLow(MS_TO_USEC(irparams.timeout), tolerance)); + DPRINT(ticksLow(MS_TO_USEC(irparams.timeout), tolerance, delta)); DPRINTLN(")]"); // We really should never get a value of 0, except as the last value // in the buffer. If that is the case, then assume infinity and return true. if (measured == 0) return true; return measured >= ticksLow(std::min(desired, MS_TO_USEC(irparams.timeout)), - tolerance); + tolerance, delta); } // Check if we match a mark signal(measured) with the desired within @@ -489,10 +600,10 @@ bool IRrecv::matchAtLeast(uint32_t measured, uint32_t desired, // // Returns: // Boolean: true if it matches, false if it doesn't. -bool IRrecv::matchMark(uint32_t measured, uint32_t desired, - uint8_t tolerance, int16_t excess) { +bool IRrecv::matchMark(uint32_t measured, uint32_t desired, uint8_t tolerance, + int16_t excess) { DPRINT("Matching MARK "); - DPRINT(measured * RAWTICK); + DPRINT(measured * kRawTick); DPRINT(" vs "); DPRINT(desired); DPRINT(" + "); @@ -512,10 +623,10 @@ bool IRrecv::matchMark(uint32_t measured, uint32_t desired, // // Returns: // Boolean: true if it matches, false if it doesn't. -bool IRrecv::matchSpace(uint32_t measured, uint32_t desired, - uint8_t tolerance, int16_t excess) { +bool IRrecv::matchSpace(uint32_t measured, uint32_t desired, uint8_t tolerance, + int16_t excess) { DPRINT("Matching SPACE "); - DPRINT(measured * RAWTICK); + DPRINT(measured * kRawTick); DPRINT(" vs "); DPRINT(desired); DPRINT(" - "); @@ -550,15 +661,15 @@ int16_t IRrecv::compare(uint16_t oldval, uint16_t newval) { return 1; } +#if DECODE_HASH /* Converts the raw code values into a 32-bit hash code. * Hopefully this code is unique for each button. * This isn't a "real" decoding, just an arbitrary value. */ bool IRrecv::decodeHash(decode_results *results) { - // Require at least 6 samples to prevent triggering on noise - if (results->rawlen < 6) - return false; - int32_t hash = FNV_BASIS_32; + // Require at least some samples to prevent triggering on noise + if (results->rawlen < unknown_threshold) return false; + int32_t hash = kFnvBasis32; // 'rawlen - 2' to avoid the look ahead from going out of bounds. // Should probably be -3 to avoid comparing the trailing space entry, // however it is left this way for compatibility with previously captured @@ -566,7 +677,7 @@ bool IRrecv::decodeHash(decode_results *results) { for (uint16_t i = 1; i < results->rawlen - 2; i++) { int16_t value = compare(results->rawbuf[i], results->rawbuf[i + 2]); // Add value into the hash - hash = (hash * FNV_PRIME_32) ^ value; + hash = (hash * kFnvPrime32) ^ value; } results->value = hash & 0xFFFFFFFF; results->bits = results->rawlen / 2; @@ -575,9 +686,11 @@ bool IRrecv::decodeHash(decode_results *results) { results->decode_type = UNKNOWN; return true; } +#endif // DECODE_HASH // Match & decode the typical data section of an IR message. -// The data value constructed as the Most Significant Bit first. +// The data value is stored in the least significant bits reguardless of the +// bit ordering requested. // // Args: // data_ptr: A pointer to where we are at in the capture buffer. @@ -586,46 +699,35 @@ bool IRrecv::decodeHash(decode_results *results) { // onespace: Nr. of uSeconds in an expected space signal for a '1' bit. // zeromark: Nr. of uSeconds in an expected mark signal for a '0' bit. // zerospace: Nr. of uSeconds in an expected space signal for a '0' bit. +// tolerance: Percentage error margin to allow. (Def: kTolerance) +// excess: Nr. of useconds. (Def: kMarkExcess) +// MSBfirst: Bit order to save the data in. (Def: true) // Returns: // A match_result_t structure containing the success (or not), the data value, // and how many buffer entries were used. -match_result_t IRrecv::matchData(volatile uint16_t *data_ptr, uint16_t nbits, - uint16_t onemark, uint32_t onespace, - uint16_t zeromark, uint32_t zerospace) { +match_result_t IRrecv::matchData( + volatile uint16_t *data_ptr, const uint16_t nbits, const uint16_t onemark, + const uint32_t onespace, const uint16_t zeromark, const uint32_t zerospace, + const uint8_t tolerance, const int16_t excess, const bool MSBfirst) { match_result_t result; - result.success = false; + result.success = false; // Fail by default. result.data = 0; - if (onemark == zeromark) { // Is this space encoded data format? - for (result.used = 0; - result.used < nbits * 2; - result.used += 2, data_ptr++) { - if (!matchMark(*data_ptr, onemark)) - return result; // Fail - data_ptr++; - if (matchSpace(*data_ptr, onespace)) - result.data = (result.data << 1) | 1; - else if (matchSpace(*data_ptr, zerospace)) - result.data <<= 1; - else - return result; // Fail + for (result.used = 0; result.used < nbits * 2; + result.used += 2, data_ptr += 2) { + // Is the bit a '1'? + if (matchMark(*data_ptr, onemark, tolerance, excess) && + matchSpace(*(data_ptr + 1), onespace, tolerance, excess)) { + result.data = (result.data << 1) | 1; + } else if (matchMark(*data_ptr, zeromark, tolerance, excess) && + matchSpace(*(data_ptr + 1), zerospace, tolerance, excess)) { + result.data <<= 1; // The bit is a '0'. + } else { + if (!MSBfirst) result.data = reverseBits(result.data, result.used / 2); + return result; // It's neither, so fail. } - result.success = true; - } else if (onespace == zerospace) { // Is this mark encoded data format? - for (result.used = 0; - result.used < nbits * 2; - result.used += 2, data_ptr++) { - if (matchMark(*data_ptr, onemark)) - result.data = (result.data << 1) | 1; - else if (matchMark(*data_ptr, zeromark)) - result.data <<= 1; - else - return result; // Fail - data_ptr++; - if (!matchSpace(*data_ptr, onespace)) - return result; // Fail - } - result.success = true; } + result.success = true; + if (!MSBfirst) result.data = reverseBits(result.data, nbits); return result; } diff --git a/lib/IRremoteESP8266-2.5.2.03/src/IRrecv.h b/lib/IRremoteESP8266-2.5.2.03/src/IRrecv.h new file mode 100644 index 000000000..c0f5e781a --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/IRrecv.h @@ -0,0 +1,335 @@ +// Copyright 2009 Ken Shirriff +// Copyright 2015 Mark Szabo +// Copyright 2015 Sebastien Warin +// Copyright 2017 David Conran + +#ifndef IRRECV_H_ +#define IRRECV_H_ + +#ifndef UNIT_TEST +#include +#endif +#include +#define __STDC_LIMIT_MACROS +#include +#include "IRremoteESP8266.h" + +// Constants +const uint16_t kHeader = 2; // Usual nr. of header entries. +const uint16_t kFooter = 2; // Usual nr. of footer (stop bits) entries. +const uint16_t kStartOffset = 1; // Usual rawbuf entry to start from. +#define MS_TO_USEC(x) (x * 1000U) // Convert milli-Seconds to micro-Seconds. +// Marks tend to be 100us too long, and spaces 100us too short +// when received due to sensor lag. +const uint16_t kMarkExcess = 50; +const uint16_t kRawBuf = 100; // Default length of raw capture buffer +const uint64_t kRepeat = UINT64_MAX; +// Default min size of reported UNKNOWN messages. +const uint16_t kUnknownThreshold = 6; + +// receiver states +const uint8_t kIdleState = 2; +const uint8_t kMarkState = 3; +const uint8_t kSpaceState = 4; +const uint8_t kStopState = 5; +const uint8_t kTolerance = 25; // default percent tolerance in measurements. +const uint16_t kRawTick = 2; // Capture tick to uSec factor. +#define RAWTICK kRawTick // Deprecated. For legacy user code support only. +// How long (ms) before we give up wait for more data? +// Don't exceed kMaxTimeoutMs without a good reason. +// That is the capture buffers maximum value size. (UINT16_MAX / kRawTick) +// Typically messages/protocols tend to repeat around the 100ms timeframe, +// thus we should timeout before that to give us some time to try to decode +// before we need to start capturing a possible new message. +// Typically 15ms suits most applications. However, some protocols demand a +// higher value. e.g. 90ms for XMP-1 and some aircon units. +const uint8_t kTimeoutMs = 15; // In MilliSeconds. +#define TIMEOUT_MS kTimeoutMs // For legacy documentation. +const uint16_t kMaxTimeoutMs = kRawTick * (UINT16_MAX / MS_TO_USEC(1)); + +// Use FNV hash algorithm: http://isthe.com/chongo/tech/comp/fnv/#FNV-param +const uint32_t kFnvPrime32 = 16777619UL; +const uint32_t kFnvBasis32 = 2166136261UL; + +#if DECODE_AC +// Hitachi AC is the current largest state size. +const uint16_t kStateSizeMax = kHitachiAc2StateLength; +#else +// Just define something +const uint16_t kStateSizeMax = 0; +#endif + +// Types +// information for the interrupt handler +typedef struct { + uint8_t recvpin; // pin for IR data from detector + uint8_t rcvstate; // state machine + uint16_t timer; // state timer, counts 50uS ticks. + uint16_t bufsize; // max. nr. of entries in the capture buffer. + uint16_t *rawbuf; // raw data + // uint16_t is used for rawlen as it saves 3 bytes of iram in the interrupt + // handler. Don't ask why, I don't know. It just does. + uint16_t rawlen; // counter of entries in rawbuf. + uint8_t overflow; // Buffer overflow indicator. + uint8_t timeout; // Nr. of milliSeconds before we give up. +} irparams_t; + +// results from a data match +typedef struct { + bool success; // Was the match successful? + uint64_t data; // The data found. + uint16_t used; // How many buffer positions were used. +} match_result_t; + +// Classes + +// Results returned from the decoder +class decode_results { + public: + decode_type_t decode_type; // NEC, SONY, RC5, UNKNOWN + // value, address, & command are all mutually exclusive with state. + // i.e. They MUST NOT be used at the same time as state, so we can use a union + // structure to save us a handful of valuable bytes of memory. + union { + struct { + uint64_t value; // Decoded value + uint32_t address; // Decoded device address. + uint32_t command; // Decoded command. + }; + uint8_t state[kStateSizeMax]; // Multi-byte results. + }; + uint16_t bits; // Number of bits in decoded value + volatile uint16_t *rawbuf; // Raw intervals in .5 us ticks + uint16_t rawlen; // Number of records in rawbuf. + bool overflow; + bool repeat; // Is the result a repeat code? +}; + +// main class for receiving IR +class IRrecv { + public: + explicit IRrecv(uint16_t recvpin, uint16_t bufsize = kRawBuf, + uint8_t timeout = kTimeoutMs, + bool save_buffer = false); // Constructor + ~IRrecv(); // Destructor + bool decode(decode_results *results, irparams_t *save = NULL); + void enableIRIn(); + void disableIRIn(); + void resume(); + uint16_t getBufSize(); +#if DECODE_HASH + void setUnknownThreshold(uint16_t length); +#endif + static bool match(uint32_t measured, uint32_t desired, + uint8_t tolerance = kTolerance, uint16_t delta = 0); + static bool matchMark(uint32_t measured, uint32_t desired, + uint8_t tolerance = kTolerance, + int16_t excess = kMarkExcess); + static bool matchSpace(uint32_t measured, uint32_t desired, + uint8_t tolerance = kTolerance, + int16_t excess = kMarkExcess); +#ifndef UNIT_TEST + + private: +#endif + irparams_t *irparams_save; +#if DECODE_HASH + uint16_t unknown_threshold; +#endif + // These are called by decode + void copyIrParams(volatile irparams_t *src, irparams_t *dst); + int16_t compare(uint16_t oldval, uint16_t newval); + static uint32_t ticksLow(uint32_t usecs, uint8_t tolerance = kTolerance, + uint16_t delta = 0); + static uint32_t ticksHigh(uint32_t usecs, uint8_t tolerance = kTolerance, + uint16_t delta = 0); + bool matchAtLeast(uint32_t measured, uint32_t desired, + uint8_t tolerance = kTolerance, uint16_t delta = 0); + match_result_t matchData(volatile uint16_t *data_ptr, const uint16_t nbits, + const uint16_t onemark, const uint32_t onespace, + const uint16_t zeromark, const uint32_t zerospace, + const uint8_t tolerance = kTolerance, + const int16_t excess = kMarkExcess, + const bool MSBfirst = true); + bool decodeHash(decode_results *results); +#if (DECODE_NEC || DECODE_SHERWOOD || DECODE_AIWA_RC_T501 || SEND_SANYO) + bool decodeNEC(decode_results *results, uint16_t nbits = kNECBits, + bool strict = true); +#endif +#if DECODE_SONY + bool decodeSony(decode_results *results, uint16_t nbits = kSonyMinBits, + bool strict = false); +#endif +#if DECODE_SANYO + // DISABLED due to poor quality. + // bool decodeSanyo(decode_results *results, + // uint16_t nbits = kSanyoSA8650BBits, + // bool strict = false); + bool decodeSanyoLC7461(decode_results *results, + uint16_t nbits = kSanyoLC7461Bits, bool strict = true); +#endif +#if DECODE_MITSUBISHI + bool decodeMitsubishi(decode_results *results, + uint16_t nbits = kMitsubishiBits, bool strict = true); +#endif +#if DECODE_MITSUBISHI2 + bool decodeMitsubishi2(decode_results *results, + uint16_t nbits = kMitsubishiBits, bool strict = true); +#endif +#if DECODE_MITSUBISHI_AC + bool decodeMitsubishiAC(decode_results *results, + uint16_t nbits = kMitsubishiACBits, + bool strict = false); +#endif +#if (DECODE_RC5 || DECODE_R6 || DECODE_LASERTAG || DECODE_MWM) + int16_t getRClevel(decode_results *results, uint16_t *offset, uint16_t *used, + uint16_t bitTime, uint8_t tolerance = kTolerance, + int16_t excess = kMarkExcess, uint16_t delta = 0, + uint8_t maxwidth = 3); +#endif +#if DECODE_RC5 + bool decodeRC5(decode_results *results, uint16_t nbits = kRC5XBits, + bool strict = true); +#endif +#if DECODE_RC6 + bool decodeRC6(decode_results *results, uint16_t nbits = kRC6Mode0Bits, + bool strict = false); +#endif +#if DECODE_RCMM + bool decodeRCMM(decode_results *results, uint16_t nbits = kRCMMBits, + bool strict = false); +#endif +#if (DECODE_PANASONIC || DECODE_DENON) + bool decodePanasonic(decode_results *results, uint16_t nbits = kPanasonicBits, + bool strict = false, + uint32_t manufacturer = kPanasonicManufacturer); +#endif +#if DECODE_LG + bool decodeLG(decode_results *results, uint16_t nbits = kLgBits, + bool strict = false); +#endif +#if DECODE_JVC + bool decodeJVC(decode_results *results, uint16_t nbits = kJvcBits, + bool strict = true); +#endif +#if DECODE_SAMSUNG + bool decodeSAMSUNG(decode_results *results, uint16_t nbits = kSamsungBits, + bool strict = true); +#endif +#if DECODE_SAMSUNG_AC + bool decodeSamsungAC(decode_results *results, uint16_t nbits = kSamsungAcBits, + bool strict = true); +#endif +#if DECODE_WHYNTER + bool decodeWhynter(decode_results *results, uint16_t nbits = kWhynterBits, + bool strict = true); +#endif +#if DECODE_COOLIX + bool decodeCOOLIX(decode_results *results, uint16_t nbits = kCoolixBits, + bool strict = true); +#endif +#if DECODE_DENON + bool decodeDenon(decode_results *results, uint16_t nbits = DENON_BITS, + bool strict = true); +#endif +#if DECODE_DISH + bool decodeDISH(decode_results *results, uint16_t nbits = kDishBits, + bool strict = true); +#endif +#if (DECODE_SHARP || DECODE_DENON) + bool decodeSharp(decode_results *results, uint16_t nbits = kSharpBits, + bool strict = true, bool expansion = true); +#endif +#if DECODE_AIWA_RC_T501 + bool decodeAiwaRCT501(decode_results *results, + uint16_t nbits = kAiwaRcT501Bits, bool strict = true); +#endif +#if DECODE_NIKAI + bool decodeNikai(decode_results *results, uint16_t nbits = kNikaiBits, + bool strict = true); +#endif +#if DECODE_MAGIQUEST + bool decodeMagiQuest(decode_results *results, uint16_t nbits = kMagiquestBits, + bool strict = true); +#endif +#if DECODE_KELVINATOR + bool decodeKelvinator(decode_results *results, + uint16_t nbits = kKelvinatorBits, bool strict = true); +#endif +#if DECODE_DAIKIN + bool decodeDaikin(decode_results *results, uint16_t nbits = kDaikinRawBits, + bool strict = true); +#endif +#if DECODE_TOSHIBA_AC + bool decodeToshibaAC(decode_results *results, + uint16_t nbytes = kToshibaACBits, bool strict = true); +#endif +#if DECODE_MIDEA + bool decodeMidea(decode_results *results, uint16_t nbits = kMideaBits, + bool strict = true); +#endif +#if DECODE_FUJITSU_AC + bool decodeFujitsuAC(decode_results *results, uint16_t nbits = kFujitsuAcBits, + bool strict = false); +#endif +#if DECODE_LASERTAG + bool decodeLasertag(decode_results *results, uint16_t nbits = kLasertagBits, + bool strict = true); +#endif +#if DECODE_CARRIER_AC + bool decodeCarrierAC(decode_results *results, uint16_t nbits = kCarrierAcBits, + bool strict = true); +#endif +#if DECODE_GREE + bool decodeGree(decode_results *results, uint16_t nbits = kGreeBits, + bool strict = true); +#endif +#if (DECODE_HAIER_AC | DECODE_HAIER_AC_YRW02) + bool decodeHaierAC(decode_results *results, uint16_t nbits = kHaierACBits, + bool strict = true); +#endif +#if DECODE_HAIER_AC_YRW02 + bool decodeHaierACYRW02(decode_results *results, + uint16_t nbits = kHaierACYRW02Bits, + bool strict = true); +#endif +#if (DECODE_HITACHI_AC || DECODE_HITACHI_AC2) + bool decodeHitachiAC(decode_results *results, uint16_t nbits = kHitachiAcBits, + bool strict = true); +#endif +#if DECODE_HITACHI_AC1 + bool decodeHitachiAC1(decode_results *results, + uint16_t nbits = kHitachiAc1Bits, bool strict = true); +#endif +#if DECODE_GICABLE + bool decodeGICable(decode_results *results, uint16_t nbits = kGicableBits, + bool strict = true); +#endif +#if DECODE_WHIRLPOOL_AC + bool decodeWhirlpoolAC(decode_results *results, + uint16_t nbits = kWhirlpoolAcBits, bool strict = true); +#endif +#if DECODE_LUTRON + bool decodeLutron(decode_results *results, uint16_t nbits = kLutronBits, + bool strict = true); +#endif +#if DECODE_ELECTRA_AC + bool decodeElectraAC(decode_results *results, uint16_t nbits = kElectraAcBits, + bool strict = true); +#endif +#if DECODE_PANASONIC_AC + bool decodePanasonicAC(decode_results *results, + uint16_t nbits = kPanasonicAcBits, bool strict = true); +#endif +#if DECODE_PIONEER + bool decodePioneer(decode_results *results, + const uint16_t nbits = kPioneerBits, + const bool strict = true); +#endif +#if DECODE_MWM + bool decodeMWM(decode_results *results, uint16_t nbits = 24, + bool strict = true); +#endif +}; + +#endif // IRRECV_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/IRremoteESP8266.h b/lib/IRremoteESP8266-2.5.2.03/src/IRremoteESP8266.h new file mode 100644 index 000000000..e228cbcb0 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/IRremoteESP8266.h @@ -0,0 +1,601 @@ + /*************************************************** + * IRremote for ESP8266 + * + * Based on the IRremote library for Arduino by Ken Shirriff + * Version 0.11 August, 2009 + * Copyright 2009 Ken Shirriff + * For details, see http://arcfn.com/2009/08/multi-protocol-infrared-remote-library.html + * + * Edited by Mitra to add new controller SANYO + * + * Interrupt code based on NECIRrcv by Joe Knapp + * http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1210243556 + * Also influenced by http://zovirl.com/2008/11/12/building-a-universal-remote-with-an-arduino/ + * + * JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post) + * LG added by Darryl Smith (based on the JVC protocol) + * Whynter A/C ARC-110WD added by Francesco Meschia + * Coolix A/C / heatpump added by (send) bakrus & (decode) crankyoldgit + * Denon: sendDenon, decodeDenon added by Massimiliano Pinto + (from https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Denon.cpp) + * Kelvinator A/C and Sherwood added by crankyoldgit + * Mitsubishi (TV) sending added by crankyoldgit + * Pronto code sending added by crankyoldgit + * Mitsubishi & Toshiba A/C added by crankyoldgit + * (derived from https://github.com/r45635/HVAC-IR-Control) + * DISH decode by marcosamarinho + * Gree Heatpump sending added by Ville Skyttä (scop) + * (derived from https://github.com/ToniA/arduino-heatpumpir/blob/master/GreeHeatpumpIR.cpp) + * Updated by markszabo (https://github.com/markszabo/IRremoteESP8266) for sending IR code on ESP8266 + * Updated by Sebastien Warin (http://sebastien.warin.fr) for receiving IR code on ESP8266 + * + * Updated by sillyfrog for Daikin, adopted from + * (https://github.com/mharizanov/Daikin-AC-remote-control-over-the-Internet/) + * Fujitsu A/C code added by jonnygraham + * Trotec AC code by stufisher + * Carrier & Haier AC code by crankyoldgit + * + * GPL license, all text above must be included in any redistribution + ****************************************************/ + +#ifndef IRREMOTEESP8266_H_ +#define IRREMOTEESP8266_H_ + +#define __STDC_LIMIT_MACROS +#include +#ifdef UNIT_TEST +#include +#endif + +// Library Version +#define _IRREMOTEESP8266_VERSION_ "2.5.2" +// Supported IR protocols +// Each protocol you include costs memory and, during decode, costs time +// Disable (set to false) all the protocols you do not need/want! +// The Air Conditioner protocols are the most expensive memory-wise. +// +/* +#define DECODE_HASH true // Semi-unique code for unknown messages + +#define SEND_RAW true + +#define DECODE_NEC true +#define SEND_NEC true + +#define DECODE_SHERWOOD true // Doesn't exist. Actually is DECODE_NEC +#define SEND_SHERWOOD true + +#define DECODE_RC5 true +#define SEND_RC5 true + +#define DECODE_RC6 true +#define SEND_RC6 true + +#define DECODE_RCMM true +#define SEND_RCMM true + +#define DECODE_SONY true +#define SEND_SONY true + +#define DECODE_PANASONIC true +#define SEND_PANASONIC true + +#define DECODE_JVC true +#define SEND_JVC true + +#define DECODE_SAMSUNG true +#define SEND_SAMSUNG true + +#define DECODE_SAMSUNG_AC true +#define SEND_SAMSUNG_AC true + +#define DECODE_WHYNTER true +#define SEND_WHYNTER true + +#define DECODE_AIWA_RC_T501 true +#define SEND_AIWA_RC_T501 true + +#define DECODE_LG true +#define SEND_LG true + +#define DECODE_SANYO true +#define SEND_SANYO true + +#define DECODE_MITSUBISHI true +#define SEND_MITSUBISHI true + +#define DECODE_MITSUBISHI2 true +#define SEND_MITSUBISHI2 true + +#define DECODE_DISH true +#define SEND_DISH true + +#define DECODE_SHARP true +#define SEND_SHARP true + +#define DECODE_DENON true +#define SEND_DENON true + +#define DECODE_KELVINATOR true +#define SEND_KELVINATOR true + +#define DECODE_MITSUBISHI_AC true // Beta. +#define SEND_MITSUBISHI_AC true + +#define DECODE_FUJITSU_AC true +#define SEND_FUJITSU_AC true + +#define DECODE_DAIKIN true +#define SEND_DAIKIN true + +#define DECODE_COOLIX true +#define SEND_COOLIX true + +#define DECODE_GLOBALCACHE false // Not written. +#define SEND_GLOBALCACHE true + +#define DECODE_GREE true +#define SEND_GREE true + +#define DECODE_PRONTO false // Not written. +#define SEND_PRONTO true + +#define DECODE_ARGO false // Not written. +#define SEND_ARGO true + +#define DECODE_TROTEC false // Not implemented. +#define SEND_TROTEC true + +#define DECODE_NIKAI true +#define SEND_NIKAI true + +#define DECODE_TOSHIBA_AC true +#define SEND_TOSHIBA_AC true + +#define DECODE_MAGIQUEST true +#define SEND_MAGIQUEST true + +#define DECODE_MIDEA true +#define SEND_MIDEA true + +#define DECODE_LASERTAG true +#define SEND_LASERTAG true + +#define DECODE_CARRIER_AC true +#define SEND_CARRIER_AC true + +#define DECODE_HAIER_AC true +#define SEND_HAIER_AC true + +#define DECODE_HITACHI_AC true +#define SEND_HITACHI_AC true + +#define DECODE_HITACHI_AC1 true +#define SEND_HITACHI_AC1 true + +#define DECODE_HITACHI_AC2 true +#define SEND_HITACHI_AC2 true + +#define DECODE_GICABLE true +#define SEND_GICABLE true + +#define DECODE_HAIER_AC_YRW02 true +#define SEND_HAIER_AC_YRW02 true + +#define DECODE_WHIRLPOOL_AC true +#define SEND_WHIRLPOOL_AC true + +#define DECODE_LUTRON true +#define SEND_LUTRON true + +#define DECODE_ELECTRA_AC true +#define SEND_ELECTRA_AC true + +#define DECODE_PANASONIC_AC true +#define SEND_PANASONIC_AC true + +#define DECODE_MWM true +#define SEND_MWM true + +#define DECODE_PIONEER true +#define SEND_PIONEER true +*/ + +// Tasmota supported protocols (less protocols is less code size) +#define DECODE_HASH true // Semi-unique code for unknown messages + +#define SEND_RAW true + +#define DECODE_NEC true +#define SEND_NEC true + +#define DECODE_SHERWOOD false // Doesn't exist. Actually is DECODE_NEC +#define SEND_SHERWOOD false + +#define DECODE_RC5 true +#define SEND_RC5 true + +#define DECODE_RC6 true +#define SEND_RC6 true + +#define DECODE_RCMM false +#define SEND_RCMM false + +#define DECODE_SONY true +#define SEND_SONY true + +#define DECODE_PANASONIC true +#define SEND_PANASONIC true + +#define DECODE_JVC true +#define SEND_JVC true + +#define DECODE_SAMSUNG true +#define SEND_SAMSUNG true + +#define DECODE_SAMSUNG_AC false +#define SEND_SAMSUNG_AC false + +#define DECODE_WHYNTER false +#define SEND_WHYNTER false + +#define DECODE_AIWA_RC_T501 false +#define SEND_AIWA_RC_T501 false + +#define DECODE_LG true +#define SEND_LG true + +#define DECODE_SANYO false +#define SEND_SANYO false + +#define DECODE_MITSUBISHI false +#define SEND_MITSUBISHI false + +#define DECODE_MITSUBISHI2 false +#define SEND_MITSUBISHI2 false + +#define DECODE_DISH false +#define SEND_DISH true + +#define DECODE_SHARP false +#define SEND_SHARP false + +#define DECODE_DENON false +#define SEND_DENON false + +#define DECODE_KELVINATOR false +#define SEND_KELVINATOR false + +#define DECODE_MITSUBISHI_AC false // Beta. +#define SEND_MITSUBISHI_AC true + +#define DECODE_FUJITSU_AC false +#define SEND_FUJITSU_AC true + +#define DECODE_DAIKIN false +#define SEND_DAIKIN false + +#define DECODE_COOLIX false +#define SEND_COOLIX false + +#define DECODE_GLOBALCACHE false // Not written. +#define SEND_GLOBALCACHE false + +#define DECODE_GREE false +#define SEND_GREE false + +#define DECODE_PRONTO false // Not written. +#define SEND_PRONTO false + +#define DECODE_ARGO false // Not written. +#define SEND_ARGO false + +#define DECODE_TROTEC false // Not implemented. +#define SEND_TROTEC false + +#define DECODE_NIKAI false +#define SEND_NIKAI false + +#define DECODE_TOSHIBA_AC false +#define SEND_TOSHIBA_AC false + +#define DECODE_MAGIQUEST false +#define SEND_MAGIQUEST false + +#define DECODE_MIDEA false +#define SEND_MIDEA false + +#define DECODE_LASERTAG false +#define SEND_LASERTAG false + +#define DECODE_CARRIER_AC false +#define SEND_CARRIER_AC false + +#define DECODE_HAIER_AC false +#define SEND_HAIER_AC false + +#define DECODE_HITACHI_AC false +#define SEND_HITACHI_AC false + +#define DECODE_HITACHI_AC1 false +#define SEND_HITACHI_AC1 false + +#define DECODE_HITACHI_AC2 false +#define SEND_HITACHI_AC2 false + +#define DECODE_GICABLE false +#define SEND_GICABLE false + +#define DECODE_HAIER_AC_YRW02 false +#define SEND_HAIER_AC_YRW02 false + +#define DECODE_WHIRLPOOL_AC false +#define SEND_WHIRLPOOL_AC false + +#define DECODE_LUTRON false +#define SEND_LUTRON false + +#define DECODE_ELECTRA_AC false +#define SEND_ELECTRA_AC false + +#define DECODE_PANASONIC_AC false +#define SEND_PANASONIC_AC false + +#define DECODE_MWM false +#define SEND_MWM false + +#define DECODE_PIONEER false +#define SEND_PIONEER false + +#if (DECODE_ARGO || DECODE_DAIKIN || DECODE_FUJITSU_AC || DECODE_GREE || \ + DECODE_KELVINATOR || DECODE_MITSUBISHI_AC || DECODE_TOSHIBA_AC || \ + DECODE_TROTEC || DECODE_HAIER_AC || DECODE_HITACHI_AC || \ + DECODE_HITACHI_AC1 || DECODE_HITACHI_AC2 || DECODE_HAIER_AC_YRW02 || \ + DECODE_WHIRLPOOL_AC || DECODE_SAMSUNG_AC || DECODE_ELECTRA_AC || \ + DECODE_PANASONIC_AC || DECODE_MWM) +#define DECODE_AC true // We need some common infrastructure for decoding A/Cs. +#else +#define DECODE_AC false // We don't need that infrastructure. +#endif + +// Use millisecond 'delay()' calls where we can to avoid tripping the WDT. +// Note: If you plan to send IR messages in the callbacks of the AsyncWebserver +// library, you need to set ALLOW_DELAY_CALLS to false. +// Ref: https://github.com/markszabo/IRremoteESP8266/issues/430 +#define ALLOW_DELAY_CALLS true + +/* + * Always add to the end of the list and should never remove entries + * or change order. Projects may save the type number for later usage + * so numbering should always stay the same. + */ +enum decode_type_t { + UNKNOWN = -1, + UNUSED = 0, + RC5, + RC6, + NEC, + SONY, + PANASONIC, + JVC, + SAMSUNG, + WHYNTER, + AIWA_RC_T501, + LG, + SANYO, + MITSUBISHI, + DISH, + SHARP, + COOLIX, + DAIKIN, + DENON, + KELVINATOR, + SHERWOOD, + MITSUBISHI_AC, + RCMM, + SANYO_LC7461, + RC5X, + GREE, + PRONTO, // Technically not a protocol, but an encoding. + NEC_LIKE, + ARGO, + TROTEC, + NIKAI, + RAW, // Technically not a protocol, but an encoding. + GLOBALCACHE, // Technically not a protocol, but an encoding. + TOSHIBA_AC, + FUJITSU_AC, + MIDEA, + MAGIQUEST, + LASERTAG, + CARRIER_AC, + HAIER_AC, + MITSUBISHI2, + HITACHI_AC, + HITACHI_AC1, + HITACHI_AC2, + GICABLE, + HAIER_AC_YRW02, + WHIRLPOOL_AC, + SAMSUNG_AC, + LUTRON, + ELECTRA_AC, + PANASONIC_AC, + PIONEER, + LG2, + MWM, +}; + +// Message lengths & required repeat values +const uint16_t kNoRepeat = 0; +const uint16_t kSingleRepeat = 1; + +const uint16_t kAiwaRcT501Bits = 15; +const uint16_t kAiwaRcT501MinRepeats = kSingleRepeat; +const uint16_t kArgoStateLength = 12; +const uint16_t kCoolixBits = 24; +const uint16_t kCarrierAcBits = 32; +const uint16_t kCarrierAcMinRepeat = kNoRepeat; +// Daikin has a lot of static stuff that is discarded +const uint16_t kDaikinRawBits = 583; +const uint16_t kDaikinStateLength = 27; +const uint16_t kDaikinBits = kDaikinStateLength * 8; +const uint16_t kDenonBits = 15; +const uint16_t kDenonLegacyBits = 14; +const uint16_t kDishBits = 16; +const uint16_t kDishMinRepeat = 3; +const uint16_t kElectraAcStateLength = 13; +const uint16_t kElectraAcBits = kElectraAcStateLength * 8; +const uint16_t kFujitsuAcMinRepeat = kNoRepeat; +const uint16_t kFujitsuAcStateLength = 16; +const uint16_t kFujitsuAcStateLengthShort = 7; +const uint16_t kFujitsuAcBits = kFujitsuAcStateLength * 8; +const uint16_t kFujitsuAcMinBits = (kFujitsuAcStateLengthShort - 1) * 8; +const uint16_t kGicableBits = 16; +const uint16_t kGicableMinRepeat = kSingleRepeat; +const uint16_t kGreeStateLength = 8; +const uint16_t kGreeBits = kGreeStateLength * 8; +const uint16_t kHaierACStateLength = 9; +const uint16_t kHaierACBits = kHaierACStateLength * 8; +const uint16_t kHaierACYRW02StateLength = 14; +const uint16_t kHaierACYRW02Bits = kHaierACYRW02StateLength * 8; +const uint16_t kHitachiAcStateLength = 28; +const uint16_t kHitachiAcBits = kHitachiAcStateLength * 8; +const uint16_t kHitachiAc1StateLength = 13; +const uint16_t kHitachiAc1Bits = kHitachiAc1StateLength * 8; +const uint16_t kHitachiAc2StateLength = 53; +const uint16_t kHitachiAc2Bits = kHitachiAc2StateLength * 8; +const uint16_t kJvcBits = 16; +const uint16_t kKelvinatorStateLength = 16; +const uint16_t kKelvinatorBits = kKelvinatorStateLength * 8; +const uint16_t kLasertagBits = 13; +const uint16_t kLasertagMinRepeat = kNoRepeat; +const uint16_t kLgBits = 28; +const uint16_t kLg32Bits = 32; +const uint16_t kLutronBits = 35; +const uint16_t kMagiquestBits = 56; +const uint16_t kMideaBits = 48; +const uint16_t kMideaMinRepeat = kNoRepeat; +const uint16_t kMitsubishiBits = 16; +// TODO(anyone): Verify that the Mitsubishi repeat is really needed. +// Based on marcosamarinho's code. +const uint16_t kMitsubishiMinRepeat = kSingleRepeat; +const uint16_t kMitsubishiACStateLength = 18; +const uint16_t kMitsubishiACBits = kMitsubishiACStateLength * 8; +const uint16_t kMitsubishiACMinRepeat = kSingleRepeat; +const uint16_t kNikaiBits = 24; +const uint16_t kNECBits = 32; +const uint16_t kPanasonicBits = 48; +const uint32_t kPanasonicManufacturer = 0x4004; +const uint16_t kPanasonicAcStateLength = 27; +const uint16_t kPanasonicAcStateShortLength = 16; +const uint16_t kPanasonicAcBits = kPanasonicAcStateLength * 8; +const uint16_t kPanasonicAcShortBits = kPanasonicAcStateShortLength * 8; +const uint16_t kPioneerBits = 64; +const uint16_t kProntoMinLength = 6; +const uint16_t kRC5RawBits = 14; +const uint16_t kRC5Bits = kRC5RawBits - 2; +const uint16_t kRC5XBits = kRC5RawBits - 1; +const uint16_t kRC6Mode0Bits = 20; // Excludes the 'start' bit. +const uint16_t kRC6_36Bits = 36; // Excludes the 'start' bit. +const uint16_t kRCMMBits = 24; +const uint16_t kSamsungBits = 32; +const uint16_t kSamsungAcStateLength = 14; +const uint16_t kSamsungAcBits = kSamsungAcStateLength * 8; +const uint16_t kSamsungAcExtendedStateLength = 21; +const uint16_t kSamsungAcExtendedBits = kSamsungAcExtendedStateLength * 8; +const uint16_t kSanyoSA8650BBits = 12; +const uint16_t kSanyoLC7461AddressBits = 13; +const uint16_t kSanyoLC7461CommandBits = 8; +const uint16_t kSanyoLC7461Bits = (kSanyoLC7461AddressBits + + kSanyoLC7461CommandBits) * 2; +const uint8_t kSharpAddressBits = 5; +const uint8_t kSharpCommandBits = 8; +const uint16_t kSharpBits = kSharpAddressBits + kSharpCommandBits + 2; // 15 +const uint8_t kSherwoodBits = kNECBits; +const uint16_t kSherwoodMinRepeat = kSingleRepeat; +const uint16_t kSony12Bits = 12; +const uint16_t kSony15Bits = 15; +const uint16_t kSony20Bits = 20; +const uint16_t kSonyMinBits = 12; +const uint16_t kSonyMinRepeat = 2; +const uint16_t kToshibaACStateLength = 9; +const uint16_t kToshibaACBits = kToshibaACStateLength * 8; +const uint16_t kToshibaACMinRepeat = kSingleRepeat; +const uint16_t kTrotecStateLength = 9; +const uint16_t kWhirlpoolAcStateLength = 21; +const uint16_t kWhirlpoolAcBits = kWhirlpoolAcStateLength * 8; +const uint16_t kWhynterBits = 32; + +// Legacy defines. (Deprecated) +#define AIWA_RC_T501_BITS kAiwaRcT501Bits +#define ARGO_COMMAND_LENGTH kArgoStateLength +#define COOLIX_BITS kCoolixBits +#define CARRIER_AC_BITS kCarrierAcBits +#define DAIKIN_COMMAND_LENGTH kDaikinStateLength +#define DENON_BITS kDenonBits +#define DENON_48_BITS kPanasonicBits +#define DENON_LEGACY_BITS kDenonLegacyBits +#define DISH_BITS kDishBits +#define FUJITSU_AC_MIN_REPEAT kFujitsuAcMinRepeat +#define FUJITSU_AC_STATE_LENGTH kFujitsuAcStateLength +#define FUJITSU_AC_STATE_LENGTH_SHORT kFujitsuAcStateLengthShort +#define FUJITSU_AC_BITS kFujitsuAcBits +#define FUJITSU_AC_MIN_BITS kFujitsuAcMinBits +#define GICABLE_BITS kGicableBits +#define GREE_STATE_LENGTH kGreeStateLength +#define HAIER_AC_STATE_LENGTH kHaierACStateLength +#define HAIER_AC_YRW02_STATE_LENGTH kHaierACYRW02StateLength +#define HITACHI_AC_STATE_LENGTH kHitachiAcStateLength +#define HITACHI_AC_BITS kHitachiAcBits +#define HITACHI_AC1_STATE_LENGTH kHitachiAc1StateLength +#define HITACHI_AC1_BITS kHitachiAc1Bits +#define HITACHI_AC2_STATE_LENGTH kHitachiAc2StateLength +#define HITACHI_AC2_BITS kHitachiAc2Bits +#define JVC_BITS kJvcBits +#define KELVINATOR_STATE_LENGTH kKelvinatorStateLength +#define LASERTAG_BITS kLasertagBits +#define LG_BITS kLgBits +#define LG32_BITS kLg32Bits +#define MAGIQUEST_BITS kMagiquestBits +#define MIDEA_BITS kMideaBits +#define MITSUBISHI_BITS kMitsubishiBits +#define MITSUBISHI_AC_STATE_LENGTH kMitsubishiACStateLength +#define NEC_BITS kNECBits +#define NIKAI_BITS kNikaiBits +#define PANASONIC_BITS kPanasonicBits +#define RC5_BITS kRC5Bits +#define RC5X_BITS kRC5XBits +#define RC6_MODE0_BITS kRC6Mode0Bits +#define RC6_36_BITS kRC6_36Bits +#define RCMM_BITS kRCMMBits +#define SANYO_LC7461_BITS kSanyoLC7461Bits +#define SAMSUNG_BITS kSamsungBits +#define SANYO_SA8650B_BITS kSanyoSA8650BBits +#define SHARP_BITS kSharpBits +#define SHERWOOD_BITS kSherwoodBits +#define SONY_12_BITS kSony12Bits +#define SONY_15_BITS kSony15Bits +#define SONY_20_BITS kSony20Bits +#define TOSHIBA_AC_STATE_LENGTH kToshibaACStateLength +#define TROTEC_COMMAND_LENGTH kTrotecStateLength +#define WHYNTER_BITS kWhynterBits + +// Turn on Debugging information by uncommenting the following line. +// #define DEBUG 1 + +#ifdef DEBUG +#ifdef UNIT_TEST +#define DPRINT(x) do { std::cout << x; } while (0) +#define DPRINTLN(x) do { std::cout << x << std::endl; } while (0) +#endif // UNIT_TEST +#ifdef ARDUINO +#define DPRINT(x) do { Serial.print(x); } while (0) +#define DPRINTLN(x) do { Serial.println(x); } while (0) +#endif // ARDUINO +#else // DEBUG +#define DPRINT(x) +#define DPRINTLN(x) +#endif // DEBUG + +#endif // IRREMOTEESP8266_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/IRsend.cpp b/lib/IRremoteESP8266-2.5.2.03/src/IRsend.cpp new file mode 100644 index 000000000..96f95172d --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/IRsend.cpp @@ -0,0 +1,601 @@ +// Copyright 2009 Ken Shirriff +// Copyright 2015 Mark Szabo +// Copyright 2017 David Conran + +#include "IRsend.h" +#ifndef UNIT_TEST +#include +#else +#define __STDC_LIMIT_MACROS +#include +#endif +#include +#ifdef UNIT_TEST +#include +#endif +#include "IRtimer.h" + +// Originally from https://github.com/shirriff/Arduino-IRremote/ +// Updated by markszabo (https://github.com/markszabo/IRremoteESP8266) for +// sending IR code on ESP8266 + +// IRsend ---------------------------------------------------------------------- +// Create an IRsend object. +// +// Args: +// IRsendPin: Which GPIO pin to use when sending an IR command. +// inverted: *DANGER* Optional flag to invert the output. (default = false) +// e.g. LED is illuminated when GPIO is LOW rather than HIGH. +// Setting this to something other than the default could +// easily destroy your IR LED if you are overdriving it. +// Unless you *REALLY* know what you are doing, don't change this. +// use_modulation: Do we do frequency modulation during transmission? +// i.e. If not, assume a 100% duty cycle. Ignore attempts +// to change the duty cycle etc. +// Returns: +// An IRsend object. +IRsend::IRsend(uint16_t IRsendPin, bool inverted, bool use_modulation) + : IRpin(IRsendPin), periodOffset(kPeriodOffset) { + if (inverted) { + outputOn = LOW; + outputOff = HIGH; + } else { + outputOn = HIGH; + outputOff = LOW; + } + modulation = use_modulation; + if (modulation) + _dutycycle = kDutyDefault; + else + _dutycycle = kDutyMax; +} + +// Enable the pin for output. +void IRsend::begin() { +#ifndef UNIT_TEST + pinMode(IRpin, OUTPUT); +#endif + ledOff(); // Ensure the LED is in a known safe state when we start. +} + +// Turn off the IR LED. +void IRsend::ledOff() { +#ifndef UNIT_TEST + digitalWrite(IRpin, outputOff); +#endif +} + +// Turn on the IR LED. +void IRsend::ledOn() { +#ifndef UNIT_TEST + digitalWrite(IRpin, outputOn); +#endif +} + +// Calculate the period for a given frequency. (T = 1/f) +// +// Args: +// freq: Frequency in Hz. +// use_offset: Should we use the calculated offset or not? +// Returns: +// nr. of uSeconds. +uint32_t IRsend::calcUSecPeriod(uint32_t hz, bool use_offset) { + if (hz == 0) hz = 1; // Avoid Zero hz. Divide by Zero is nasty. + uint32_t period = + (1000000UL + hz / 2) / hz; // The equiv of round(1000000/hz). + // Apply the offset and ensure we don't result in a <= 0 value. + if (use_offset) + return std::max((uint32_t)1, period + periodOffset); + else + return std::max((uint32_t)1, period); +} + +// Set the output frequency modulation and duty cycle. +// +// Args: +// freq: The freq we want to modulate at. Assumes < 1000 means kHz else Hz. +// duty: Percentage duty cycle of the LED. e.g. 25 = 25% = 1/4 on, 3/4 off. +// This is ignored if modulation is disabled at object instantiation. +// +// Note: +// Integer timing functions & math mean we can't do fractions of +// microseconds timing. Thus minor changes to the freq & duty values may have +// limited effect. You've been warned. +void IRsend::enableIROut(uint32_t freq, uint8_t duty) { + // Set the duty cycle to use if we want freq. modulation. + if (modulation) { + _dutycycle = std::min(duty, kDutyMax); + } else { + _dutycycle = kDutyMax; + } + if (freq < 1000) // Were we given kHz? Supports the old call usage. + freq *= 1000; + uint32_t period = calcUSecPeriod(freq); + // Nr. of uSeconds the LED will be on per pulse. + onTimePeriod = (period * _dutycycle) / kDutyMax; + // Nr. of uSeconds the LED will be off per pulse. + offTimePeriod = period - onTimePeriod; +} + +#if ALLOW_DELAY_CALLS +// An ESP8266 RTOS watch-dog timer friendly version of delayMicroseconds(). +// Args: +// usec: Nr. of uSeconds to delay for. +void IRsend::_delayMicroseconds(uint32_t usec) { + // delayMicroseconds() is only accurate to 16383us. + // Ref: https://www.arduino.cc/en/Reference/delayMicroseconds + if (usec <= kMaxAccurateUsecDelay) { +#ifndef UNIT_TEST + delayMicroseconds(usec); +#endif + } else { +#ifndef UNIT_TEST + // Invoke a delay(), where possible, to avoid triggering the WDT. + delay(usec / 1000UL); // Delay for as many whole milliseconds as we can. + // Delay the remaining sub-millisecond. + delayMicroseconds(static_cast(usec % 1000UL)); +#endif + } +} +#else // ALLOW_DELAY_CALLS +// A version of delayMicroseconds() that handles large values and does NOT use +// the watch-dog friendly delay() calls where appropriate. +// Args: +// usec: Nr. of uSeconds to delay for. +// +// NOTE: Use this only if you know what you are doing as it may cause the WDT +// to reset the ESP8266. +void IRsend::_delayMicroseconds(uint32_t usec) { + for (; usec > kMaxAccurateUsecDelay; usec -= kMaxAccurateUsecDelay) +#ifndef UNIT_TEST + delayMicroseconds(kMaxAccurateUsecDelay); + delayMicroseconds(static_cast(usec)); +#endif // UNIT_TEST +} +#endif // ALLOW_DELAY_CALLS + +// Modulate the IR LED for the given period (usec) and at the duty cycle set. +// +// Args: +// usec: The period of time to modulate the IR LED for, in microseconds. +// Returns: +// Nr. of pulses actually sent. +// +// Note: +// The ESP8266 has no good way to do hardware PWM, so we have to do it all +// in software. There is a horrible kludge/brilliant hack to use the second +// serial TX line to do fairly accurate hardware PWM, but it is only +// available on a single specific GPIO and only available on some modules. +// e.g. It's not available on the ESP-01 module. +// Hence, for greater compatibility & choice, we don't use that method. +// Ref: +// https://www.analysir.com/blog/2017/01/29/updated-esp8266-nodemcu-backdoor-upwm-hack-for-ir-signals/ +uint16_t IRsend::mark(uint16_t usec) { + // Handle the simple case of no required frequency modulation. + if (!modulation || _dutycycle >= 100) { + ledOn(); + _delayMicroseconds(usec); + ledOff(); + return 1; + } + + // Not simple, so do it assuming frequency modulation. + uint16_t counter = 0; + IRtimer usecTimer = IRtimer(); + // Cache the time taken so far. This saves us calling time, and we can be + // assured that we can't have odd math problems. i.e. unsigned under/overflow. + uint32_t elapsed = usecTimer.elapsed(); + + while (elapsed < usec) { // Loop until we've met/exceeded our required time. + ledOn(); + // Calculate how long we should pulse on for. + // e.g. Are we to close to the end of our requested mark time (usec)? + _delayMicroseconds(std::min((uint32_t)onTimePeriod, usec - elapsed)); + ledOff(); + counter++; + if (elapsed + onTimePeriod >= usec) + return counter; // LED is now off & we've passed our allotted time. + // Wait for the lesser of the rest of the duty cycle, or the time remaining. + _delayMicroseconds( + std::min(usec - elapsed - onTimePeriod, (uint32_t)offTimePeriod)); + elapsed = usecTimer.elapsed(); // Update & recache the actual elapsed time. + } + return counter; +} + +// Turn the pin (LED) off for a given time. +// Sends an IR space for the specified number of microseconds. +// A space is no output, so the PWM output is disabled. +// +// Args: +// time: Time in microseconds (us). +void IRsend::space(uint32_t time) { + ledOff(); + if (time == 0) return; + _delayMicroseconds(time); +} + +// Calculate & set any offsets to account for execution times. +// +// Args: +// hz: The frequency to calibrate at >= 1000Hz. Default is 38000Hz. +// +// Returns: +// The calculated period offset (in uSeconds) which is now in use. e.g. -5. +// +// Status: Stable / Working. +// +// NOTE: +// This will generate an 65535us mark() IR LED signal. +// This only needs to be called once, if at all. +int8_t IRsend::calibrate(uint16_t hz) { + if (hz < 1000) // Were we given kHz? Supports the old call usage. + hz *= 1000; + periodOffset = 0; // Turn off any existing offset while we calibrate. + enableIROut(hz); + IRtimer usecTimer = IRtimer(); // Start a timer *just* before we do the call. + uint16_t pulses = mark(UINT16_MAX); // Generate a PWM of 65,535 us. (Max.) + uint32_t timeTaken = usecTimer.elapsed(); // Record the time it took. + // While it shouldn't be necessary, assume at least 1 pulse, to avoid a + // divide by 0 situation. + pulses = std::max(pulses, (uint16_t)1U); + uint32_t calcPeriod = calcUSecPeriod(hz); // e.g. @38kHz it should be 26us. + // Assuming 38kHz for the example calculations: + // In a 65535us pulse, we should have 2520.5769 pulses @ 26us periods. + // e.g. 65535.0us / 26us = 2520.5769 + // This should have caused approx 2520 loops through the main loop in mark(). + // The average over that many interations should give us a reasonable + // approximation at what offset we need to use to account for instruction + // execution times. + // + // Calculate the actual period from the actual time & the actual pulses + // generated. + double_t actualPeriod = (double_t)timeTaken / (double_t)pulses; + // Store the difference between the actual time per period vs. calculated. + periodOffset = (int8_t)((double_t)calcPeriod - actualPeriod); + return periodOffset; +} + +// Generic method for sending data that is common to most protocols. +// Will send leading or trailing 0's if the nbits is larger than the number +// of bits in data. +// +// Args: +// onemark: Nr. of usecs for the led to be pulsed for a '1' bit. +// onespace: Nr. of usecs for the led to be fully off for a '1' bit. +// zeromark: Nr. of usecs for the led to be pulsed for a '0' bit. +// zerospace: Nr. of usecs for the led to be fully off for a '0' bit. +// data: The data to be transmitted. +// nbits: Nr. of bits of data to be sent. +// MSBfirst: Flag for bit transmission order. Defaults to MSB->LSB order. +void IRsend::sendData(uint16_t onemark, uint32_t onespace, uint16_t zeromark, + uint32_t zerospace, uint64_t data, uint16_t nbits, + bool MSBfirst) { + if (nbits == 0) // If we are asked to send nothing, just return. + return; + if (MSBfirst) { // Send the MSB first. + // Send 0's until we get down to a bit size we can actually manage. + while (nbits > sizeof(data) * 8) { + mark(zeromark); + space(zerospace); + nbits--; + } + // Send the supplied data. + for (uint64_t mask = 1ULL << (nbits - 1); mask; mask >>= 1) + if (data & mask) { // Send a 1 + mark(onemark); + space(onespace); + } else { // Send a 0 + mark(zeromark); + space(zerospace); + } + } else { // Send the Least Significant Bit (LSB) first / MSB last. + for (uint16_t bit = 0; bit < nbits; bit++, data >>= 1) + if (data & 1) { // Send a 1 + mark(onemark); + space(onespace); + } else { // Send a 0 + mark(zeromark); + space(zerospace); + } + } +} + +// Generic method for sending simple protocol messages. +// Will send leading or trailing 0's if the nbits is larger than the number +// of bits in data. +// +// Args: +// headermark: Nr. of usecs for the led to be pulsed for the header mark. +// A value of 0 means no header mark. +// headerspace: Nr. of usecs for the led to be off after the header mark. +// A value of 0 means no header space. +// onemark: Nr. of usecs for the led to be pulsed for a '1' bit. +// onespace: Nr. of usecs for the led to be fully off for a '1' bit. +// zeromark: Nr. of usecs for the led to be pulsed for a '0' bit. +// zerospace: Nr. of usecs for the led to be fully off for a '0' bit. +// footermark: Nr. of usecs for the led to be pulsed for the footer mark. +// A value of 0 means no footer mark. +// gap: Nr. of usecs for the led to be off after the footer mark. +// This is effectively the gap between messages. +// A value of 0 means no gap space. +// data: The data to be transmitted. +// nbits: Nr. of bits of data to be sent. +// frequency: The frequency we want to modulate at. +// Assumes < 1000 means kHz otherwise it is in Hz. +// Most common value is 38000 or 38, for 38kHz. +// MSBfirst: Flag for bit transmission order. Defaults to MSB->LSB order. +// repeat: Nr. of extra times the message will be sent. +// e.g. 0 = 1 message sent, 1 = 1 initial + 1 repeat = 2 messages +// dutycycle: Percentage duty cycle of the LED. +// e.g. 25 = 25% = 1/4 on, 3/4 off. +// If you are not sure, try 50 percent. +void IRsend::sendGeneric(const uint16_t headermark, const uint32_t headerspace, + const uint16_t onemark, const uint32_t onespace, + const uint16_t zeromark, const uint32_t zerospace, + const uint16_t footermark, const uint32_t gap, + const uint64_t data, const uint16_t nbits, + const uint16_t frequency, const bool MSBfirst, + const uint16_t repeat, const uint8_t dutycycle) { + sendGeneric(headermark, headerspace, onemark, onespace, zeromark, zerospace, + footermark, gap, 0U, data, nbits, frequency, MSBfirst, repeat, + dutycycle); +} + +// Generic method for sending simple protocol messages. +// Will send leading or trailing 0's if the nbits is larger than the number +// of bits in data. +// +// Args: +// headermark: Nr. of usecs for the led to be pulsed for the header mark. +// A value of 0 means no header mark. +// headerspace: Nr. of usecs for the led to be off after the header mark. +// A value of 0 means no header space. +// onemark: Nr. of usecs for the led to be pulsed for a '1' bit. +// onespace: Nr. of usecs for the led to be fully off for a '1' bit. +// zeromark: Nr. of usecs for the led to be pulsed for a '0' bit. +// zerospace: Nr. of usecs for the led to be fully off for a '0' bit. +// footermark: Nr. of usecs for the led to be pulsed for the footer mark. +// A value of 0 means no footer mark. +// gap: Min. nr. of usecs for the led to be off after the footer mark. +// This is effectively the absolute minimum gap between messages. +// mesgtime: Min. nr. of usecs a single message needs to be. +// This is effectively the min. total length of a single message. +// data: The data to be transmitted. +// nbits: Nr. of bits of data to be sent. +// frequency: The frequency we want to modulate at. +// Assumes < 1000 means kHz otherwise it is in Hz. +// Most common value is 38000 or 38, for 38kHz. +// MSBfirst: Flag for bit transmission order. Defaults to MSB->LSB order. +// repeat: Nr. of extra times the message will be sent. +// e.g. 0 = 1 message sent, 1 = 1 initial + 1 repeat = 2 messages +// dutycycle: Percentage duty cycle of the LED. +// e.g. 25 = 25% = 1/4 on, 3/4 off. +// If you are not sure, try 50 percent. +void IRsend::sendGeneric(const uint16_t headermark, const uint32_t headerspace, + const uint16_t onemark, const uint32_t onespace, + const uint16_t zeromark, const uint32_t zerospace, + const uint16_t footermark, const uint32_t gap, + const uint32_t mesgtime, const uint64_t data, + const uint16_t nbits, const uint16_t frequency, + const bool MSBfirst, const uint16_t repeat, + const uint8_t dutycycle) { + // Setup + enableIROut(frequency, dutycycle); + IRtimer usecs = IRtimer(); + + // We always send a message, even for repeat=0, hence '<= repeat'. + for (uint16_t r = 0; r <= repeat; r++) { + usecs.reset(); + + // Header + if (headermark) mark(headermark); + if (headerspace) space(headerspace); + + // Data + sendData(onemark, onespace, zeromark, zerospace, data, nbits, MSBfirst); + + // Footer + if (footermark) mark(footermark); + uint32_t elapsed = usecs.elapsed(); + // Avoid potential unsigned integer underflow. e.g. when mesgtime is 0. + if (elapsed >= mesgtime) + space(gap); + else + space(std::max(gap, mesgtime - elapsed)); + } +} + +// Generic method for sending simple protocol messages. +// +// Args: +// headermark: Nr. of usecs for the led to be pulsed for the header mark. +// A value of 0 means no header mark. +// headerspace: Nr. of usecs for the led to be off after the header mark. +// A value of 0 means no header space. +// onemark: Nr. of usecs for the led to be pulsed for a '1' bit. +// onespace: Nr. of usecs for the led to be fully off for a '1' bit. +// zeromark: Nr. of usecs for the led to be pulsed for a '0' bit. +// zerospace: Nr. of usecs for the led to be fully off for a '0' bit. +// footermark: Nr. of usecs for the led to be pulsed for the footer mark. +// A value of 0 means no footer mark. +// gap: Nr. of usecs for the led to be off after the footer mark. +// This is effectively the gap between messages. +// A value of 0 means no gap space. +// dataptr: Pointer to the data to be transmitted. +// nbytes: Nr. of bytes of data to be sent. +// frequency: The frequency we want to modulate at. +// Assumes < 1000 means kHz otherwise it is in Hz. +// Most common value is 38000 or 38, for 38kHz. +// MSBfirst: Flag for bit transmission order. Defaults to MSB->LSB order. +// repeat: Nr. of extra times the message will be sent. +// e.g. 0 = 1 message sent, 1 = 1 initial + 1 repeat = 2 messages +// dutycycle: Percentage duty cycle of the LED. +// e.g. 25 = 25% = 1/4 on, 3/4 off. +// If you are not sure, try 50 percent. +void IRsend::sendGeneric(const uint16_t headermark, const uint32_t headerspace, + const uint16_t onemark, const uint32_t onespace, + const uint16_t zeromark, const uint32_t zerospace, + const uint16_t footermark, const uint32_t gap, + const uint8_t *dataptr, const uint16_t nbytes, + const uint16_t frequency, const bool MSBfirst, + const uint16_t repeat, const uint8_t dutycycle) { + // Setup + enableIROut(frequency, dutycycle); + // We always send a message, even for repeat=0, hence '<= repeat'. + for (uint16_t r = 0; r <= repeat; r++) { + // Header + if (headermark) mark(headermark); + if (headerspace) space(headerspace); + + // Data + for (uint16_t i = 0; i < nbytes; i++) + sendData(onemark, onespace, zeromark, zerospace, *(dataptr + i), 8, + MSBfirst); + + // Footer + if (footermark) mark(footermark); + space(gap); + } +} + +#if SEND_RAW +// Send a raw IRremote message. +// +// Args: +// buf: An array of uint16_t's that has microseconds elements. +// len: Nr. of elements in the buf[] array. +// hz: Frequency to send the message at. (kHz < 1000; Hz >= 1000) +// +// Status: STABLE / Known working. +// +// Notes: +// Even elements are Mark times (On), Odd elements are Space times (Off). +// +// Ref: +// examples/IRrecvDumpV2/IRrecvDumpV2.ino +void IRsend::sendRaw(uint16_t buf[], uint16_t len, uint16_t hz) { + // Set IR carrier frequency + enableIROut(hz); + for (uint16_t i = 0; i < len; i++) { + if (i & 1) { // Odd bit. + space(buf[i]); + } else { // Even bit. + mark(buf[i]); + } + } + ledOff(); // We potentially have ended with a mark(), so turn of the LED. +} +#endif // SEND_RAW + +#ifndef UNIT_TEST +void IRsend::send(uint16_t type, uint64_t data, uint16_t nbits) { + switch (type) { +#if SEND_NEC + case NEC: + sendNEC(data, nbits); + break; +#endif +#if SEND_SONY + case SONY: + sendSony(data, nbits); + break; +#endif +#if SEND_RC5 + case RC5: + sendRC5(data, nbits); + break; +#endif +#if SEND_RC6 + case RC6: + sendRC6(data, nbits); + break; +#endif +#if SEND_DISH + case DISH: + sendDISH(data, nbits); + break; +#endif +#if SEND_JVC + case JVC: + sendJVC(data, nbits); + break; +#endif +#if SEND_SAMSUNG + case SAMSUNG: + sendSAMSUNG(data, nbits); + break; +#endif +#if SEND_LG + case LG: + sendLG(data, nbits); + break; +#endif +#if SEND_LG + case LG2: + sendLG2(data, nbits); + break; +#endif +#if SEND_WHYNTER + case WHYNTER: + sendWhynter(data, nbits); + break; +#endif +#if SEND_COOLIX + case COOLIX: + sendCOOLIX(data, nbits); + break; +#endif +#if SEND_DENON + case DENON: + sendDenon(data, nbits); + break; +#endif +#if SEND_SHERWOOD + case SHERWOOD: + sendSherwood(data, nbits); + break; +#endif +#if SEND_RCMM + case RCMM: + sendRCMM(data, nbits); + break; +#endif +#if SEND_MITSUBISHI + case MITSUBISHI: + sendMitsubishi(data, nbits); + break; +#endif +#if SEND_MITSUBISHI2 + case MITSUBISHI2: + sendMitsubishi2(data, nbits); + break; +#endif +#if SEND_SHARP + case SHARP: + sendSharpRaw(data, nbits); + break; +#endif +#if SEND_AIWA_RC_T501 + case AIWA_RC_T501: + sendAiwaRCT501(data, nbits); + break; +#endif +#if SEND_MIDEA + case MIDEA: + sendMidea(data, nbits); + break; +#endif +#if SEND_GICABLE + case GICABLE: + sendGICable(data, nbits); + break; +#endif +#if SEND_PIONEER + case PIONEER: + sendPioneer(data, nbits); + break; +#endif + } +} +#endif diff --git a/lib/IRremoteESP8266-2.5.2.03/src/IRsend.h b/lib/IRremoteESP8266-2.5.2.03/src/IRsend.h new file mode 100644 index 000000000..8e2dc248e --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/IRsend.h @@ -0,0 +1,333 @@ +// Copyright 2009 Ken Shirriff +// Copyright 2015 Mark Szabo +// Copyright 2017 David Conran +#ifndef IRSEND_H_ +#define IRSEND_H_ + +#define __STDC_LIMIT_MACROS +#include +#include "IRremoteESP8266.h" + +// Originally from https://github.com/shirriff/Arduino-IRremote/ +// Updated by markszabo (https://github.com/markszabo/IRremoteESP8266) for +// sending IR code on ESP8266 + +#if TEST || UNIT_TEST +#define VIRTUAL virtual +#else +#define VIRTUAL +#endif + +// Constants +// Offset (in microseconds) to use in Period time calculations to account for +// code excution time in producing the software PWM signal. +// Value was calculated on Wemos D1 mini using v2.4.1 with v2.4.0 ESP core +const int8_t kPeriodOffset = -5; +const uint8_t kDutyDefault = 50; // Percentage +const uint8_t kDutyMax = 100; // Percentage +// delayMicroseconds() is only accurate to 16383us. +// Ref: https://www.arduino.cc/en/Reference/delayMicroseconds +const uint16_t kMaxAccurateUsecDelay = 16383; + +// Classes +class IRsend { + public: + explicit IRsend(uint16_t IRsendPin, bool inverted = false, + bool use_modulation = true); + void begin(); + void enableIROut(uint32_t freq, uint8_t duty = kDutyDefault); + VIRTUAL void _delayMicroseconds(uint32_t usec); + VIRTUAL uint16_t mark(uint16_t usec); + VIRTUAL void space(uint32_t usec); + int8_t calibrate(uint16_t hz = 38000U); + void sendRaw(uint16_t buf[], uint16_t len, uint16_t hz); + void sendData(uint16_t onemark, uint32_t onespace, uint16_t zeromark, + uint32_t zerospace, uint64_t data, uint16_t nbits, + bool MSBfirst = true); + void sendGeneric(const uint16_t headermark, const uint32_t headerspace, + const uint16_t onemark, const uint32_t onespace, + const uint16_t zeromark, const uint32_t zerospace, + const uint16_t footermark, const uint32_t gap, + const uint64_t data, const uint16_t nbits, + const uint16_t frequency, const bool MSBfirst, + const uint16_t repeat, const uint8_t dutycycle); + void sendGeneric(const uint16_t headermark, const uint32_t headerspace, + const uint16_t onemark, const uint32_t onespace, + const uint16_t zeromark, const uint32_t zerospace, + const uint16_t footermark, const uint32_t gap, + const uint32_t mesgtime, const uint64_t data, + const uint16_t nbits, const uint16_t frequency, + const bool MSBfirst, const uint16_t repeat, + const uint8_t dutycycle); + void sendGeneric(const uint16_t headermark, const uint32_t headerspace, + const uint16_t onemark, const uint32_t onespace, + const uint16_t zeromark, const uint32_t zerospace, + const uint16_t footermark, const uint32_t gap, + const uint8_t *dataptr, const uint16_t nbytes, + const uint16_t frequency, const bool MSBfirst, + const uint16_t repeat, const uint8_t dutycycle); + void send(uint16_t type, uint64_t data, uint16_t nbits); +#if (SEND_NEC || SEND_SHERWOOD || SEND_AIWA_RC_T501 || SEND_SANYO) + void sendNEC(uint64_t data, uint16_t nbits = kNECBits, + uint16_t repeat = kNoRepeat); + uint32_t encodeNEC(uint16_t address, uint16_t command); +#endif +#if SEND_SONY + // sendSony() should typically be called with repeat=2 as Sony devices + // expect the code to be sent at least 3 times. (code + 2 repeats = 3 codes) + // Legacy use of this procedure was to only send a single code so call it with + // repeat=0 for backward compatibility. As of v2.0 it defaults to sending + // a Sony command that will be accepted be a device. + void sendSony(uint64_t data, uint16_t nbits = kSony20Bits, + uint16_t repeat = kSonyMinRepeat); + uint32_t encodeSony(uint16_t nbits, uint16_t command, uint16_t address, + uint16_t extended = 0); +#endif +#if SEND_SHERWOOD + void sendSherwood(uint64_t data, uint16_t nbits = kSherwoodBits, + uint16_t repeat = kSherwoodMinRepeat); +#endif +#if SEND_SAMSUNG + void sendSAMSUNG(uint64_t data, uint16_t nbits = kSamsungBits, + uint16_t repeat = kNoRepeat); + uint32_t encodeSAMSUNG(uint8_t customer, uint8_t command); +#endif +#if SEND_SAMSUNG_AC + void sendSamsungAC(unsigned char data[], + uint16_t nbytes = kSamsungAcStateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_LG + void sendLG(uint64_t data, uint16_t nbits = kLgBits, + uint16_t repeat = kNoRepeat); + void sendLG2(uint64_t data, uint16_t nbits = kLgBits, + uint16_t repeat = kNoRepeat); + uint32_t encodeLG(uint16_t address, uint16_t command); +#endif +#if (SEND_SHARP || SEND_DENON) + uint32_t encodeSharp(uint16_t address, uint16_t command, + uint16_t expansion = 1, uint16_t check = 0, + bool MSBfirst = false); + void sendSharp(uint16_t address, uint16_t command, + uint16_t nbits = kSharpBits, uint16_t repeat = kNoRepeat); + void sendSharpRaw(uint64_t data, uint16_t nbits = kSharpBits, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_JVC + void sendJVC(uint64_t data, uint16_t nbits = kJvcBits, + uint16_t repeat = kNoRepeat); + uint16_t encodeJVC(uint8_t address, uint8_t command); +#endif +#if SEND_DENON + void sendDenon(uint64_t data, uint16_t nbits = DENON_BITS, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_SANYO + uint64_t encodeSanyoLC7461(uint16_t address, uint8_t command); + void sendSanyoLC7461(uint64_t data, uint16_t nbits = kSanyoLC7461Bits, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_DISH + // sendDISH() should typically be called with repeat=3 as DISH devices + // expect the code to be sent at least 4 times. (code + 3 repeats = 4 codes) + // Legacy use of this procedure was only to send a single code + // so use repeat=0 for backward compatibility. + void sendDISH(uint64_t data, uint16_t nbits = kDishBits, + uint16_t repeat = kDishMinRepeat); +#endif +#if (SEND_PANASONIC || SEND_DENON) + void sendPanasonic64(uint64_t data, uint16_t nbits = kPanasonicBits, + uint16_t repeat = kNoRepeat); + void sendPanasonic(uint16_t address, uint32_t data, + uint16_t nbits = kPanasonicBits, + uint16_t repeat = kNoRepeat); + uint64_t encodePanasonic(uint16_t manufacturer, uint8_t device, + uint8_t subdevice, uint8_t function); +#endif +#if SEND_RC5 + void sendRC5(uint64_t data, uint16_t nbits = kRC5XBits, + uint16_t repeat = kNoRepeat); + uint16_t encodeRC5(uint8_t address, uint8_t command, + bool key_released = false); + uint16_t encodeRC5X(uint8_t address, uint8_t command, + bool key_released = false); + uint64_t toggleRC5(uint64_t data); +#endif +#if SEND_RC6 + void sendRC6(uint64_t data, uint16_t nbits = kRC6Mode0Bits, + uint16_t repeat = kNoRepeat); + uint64_t encodeRC6(uint32_t address, uint8_t command, + uint16_t mode = kRC6Mode0Bits); + uint64_t toggleRC6(uint64_t data, uint16_t nbits = kRC6Mode0Bits); +#endif +#if SEND_RCMM + void sendRCMM(uint64_t data, uint16_t nbits = kRCMMBits, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_COOLIX + void sendCOOLIX(uint64_t data, uint16_t nbits = kCoolixBits, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_WHYNTER + void sendWhynter(uint64_t data, uint16_t nbits = kWhynterBits, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_MITSUBISHI + void sendMitsubishi(uint64_t data, uint16_t nbits = kMitsubishiBits, + uint16_t repeat = kMitsubishiMinRepeat); +#endif +#if SEND_MITSUBISHI2 + void sendMitsubishi2(uint64_t data, uint16_t nbits = kMitsubishiBits, + uint16_t repeat = kMitsubishiMinRepeat); +#endif +#if SEND_MITSUBISHI_AC + void sendMitsubishiAC(unsigned char data[], + uint16_t nbytes = kMitsubishiACStateLength, + uint16_t repeat = kMitsubishiACMinRepeat); +#endif +#if SEND_FUJITSU_AC + void sendFujitsuAC(unsigned char data[], uint16_t nbytes, + uint16_t repeat = kFujitsuAcMinRepeat); +#endif +#if SEND_GLOBALCACHE + void sendGC(uint16_t buf[], uint16_t len); +#endif +#if SEND_KELVINATOR + void sendKelvinator(unsigned char data[], + uint16_t nbytes = kKelvinatorStateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_DAIKIN + void sendDaikin(unsigned char data[], uint16_t nbytes = kDaikinStateLength, + uint16_t repeat = kNoRepeat); + void sendDaikinGapHeader(); +#endif +#if SEND_AIWA_RC_T501 + void sendAiwaRCT501(uint64_t data, uint16_t nbits = kAiwaRcT501Bits, + uint16_t repeat = kAiwaRcT501MinRepeats); +#endif +#if SEND_GREE + void sendGree(uint64_t data, uint16_t nbits = kGreeBits, + uint16_t repeat = kNoRepeat); + void sendGree(uint8_t data[], uint16_t nbytes = kGreeStateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_PRONTO + void sendPronto(uint16_t data[], uint16_t len, uint16_t repeat = kNoRepeat); +#endif +#if SEND_ARGO + void sendArgo(unsigned char data[], uint16_t nbytes = kArgoStateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_TROTEC + void sendTrotec(unsigned char data[], uint16_t nbytes = kTrotecStateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_NIKAI + void sendNikai(uint64_t data, uint16_t nbits = kNikaiBits, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_TOSHIBA_AC + void sendToshibaAC(unsigned char data[], + uint16_t nbytes = kToshibaACStateLength, + uint16_t repeat = kToshibaACMinRepeat); +#endif +#if SEND_MIDEA + void sendMidea(uint64_t data, uint16_t nbits = kMideaBits, + uint16_t repeat = kMideaMinRepeat); +#endif +#if SEND_MAGIQUEST + void sendMagiQuest(uint64_t data, uint16_t nbits = kMagiquestBits, + uint16_t repeat = kNoRepeat); + uint64_t encodeMagiQuest(uint32_t wand_id, uint16_t magnitude); +#endif +#if SEND_LASERTAG + void sendLasertag(uint64_t data, uint16_t nbits = kLasertagBits, + uint16_t repeat = kLasertagMinRepeat); +#endif +#if SEND_CARRIER_AC + void sendCarrierAC(uint64_t data, uint16_t nbits = kCarrierAcBits, + uint16_t repeat = kCarrierAcMinRepeat); +#endif +#if (SEND_HAIER_AC || SEND_HAIER_AC_YRW02) + void sendHaierAC(unsigned char data[], uint16_t nbytes = kHaierACStateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_HAIER_AC_YRW02 + void sendHaierACYRW02(unsigned char data[], + uint16_t nbytes = kHaierACYRW02StateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_HITACHI_AC + void sendHitachiAC(unsigned char data[], + uint16_t nbytes = kHitachiAcStateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_HITACHI_AC1 + void sendHitachiAC1(unsigned char data[], + uint16_t nbytes = kHitachiAc1StateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_HITACHI_AC2 + void sendHitachiAC2(unsigned char data[], + uint16_t nbytes = kHitachiAc2StateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_GICABLE + void sendGICable(uint64_t data, uint16_t nbits = kGicableBits, + uint16_t repeat = kGicableMinRepeat); +#endif +#if SEND_WHIRLPOOL_AC + void sendWhirlpoolAC(unsigned char data[], + uint16_t nbytes = kWhirlpoolAcStateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_LUTRON + void sendLutron(uint64_t data, uint16_t nbits = kLutronBits, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_ELECTRA_AC + void sendElectraAC(unsigned char data[], + uint16_t nbytes = kElectraAcStateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_PANASONIC_AC + void sendPanasonicAC(unsigned char data[], + uint16_t nbytes = kPanasonicAcStateLength, + uint16_t repeat = kNoRepeat); +#endif +#if SEND_PIONEER + void sendPioneer(const uint64_t data, const uint16_t nbits = kPioneerBits, + const uint16_t repeat = kNoRepeat); + uint64_t encodePioneer(uint16_t address, uint16_t command); +#endif +#if SEND_MWM + void sendMWM(unsigned char data[], uint16_t nbytes, + uint16_t repeat = kNoRepeat); +#endif + + protected: +#ifdef UNIT_TEST +#ifndef HIGH +#define HIGH 0x1 +#endif +#ifndef LOW +#define LOW 0x0 +#endif +#endif // UNIT_TEST + uint8_t outputOn; + uint8_t outputOff; + VIRTUAL void ledOff(); + VIRTUAL void ledOn(); + + private: + uint16_t onTimePeriod; + uint16_t offTimePeriod; + uint16_t IRpin; + int8_t periodOffset; + uint8_t _dutycycle; + bool modulation; + uint32_t calcUSecPeriod(uint32_t hz, bool use_offset = true); +}; + +#endif // IRSEND_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/IRtimer.cpp b/lib/IRremoteESP8266-2.5.2.03/src/IRtimer.cpp similarity index 52% rename from lib/IRremoteESP8266-2.2.1.02/src/IRtimer.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/IRtimer.cpp index cc5cdfaff..029637cbb 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/IRtimer.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/IRtimer.cpp @@ -5,18 +5,21 @@ #include #endif +#ifdef UNIT_TEST +// Used to help simulate elapsed time in unit tests. +extern uint32_t _IRtimer_unittest_now; +#endif // UNIT_TEST + // This class performs a simple time in useconds since instantiated. // Handles when the system timer wraps around (once). -IRtimer::IRtimer() { - reset(); -} +IRtimer::IRtimer() { reset(); } void IRtimer::reset() { #ifndef UNIT_TEST start = micros(); #else - start = 0; + start = _IRtimer_unittest_now; #endif } @@ -24,10 +27,15 @@ uint32_t IRtimer::elapsed() { #ifndef UNIT_TEST uint32_t now = micros(); #else - uint32_t now = 0; + uint32_t now = _IRtimer_unittest_now; #endif - if (start <= now) // Check if the system timer has wrapped. + if (start <= now) // Check if the system timer has wrapped. return now - start; // No wrap. else return UINT32_MAX - start + now; // Has wrapped. } + +// Only used in unit testing. +#ifdef UNIT_TEST +void IRtimer::add(uint32_t usecs) { _IRtimer_unittest_now += usecs; } +#endif // UNIT_TEST diff --git a/lib/IRremoteESP8266-2.2.1.02/src/IRtimer.h b/lib/IRremoteESP8266-2.5.2.03/src/IRtimer.h similarity index 78% rename from lib/IRremoteESP8266-2.2.1.02/src/IRtimer.h rename to lib/IRremoteESP8266-2.5.2.03/src/IRtimer.h index 6cf7f7dc8..baca1cf74 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/IRtimer.h +++ b/lib/IRremoteESP8266-2.5.2.03/src/IRtimer.h @@ -12,6 +12,9 @@ class IRtimer { IRtimer(); void reset(); uint32_t elapsed(); +#ifdef UNIT_TEST + static void add(uint32_t usecs); +#endif // UNIT_TEST private: uint32_t start; diff --git a/lib/IRremoteESP8266-2.5.2.03/src/IRutils.cpp b/lib/IRremoteESP8266-2.5.2.03/src/IRutils.cpp new file mode 100644 index 000000000..7864625a5 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/IRutils.cpp @@ -0,0 +1,470 @@ +// Copyright 2017 David Conran + +#include "IRutils.h" +#ifndef UNIT_TEST +#include +#endif + +#define __STDC_LIMIT_MACROS +#include +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRremoteESP8266.h" + +// Reverse the order of the requested least significant nr. of bits. +// Args: +// input: Bit pattern/integer to reverse. +// nbits: Nr. of bits to reverse. +// Returns: +// The reversed bit pattern. +uint64_t reverseBits(uint64_t input, uint16_t nbits) { + if (nbits <= 1) return input; // Reversing <= 1 bits makes no change at all. + // Cap the nr. of bits to rotate to the max nr. of bits in the input. + nbits = std::min(nbits, (uint16_t)(sizeof(input) * 8)); + uint64_t output = 0; + for (uint16_t i = 0; i < nbits; i++) { + output <<= 1; + output |= (input & 1); + input >>= 1; + } + // Merge any remaining unreversed bits back to the top of the reversed bits. + return (input << nbits) | output; +} + +// Convert a uint64_t (unsigned long long) to a string. +// Arduino String/toInt/Serial.print() can't handle printing 64 bit values. +// +// Args: +// input: The value to print +// base: The output base. +// Returns: +// A string representation of the integer. +// Note: Based on Arduino's Print::printNumber() +#ifdef ARDUINO // Arduino's & C++'s string implementations can't co-exist. +String uint64ToString(uint64_t input, uint8_t base) { + String result = ""; +#else +std::string uint64ToString(uint64_t input, uint8_t base) { + std::string result = ""; +#endif + // prevent issues if called with base <= 1 + if (base < 2) base = 10; + // Check we have a base that we can actually print. + // i.e. [0-9A-Z] == 36 + if (base > 36) base = 10; + + do { + char c = input % base; + input /= base; + + if (c < 10) + c += '0'; + else + c += 'A' - 10; + result = c + result; + } while (input); + return result; +} + +#ifdef ARDUINO +// Print a uint64_t/unsigned long long to the Serial port +// Serial.print() can't handle printing long longs. (uint64_t) +// +// Args: +// input: The value to print +// base: The output base. +void serialPrintUint64(uint64_t input, uint8_t base) { + Serial.print(uint64ToString(input, base)); +} +#endif + +// Convert a protocol type (enum etc) to a human readable string. +// Args: +// protocol: Nr. (enum) of the protocol. +// isRepeat: A flag indicating if it is a repeat message of the protocol. +// Returns: +// A string containing the protocol name. +#ifdef ARDUINO // Arduino's & C++'s string implementations can't co-exist. +String typeToString(const decode_type_t protocol, const bool isRepeat) { + String result = ""; +#else +std::string typeToString(const decode_type_t protocol, const bool isRepeat) { + std::string result = ""; +#endif + switch (protocol) { + default: + case UNKNOWN: + result = "UNKNOWN"; + break; + case UNUSED: + result = "UNUSED"; + break; + case AIWA_RC_T501: + result = "AIWA_RC_T501"; + break; + case ARGO: + result = "ARGO"; + break; + case CARRIER_AC: + result = "CARRIER_AC"; + break; + case COOLIX: + result = "COOLIX"; + break; + case DAIKIN: + result = "DAIKIN"; + break; + case DENON: + result = "DENON"; + break; + case DISH: + result = "DISH"; + break; + case ELECTRA_AC: + result = "ELECTRA_AC"; + break; + case FUJITSU_AC: + result = "FUJITSU_AC"; + break; + case GICABLE: + result = "GICABLE"; + break; + case GLOBALCACHE: + result = "GLOBALCACHE"; + break; + case GREE: + result = "GREE"; + break; + case HAIER_AC: + result = "HAIER_AC"; + break; + case HAIER_AC_YRW02: + result = "HAIER_AC_YRW02"; + break; + case HITACHI_AC: + result = "HITACHI_AC"; + break; + case HITACHI_AC1: + result = "HITACHI_AC1"; + break; + case HITACHI_AC2: + result = "HITACHI_AC2"; + break; + case JVC: + result = "JVC"; + break; + case KELVINATOR: + result = "KELVINATOR"; + break; + case LG: + result = "LG"; + break; + case LG2: + result = "LG2"; + break; + case LASERTAG: + result = "LASERTAG"; + break; + case LUTRON: + result = "LUTRON"; + break; + case MAGIQUEST: + result = "MAGIQUEST"; + break; + case MIDEA: + result = "MIDEA"; + break; + case MITSUBISHI: + result = "MITSUBISHI"; + break; + case MITSUBISHI2: + result = "MITSUBISHI2"; + break; + case MITSUBISHI_AC: + result = "MITSUBISHI_AC"; + break; + case MWM: + result = "MWM"; + break; + case NEC: + result = "NEC"; + break; + case NEC_LIKE: + result = "NEC (non-strict)"; + break; + case NIKAI: + result = "NIKAI"; + break; + case PANASONIC: + result = "PANASONIC"; + break; + case PANASONIC_AC: + result = "PANASONIC_AC"; + break; + case PIONEER: + result = "PIONEER"; + break; + case PRONTO: + result = "PRONTO"; + break; + case RAW: + result = "RAW"; + break; + case RC5: + result = "RC5"; + break; + case RC5X: + result = "RC5X"; + break; + case RC6: + result = "RC6"; + break; + case RCMM: + result = "RCMM"; + break; + case SAMSUNG: + result = "SAMSUNG"; + break; + case SAMSUNG_AC: + result = "SAMSUNG_AC"; + break; + case SANYO: + result = "SANYO"; + break; + case SANYO_LC7461: + result = "SANYO_LC7461"; + break; + case SHARP: + result = "SHARP"; + break; + case SHERWOOD: + result = "SHERWOOD"; + break; + case SONY: + result = "SONY"; + break; + case TOSHIBA_AC: + result = "TOSHIBA_AC"; + break; + case TROTEC: + result = "TROTEC"; + break; + case WHIRLPOOL_AC: + result = "WHIRLPOOL_AC"; + break; + case WHYNTER: + result = "WHYNTER"; + break; + } + if (isRepeat) result += " (Repeat)"; + return result; +} + +// Does the given protocol use a complex state as part of the decode? +bool hasACState(const decode_type_t protocol) { + switch (protocol) { + case DAIKIN: + case ELECTRA_AC: + case FUJITSU_AC: + case GREE: + case HAIER_AC: + case HAIER_AC_YRW02: + case HITACHI_AC: + case HITACHI_AC1: + case HITACHI_AC2: + case KELVINATOR: + case MITSUBISHI_AC: + case MWM: + case PANASONIC_AC: + case SAMSUNG_AC: + case TOSHIBA_AC: + case WHIRLPOOL_AC: + return true; + default: + return false; + } +} + +// Return the corrected length of a 'raw' format array structure +// after over-large values are converted into multiple entries. +// Args: +// results: A ptr to a decode result. +// Returns: +// A uint16_t containing the length. +uint16_t getCorrectedRawLength(const decode_results *results) { + uint16_t extended_length = results->rawlen - 1; + for (uint16_t i = 0; i < results->rawlen - 1; i++) { + uint32_t usecs = results->rawbuf[i] * kRawTick; + // Add two extra entries for multiple larger than UINT16_MAX it is. + extended_length += (usecs / (UINT16_MAX + 1)) * 2; + } + return extended_length; +} + +// Return a string containing the key values of a decode_results structure +// in a C/C++ code style format. +#ifdef ARDUINO +String resultToSourceCode(const decode_results *results) { + String output = ""; +#else +std::string resultToSourceCode(const decode_results *results) { + std::string output = ""; +#endif + // Start declaration + output += "uint16_t "; // variable type + output += "rawData["; // array name + output += uint64ToString(getCorrectedRawLength(results), 10); + // array size + output += "] = {"; // Start declaration + + // Dump data + for (uint16_t i = 1; i < results->rawlen; i++) { + uint32_t usecs; + for (usecs = results->rawbuf[i] * kRawTick; usecs > UINT16_MAX; + usecs -= UINT16_MAX) { + output += uint64ToString(UINT16_MAX); + if (i % 2) + output += ", 0, "; + else + output += ", 0, "; + } + output += uint64ToString(usecs, 10); + if (i < results->rawlen - 1) + output += ", "; // ',' not needed on the last one + if (i % 2 == 0) output += " "; // Extra if it was even. + } + + // End declaration + output += "};"; + + // Comment + output += " // " + typeToString(results->decode_type, results->repeat); + // Only display the value if the decode type doesn't have an A/C state. + if (!hasACState(results->decode_type)) + output += " " + uint64ToString(results->value, 16); + output += "\n"; + + // Now dump "known" codes + if (results->decode_type != UNKNOWN) { + if (hasACState(results->decode_type)) { +#if DECODE_AC + uint16_t nbytes = results->bits / 8; + output += "uint8_t state[" + uint64ToString(nbytes) + "] = {"; + for (uint16_t i = 0; i < nbytes; i++) { + output += "0x"; + if (results->state[i] < 0x10) output += "0"; + output += uint64ToString(results->state[i], 16); + if (i < nbytes - 1) output += ", "; + } + output += "};\n"; +#endif // DECODE_AC + } else { + // Simple protocols + // Some protocols have an address &/or command. + // NOTE: It will ignore the atypical case when a message has been + // decoded but the address & the command are both 0. + if (results->address > 0 || results->command > 0) { + output += "uint32_t address = 0x" + + uint64ToString(results->address, 16) + ";\n"; + output += "uint32_t command = 0x" + + uint64ToString(results->command, 16) + ";\n"; + } + // Most protocols have data + output += + "uint64_t data = 0x" + uint64ToString(results->value, 16) + ";\n"; + } + } + return output; +} + +// Dump out the decode_results structure. +// +#ifdef ARDUINO +String resultToTimingInfo(const decode_results *results) { + String output = ""; + String value = ""; +#else +std::string resultToTimingInfo(const decode_results *results) { + std::string output = ""; + std::string value = ""; +#endif + output += "Raw Timing[" + uint64ToString(results->rawlen - 1, 10) + "]:\n"; + + for (uint16_t i = 1; i < results->rawlen; i++) { + if (i % 2 == 0) + output += "-"; // even + else + output += " +"; // odd + value = uint64ToString(results->rawbuf[i] * kRawTick); + // Space pad the value till it is at least 6 chars long. + while (value.length() < 6) value = " " + value; + output += value; + if (i < results->rawlen - 1) output += ", "; // ',' not needed for last one + if (!(i % 8)) output += "\n"; // Newline every 8 entries. + } + output += "\n"; + return output; +} + +// Convert the decode_results structure's value/state to simple hexadecimal. +// +#ifdef ARDUINO +String resultToHexidecimal(const decode_results *result) { + String output = ""; +#else +std::string resultToHexidecimal(const decode_results *result) { + std::string output = ""; +#endif + if (hasACState(result->decode_type)) { +#if DECODE_AC + for (uint16_t i = 0; result->bits > i * 8; i++) { + if (result->state[i] < 0x10) output += "0"; // Zero pad + output += uint64ToString(result->state[i], 16); + } +#endif // DECODE_AC + } else { + output += uint64ToString(result->value, 16); + } + return output; +} + +// Dump out the decode_results structure. +// +#ifdef ARDUINO +String resultToHumanReadableBasic(const decode_results *results) { + String output = ""; +#else +std::string resultToHumanReadableBasic(const decode_results *results) { + std::string output = ""; +#endif + // Show Encoding standard + output += + "Encoding : " + typeToString(results->decode_type, results->repeat) + + "\n"; + + // Show Code & length + output += "Code : "; + output += resultToHexidecimal(results); + output += " (" + uint64ToString(results->bits) + " bits)\n"; + return output; +} + +uint8_t sumBytes(uint8_t *start, const uint16_t length, const uint8_t init) { + uint8_t checksum = init; + uint8_t *ptr; + for (ptr = start; ptr - start < length; ptr++) checksum += *ptr; + return checksum; +} + +uint64_t invertBits(const uint64_t data, const uint16_t nbits) { + // No change if we are asked to invert no bits. + if (nbits == 0) return data; + uint64_t result = ~data; + // If we are asked to invert all the bits or more than we have, it's simple. + if (nbits >= sizeof(data) * 8) return result; + // Mask off any unwanted bits and return the result. + return (result & ((1ULL << nbits) - 1)); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/src/IRutils.h b/lib/IRremoteESP8266-2.5.2.03/src/IRutils.h new file mode 100644 index 000000000..c17375d98 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/IRutils.h @@ -0,0 +1,41 @@ +#ifndef IRUTILS_H_ +#define IRUTILS_H_ + +// Copyright 2017 David Conran + +#ifndef UNIT_TEST +#include +#endif +#define __STDC_LIMIT_MACROS +#include +#ifndef ARDUINO +#include +#endif +#include "IRremoteESP8266.h" +#include "IRrecv.h" + +uint64_t reverseBits(uint64_t input, uint16_t nbits); +#ifdef ARDUINO // Arduino's & C++'s string implementations can't co-exist. +String uint64ToString(uint64_t input, uint8_t base = 10); +String typeToString(const decode_type_t protocol, + const bool isRepeat = false); +void serialPrintUint64(uint64_t input, uint8_t base = 10); +String resultToSourceCode(const decode_results *results); +String resultToTimingInfo(const decode_results *results); +String resultToHumanReadableBasic(const decode_results *results); +String resultToHexidecimal(const decode_results *result); +#else +std::string uint64ToString(uint64_t input, uint8_t base = 10); +std::string typeToString(const decode_type_t protocol, + const bool isRepeat = false); +std::string resultToSourceCode(const decode_results *results); +std::string resultToTimingInfo(const decode_results *results); +std::string resultToHumanReadableBasic(const decode_results *results); +std::string resultToHexidecimal(const decode_results *result); +#endif +bool hasACState(const decode_type_t protocol); +uint16_t getCorrectedRawLength(const decode_results *results); +uint8_t sumBytes(uint8_t *start, const uint16_t length, const uint8_t init = 0); +uint64_t invertBits(const uint64_t data, const uint16_t nbits); + +#endif // IRUTILS_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Aiwa.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Aiwa.cpp similarity index 76% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_Aiwa.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_Aiwa.cpp index 99a97e187..617711a99 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Aiwa.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Aiwa.cpp @@ -2,7 +2,6 @@ #include "IRrecv.h" #include "IRsend.h" -#include "IRtimer.h" // AAA IIIII W W AAA // A A I W W A A @@ -14,20 +13,20 @@ // Added by David Conran. (Inspired by IRremoteESP8266's implementation: // https://github.com/z3t0/Arduino-IRremote) -#define AIWA_RC_T501_PRE_BITS 26U -#define AIWA_RC_T501_POST_BITS 1U +const uint16_t kAiwaRcT501PreBits = 26; +const uint16_t kAiwaRcT501PostBits = 1; // NOTE: These are the compliment (inverted) of lirc values as // lirc uses a '0' for a mark, and a '1' for a space. -#define AIWA_RC_T501_PRE_DATA 0x1D8113FULL // 26-bits -#define AIWA_RC_T501_POST_DATA 1ULL +const uint64_t kAiwaRcT501PreData = 0x1D8113FULL; // 26-bits +const uint64_t kAiwaRcT501PostData = 1ULL; #if SEND_AIWA_RC_T501 -// Send a Aiwa RC T501 formatted message. +// Send an Aiwa RC T501 formatted message. // // Args: // data: The message to be sent. // nbits: The number of bits of the message to be sent. -// Typically AIWA_RC_T501_BITS. Max is 37 = (64 - 27) +// Typically kAiwaRcT501Bits. Max is 37 = (64 - 27) // repeat: The number of times the command is to be repeated. // // Status: BETA / Should work. @@ -38,10 +37,9 @@ void IRsend::sendAiwaRCT501(uint64_t data, uint16_t nbits, uint16_t repeat) { // Appears to be an extended NEC1 protocol. i.e. 42 bits instead of 32 bits. // So use sendNEC instead, however the twist is it has a fixed 26 bit // prefix, and a fixed postfix bit. - uint64_t new_data = ( - (AIWA_RC_T501_PRE_DATA << (nbits + AIWA_RC_T501_POST_BITS)) | - (data << AIWA_RC_T501_POST_BITS) | AIWA_RC_T501_POST_DATA); - nbits += AIWA_RC_T501_PRE_BITS + AIWA_RC_T501_POST_BITS; + uint64_t new_data = ((kAiwaRcT501PreData << (nbits + kAiwaRcT501PostBits)) | + (data << kAiwaRcT501PostBits) | kAiwaRcT501PostData); + nbits += kAiwaRcT501PreBits + kAiwaRcT501PostBits; if (nbits > sizeof(new_data) * 8) return; // We are overflowing. Abort, and don't send. sendNEC(new_data, nbits, repeat); @@ -53,7 +51,7 @@ void IRsend::sendAiwaRCT501(uint64_t data, uint16_t nbits, uint16_t repeat) { // // Args: // results: Ptr to the data to decode and where to store the decode result. -// nbits: The number of data bits to expect. Typically AIWA_RC_T501_BITS. +// nbits: The number of data bits to expect. Typically kAiwaRcT501Bits. // strict: Flag indicating if we should perform strict matching. // Returns: // boolean: True if it can decode it, false if it can't. @@ -72,12 +70,11 @@ void IRsend::sendAiwaRCT501(uint64_t data, uint16_t nbits, uint16_t repeat) { bool IRrecv::decodeAiwaRCT501(decode_results *results, uint16_t nbits, bool strict) { // Compliance - if (strict && nbits != AIWA_RC_T501_BITS) + if (strict && nbits != kAiwaRcT501Bits) return false; // Doesn't match our protocol defn. // Add on the pre & post bits to our requested bit length. - uint16_t expected_nbits = nbits + AIWA_RC_T501_PRE_BITS + - AIWA_RC_T501_POST_BITS; + uint16_t expected_nbits = nbits + kAiwaRcT501PreBits + kAiwaRcT501PostBits; uint64_t new_data; if (expected_nbits > sizeof(new_data) * 8) return false; // We can't possibly match something that big. @@ -89,24 +86,23 @@ bool IRrecv::decodeAiwaRCT501(decode_results *results, uint16_t nbits, new_data = results->value; if (actual_bits < expected_nbits) return false; // The data we caught was undersized. Throw it back. - if ((new_data & 0x1ULL) != AIWA_RC_T501_POST_DATA) + if ((new_data & 0x1ULL) != kAiwaRcT501PostData) return false; // The post data doesn't match, so it can't be this protocol. // Trim off the post data bit. - new_data >>= AIWA_RC_T501_POST_BITS; - actual_bits -= AIWA_RC_T501_POST_BITS; + new_data >>= kAiwaRcT501PostBits; + actual_bits -= kAiwaRcT501PostBits; // Extract out our likely new value and put it back in the results. - actual_bits -= AIWA_RC_T501_PRE_BITS; + actual_bits -= kAiwaRcT501PreBits; results->value = new_data & ((1ULL << actual_bits) - 1); // Check the prefix data matches. new_data >>= actual_bits; // Trim off the new data to expose the prefix. - if (new_data != AIWA_RC_T501_PRE_DATA) // Check the prefix. + if (new_data != kAiwaRcT501PreData) // Check the prefix. return false; // Compliance - if (strict && results->bits != expected_nbits) - return false; + if (strict && results->bits != expected_nbits) return false; // Success results->decode_type = AIWA_RC_T501; diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Argo.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Argo.cpp similarity index 69% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_Argo.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_Argo.cpp index 0129c7231..8a3e69f72 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Argo.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Argo.cpp @@ -11,53 +11,40 @@ Copyright 2017 Schmolders // Constants // using SPACE modulation. MARK is always const 400u -#define ARGO_PREAMBLE_1 6400U // Mark -#define ARGO_PREAMBLE_2 3300U // Space -#define ARGO_MARK 400U -#define ARGO_ONE_SPACE 2200U -#define ARGO_ZERO_SPACE 900U +const uint16_t kArgoHdrMark = 6400; +const uint16_t kArgoHdrSpace = 3300; +const uint16_t kArgoBitMark = 400; +const uint16_t kArgoOneSpace = 2200; +const uint16_t kArgoZeroSpace = 900; #if SEND_ARGO -// Send a Argo A/C message. +// Send an Argo A/C message. // // Args: -// data: An array of ARGO_COMMAND_LENGTH bytes containing the IR command. +// data: An array of kArgoStateLength bytes containing the IR command. // // Status: ALPHA / Untested. -// -// Overloading the IRSend Function void IRsend::sendArgo(unsigned char data[], uint16_t nbytes, uint16_t repeat) { // Check if we have enough bytes to send a proper message. - if (nbytes < ARGO_COMMAND_LENGTH) return; - // Set IR carrier frequency - enableIROut(38); - for (uint16_t r = 0; r <= repeat; r++) { - // Header - // TODO(kaschmo): validate - mark(ARGO_PREAMBLE_1); - space(ARGO_PREAMBLE_2); - // send data, defined in IRSend.cpp - for (uint16_t i = 0; i < nbytes; i++) - sendData(ARGO_MARK, ARGO_ONE_SPACE, ARGO_MARK, - ARGO_ZERO_SPACE, data[i], 8, false); - // send LSB first reverses the bit order in array for sending. - } + if (nbytes < kArgoStateLength) return; + // TODO(kaschmo): validate + sendGeneric(kArgoHdrMark, kArgoHdrSpace, kArgoBitMark, kArgoOneSpace, + kArgoBitMark, kArgoZeroSpace, 0, 0, // No Footer. + data, nbytes, 38, false, repeat, kDutyDefault); } +#endif // SEND_ARGO -IRArgoAC::IRArgoAC(uint16_t pin) : _irsend(pin) { - stateReset(); -} +IRArgoAC::IRArgoAC(uint16_t pin) : _irsend(pin) { stateReset(); } -void IRArgoAC::begin() { - _irsend.begin(); -} +void IRArgoAC::begin() { _irsend.begin(); } +#if SEND_ARGO void IRArgoAC::send() { - // Serial.println("Sending IR code"); // Only for Debug checksum(); // Create valid checksum before sending _irsend.sendArgo(argo); } +#endif // SEND_ARGO void IRArgoAC::checksum() { uint8_t sum = 2; // Corresponds to byte 11 being constant 0b01 @@ -65,20 +52,18 @@ void IRArgoAC::checksum() { // Only add up bytes to 9. byte 10 is 0b01 constant anyway. // Assume that argo array is MSB first (left) - for (i = 0; i < 10; i++) - sum += argo[i]; + for (i = 0; i < 10; i++) sum += argo[i]; sum = sum % 256; // modulo 256 // Append sum to end of array // Set const part of checksum bit 10 argo[10] = 0b00000010; argo[10] += sum << 2; // Shift up 2 bits and append to byte 10 - argo[11] = sum >> 6; // Shift down 6 bits and add in two LSBs of bit 11 + argo[11] = sum >> 6; // Shift down 6 bits and add in two LSBs of bit 11 } void IRArgoAC::stateReset() { - for (uint8_t i = 0; i < ARGO_COMMAND_LENGTH; i++) - argo[i] = 0x0; + for (uint8_t i = 0; i < kArgoStateLength; i++) argo[i] = 0x0; // Argo Message. Store MSB left. // Default message: @@ -91,8 +76,8 @@ void IRArgoAC::stateReset() { this->off(); this->setTemp(20); this->setRoomTemp(25); - this->setCoolMode(ARGO_COOL_AUTO); - this->setFan(ARGO_FAN_AUTO); + this->setCoolMode(kArgoCoolAuto); + this->setFan(kArgoFanAuto); } uint8_t* IRArgoAC::getRaw() { @@ -123,9 +108,7 @@ void IRArgoAC::setPower(bool state) { off(); } -uint8_t IRArgoAC::getPower() { - return ac_state; -} +uint8_t IRArgoAC::getPower() { return ac_state; } void IRArgoAC::setMax(bool state) { max_mode = state; @@ -135,17 +118,15 @@ void IRArgoAC::setMax(bool state) { argo[9] &= 0b11110111; } -bool IRArgoAC::getMax() { - return max_mode; -} +bool IRArgoAC::getMax() { return max_mode; } // Set the temp in deg C // Sending 0 equals +4 void IRArgoAC::setTemp(uint8_t temp) { - if (temp < ARGO_MIN_TEMP) - temp = ARGO_MIN_TEMP; - else if (temp > ARGO_MAX_TEMP) - temp = ARGO_MAX_TEMP; + if (temp < kArgoMinTemp) + temp = kArgoMinTemp; + else if (temp > kArgoMaxTemp) + temp = kArgoMaxTemp; // Store in attributes set_temp = temp; @@ -161,9 +142,7 @@ void IRArgoAC::setTemp(uint8_t temp) { argo[3] += temp >> 2; // remove lowest to bits and append in 0-2 } -uint8_t IRArgoAC::getTemp() { - return set_temp; -} +uint8_t IRArgoAC::getTemp() { return set_temp; } // Set the speed of the fan void IRArgoAC::setFan(uint8_t fan) { @@ -175,18 +154,14 @@ void IRArgoAC::setFan(uint8_t fan) { argo[3] += fan << 3; } -uint8_t IRArgoAC::getFan() { - return fan_mode; -} +uint8_t IRArgoAC::getFan() { return fan_mode; } void IRArgoAC::setFlap(uint8_t flap) { flap_mode = flap; // TODO(kaschmo): set correct bits for flap mode } -uint8_t IRArgoAC::getFlap() { - return flap_mode; -} +uint8_t IRArgoAC::getFlap() { return flap_mode; } uint8_t IRArgoAC::getMode() { // return cooling 0, heating 1 @@ -203,9 +178,7 @@ void IRArgoAC::setCoolMode(uint8_t mode) { argo[2] += mode << 3; } -uint8_t IRArgoAC::getCoolMode() { - return cool_mode; -} +uint8_t IRArgoAC::getCoolMode() { return cool_mode; } void IRArgoAC::setHeatMode(uint8_t mode) { ac_mode = 1; // Set ac mode to heating @@ -218,9 +191,7 @@ void IRArgoAC::setHeatMode(uint8_t mode) { argo[2] += mode << 3; } -uint8_t IRArgoAC::getHeatMode() { - return heat_mode; -} +uint8_t IRArgoAC::getHeatMode() { return heat_mode; } void IRArgoAC::setNight(bool state) { night_mode = state; @@ -231,9 +202,7 @@ void IRArgoAC::setNight(bool state) { argo[9] &= 0b11111011; } -bool IRArgoAC::getNight() { - return night_mode; -} +bool IRArgoAC::getNight() { return night_mode; } void IRArgoAC::setiFeel(bool state) { ifeel_mode = state; @@ -244,9 +213,7 @@ void IRArgoAC::setiFeel(bool state) { argo[9] &= 0b01111111; } -bool IRArgoAC::getiFeel() { - return ifeel_mode; -} +bool IRArgoAC::getiFeel() { return ifeel_mode; } void IRArgoAC::setTime() { // TODO(kaschmo): use function call from checksum to set time first @@ -261,4 +228,3 @@ void IRArgoAC::setRoomTemp(uint8_t temp) { argo[3] += temp << 5; // Append to bit 5,6,7 argo[4] += temp >> 3; // Remove lowest 3 bits and append in 0,1 } -#endif // SEND_ARGO diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Argo.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Argo.h similarity index 51% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_Argo.h rename to lib/IRremoteESP8266-2.5.2.03/src/ir_Argo.h index a25199208..b49fc3517 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Argo.h +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Argo.h @@ -29,40 +29,59 @@ // Constants. Store MSB left. -#define ARGO_COOL_ON 0U // 0b000 -#define ARGO_COOL_OFF 3U // 0b110 -#define ARGO_COOL_AUTO 2U // 0b010 -#define ARGO_COOl_HUM 1U // 0b100 +const uint8_t kArgoCoolOn = 0; // 0b000 +const uint8_t kArgoCoolOff = 3; // 0b110 +const uint8_t kArgoCoolAuto = 2; // 0b010 +const uint8_t kArgoCoolHum = 1; // 0b100 +const uint8_t kArgoHeatOn = 0; // 0b001 +const uint8_t kArgoHeatAuto = 1; // 0b101 +const uint8_t kArgoHeatBlink = 2; // 0b011 // ??no idea what mode that is +const uint8_t kArgoMinTemp = 10; // Celsius offset +4 +const uint8_t kArgoMaxTemp = 32; // Celsius +const uint8_t kArgoFanAuto = 0; // 0b00 +const uint8_t kArgoFan3 = 3; // 0b11 +const uint8_t kArgoFan2 = 2; // 0b01 +const uint8_t kArgoFan1 = 1; // 0b10 +const uint8_t kArgoFlapAuto = 0; // 0b000 +const uint8_t kArgoFlap1 = 1; // 0b100 +const uint8_t kArgoFlap2 = 2; // 0b010 +const uint8_t kArgoFlap3 = 3; // 0b110 +const uint8_t kArgoFlap4 = 4; // 0b001 +const uint8_t kArgoFlap5 = 5; // 0b101 +const uint8_t kArgoFlap6 = 6; // 0b011 +const uint8_t kArgoFlapFull = 7; // 0b111 -#define ARGO_HEAT_ON 0U // 0b001 -#define ARGO_HEAT_AUTO 1U // 0b101 -#define ARGO_HEAT_BLINK 2U // 0b011 // ??no idea what mode that is +// Legacy defines. (Deperecated) +#define ARGO_COOL_ON kArgoCoolOn +#define ARGO_COOL_OFF kArgoCoolOff +#define ARGO_COOL_AUTO kArgoCoolAuto +#define ARGO_COOl_HUM kArgoCoolHum +#define ARGO_HEAT_ON kArgoHeatOn +#define ARGO_HEAT_AUTO kArgoHeatAuto +#define ARGO_HEAT_BLINK kArgoHeatBlink +#define ARGO_MIN_TEMP kArgoMinTemp +#define ARGO_MAX_TEMP kArgoMaxTemp +#define ARGO_FAN_AUTO kArgoFanAuto +#define ARGO_FAN_3 kArgoFan3 +#define ARGO_FAN_2 kArgoFan2 +#define ARGO_FAN_1 kArgoFan1 +#define ARGO_FLAP_AUTO kArgoFlapAuto +#define ARGO_FLAP_1 kArgoFlap1 +#define ARGO_FLAP_2 kArgoFlap2 +#define ARGO_FLAP_3 kArgoFlap3 +#define ARGO_FLAP_4 kArgoFlap4 +#define ARGO_FLAP_5 kArgoFlap5 +#define ARGO_FLAP_6 kArgoFlap6 +#define ARGO_FLAP_FULL kArgoFlapFull -#define ARGO_MIN_TEMP 10U // Celsius offset +4 -#define ARGO_MAX_TEMP 32U // Celsius - -#define ARGO_FAN_AUTO 0U // 0b00 -#define ARGO_FAN_3 3U // 0b11 -#define ARGO_FAN_2 2U // 0b01 -#define ARGO_FAN_1 1U // 0b10 - -#define ARGO_FLAP_AUTO 0U // 0b000 -#define ARGO_FLAP_1 1U // 0b100 -#define ARGO_FLAP_2 2U // 0b010 -#define ARGO_FLAP_3 3U // 0b110 -#define ARGO_FLAP_4 4U // 0b001 -#define ARGO_FLAP_5 5U // 0b101 -#define ARGO_FLAP_6 6U // 0b011 -#define ARGO_FLAP_FULL 7U // 0b111 - - -#if SEND_ARGO class IRArgoAC { public: explicit IRArgoAC(uint16_t pin); +#if SEND_ARGO void send(); +#endif // SEND_ARGO void begin(); void on(); void off(); @@ -102,7 +121,7 @@ class IRArgoAC { private: // # of bytes per command - uint8_t argo[ARGO_COMMAND_LENGTH]; // Defined in IRremoteESP8266.h + uint8_t argo[kArgoStateLength]; // Defined in IRremoteESP8266.h void stateReset(); void checksum(); IRsend _irsend; // instance of the IR send class @@ -119,6 +138,5 @@ class IRArgoAC { uint8_t max_mode; // on/off uint8_t ifeel_mode; // on/off }; -#endif // SEND_ARGO #endif // IR_ARGO_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Carrier.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Carrier.cpp new file mode 100644 index 000000000..350d61cc1 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Carrier.cpp @@ -0,0 +1,111 @@ +// Copyright 2018 David Conran + +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// CCCCC AAA RRRRRR RRRRRR IIIII EEEEEEE RRRRRR +// CC C AAAAA RR RR RR RR III EE RR RR +// CC AA AA RRRRRR RRRRRR III EEEEE RRRRRR +// CC C AAAAAAA RR RR RR RR III EE RR RR +// CCCCC AA AA RR RR RR RR IIIII EEEEEEE RR RR + +// Suits Carrier/Surrey HVAC models: +// 42QG5A55970 (remote) +// 619EGX0090E0 / 619EGX0120E0 / 619EGX0180E0 / 619EGX0220E0 (indoor units) +// 53NGK009/012 (inverter) + +// Constants +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/385 +const uint16_t kCarrierAcHdrMark = 8532; +const uint16_t kCarrierAcHdrSpace = 4228; +const uint16_t kCarrierAcBitMark = 628; +const uint16_t kCarrierAcOneSpace = 1320; +const uint16_t kCarrierAcZeroSpace = 532; +const uint16_t kCarrierAcGap = 20000; + +#if SEND_CARRIER_AC +// Send a Carrier HVAC formatted message. +// +// Args: +// data: The message to be sent. +// nbits: The bit size of the message being sent. typically kCarrierAcBits. +// repeat: The number of times the message is to be repeated. +// +// Status: BETA / Appears to work on real devices. +// +void IRsend::sendCarrierAC(uint64_t data, uint16_t nbits, uint16_t repeat) { + for (uint16_t r = 0; r <= repeat; r++) { + uint64_t temp_data = data; + // Carrier sends the data block three times. normal + inverted + normal. + for (uint16_t i = 0; i < 3; i++) { + sendGeneric(kCarrierAcHdrMark, kCarrierAcHdrSpace, kCarrierAcBitMark, + kCarrierAcOneSpace, kCarrierAcBitMark, kCarrierAcZeroSpace, + kCarrierAcBitMark, kCarrierAcGap, temp_data, nbits, 38, true, + 0, kDutyDefault); + temp_data = invertBits(temp_data, nbits); + } + } +} +#endif + +#if DECODE_CARRIER_AC +// Decode the supplied Carrier HVAC message. +// Carrier HVAC messages contain only 32 bits, but it is sent three(3) times. +// i.e. normal + inverted + normal +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: Nr. of bits to expect in the data portion. +// Typically kCarrierAcBits. +// strict: Flag to indicate if we strictly adhere to the specification. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: ALPHA / Untested. +// +bool IRrecv::decodeCarrierAC(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < ((2 * nbits + kHeader + kFooter) * 3) - 1) + return false; // Can't possibly be a valid Carrier message. + if (strict && nbits != kCarrierAcBits) + return false; // We expect Carrier to be 32 bits of message. + + uint64_t data = 0; + uint64_t prev_data = 0; + uint16_t offset = kStartOffset; + + for (uint8_t i = 0; i < 3; i++) { + prev_data = data; + // Header + if (!matchMark(results->rawbuf[offset++], kCarrierAcHdrMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kCarrierAcHdrSpace)) + return false; + // Data + match_result_t data_result = + matchData(&(results->rawbuf[offset]), nbits, kCarrierAcBitMark, + kCarrierAcOneSpace, kCarrierAcBitMark, kCarrierAcZeroSpace); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + // Footer + if (!matchMark(results->rawbuf[offset++], kCarrierAcBitMark)) return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset++], kCarrierAcGap)) + return false; + // Compliance. + if (strict) { + // Check if the data is an inverted copy of the previous data. + if (i > 0 && prev_data != invertBits(data, nbits)) return false; + } + } + + // Success + results->bits = nbits; + results->value = data; + results->decode_type = CARRIER_AC; + results->address = data >> 16; + results->command = data & 0xFFFF; + return true; +} +#endif diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Coolix.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Coolix.cpp new file mode 100644 index 000000000..ee539af25 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Coolix.cpp @@ -0,0 +1,423 @@ +// Copyright bakrus +// Copyright 2017 David Conran + +#include "ir_Coolix.h" +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// CCCCC OOOOO OOOOO LL IIIII XX XX +// CC C OO OO OO OO LL III XX XX +// CC OO OO OO OO LL III XXXX +// CC C OO OO OO OO LL III XX XX +// CCCCC OOOO0 OOOO0 LLLLLLL IIIII XX XX + +// Coolix A/C / heatpump added by (send) bakrus & (decode) crankyoldgit +// +// Supports: +// RG57K7(B)/BGEF remote control for Beko BINR 070/071 split-type aircon. +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/484 + +// Constants +// Pulse parms are *50-100 for the Mark and *50+100 for the space +// First MARK is the one after the long gap +// pulse parameters in usec +const uint16_t kCoolixTick = 560; // Approximately 21 cycles at 38kHz +const uint16_t kCoolixBitMarkTicks = 1; +const uint16_t kCoolixBitMark = kCoolixBitMarkTicks * kCoolixTick; +const uint16_t kCoolixOneSpaceTicks = 3; +const uint16_t kCoolixOneSpace = kCoolixOneSpaceTicks * kCoolixTick; +const uint16_t kCoolixZeroSpaceTicks = 1; +const uint16_t kCoolixZeroSpace = kCoolixZeroSpaceTicks * kCoolixTick; +const uint16_t kCoolixHdrMarkTicks = 8; +const uint16_t kCoolixHdrMark = kCoolixHdrMarkTicks * kCoolixTick; +const uint16_t kCoolixHdrSpaceTicks = 8; +const uint16_t kCoolixHdrSpace = kCoolixHdrSpaceTicks * kCoolixTick; +const uint16_t kCoolixMinGapTicks = kCoolixHdrMarkTicks + kCoolixZeroSpaceTicks; +const uint16_t kCoolixMinGap = kCoolixMinGapTicks * kCoolixTick; + +#if SEND_COOLIX +// Send a Coolix message +// +// Args: +// data: Contents of the message to be sent. +// nbits: Nr. of bits of data to be sent. Typically kCoolixBits. +// repeat: Nr. of additional times the message is to be sent. +// +// Status: BETA / Probably works. +// +// Ref: +// https://github.com/z3t0/Arduino-IRremote/blob/master/ir_COOLIX.cpp +// TODO(anyone): Verify repeat functionality against a real unit. +void IRsend::sendCOOLIX(uint64_t data, uint16_t nbits, uint16_t repeat) { + if (nbits % 8 != 0) return; // nbits is required to be a multiple of 8. + + // Set IR carrier frequency + enableIROut(38); + + for (uint16_t r = 0; r <= repeat; r++) { + // Header + mark(kCoolixHdrMark); + space(kCoolixHdrSpace); + + // Data + // Break data into byte segments, starting at the Most Significant + // Byte. Each byte then being sent normal, then followed inverted. + for (uint16_t i = 8; i <= nbits; i += 8) { + // Grab a bytes worth of data. + uint8_t segment = (data >> (nbits - i)) & 0xFF; + // Normal + sendData(kCoolixBitMark, kCoolixOneSpace, kCoolixBitMark, + kCoolixZeroSpace, segment, 8, true); + // Inverted. + sendData(kCoolixBitMark, kCoolixOneSpace, kCoolixBitMark, + kCoolixZeroSpace, segment ^ 0xFF, 8, true); + } + + // Footer + mark(kCoolixBitMark); + space(kCoolixMinGap); // Pause before repeating + } +} +#endif + +// IRCoolixAC class +// Supports: +// RG57K7(B)/BGEF remote control for Beko BINR 070/071 split-type aircon. +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/484 +IRCoolixAC::IRCoolixAC(uint16_t pin) : _irsend(pin) { stateReset(); } + +void IRCoolixAC::stateReset() { remote_state = kCoolixDefaultState; } + +void IRCoolixAC::begin() { _irsend.begin(); } + +#if SEND_COOLIX +void IRCoolixAC::send() { _irsend.sendCOOLIX(remote_state); } +#endif // SEND_COOLIX + +uint32_t IRCoolixAC::getRaw() { return remote_state; } + +void IRCoolixAC::setRaw(const uint32_t new_code) { remote_state = new_code; } + +void IRCoolixAC::setTempRaw(const uint8_t code) { + remote_state &= ~kCoolixTempMask; // Clear the old temp. + remote_state |= (code << 4); +} + +uint8_t IRCoolixAC::getTempRaw() { + return (remote_state & kCoolixTempMask) >> 4; +} + +void IRCoolixAC::setTemp(const uint8_t desired) { + // Range check. + uint8_t temp = std::min(desired, kCoolixTempMax); + temp = std::max(temp, kCoolixTempMin); + setTempRaw(kCoolixTempMap[temp - kCoolixTempMin]); +} + +uint8_t IRCoolixAC::getTemp() { + uint8_t code = getTempRaw(); + uint8_t i; + for (i = 0; i < kCoolixTempRange; i++) + if (kCoolixTempMap[i] == code) return kCoolixTempMin + i; + return kCoolixUnknown; // Not a temp we expected. +} + +void IRCoolixAC::setSensorTempRaw(const uint8_t code) { + remote_state &= ~kCoolixSensorTempMask; // Clear previous sensor temp. + remote_state |= ((code & 0xF) << 8); +} + +void IRCoolixAC::setSensorTemp(const uint8_t desired) { + uint8_t temp = desired; + temp = std::min(temp, kCoolixSensorTempMax); + temp = std::max(temp, kCoolixSensorTempMin); + setSensorTempRaw(temp - kCoolixSensorTempMin); + setZoneFollow(true); // Setting a Sensor temp means you want to Zone Follow. +} + +uint8_t IRCoolixAC::getSensorTemp() { + return ((remote_state & kCoolixSensorTempMask) >> 8) + kCoolixSensorTempMin; +} + +bool IRCoolixAC::getPower() { + // There is only an off state. Everything else is "on". + return remote_state != kCoolixOff; +} + +void IRCoolixAC::setPower(const bool power) { + if (!power) remote_state = kCoolixOff; + // There really is no distinct "on" setting, so do nothing. +} + +bool IRCoolixAC::getSwing() { return remote_state == kCoolixSwing; } + +void IRCoolixAC::setSwing() { + // Assumes that repeated sending "swing" toggles the action on the device. + remote_state = kCoolixSwing; +} + +bool IRCoolixAC::getSleep() { return remote_state == kCoolixSleep; } + +void IRCoolixAC::setSleep() { remote_state = kCoolixSleep; } + +bool IRCoolixAC::getTurbo() { return remote_state == kCoolixTurbo; } + +void IRCoolixAC::setTurbo() { + // Assumes that repeated sending "turbo" toggles the action on the device. + remote_state = kCoolixTurbo; +} + +bool IRCoolixAC::getLed() { return remote_state == kCoolixLed; } + +void IRCoolixAC::setLed() { + // Assumes that repeated sending "Led" toggles the action on the device. + remote_state = kCoolixLed; +} + +bool IRCoolixAC::getClean() { return remote_state == kCoolixClean; } + +void IRCoolixAC::setClean() { remote_state = kCoolixClean; } + +bool IRCoolixAC::getZoneFollow() { + return remote_state & kCoolixZoneFollowMask; +} + +// Internal use only. +void IRCoolixAC::setZoneFollow(bool state) { + if (state) { + remote_state |= kCoolixZoneFollowMask; + } else { + remote_state &= ~kCoolixZoneFollowMask; + } +} + +void IRCoolixAC::clearSensorTemp() { + setZoneFollow(false); + setSensorTempRaw(kCoolixSensorTempIgnoreCode); +} + +void IRCoolixAC::setMode(const uint8_t mode) { + uint32_t actualmode = mode; + // Fan mode is a special case of Dry. + if (mode == kCoolixFan) actualmode = kCoolixDry; + switch (actualmode) { + case kCoolixCool: + case kCoolixAuto: + case kCoolixHeat: + case kCoolixDry: + remote_state = (remote_state & ~kCoolixModeMask) | (actualmode << 2); + // Force the temp into a known-good state. + setTemp(getTemp()); + } + if (mode == kCoolixFan) setTempRaw(kCoolixFanTempCode); +} + +uint8_t IRCoolixAC::getMode() { + uint8_t mode = (remote_state & kCoolixModeMask) >> 2; + if (mode == kCoolixDry) + if (getTempRaw() == kCoolixFanTempCode) return kCoolixFan; + return mode; +} + +uint8_t IRCoolixAC::getFan() { return (remote_state & kCoolixFanMask) >> 13; } + +void IRCoolixAC::setFan(const uint8_t speed) { + uint8_t newspeed = speed; + switch (speed) { + case kCoolixFanMin: + case kCoolixFanMed: + case kCoolixFanMax: + case kCoolixFanAuto: + case kCoolixFanZoneFollow: + case kCoolixFanFixed: + break; + default: // Unknown speed requested. + newspeed = kCoolixFanAuto; + } + remote_state &= ~kCoolixFanMask; + remote_state |= ((newspeed << 13) & kCoolixFanMask); +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRCoolixAC::toString() { + String result = ""; +#else +std::string IRCoolixAC::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Power: "; + if (getPower()) { + result += "On"; + } else { + result += "Off"; + return result; // If it's off, there is no other info. + } + result += ", Fan: " + uint64ToString(getFan()); + switch (getFan()) { + case kCoolixFanAuto: + result += " (AUTO)"; + break; + case kCoolixFanMax: + result += " (MAX)"; + break; + case kCoolixFanMin: + result += " (MIN)"; + break; + case kCoolixFanMed: + result += " (MED)"; + break; + case kCoolixFanZoneFollow: + result += " (ZONEFOLLOW)"; + break; + case kCoolixFanFixed: + result += " (FIXED)"; + break; + default: + result += " (UNKNOWN)"; + } + // Special modes. + if (getSwing()) { + result += ", Swing: Toggle"; + return result; + } + if (getSleep()) { + result += ", Sleep: Toggle"; + return result; + } + if (getTurbo()) { + result += ", Turbo: Toggle"; + return result; + } + if (getLed()) { + result += ", Led: Toggle"; + return result; + } + if (getClean()) { + result += ", Mode: Self clean"; + return result; + } + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kCoolixAuto: + result += " (AUTO)"; + break; + case kCoolixCool: + result += " (COOL)"; + break; + case kCoolixHeat: + result += " (HEAT)"; + break; + case kCoolixDry: + result += " (DRY)"; + break; + case kCoolixFan: + result += " (FAN)"; + break; + default: + result += " (UNKNOWN)"; + } + if (getMode() != kCoolixFan) // Fan mode doesn't have a temperature. + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", Zone Follow: "; + if (getZoneFollow()) + result += "On"; + else + result += "Off"; + result += ", Sensor Temp: "; + if (getSensorTemp() > kCoolixSensorTempMax) + result += "Ignored"; + else + result += uint64ToString(getSensorTemp()) + "C"; + return result; +} + +#if DECODE_COOLIX +// Decode the supplied Coolix message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kCoolixBits. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA / Probably working. +bool IRrecv::decodeCOOLIX(decode_results *results, uint16_t nbits, + bool strict) { + // The protocol sends the data normal + inverted, alternating on + // each byte. Hence twice the number of expected data bits. + if (results->rawlen < 2 * 2 * nbits + kHeader + kFooter - 1) + return false; // Can't possibly be a valid COOLIX message. + if (strict && nbits != kCoolixBits) + return false; // Not strictly a COOLIX message. + if (nbits % 8 != 0) // nbits has to be a multiple of nr. of bits in a byte. + return false; + + uint64_t data = 0; + uint64_t inverted = 0; + uint16_t offset = kStartOffset; + + if (nbits > sizeof(data) * 8) + return false; // We can't possibly capture a Coolix packet that big. + + // Header + if (!matchMark(results->rawbuf[offset], kCoolixHdrMark)) return false; + // Calculate how long the common tick time is based on the header mark. + uint32_t m_tick = results->rawbuf[offset++] * kRawTick / kCoolixHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kCoolixHdrSpace)) return false; + // Calculate how long the common tick time is based on the header space. + uint32_t s_tick = results->rawbuf[offset++] * kRawTick / kCoolixHdrSpaceTicks; + + // Data + // Twice as many bits as there are normal plus inverted bits. + for (uint16_t i = 0; i < nbits * 2; i++, offset++) { + bool flip = (i / 8) % 2; + if (!matchMark(results->rawbuf[offset++], kCoolixBitMarkTicks * m_tick)) + return false; + if (matchSpace(results->rawbuf[offset], kCoolixOneSpaceTicks * s_tick)) { + if (flip) + inverted = (inverted << 1) | 1; + else + data = (data << 1) | 1; + } else if (matchSpace(results->rawbuf[offset], + kCoolixZeroSpaceTicks * s_tick)) { + if (flip) + inverted <<= 1; + else + data <<= 1; + } else { + return false; + } + } + + // Footer + if (!matchMark(results->rawbuf[offset++], kCoolixBitMarkTicks * m_tick)) + return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset], kCoolixMinGapTicks * s_tick)) + return false; + + // Compliance + uint64_t orig = data; // Save a copy of the data. + if (strict) { + for (uint16_t i = 0; i < nbits; i += 8, data >>= 8, inverted >>= 8) + if ((data & 0xFF) != ((inverted & 0xFF) ^ 0xFF)) return false; + } + + // Success + results->decode_type = COOLIX; + results->bits = nbits; + results->value = orig; + results->address = 0; + results->command = 0; + return true; +} +#endif diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Coolix.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Coolix.h new file mode 100644 index 000000000..ee4552074 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Coolix.h @@ -0,0 +1,139 @@ +// Coolix A/C +// +// Copyright 2018 David Conran + +#ifndef IR_COOLIX_H_ +#define IR_COOLIX_H_ + +#define __STDC_LIMIT_MACROS +#include +#ifndef UNIT_TEST +#include +#else +#include +#endif +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// CCCCC OOOOO OOOOO LL IIIII XX XX +// CC C OO OO OO OO LL III XX XX +// CC OO OO OO OO LL III XXXX +// CC C OO OO OO OO LL III XX XX +// CCCCC OOOO0 OOOO0 LLLLLLL IIIII XX XX + +// Supports: +// RG57K7(B)/BGEF remote control for Beko BINR 070/071 split-type aircon. +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/484 +// Kudos: +// Hamper: For the breakdown and mapping of the bit values. + +// Constants +// Modes +const uint8_t kCoolixCool = 0b00; +const uint8_t kCoolixDry = 0b01; +const uint8_t kCoolixAuto = 0b10; +const uint8_t kCoolixHeat = 0b11; +const uint8_t kCoolixFan = 4; // Synthetic. +const uint32_t kCoolixModeMask = 0b000000000000000000001100; // 0xC +const uint32_t kCoolixZoneFollowMask = 0b000010000000000000000000; // 0x80000 +// Fan Control +const uint8_t kCoolixFanMin = 0b100; +const uint8_t kCoolixFanMed = 0b010; +const uint8_t kCoolixFanMax = 0b001; +const uint8_t kCoolixFanAuto = 0b101; +const uint8_t kCoolixFanZoneFollow = 0b110; +const uint8_t kCoolixFanFixed = 0b111; +const uint32_t kCoolixFanMask = 0b000000001110000000000000; // 0x00E000 +// Temperature +const uint8_t kCoolixTempMin = 17; // Celsius +const uint8_t kCoolixTempMax = 30; // Celsius +const uint8_t kCoolixTempRange = kCoolixTempMax - kCoolixTempMin + 1; +const uint8_t kCoolixFanTempCode = 0b1110; // Part of Fan Mode. +const uint32_t kCoolixTempMask = 0b11110000; +const uint8_t kCoolixTempMap[kCoolixTempRange] = { + 0b0000, // 17C + 0b0001, // 18c + 0b0011, // 19C + 0b0010, // 20C + 0b0110, // 21C + 0b0111, // 22C + 0b0101, // 23C + 0b0100, // 24C + 0b1100, // 25C + 0b1101, // 26C + 0b1001, // 27C + 0b1000, // 28C + 0b1010, // 29C + 0b1011 // 30C +}; +const uint8_t kCoolixSensorTempMin = 16; // Celsius +const uint8_t kCoolixSensorTempMax = 30; // Celsius +const uint8_t kCoolixSensorTempIgnoreCode = 0b1111; +const uint32_t kCoolixSensorTempMask = 0b000000000000111100000000; // 0xF00 +// Fixed states/messages. +const uint8_t kCoolixPrefix = 0b1011; // 0xB +const uint8_t kCoolixUnknown = 0xFF; +const uint32_t kCoolixOff = 0b101100100111101111100000; // 0xB27BE0 +const uint32_t kCoolixSwing = 0b101100100110101111100000; // 0xB26BE0 +const uint32_t kCoolixSleep = 0b101100101110000000000011; // 0xB2E003 +const uint32_t kCoolixTurbo = 0b101101011111010110100010; // 0xB5F5A2 +const uint32_t kCoolixLed = 0b101101011111010110100101; // 0xB5F5A5 +const uint32_t kCoolixClean = 0b101101011111010110101010; // 0xB5F5AA +// On, 25C, Mode: Auto, Fan: Auto, Zone Follow: Off, Sensor Temp: Ignore. +const uint32_t kCoolixDefaultState = 0b101100101011111111001000; // 0xB2BFC8 + +// Classes +class IRCoolixAC { + public: + explicit IRCoolixAC(uint16_t pin); + + void stateReset(); +#if SEND_COOLIX + void send(); +#endif // SEND_COOLIX + void begin(); + void on(); + void off(); + void setPower(const bool state); + bool getPower(); + void setTemp(const uint8_t temp); + uint8_t getTemp(); + void setSensorTemp(const uint8_t desired); + uint8_t getSensorTemp(); + void clearSensorTemp(); + void setFan(const uint8_t fan); + uint8_t getFan(); + void setMode(const uint8_t mode); + uint8_t getMode(); + void setSwing(); + bool getSwing(); + void setSleep(); + bool getSleep(); + void setTurbo(); + bool getTurbo(); + void setLed(); + bool getLed(); + void setClean(); + bool getClean(); + bool getZoneFollow(); + uint32_t getRaw(); + void setRaw(const uint32_t new_code); + +#ifdef ARDUINO + String toString(); +#else + std::string toString(); +#endif + + private: + // The state of the IR remote in IR code form. + uint32_t remote_state; + IRsend _irsend; + void setTempRaw(const uint8_t code); + uint8_t getTempRaw(); + void setSensorTempRaw(const uint8_t code); + void setZoneFollow(const bool state); +}; + +#endif // IR_COOLIX_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Daikin.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Daikin.cpp new file mode 100644 index 000000000..b94b4a63a --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Daikin.cpp @@ -0,0 +1,750 @@ +/* +An Arduino sketch to emulate IR Daikin ARC433** remote control unit +Read more at: +http://harizanov.com/2012/02/control-daikin-air-conditioner-over-the-internet/ + +Copyright 2016 sillyfrog +Copyright 2017 sillyfrog, crankyoldgit +*/ + +#include "ir_Daikin.h" +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRremoteESP8266.h" +#include "IRsend.h" +#include "IRutils.h" + +// DDDDD AAA IIIII KK KK IIIII NN NN +// DD DD AAAAA III KK KK III NNN NN +// DD DD AA AA III KKKK III NN N NN +// DD DD AAAAAAA III KK KK III NN NNN +// DDDDDD AA AA IIIII KK KK IIIII NN NN + +// Constants +// Ref: +// https://github.com/mharizanov/Daikin-AC-remote-control-over-the-Internet/tree/master/IRremote +// http://rdlab.cdmt.vn/project-2013/daikin-ir-protocol + +#if SEND_DAIKIN +// Original header +// static uint8_t header1[DAIKIN_HEADER1_LENGTH]; +// header1[0] = 0b00010001; +// header1[1] = 0b11011010; +// header1[2] = 0b00100111; +// header1[3] = 0b00000000; +// header1[4] = 0b11000101; +// header1[5] = 0b00000000; +// header1[6] = 0b00000000; +// header1[7] = 0b11010111; + +// Send a Daikin A/C message. +// +// Args: +// data: An array of kDaikinStateLength bytes containing the IR command. +// +// Status: STABLE +// +// Ref: +// IRDaikinESP.cpp +// https://github.com/mharizanov/Daikin-AC-remote-control-over-the-Internet/tree/master/IRremote +void IRsend::sendDaikin(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + if (nbytes < kDaikinStateLength) + return; // Not enough bytes to send a proper message. + + for (uint16_t r = 0; r <= repeat; r++) { + // Send the header, 0b00000 + sendGeneric(0, 0, // No header for the header + kDaikinBitMark, kDaikinOneSpace, kDaikinBitMark, + kDaikinZeroSpace, kDaikinBitMark, kDaikinZeroSpace + kDaikinGap, + (uint64_t)0b00000, 5, 38, false, 0, 50); + // Leading header + // Do this as a constant to save RAM and keep in flash memory + sendGeneric(kDaikinHdrMark, kDaikinHdrSpace, kDaikinBitMark, + kDaikinOneSpace, kDaikinBitMark, kDaikinZeroSpace, + kDaikinBitMark, kDaikinZeroSpace + kDaikinGap, + kDaikinFirstHeader64, 64, 38, false, 0, 50); + // Data #1 + sendGeneric(kDaikinHdrMark, kDaikinHdrSpace, kDaikinBitMark, + kDaikinOneSpace, kDaikinBitMark, kDaikinZeroSpace, + kDaikinBitMark, kDaikinZeroSpace + kDaikinGap, data, 8, 38, + false, 0, 50); + // Data #2 + sendGeneric(kDaikinHdrMark, kDaikinHdrSpace, kDaikinBitMark, + kDaikinOneSpace, kDaikinBitMark, kDaikinZeroSpace, + kDaikinBitMark, kDaikinZeroSpace + kDaikinGap, data + 8, + nbytes - 8, 38, false, 0, 50); + } +} +#endif // SEND_DAIKIN + +IRDaikinESP::IRDaikinESP(uint16_t pin) : _irsend(pin) { stateReset(); } + +void IRDaikinESP::begin() { _irsend.begin(); } + +#if SEND_DAIKIN +void IRDaikinESP::send() { + checksum(); + _irsend.sendDaikin(daikin); +} +#endif // SEND_DAIKIN + +// Calculate the checksum for a given data block. +// Args: +// block: Ptr to the start of the data block. +// length: Nr. of bytes to checksum. +// Returns: +// A byte containing the calculated checksum. +uint8_t IRDaikinESP::calcBlockChecksum(const uint8_t *block, + const uint16_t length) { + uint8_t sum = 0; + // Daikin checksum is just the addition of all the data bytes + // in the block but capped to 8 bits. + for (uint16_t i = 0; i < length; i++, block++) sum += *block; + return sum & 0xFFU; +} + +// Verify the checksum is valid for a given state. +// Args: +// state: The array to verify the checksum of. +// length: The size of the state. +// Returns: +// A boolean. +bool IRDaikinESP::validChecksum(const uint8_t state[], const uint16_t length) { + if (length < 8 || state[7] != calcBlockChecksum(state, 7)) return false; + if (length < 10 || + state[length - 1] != calcBlockChecksum(state + 8, length - 9)) + return false; + return true; +} + +// Calculate and set the checksum values for the internal state. +void IRDaikinESP::checksum() { + daikin[7] = calcBlockChecksum(daikin, 7); + daikin[26] = calcBlockChecksum(daikin + 8, 17); +} + +void IRDaikinESP::stateReset() { + for (uint8_t i = 0; i < kDaikinStateLength; i++) daikin[i] = 0x0; + + daikin[0] = 0x11; + daikin[1] = 0xDA; + daikin[2] = 0x27; + daikin[4] = 0x42; + // daikin[7] is a checksum byte, it will be set by checksum(). + daikin[8] = 0x11; + daikin[9] = 0xDA; + daikin[10] = 0x27; + daikin[13] = 0x49; + daikin[14] = 0x1E; + daikin[16] = 0xB0; + daikin[19] = 0x06; + daikin[20] = 0x60; + daikin[23] = 0xC0; + // daikin[26] is a checksum byte, it will be set by checksum(). + checksum(); +} + +uint8_t *IRDaikinESP::getRaw() { + checksum(); // Ensure correct settings before sending. + return daikin; +} + +void IRDaikinESP::setRaw(uint8_t new_code[]) { + for (uint8_t i = 0; i < kDaikinStateLength; i++) daikin[i] = new_code[i]; +} + +void IRDaikinESP::on() { + // state = ON; + setBit(kDaikinBytePower, kDaikinBitPower); +} + +void IRDaikinESP::off() { + // state = OFF; + clearBit(kDaikinBytePower, kDaikinBitPower); +} + +void IRDaikinESP::setPower(bool state) { + if (state) + on(); + else + off(); +} + +bool IRDaikinESP::getPower() { + return (getBit(kDaikinBytePower, kDaikinBitPower) > 0); +} + +// Set the temp in deg C +void IRDaikinESP::setTemp(uint8_t temp) { + if (temp < kDaikinMinTemp) + temp = kDaikinMinTemp; + else if (temp > kDaikinMaxTemp) + temp = kDaikinMaxTemp; + daikin[14] = temp * 2; +} + +uint8_t IRDaikinESP::getTemp() { return daikin[14] / 2; } + +// Set the speed of the fan, 1-5 or kDaikinFanAuto or kDaikinFanQuiet +void IRDaikinESP::setFan(uint8_t fan) { + // Set the fan speed bits, leave low 4 bits alone + uint8_t fanset; + if (fan == kDaikinFanQuiet || fan == kDaikinFanAuto) + fanset = fan; + else if (fan < kDaikinFanMin || fan > kDaikinFanMax) + fanset = kDaikinFanAuto; + else + fanset = 2 + fan; + daikin[16] &= 0x0F; + daikin[16] |= (fanset << 4); +} + +uint8_t IRDaikinESP::getFan() { + uint8_t fan = daikin[16] >> 4; + if (fan != kDaikinFanQuiet && fan != kDaikinFanAuto) fan -= 2; + return fan; +} + +uint8_t IRDaikinESP::getMode() { + /* + kDaikinCool + kDaikinHeat + kDaikinFan + kDaikinAuto + kDaikinDry + */ + return daikin[13] >> 4; +} + +void IRDaikinESP::setMode(uint8_t mode) { + switch (mode) { + case kDaikinCool: + case kDaikinHeat: + case kDaikinFan: + case kDaikinDry: + break; + default: + mode = kDaikinAuto; + } + mode <<= 4; + daikin[13] &= 0b10001111; + daikin[13] |= mode; +} + +void IRDaikinESP::setSwingVertical(bool state) { + if (state) + daikin[16] |= 0x0F; + else + daikin[16] &= 0xF0; +} + +bool IRDaikinESP::getSwingVertical() { return daikin[16] & 0x01; } + +void IRDaikinESP::setSwingHorizontal(bool state) { + if (state) + daikin[17] |= 0x0F; + else + daikin[17] &= 0xF0; +} + +bool IRDaikinESP::getSwingHorizontal() { return daikin[17] & 0x01; } + +void IRDaikinESP::setQuiet(bool state) { + if (state) { + setBit(kDaikinByteSilent, kDaikinBitSilent); + // Powerful & Quiet mode being on are mutually exclusive. + setPowerful(false); + } else { + clearBit(kDaikinByteSilent, kDaikinBitSilent); + } +} + +bool IRDaikinESP::getQuiet() { + return (getBit(kDaikinByteSilent, kDaikinBitSilent) > 0); +} + +void IRDaikinESP::setPowerful(bool state) { + if (state) { + setBit(kDaikinBytePowerful, kDaikinBitPowerful); + // Powerful, Quiet, & Econo mode being on are mutually exclusive. + setQuiet(false); + setEcono(false); + } else { + clearBit(kDaikinBytePowerful, kDaikinBitPowerful); + } +} + +bool IRDaikinESP::getPowerful() { + return (getBit(kDaikinBytePowerful, kDaikinBitPowerful) > 0); +} + +void IRDaikinESP::setSensor(bool state) { + if (state) + setBit(kDaikinByteSensor, kDaikinBitSensor); + else + clearBit(kDaikinByteSensor, kDaikinBitSensor); +} + +bool IRDaikinESP::getSensor() { + return (getBit(kDaikinByteSensor, kDaikinBitSensor) > 0); +} + +void IRDaikinESP::setEcono(bool state) { + if (state) { + setBit(kDaikinByteEcono, kDaikinBitEcono); + // Powerful & Econo mode being on are mutually exclusive. + setPowerful(false); + } else { + clearBit(kDaikinByteEcono, kDaikinBitEcono); + } +} + +bool IRDaikinESP::getEcono() { + return (getBit(kDaikinByteEcono, kDaikinBitEcono) > 0); +} + +void IRDaikinESP::setEye(bool state) { + if (state) + setBit(kDaikinByteEye, kDaikinBitEye); + else + clearBit(kDaikinByteEye, kDaikinBitEye); +} + +bool IRDaikinESP::getEye() { + return (getBit(kDaikinByteEye, kDaikinBitEye) > 0); +} + +void IRDaikinESP::setMold(bool state) { + if (state) + setBit(kDaikinByteMold, kDaikinBitMold); + else + clearBit(kDaikinByteMold, kDaikinBitMold); +} + +bool IRDaikinESP::getMold() { + return (getBit(kDaikinByteMold, kDaikinBitMold) > 0); +} + +void IRDaikinESP::setBit(uint8_t byte, uint8_t bitmask) { + daikin[byte] |= bitmask; +} + +void IRDaikinESP::clearBit(uint8_t byte, uint8_t bitmask) { + bitmask = ~bitmask; + daikin[byte] &= bitmask; +} + +uint8_t IRDaikinESP::getBit(uint8_t byte, uint8_t bitmask) { + return daikin[byte] & bitmask; +} + +// starttime: Number of minutes after midnight, in 10 minutes increments +void IRDaikinESP::enableOnTimer(uint16_t starttime) { + setBit(kDaikinByteOnTimer, kDaikinBitOnTimer); + daikin[18] = (uint8_t)(starttime & 0x00FF); + // only keep 4 bits + daikin[19] &= 0xF0; + daikin[19] |= (uint8_t)((starttime >> 8) & 0x0F); +} + +void IRDaikinESP::disableOnTimer() { + enableOnTimer(0x600); + clearBit(kDaikinByteOnTimer, kDaikinBitOnTimer); +} + +uint16_t IRDaikinESP::getOnTime() { + uint16_t ret; + ret = daikin[19] & 0x0F; + ret = ret << 8; + ret += daikin[18]; + return ret; +} + +bool IRDaikinESP::getOnTimerEnabled() { + return getBit(kDaikinByteOnTimer, kDaikinBitOnTimer); +} + +// endtime: Number of minutes after midnight, in 10 minutes increments +void IRDaikinESP::enableOffTimer(uint16_t endtime) { + setBit(kDaikinByteOffTimer, kDaikinBitOffTimer); + daikin[20] = (uint8_t)((endtime >> 4) & 0xFF); + daikin[19] &= 0x0F; + daikin[19] |= (uint8_t)((endtime & 0x000F) << 4); +} + +void IRDaikinESP::disableOffTimer() { + enableOffTimer(0x600); + clearBit(kDaikinByteOffTimer, kDaikinBitOffTimer); +} + +uint16_t IRDaikinESP::getOffTime() { + uint16_t ret, tmp; + ret = daikin[20]; + ret <<= 4; + tmp = daikin[19] & 0xF0; + tmp >>= 4; + ret += tmp; + return ret; +} + +bool IRDaikinESP::getOffTimerEnabled() { + return getBit(kDaikinByteOffTimer, kDaikinBitOffTimer); +} + +void IRDaikinESP::setCurrentTime(uint16_t numMins) { + if (numMins > 24 * 60) numMins = 0; // If > 23:59, set to 00:00 + daikin[5] = (uint8_t)(numMins & 0x00FF); + // only keep 4 bits + daikin[6] &= 0xF0; + daikin[6] |= (uint8_t)((numMins >> 8) & 0x0F); +} + +uint16_t IRDaikinESP::getCurrentTime() { + uint16_t ret; + ret = daikin[6] & 0x0F; + ret <<= 8; + ret += daikin[5]; + return ret; +} + +#ifdef ARDUINO +String IRDaikinESP::renderTime(uint16_t timemins) { + String ret; +#else // ARDUINO +std::string IRDaikinESP::renderTime(uint16_t timemins) { + std::string ret; +#endif // ARDUINO + uint16_t hours, mins; + hours = timemins / 60; + ret = uint64ToString(hours) + ":"; + mins = timemins - (hours * 60); + if (mins < 10) ret += "0"; + ret += uint64ToString(mins); + return ret; +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRDaikinESP::toString() { + String result = ""; +#else // ARDUINO +std::string IRDaikinESP::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Power: "; + if (getPower()) + result += "On"; + else + result += "Off"; + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kDaikinAuto: + result += " (AUTO)"; + break; + case kDaikinCool: + result += " (COOL)"; + break; + case kDaikinHeat: + result += " (HEAT)"; + break; + case kDaikinDry: + result += " (DRY)"; + break; + case kDaikinFan: + result += " (FAN)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", Fan: " + uint64ToString(getFan()); + switch (getFan()) { + case kDaikinFanAuto: + result += " (AUTO)"; + break; + case kDaikinFanQuiet: + result += " (QUIET)"; + break; + case kDaikinFanMin: + result += " (MIN)"; + break; + case kDaikinFanMax: + result += " (MAX)"; + break; + } + result += ", Powerful: "; + if (getPowerful()) + result += "On"; + else + result += "Off"; + result += ", Quiet: "; + if (getQuiet()) + result += "On"; + else + result += "Off"; + result += ", Sensor: "; + if (getSensor()) + result += "On"; + else + result += "Off"; + result += ", Eye: "; + if (getEye()) + result += "On"; + else + result += "Off"; + result += ", Mold: "; + if (getMold()) + result += "On"; + else + result += "Off"; + result += ", Swing (Horizontal): "; + if (getSwingHorizontal()) + result += "On"; + else + result += "Off"; + result += ", Swing (Vertical): "; + if (getSwingVertical()) + result += "On"; + else + result += "Off"; + result += ", Current Time: " + renderTime(getCurrentTime()); + result += ", On Time: "; + if (getOnTimerEnabled()) + result += renderTime(getOnTime()); + else + result += "Off"; + result += ", Off Time: "; + if (getOffTimerEnabled()) + result += renderTime(getOffTime()); + else + result += "Off"; + + return result; +} + +#if DAIKIN_DEBUG +// Print what we have +void IRDaikinESP::printState() { +#ifdef ARDUINO + String strbits; +#else // ARDUINO + std::string strbits; +#endif // ARDUINO + DPRINTLN("Raw Bits:"); + for (uint8_t i = 0; i < kDaikinStateLength; i++) { + strbits = uint64ToString(daikin[i], BIN); + while (strbits.length() < 8) strbits = "0" + strbits; + DPRINT(strbits); + DPRINT(" "); + } + DPRINTLN(""); + DPRINTLN(toString()); +} +#endif // DAIKIN_DEBUG + +/* + * Return most important bits to allow replay + * layout is: + * 0: Power + * 1-3: Mode + * 4-7: Fan speed/mode + * 8-14: Target Temperature + * 15: Econo + * 16: Powerful + * 17: Quiet + * 18: Sensor + * 19: Swing Vertical + * 20-31: Current time (mins since midnight) + * */ +uint32_t IRDaikinESP::getCommand() { + uint32_t ret = 0; + uint32_t tmp = 0; + if (getPower()) ret |= 0b00000000000000000000000000000001; + tmp = getMode(); + tmp = tmp << 1; + ret |= tmp; + + tmp = getFan(); + tmp <<= 4; + ret |= tmp; + + tmp = getTemp(); + tmp <<= 8; + ret |= tmp; + + if (getEcono()) ret |= 0b00000000000000001000000000000000; + if (getPowerful()) ret |= 0b00000000000000010000000000000000; + if (getQuiet()) ret |= 0b00000000000000100000000000000000; + if (getSensor()) ret |= 0b00000000000001000000000000000000; + if (getSwingVertical()) ret |= 0b00000000000010000000000000000000; + ret |= (getCurrentTime() << 20); + return ret; +} + +void IRDaikinESP::setCommand(uint32_t value) { + uint32_t tmp = 0; + if (value & 0b00000000000000000000000000000001) setPower(true); + tmp = value & 0b00000000000000000000000000001110; + tmp >>= 1; + setMode(tmp); + + tmp = value & 0b00000000000000000000000011110000; + tmp >>= 4; + setFan(tmp); + + tmp = value & 0b00000000000000000111111100000000; + tmp >>= 8; + setTemp(tmp); + + if (value & 0b00000000000000001000000000000000) setEcono(true); + if (value & 0b00000000000000010000000000000000) setPowerful(true); + if (value & 0b00000000000000100000000000000000) setQuiet(true); + if (value & 0b00000000000001000000000000000000) setSensor(true); + if (value & 0b00000000000010000000000000000000) setSwingVertical(true); + + value >>= 20; + setCurrentTime(value); +} + +#if DECODE_DAIKIN + +void addbit(bool val, unsigned char data[]) { + uint8_t curbit = data[kDaikinCurBit]; + uint8_t curindex = data[kDaikinCurIndex]; + if (val) { + unsigned char bit = 1; + bit = bit << curbit; + data[curindex] |= bit; + } + curbit++; + if (curbit == 8) { + curbit = 0; + curindex++; + } + data[kDaikinCurBit] = curbit; + data[kDaikinCurIndex] = curindex; +} + +bool checkheader(decode_results *results, uint16_t *offset) { + if (!IRrecv::matchMark(results->rawbuf[(*offset)++], kDaikinBitMark, + kDaikinTolerance, kDaikinMarkExcess)) + return false; + if (!IRrecv::matchSpace(results->rawbuf[(*offset)++], + kDaikinZeroSpace + kDaikinGap, kDaikinTolerance, + kDaikinMarkExcess)) + return false; + if (!IRrecv::matchMark(results->rawbuf[(*offset)++], kDaikinHdrMark, + kDaikinTolerance, kDaikinMarkExcess)) + return false; + if (!IRrecv::matchSpace(results->rawbuf[(*offset)++], kDaikinHdrSpace, + kDaikinTolerance, kDaikinMarkExcess)) + return false; + + return true; +} + +bool readbits(decode_results *results, uint16_t *offset, + unsigned char daikin_code[], uint16_t countbits) { + for (uint16_t i = 0; i < countbits && *offset < results->rawlen - 1; + i++, (*offset)++) { + if (!IRrecv::matchMark(results->rawbuf[(*offset)++], kDaikinBitMark, + kDaikinTolerance, kDaikinMarkExcess)) + return false; + if (IRrecv::matchSpace(results->rawbuf[*offset], kDaikinOneSpace, + kDaikinTolerance, kDaikinMarkExcess)) + addbit(1, daikin_code); + else if (IRrecv::matchSpace(results->rawbuf[*offset], kDaikinZeroSpace, + kDaikinTolerance, kDaikinMarkExcess)) + addbit(0, daikin_code); + else + return false; + } + return true; +} + +// Decode the supplied Daikin A/C message. +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: Nr. of bits to expect in the data portion. (kDaikinRawBits) +// strict: Flag to indicate if we strictly adhere to the specification. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA / Should be working. +// +// Notes: +// If DAIKIN_DEBUG enabled, will print all the set options and values. +// +// Ref: +// https://github.com/mharizanov/Daikin-AC-remote-control-over-the-Internet/tree/master/IRremote +bool IRrecv::decodeDaikin(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < kDaikinRawBits) return false; + + // Compliance + if (strict && nbits != kDaikinRawBits) return false; + + uint16_t offset = kStartOffset; + unsigned char daikin_code[kDaikinStateLength + 2]; + for (uint8_t i = 0; i < kDaikinStateLength + 2; i++) daikin_code[i] = 0; + + // Header (#1) + for (uint8_t i = 0; i < 10; i++) { + if (!matchMark(results->rawbuf[offset++], kDaikinBitMark)) return false; + } + if (!checkheader(results, &offset)) return false; + + // Data (#1) + if (!readbits(results, &offset, daikin_code, 8 * 8)) return false; + + // Ignore everything that has just been captured as it is not needed. + // Some remotes may not send this portion, my remote did, but it's not + // required. + for (uint8_t i = 0; i < kDaikinStateLength + 2; i++) daikin_code[i] = 0; + + // Header (#2) + if (!checkheader(results, &offset)) return false; + + // Data (#2) + if (!readbits(results, &offset, daikin_code, 8 * 8)) return false; + + // Header (#3) + if (!checkheader(results, &offset)) return false; + + // Data (#3), read up everything else + if (!readbits(results, &offset, daikin_code, kDaikinBits - (8 * 8))) + return false; + + // Footer + if (!matchMark(results->rawbuf[offset++], kDaikinBitMark)) return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset], kDaikinGap)) + return false; + + // Compliance + if (strict) { + if (!IRDaikinESP::validChecksum(daikin_code)) return false; + } + + // Success +#if DAIKIN_DEBUG + IRDaikinESP dako = IRDaikinESP(0); + dako.setRaw(daikin_code); +#ifdef ARDUINO + yield(); +#endif // ARDUINO + dako.printState(); +#endif // DAIKIN_DEBUG + + // Copy across the bits to state + for (uint8_t i = 0; i < kDaikinStateLength; i++) + results->state[i] = daikin_code[i]; + results->bits = kDaikinStateLength * 8; + results->decode_type = DAIKIN; + return true; +} +#endif // DECODE_DAIKIN diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Daikin.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Daikin.h new file mode 100644 index 000000000..7094990d8 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Daikin.h @@ -0,0 +1,208 @@ +// Copyright 2016 sillyfrog +// Copyright 2017 sillyfrog, crankyoldgit +#ifndef IR_DAIKIN_H_ +#define IR_DAIKIN_H_ + +#ifndef UNIT_TEST +#include +#else +#include +#endif +#include "IRrecv.h" +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// Option to disable the additional Daikin debug info to conserve memory +#define DAIKIN_DEBUG false + +// DDDDD AAA IIIII KK KK IIIII NN NN +// DD DD AAAAA III KK KK III NNN NN +// DD DD AA AA III KKKK III NN N NN +// DD DD AAAAAAA III KK KK III NN NNN +// DDDDDD AA AA IIIII KK KK IIIII NN NN + +/* + Daikin AC map + byte 5=Current time, mins past midnight, low bits + byte 6 + b0-b3=Current time, mins past midnight, high bits + byte 7= checksum of the first part (and last byte before a 29ms pause) + byte 13=mode + b7 = 0 + b6+b5+b4 = Mode + Modes: b6+b5+b4 + 011 = Cool + 100 = Heat (temp 23) + 110 = FAN (temp not shown, but 25) + 000 = Fully Automatic (temp 25) + 010 = DRY (temp 0xc0 = 96 degrees c) + b3 = 1 + b2 = OFF timer set + b1 = ON timer set + b0 = Air Conditioner ON + byte 14=temp*2 (Temp should be between 10 - 32) + byte 16=Fan + FAN control + b7+b6+b5+b4 = Fan speed + Fan: b7+b6+b5+b4 + 0×3 = 1 bar + 0×4 = 2 bar + 0×5 = 3 bar + 0×6 = 4 bar + 0×7 = 5 bar + 0xa = Auto + 0xb = Quite + b3+b2+b1+b0 = Swing control up/down + Swing control up/down: + 0000 = Swing up/down off + 1111 = Swing up/down on + byte 17 + Swing control left/right: + 0000 = Swing left/right off + 1111 = Swing left/right on + byte 18=On timer mins past midnight, low bits + byte 19 + b0-b3=On timer mins past midnight, high bits + b4-b7=Off timer mins past midnight, low bits + byte 20=Off timer mins past midnight, high bits + byte 21=Aux -> Powerful (bit 1), Silent (bit 5) + byte 24=Aux2 + b1: Sensor + b2: Econo mode + b7: Intelligent eye on + byte 25=Aux3 + b1: Mold Proof + byte 26= checksum of the second part +*/ + +// Constants +const uint8_t kDaikinAuto = 0b000; +const uint8_t kDaikinDry = 0b010; +const uint8_t kDaikinCool = 0b011; +const uint8_t kDaikinHeat = 0b100; +const uint8_t kDaikinFan = 0b110; +const uint8_t kDaikinMinTemp = 10; // Celsius +const uint8_t kDaikinMaxTemp = 32; // Celsius +const uint8_t kDaikinFanMin = 1; +const uint8_t kDaikinFanMax = 5; +const uint8_t kDaikinFanAuto = 0b1010; +const uint8_t kDaikinFanQuiet = 0b1011; +const uint8_t kDaikinBytePower = 13; +const uint8_t kDaikinBitPower = 0b00000001; +const uint8_t kDaikinBytePowerful = 21; +const uint8_t kDaikinBitPowerful = 0b00000001; +const uint8_t kDaikinByteSilent = 21; +const uint8_t kDaikinBitSilent = 0b00100000; +const uint8_t kDaikinByteSensor = 24; +const uint8_t kDaikinBitSensor = 0b00000010; +const uint8_t kDaikinByteEcono = 24; +const uint8_t kDaikinBitEcono = 0b00000100; +const uint8_t kDaikinByteEye = 24; +const uint8_t kDaikinBitEye = 0b10000000; +const uint8_t kDaikinByteMold = 25; +const uint8_t kDaikinBitMold = 0b00000010; +const uint8_t kDaikinByteOffTimer = 13; +const uint8_t kDaikinBitOffTimer = 0b00000100; +const uint8_t kDaikinByteOnTimer = 13; +const uint8_t kDaikinBitOnTimer = 0b00000010; +const uint8_t kDaikinCurBit = kDaikinStateLength; +const uint8_t kDaikinCurIndex = kDaikinStateLength + 1; +const uint8_t kDaikinTolerance = 35; +const uint16_t kDaikinMarkExcess = kMarkExcess; +const uint16_t kDaikinHdrMark = 3650; // kDaikinBitMark * 8 +const uint16_t kDaikinHdrSpace = 1623; // kDaikinBitMark * 4 +const uint16_t kDaikinBitMark = 428; +const uint16_t kDaikinZeroSpace = 428; +const uint16_t kDaikinOneSpace = 1280; +const uint16_t kDaikinGap = 29000; +// Note bits in each octet swapped so can be sent as a single value +const uint64_t kDaikinFirstHeader64 = + 0b1101011100000000000000001100010100000000001001111101101000010001; + +// Legacy defines. +#define DAIKIN_COOL kDaikinCool +#define DAIKIN_HEAT kDaikinHeat +#define DAIKIN_FAN kDaikinFan +#define DAIKIN_AUTO kDaikinAuto +#define DAIKIN_DRY kDaikinDry +#define DAIKIN_MIN_TEMP kDaikinMinTemp +#define DAIKIN_MAX_TEMP kDaikinMaxTemp +#define DAIKIN_FAN_MIN kDaikinFanMin +#define DAIKIN_FAN_MAX kDaikinFanMax +#define DAIKIN_FAN_AUTO kDaikinFanAuto +#define DAIKIN_FAN_QUIET kDaikinFanQuiet + +class IRDaikinESP { + public: + explicit IRDaikinESP(uint16_t pin); + +#if SEND_DAIKIN + void send(); +#endif + void begin(); + void on(); + void off(); + void setPower(bool state); + bool getPower(); + void setTemp(uint8_t temp); + uint8_t getTemp(); + void setFan(uint8_t fan); + uint8_t getFan(); + uint8_t getMode(); + void setMode(uint8_t mode); + void setSwingVertical(bool state); + bool getSwingVertical(); + void setSwingHorizontal(bool state); + bool getSwingHorizontal(); + bool getQuiet(); + void setQuiet(bool state); + bool getPowerful(); + void setPowerful(bool state); + void setSensor(bool state); + bool getSensor(); + void setEcono(bool state); + bool getEcono(); + void setEye(bool state); + bool getEye(); + void setMold(bool state); + bool getMold(); + void enableOnTimer(uint16_t starttime); + void disableOnTimer(); + uint16_t getOnTime(); + bool getOnTimerEnabled(); + void enableOffTimer(uint16_t endtime); + void disableOffTimer(); + uint16_t getOffTime(); + bool getOffTimerEnabled(); + void setCurrentTime(uint16_t time); + uint16_t getCurrentTime(); + uint8_t* getRaw(); + void setRaw(uint8_t new_code[]); +#if DAIKIN_DEBUG + void printState(); +#endif // DAIKIN_DEBUG + uint32_t getCommand(); + void setCommand(uint32_t value); + static bool validChecksum(const uint8_t state[], + const uint16_t length = kDaikinStateLength); +#ifdef ARDUINO + String toString(); + static String renderTime(uint16_t timemins); +#else + std::string toString(); + static std::string renderTime(uint16_t timemins); +#endif + + private: + // # of bytes per command + uint8_t daikin[kDaikinStateLength]; + void stateReset(); + static uint8_t calcBlockChecksum(const uint8_t* block, const uint16_t length); + void checksum(); + void setBit(uint8_t byte, uint8_t bitmask); + void clearBit(uint8_t byte, uint8_t bitmask); + uint8_t getBit(uint8_t byte, uint8_t bitmask); + IRsend _irsend; +}; + +#endif // IR_DAIKIN_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Denon.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Denon.cpp similarity index 59% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_Denon.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_Denon.cpp index 538e5af10..6798e022e 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Denon.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Denon.cpp @@ -4,7 +4,6 @@ #include #include "IRrecv.h" #include "IRsend.h" -#include "IRtimer.h" #include "IRutils.h" // DDDD EEEEE N N OOO N N @@ -19,25 +18,25 @@ // Constants // Ref: // https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Denon.cpp -#define DENON_TICK 263U -#define DENON_HDR_MARK_TICKS 1U -#define DENON_HDR_MARK (DENON_HDR_MARK_TICKS * DENON_TICK) -#define DENON_HDR_SPACE_TICKS 3U -#define DENON_HDR_SPACE (DENON_HDR_SPACE_TICKS * DENON_TICK) -#define DENON_BIT_MARK_TICKS 1U -#define DENON_BIT_MARK (DENON_BIT_MARK_TICKS * DENON_TICK) -#define DENON_ONE_SPACE_TICKS 7U -#define DENON_ONE_SPACE (DENON_ONE_SPACE_TICKS * DENON_TICK) -#define DENON_ZERO_SPACE_TICKS 3U -#define DENON_ZERO_SPACE (DENON_ZERO_SPACE_TICKS * DENON_TICK) -#define DENON_MIN_COMMAND_LENGTH_TICKS 510U -#define DENON_MIN_COMMAND_LENGTH (DENON_MIN_COMMAND_LENGTH_TICKS * DENON_TICK) -#define DENON_MIN_GAP_TICKS (DENON_MIN_COMMAND_LENGTH_TICKS - \ - (DENON_HDR_MARK_TICKS + DENON_HDR_SPACE_TICKS + \ - DENON_BITS * (DENON_BIT_MARK_TICKS + DENON_ONE_SPACE_TICKS) + \ - DENON_BIT_MARK_TICKS)) -#define DENON_MIN_GAP (DENON_MIN_GAP_TICKS * DENON_TICK) -#define DENON_MANUFACTURER 0x2A4CULL +const uint16_t kDenonTick = 263; +const uint16_t kDenonHdrMarkTicks = 1; +const uint16_t kDenonHdrMark = kDenonHdrMarkTicks * kDenonTick; +const uint16_t kDenonHdrSpaceTicks = 3; +const uint16_t kDenonHdrSpace = kDenonHdrSpaceTicks * kDenonTick; +const uint16_t kDenonBitMarkTicks = 1; +const uint16_t kDenonBitMark = kDenonBitMarkTicks * kDenonTick; +const uint16_t kDenonOneSpaceTicks = 7; +const uint16_t kDenonOneSpace = kDenonOneSpaceTicks * kDenonTick; +const uint16_t kDenonZeroSpaceTicks = 3; +const uint16_t kDenonZeroSpace = kDenonZeroSpaceTicks * kDenonTick; +const uint16_t kDenonMinCommandLengthTicks = 510; +const uint16_t kDenonMinGapTicks = + kDenonMinCommandLengthTicks - + (kDenonHdrMarkTicks + kDenonHdrSpaceTicks + + kDenonBits * (kDenonBitMarkTicks + kDenonOneSpaceTicks) + + kDenonBitMarkTicks); +const uint32_t kDenonMinGap = kDenonMinGapTicks * kDenonTick; +const uint64_t kDenonManufacturer = 0x2A4CULL; #if SEND_DENON // Send a Denon message @@ -56,9 +55,9 @@ // https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Denon.cpp // http://assets.denon.com/documentmaster/us/denon%20master%20ir%20hex.xls void IRsend::sendDenon(uint64_t data, uint16_t nbits, uint16_t repeat) { - if (nbits >= PANASONIC_BITS) // Is this really Panasonic? + if (nbits >= kPanasonicBits) // Is this really Panasonic? sendPanasonic64(data, nbits, repeat); - else if (nbits == DENON_LEGACY_BITS) + else if (nbits == kDenonLegacyBits) // Support legacy (broken) calls of sendDenon(). sendSharpRaw(data & (~0x2000ULL), nbits + 1, repeat); else @@ -85,7 +84,7 @@ bool IRrecv::decodeDenon(decode_results *results, uint16_t nbits, bool strict) { switch (nbits) { case DENON_BITS: case DENON_48_BITS: - case DENON_LEGACY_BITS: + case kDenonLegacyBits: break; default: return false; @@ -100,40 +99,36 @@ bool IRrecv::decodeDenon(decode_results *results, uint16_t nbits, bool strict) { // manufacturer code. if (!decodeSharp(results, nbits, true, false) && - !decodePanasonic(results, nbits, true, DENON_MANUFACTURER)) { + !decodePanasonic(results, nbits, true, kDenonManufacturer)) { // We couldn't decode it as expected, so try the old legacy method. // NOTE: I don't think this following protocol actually exists. // Looks like a partial version of the Sharp protocol. // Check we have enough data - if (results->rawlen < 2 * nbits + HEADER + FOOTER - 1) - return false; - if (strict && nbits != DENON_LEGACY_BITS) - return false; + if (results->rawlen < 2 * nbits + kHeader + kFooter - 1) return false; + if (strict && nbits != kDenonLegacyBits) return false; uint64_t data = 0; - uint16_t offset = OFFSET_START; + uint16_t offset = kStartOffset; // Header - if (!matchMark(results->rawbuf[offset], DENON_HDR_MARK)) return false; + if (!matchMark(results->rawbuf[offset], kDenonHdrMark)) return false; // Calculate how long the common tick time is based on the header mark. - uint32_t m_tick = results->rawbuf[offset++] * RAWTICK / - DENON_HDR_MARK_TICKS; - if (!matchSpace(results->rawbuf[offset], DENON_HDR_SPACE)) return false; - uint32_t s_tick = results->rawbuf[offset++] * RAWTICK / - DENON_HDR_SPACE_TICKS; + uint32_t m_tick = results->rawbuf[offset++] * kRawTick / kDenonHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kDenonHdrSpace)) return false; + uint32_t s_tick = + results->rawbuf[offset++] * kRawTick / kDenonHdrSpaceTicks; // Data - match_result_t data_result = matchData(&(results->rawbuf[offset]), nbits, - DENON_BIT_MARK_TICKS * m_tick, - DENON_ONE_SPACE_TICKS * s_tick, - DENON_BIT_MARK_TICKS * m_tick, - DENON_ZERO_SPACE_TICKS * s_tick); + match_result_t data_result = + matchData(&(results->rawbuf[offset]), nbits, + kDenonBitMarkTicks * m_tick, kDenonOneSpaceTicks * s_tick, + kDenonBitMarkTicks * m_tick, kDenonZeroSpaceTicks * s_tick); if (data_result.success == false) return false; data = data_result.data; offset += data_result.used; // Footer - if (!matchMark(results->rawbuf[offset++], DENON_BIT_MARK_TICKS * m_tick)) + if (!matchMark(results->rawbuf[offset++], kDenonBitMarkTicks * m_tick)) return false; // Success diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Dish.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Dish.cpp similarity index 59% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_Dish.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_Dish.cpp index 4555db92f..040aa3bf7 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Dish.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Dish.cpp @@ -3,7 +3,6 @@ #include "IRrecv.h" #include "IRsend.h" -#include "IRtimer.h" #include "IRutils.h" // DDDD IIIII SSSS H H @@ -19,19 +18,19 @@ // Ref: // https://github.com/marcosamarinho/IRremoteESP8266/blob/master/ir_Dish.cpp // http://www.hifi-remote.com/wiki/index.php?title=Dish -#define DISH_TICK 100U -#define DISH_HDR_MARK_TICKS 4U -#define DISH_HDR_MARK (DISH_HDR_MARK_TICKS * DISH_TICK) -#define DISH_HDR_SPACE_TICKS 61U -#define DISH_HDR_SPACE (DISH_HDR_SPACE_TICKS * DISH_TICK) -#define DISH_BIT_MARK_TICKS 4U -#define DISH_BIT_MARK (DISH_BIT_MARK_TICKS * DISH_TICK) -#define DISH_ONE_SPACE_TICKS 17U -#define DISH_ONE_SPACE (DISH_ONE_SPACE_TICKS * DISH_TICK) -#define DISH_ZERO_SPACE_TICKS 28U -#define DISH_ZERO_SPACE (DISH_ZERO_SPACE_TICKS * DISH_TICK) -#define DISH_RPT_SPACE_TICKS DISH_HDR_SPACE_TICKS -#define DISH_RPT_SPACE (DISH_RPT_SPACE_TICKS * DISH_TICK) +const uint16_t kDishTick = 100; +const uint16_t kDishHdrMarkTicks = 4; +const uint16_t kDishHdrMark = kDishHdrMarkTicks * kDishTick; +const uint16_t kDishHdrSpaceTicks = 61; +const uint16_t kDishHdrSpace = kDishHdrSpaceTicks * kDishTick; +const uint16_t kDishBitMarkTicks = 4; +const uint16_t kDishBitMark = kDishBitMarkTicks * kDishTick; +const uint16_t kDishOneSpaceTicks = 17; +const uint16_t kDishOneSpace = kDishOneSpaceTicks * kDishTick; +const uint16_t kDishZeroSpaceTicks = 28; +const uint16_t kDishZeroSpace = kDishZeroSpaceTicks * kDishTick; +const uint16_t kDishRptSpaceTicks = kDishHdrSpaceTicks; +const uint16_t kDishRptSpace = kDishRptSpaceTicks * kDishTick; #if SEND_DISH // Send an IR command to a DISH NETWORK device. @@ -56,20 +55,15 @@ // Ref: // http://www.hifi-remote.com/wiki/index.php?title=Dish void IRsend::sendDISH(uint64_t data, uint16_t nbits, uint16_t repeat) { - // Set 57.6kHz IR carrier frequency, duty cycle is unknown. - enableIROut(57600); - // Header - mark(DISH_HDR_MARK); - space(DISH_HDR_SPACE); - // We always send a command, even for repeat=0, hence '<= repeat'. - for (uint16_t i = 0; i <= repeat; i++) { - // Data - sendData(DISH_BIT_MARK, DISH_ONE_SPACE, DISH_BIT_MARK, DISH_ZERO_SPACE, - data, nbits, true); - // Footer - mark(DISH_BIT_MARK); - space(DISH_RPT_SPACE); - } + enableIROut(57600); // Set modulation freq. to 57.6kHz. + // Header is only ever sent once. + mark(kDishHdrMark); + space(kDishHdrSpace); + + sendGeneric(0, 0, // No headers from here on in. + kDishBitMark, kDishOneSpace, kDishBitMark, kDishZeroSpace, + kDishBitMark, kDishRptSpace, data, nbits, 57600, true, repeat, + 50); } #endif @@ -78,7 +72,7 @@ void IRsend::sendDISH(uint64_t data, uint16_t nbits, uint16_t repeat) { // // Args: // results: Ptr to the data to decode and where to store the decode result. -// nbits: Nr. of bits to expect in the data portion. Typically DISH_BITS. +// nbits: Nr. of bits to expect in the data portion. Typically kDishBits. // strict: Flag to indicate if we strictly adhere to the specification. // Returns: // boolean: True if it can decode it, false if it can't. @@ -94,34 +88,32 @@ void IRsend::sendDISH(uint64_t data, uint16_t nbits, uint16_t repeat) { // http://lirc.sourceforge.net/remotes/echostar/301_501_3100_5100_58xx_59xx // https://github.com/marcosamarinho/IRremoteESP8266/blob/master/ir_Dish.cpp bool IRrecv::decodeDISH(decode_results *results, uint16_t nbits, bool strict) { - if (results->rawlen < 2 * nbits + HEADER + FOOTER - 1) + if (results->rawlen < 2 * nbits + kHeader + kFooter - 1) return false; // Not enough entries to be valid. - if (strict && nbits != DISH_BITS) - return false; // Not strictly compliant. + if (strict && nbits != kDishBits) return false; // Not strictly compliant. uint64_t data = 0; - uint16_t offset = OFFSET_START; + uint16_t offset = kStartOffset; // Header - if (!match(results->rawbuf[offset], DISH_HDR_MARK)) return false; + if (!match(results->rawbuf[offset], kDishHdrMark)) return false; // Calculate how long the common tick time is based on the header mark. - uint32_t m_tick = results->rawbuf[offset++] * RAWTICK / DISH_HDR_MARK_TICKS; - if (!matchSpace(results->rawbuf[offset], DISH_HDR_SPACE)) return false; + uint32_t m_tick = results->rawbuf[offset++] * kRawTick / kDishHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kDishHdrSpace)) return false; // Calculate how long the common tick time is based on the header space. - uint32_t s_tick = results->rawbuf[offset++] * RAWTICK / DISH_HDR_SPACE_TICKS; + uint32_t s_tick = results->rawbuf[offset++] * kRawTick / kDishHdrSpaceTicks; // Data - match_result_t data_result = matchData(&(results->rawbuf[offset]), nbits, - DISH_BIT_MARK_TICKS * m_tick, - DISH_ONE_SPACE_TICKS * s_tick, - DISH_BIT_MARK_TICKS * m_tick, - DISH_ZERO_SPACE_TICKS * s_tick); + match_result_t data_result = + matchData(&(results->rawbuf[offset]), nbits, kDishBitMarkTicks * m_tick, + kDishOneSpaceTicks * s_tick, kDishBitMarkTicks * m_tick, + kDishZeroSpaceTicks * s_tick); if (data_result.success == false) return false; data = data_result.data; offset += data_result.used; // Footer - if (!matchMark(results->rawbuf[offset++], DISH_BIT_MARK_TICKS * m_tick)) + if (!matchMark(results->rawbuf[offset++], kDishBitMarkTicks * m_tick)) return false; // Compliance @@ -129,7 +121,7 @@ bool IRrecv::decodeDISH(decode_results *results, uint16_t nbits, bool strict) { // The DISH protocol calls for a repeated message, so strictly speaking // there should be a code following this. Only require it if we are set to // strict matching. - if (!matchSpace(results->rawbuf[offset], DISH_RPT_SPACE_TICKS * s_tick)) + if (!matchSpace(results->rawbuf[offset], kDishRptSpaceTicks * s_tick)) return false; } diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Electra.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Electra.cpp new file mode 100644 index 000000000..df69be748 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Electra.cpp @@ -0,0 +1,112 @@ +// Copyright 2018 David Conran + +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// EEEEEEE LL EEEEEEE CCCCC TTTTTTT RRRRRR AAA +// EE LL EE CC C TTT RR RR AAAAA +// EEEEE LL EEEEE CC TTT RRRRRR AA AA +// EE LL EE CC C TTT RR RR AAAAAAA +// EEEEEEE LLLLLLL EEEEEEE CCCCC TTT RR RR AA AA + +// Electra A/C added by crankyoldgit +// +// Equipment it seems compatible with: +// * + +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/527 + +// Constants +const uint16_t kElectraAcHdrMark = 9166; +const uint16_t kElectraAcBitMark = 646; +const uint16_t kElectraAcHdrSpace = 4470; +const uint16_t kElectraAcOneSpace = 1647; +const uint16_t kElectraAcZeroSpace = 547; +const uint32_t kElectraAcMessageGap = 100000; // Completely made-up guess. + +#if SEND_ELECTRA_AC +// Send a Electra message +// +// Args: +// data: Contents of the message to be sent. (Guessing MSBF order) +// nbits: Nr. of bits of data to be sent. Typically kElectraAcBits. +// repeat: Nr. of additional times the message is to be sent. +// +// Status: Alpha / Needs testing against a real device. +// +void IRsend::sendElectraAC(uint8_t data[], uint16_t nbytes, uint16_t repeat) { + for (uint16_t r = 0; r <= repeat; r++) + sendGeneric(kElectraAcHdrMark, kElectraAcHdrSpace, kElectraAcBitMark, + kElectraAcOneSpace, kElectraAcBitMark, kElectraAcZeroSpace, + kElectraAcBitMark, kElectraAcMessageGap, data, nbytes, + 38000, // Complete guess of the modulation frequency. + true, 0, 50); +} +#endif + +#if DECODE_ELECTRA_AC +// Decode the supplied Electra A/C message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kElectraAcBits. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: Alpha / Needs testing against a real device. +// +bool IRrecv::decodeElectraAC(decode_results *results, uint16_t nbits, + bool strict) { + if (nbits % 8 != 0) // nbits has to be a multiple of nr. of bits in a byte. + return false; + + if (strict) { + if (nbits != kElectraAcBits) + return false; // Not strictly a ELECTRA_AC message. + } + + // The protocol sends the data normal + inverted, alternating on + // each byte. Hence twice the number of expected data bits. + if (results->rawlen < 2 * nbits + kHeader + kFooter - 1) + return false; // Can't possibly be a valid ELECTRA_AC message. + + uint16_t offset = kStartOffset; + + // Message Header + if (!matchMark(results->rawbuf[offset++], kElectraAcHdrMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kElectraAcHdrSpace)) return false; + + // Data Section + match_result_t data_result; + uint16_t dataBitsSoFar = 0; + // Keep reading bytes until we either run out of section or state to fill. + for (uint16_t i = 0; offset <= results->rawlen - 16 && i < nbits / 8; + i++, dataBitsSoFar += 8, offset += data_result.used) { + data_result = matchData(&(results->rawbuf[offset]), 8, kElectraAcBitMark, + kElectraAcOneSpace, kElectraAcBitMark, + kElectraAcZeroSpace, kTolerance, 0, true); + if (data_result.success == false) return false; // Fail + results->state[i] = data_result.data; + } + + // Message Footer + if (!matchMark(results->rawbuf[offset++], kElectraAcBitMark)) return false; + if (offset <= results->rawlen && + !matchAtLeast(results->rawbuf[offset++], kElectraAcMessageGap)) + return false; + + // Compliance + if (strict && dataBitsSoFar != nbits) return false; + + // Success + results->decode_type = ELECTRA_AC; + results->bits = dataBitsSoFar; + // No need to record the state as we stored it as we decoded it. + // As we use result->state, we don't record value, address, or command as it + // is a union data type. + return true; +} +#endif // DECODE_ELECTRA_AC diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Fujitsu.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Fujitsu.cpp new file mode 100644 index 000000000..7c1b99834 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Fujitsu.cpp @@ -0,0 +1,519 @@ +// Copyright 2017 Jonny Graham, David Conran +#include "ir_Fujitsu.h" +#include +#ifndef ARDUINO +#include +#endif +#include "IRsend.h" +#include "IRutils.h" + +// Fujitsu A/C support added by Jonny Graham & David Conran + +// Equipment it seems compatible with: +// * Fujitsu ASYG30LFCA with remote AR-RAH2E +// * Fujitsu AST9RSGCW with remote AR-DB1 +// * + +// Ref: +// These values are based on averages of measurements +const uint16_t kFujitsuAcHdrMark = 3324; +const uint16_t kFujitsuAcHdrSpace = 1574; +const uint16_t kFujitsuAcBitMark = 448; +const uint16_t kFujitsuAcOneSpace = 1182; +const uint16_t kFujitsuAcZeroSpace = 390; +const uint16_t kFujitsuAcMinGap = 8100; + +#if SEND_FUJITSU_AC +// Send a Fujitsu A/C message. +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. Typically one of: +// kFujitsuAcStateLength +// kFujitsuAcStateLength - 1 +// kFujitsuAcStateLengthShort +// kFujitsuAcStateLengthShort - 1 +// repeat: Nr. of times the message is to be repeated. +// (Default = kFujitsuAcMinRepeat). +// +// Status: BETA / Appears to be working. +// +void IRsend::sendFujitsuAC(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + sendGeneric(kFujitsuAcHdrMark, kFujitsuAcHdrSpace, kFujitsuAcBitMark, + kFujitsuAcOneSpace, kFujitsuAcBitMark, kFujitsuAcZeroSpace, + kFujitsuAcBitMark, kFujitsuAcMinGap, data, nbytes, 38, false, + repeat, 50); +} +#endif // SEND_FUJITSU_AC + +// Code to emulate Fujitsu A/C IR remote control unit. + +// Initialise the object. +IRFujitsuAC::IRFujitsuAC(uint16_t pin, fujitsu_ac_remote_model_t model) + : _irsend(pin) { + setModel(model); + stateReset(); +} + +void IRFujitsuAC::setModel(fujitsu_ac_remote_model_t model) { + _model = model; + switch (model) { + case ARDB1: + _state_length = kFujitsuAcStateLength - 1; + _state_length_short = kFujitsuAcStateLengthShort - 1; + break; + default: + _state_length = kFujitsuAcStateLength; + _state_length_short = kFujitsuAcStateLengthShort; + } +} + +// Reset the state of the remote to a known good state/sequence. +void IRFujitsuAC::stateReset() { + _temp = 24; + _fanSpeed = kFujitsuAcFanHigh; + _mode = kFujitsuAcModeCool; + _swingMode = kFujitsuAcSwingBoth; + _cmd = kFujitsuAcCmdTurnOn; + buildState(); +} + +// Configure the pin for output. +void IRFujitsuAC::begin() { _irsend.begin(); } + +#if SEND_FUJITSU_AC +// Send the current desired state to the IR LED. +void IRFujitsuAC::send() { + getRaw(); + _irsend.sendFujitsuAC(remote_state, getStateLength()); +} +#endif // SEND_FUJITSU_AC + +void IRFujitsuAC::buildState() { + remote_state[0] = 0x14; + remote_state[1] = 0x63; + remote_state[2] = 0x00; + remote_state[3] = 0x10; + remote_state[4] = 0x10; + bool fullCmd = false; + switch (_cmd) { + case kFujitsuAcCmdTurnOff: + remote_state[5] = 0x02; + break; + case kFujitsuAcCmdStepHoriz: + remote_state[5] = 0x79; + break; + case kFujitsuAcCmdStepVert: + remote_state[5] = 0x6C; + break; + default: + switch (_model) { + case ARRAH2E: + remote_state[5] = 0xFE; + break; + case ARDB1: + remote_state[5] = 0xFC; + break; + } + fullCmd = true; + break; + } + if (fullCmd) { // long codes + uint8_t tempByte = _temp - kFujitsuAcMinTemp; + // Nr. of bytes in the message after this byte. + remote_state[6] = _state_length - 7; + + remote_state[7] = 0x30; + remote_state[8] = (_cmd == kFujitsuAcCmdTurnOn) | (tempByte << 4); + remote_state[9] = _mode | 0 << 4; // timer off + remote_state[10] = _fanSpeed | _swingMode << 4; + remote_state[11] = 0; // timerOff values + remote_state[12] = 0; // timerOff/On values + remote_state[13] = 0; // timerOn values + if (_model == ARRAH2E) + remote_state[14] = 0x20; + else + remote_state[14] = 0x00; + + uint8_t checksum = 0; + uint8_t checksum_complement = 0; + if (_model == ARRAH2E) { + checksum = sumBytes(remote_state + _state_length_short, + _state_length - _state_length_short - 1); + } else if (_model == ARDB1) { + checksum = sumBytes(remote_state, _state_length - 1); + checksum_complement = 0x9B; + } + // and negate the checksum and store it in the last byte. + remote_state[_state_length - 1] = checksum_complement - checksum; + } else { // short codes + if (_model == ARRAH2E) + // The last byte is the inverse of penultimate byte + remote_state[_state_length_short - 1] = + ~remote_state[_state_length_short - 2]; + // Zero the rest of the state. + for (uint8_t i = _state_length_short; i < kFujitsuAcStateLength; i++) + remote_state[i] = 0; + } +} + +uint8_t IRFujitsuAC::getStateLength() { + buildState(); // Force an update of the internal state. + if ((_model == ARRAH2E && remote_state[5] != 0xFE) || + (_model == ARDB1 && remote_state[5] != 0xFC)) + return _state_length_short; + else + return _state_length; +} + +// Return a pointer to the internal state date of the remote. +uint8_t* IRFujitsuAC::getRaw() { + buildState(); + return remote_state; +} + +void IRFujitsuAC::buildFromState(const uint16_t length) { + switch (length) { + case kFujitsuAcStateLength - 1: + case kFujitsuAcStateLengthShort - 1: + setModel(ARDB1); + break; + default: + setModel(ARRAH2E); + } + switch (remote_state[6]) { + case 8: + setModel(ARDB1); + break; + case 9: + setModel(ARRAH2E); + break; + } + setTemp((remote_state[8] >> 4) + kFujitsuAcMinTemp); + if (remote_state[8] & 0x1) + setCmd(kFujitsuAcCmdTurnOn); + else + setCmd(kFujitsuAcCmdStayOn); + setMode(remote_state[9] & 0b111); + setFanSpeed(remote_state[10] & 0b111); + setSwing(remote_state[10] >> 4); + switch (remote_state[5]) { + case kFujitsuAcCmdTurnOff: + case kFujitsuAcCmdStepHoriz: + case kFujitsuAcCmdStepVert: + setCmd(remote_state[5]); + break; + } +} + +bool IRFujitsuAC::setRaw(const uint8_t newState[], const uint16_t length) { + if (length > kFujitsuAcStateLength) return false; + for (uint16_t i = 0; i < kFujitsuAcStateLength; i++) { + if (i < length) + remote_state[i] = newState[i]; + else + remote_state[i] = 0; + } + buildFromState(length); + return true; +} + +// Set the requested power state of the A/C to off. +void IRFujitsuAC::off() { _cmd = kFujitsuAcCmdTurnOff; } + +void IRFujitsuAC::stepHoriz() { + switch (_model) { + case ARDB1: + break; // This remote doesn't have a horizontal option. + default: + _cmd = kFujitsuAcCmdStepHoriz; + } +} + +void IRFujitsuAC::stepVert() { _cmd = kFujitsuAcCmdStepVert; } + +// Set the requested command of the A/C. +void IRFujitsuAC::setCmd(uint8_t cmd) { + switch (cmd) { + case kFujitsuAcCmdTurnOff: + case kFujitsuAcCmdTurnOn: + case kFujitsuAcCmdStayOn: + case kFujitsuAcCmdStepVert: + _cmd = cmd; + break; + case kFujitsuAcCmdStepHoriz: + if (_model != ARDB1) // AR-DB1 remote doesn't have step horizontal. + _cmd = cmd; + // FALLTHRU + default: + _cmd = kFujitsuAcCmdStayOn; + break; + } +} + +uint8_t IRFujitsuAC::getCmd() { return _cmd; } + +bool IRFujitsuAC::getPower() { return _cmd != kFujitsuAcCmdTurnOff; } + +// Set the temp. in deg C +void IRFujitsuAC::setTemp(uint8_t temp) { + temp = std::max((uint8_t)kFujitsuAcMinTemp, temp); + temp = std::min((uint8_t)kFujitsuAcMaxTemp, temp); + _temp = temp; +} + +uint8_t IRFujitsuAC::getTemp() { return _temp; } + +// Set the speed of the fan +void IRFujitsuAC::setFanSpeed(uint8_t fanSpeed) { + if (fanSpeed > kFujitsuAcFanQuiet) + fanSpeed = kFujitsuAcFanHigh; // Set the fan to maximum if out of range. + _fanSpeed = fanSpeed; +} +uint8_t IRFujitsuAC::getFanSpeed() { return _fanSpeed; } + +// Set the requested climate operation mode of the a/c unit. +void IRFujitsuAC::setMode(uint8_t mode) { + if (mode > kFujitsuAcModeHeat) + mode = kFujitsuAcModeHeat; // Set the mode to maximum if out of range. + _mode = mode; +} + +uint8_t IRFujitsuAC::getMode() { return _mode; } +// Set the requested swing operation mode of the a/c unit. +void IRFujitsuAC::setSwing(uint8_t swingMode) { + switch (_model) { + case ARDB1: + // Set the mode to max if out of range + if (swingMode > kFujitsuAcSwingVert) swingMode = kFujitsuAcSwingVert; + break; + case ARRAH2E: + default: + // Set the mode to max if out of range + if (swingMode > kFujitsuAcSwingBoth) swingMode = kFujitsuAcSwingBoth; + } + _swingMode = swingMode; +} + +uint8_t IRFujitsuAC::getSwing() { return _swingMode; } + +bool IRFujitsuAC::validChecksum(uint8_t state[], uint16_t length) { + uint8_t sum = 0; + uint8_t sum_complement = 0; + uint8_t checksum = state[length - 1]; + switch (length) { + case kFujitsuAcStateLengthShort: // ARRAH2E + return state[length - 1] == (uint8_t)~state[length - 2]; + case kFujitsuAcStateLength - 1: // ARDB1 + sum = sumBytes(state, length - 1); + sum_complement = 0x9B; + break; + case kFujitsuAcStateLength: // ARRAH2E + sum = sumBytes(state + kFujitsuAcStateLengthShort, + length - 1 - kFujitsuAcStateLengthShort); + break; + default: // Includes ARDB1 short. + return true; // Assume the checksum is valid for other lengths. + } + return checksum == (uint8_t)(sum_complement - sum); // Does it match? +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRFujitsuAC::toString() { + String result = ""; +#else +std::string IRFujitsuAC::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Power: "; + if (getPower()) + result += "On"; + else + result += "Off"; + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kFujitsuAcModeAuto: + result += " (AUTO)"; + break; + case kFujitsuAcModeCool: + result += " (COOL)"; + break; + case kFujitsuAcModeHeat: + result += " (HEAT)"; + break; + case kFujitsuAcModeDry: + result += " (DRY)"; + break; + case kFujitsuAcModeFan: + result += " (FAN)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", Fan: " + uint64ToString(getFanSpeed()); + switch (getFanSpeed()) { + case kFujitsuAcFanAuto: + result += " (AUTO)"; + break; + case kFujitsuAcFanHigh: + result += " (HIGH)"; + break; + case kFujitsuAcFanMed: + result += " (MED)"; + break; + case kFujitsuAcFanLow: + result += " (LOW)"; + break; + case kFujitsuAcFanQuiet: + result += " (QUIET)"; + break; + } + result += ", Swing: "; + switch (getSwing()) { + case kFujitsuAcSwingOff: + result += "Off"; + break; + case kFujitsuAcSwingVert: + result += "Vert"; + break; + case kFujitsuAcSwingHoriz: + result += "Horiz"; + break; + case kFujitsuAcSwingBoth: + result += "Vert + Horiz"; + break; + default: + result += "UNKNOWN"; + } + result += ", Command: "; + switch (getCmd()) { + case kFujitsuAcCmdStepHoriz: + result += "Step vane horizontally"; + break; + case kFujitsuAcCmdStepVert: + result += "Step vane vertically"; + break; + default: + result += "N/A"; + } + return result; +} + +#if DECODE_FUJITSU_AC +// Decode a Fujitsu AC IR message if possible. +// Places successful decode information in the results pointer. +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kFujitsuAcBits. +// strict: Flag to indicate if we strictly adhere to the specification. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: ALPHA / Untested. +// +// Ref: +// +bool IRrecv::decodeFujitsuAC(decode_results* results, uint16_t nbits, + bool strict) { + uint16_t offset = kStartOffset; + uint16_t dataBitsSoFar = 0; + + // Have we got enough data to successfully decode? + if (results->rawlen < (2 * kFujitsuAcMinBits) + kHeader + kFooter - 1) + return false; // Can't possibly be a valid message. + + // Compliance + if (strict) { + switch (nbits) { + case kFujitsuAcBits: + case kFujitsuAcBits - 8: + case kFujitsuAcMinBits: + case kFujitsuAcMinBits + 8: + break; + default: + return false; // Must be called with the correct nr. of bits. + } + } + + // Header + if (!matchMark(results->rawbuf[offset++], kFujitsuAcHdrMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kFujitsuAcHdrSpace)) return false; + + // Data (Fixed signature) + match_result_t data_result = + matchData(&(results->rawbuf[offset]), kFujitsuAcMinBits - 8, + kFujitsuAcBitMark, kFujitsuAcOneSpace, kFujitsuAcBitMark, + kFujitsuAcZeroSpace, kTolerance, kMarkExcess, false); + if (data_result.success == false) return false; // Fail + if (data_result.data != 0x1010006314) return false; // Signature failed. + dataBitsSoFar += kFujitsuAcMinBits - 8; + offset += data_result.used; + results->state[0] = 0x14; + results->state[1] = 0x63; + results->state[2] = 0x00; + results->state[3] = 0x10; + results->state[4] = 0x10; + + // Keep reading bytes until we either run out of message or state to fill. + for (uint16_t i = 5; + offset <= results->rawlen - 16 && i < kFujitsuAcStateLength; + i++, dataBitsSoFar += 8, offset += data_result.used) { + data_result = matchData( + &(results->rawbuf[offset]), 8, kFujitsuAcBitMark, kFujitsuAcOneSpace, + kFujitsuAcBitMark, kFujitsuAcZeroSpace, kTolerance, kMarkExcess, false); + if (data_result.success == false) break; // Fail + results->state[i] = data_result.data; + } + + // Footer + if (offset > results->rawlen || + !matchMark(results->rawbuf[offset++], kFujitsuAcBitMark)) + return false; + // The space is optional if we are out of capture. + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset], kFujitsuAcMinGap)) + return false; + + // Compliance + if (strict) { + if (dataBitsSoFar != nbits) return false; + } + + results->decode_type = FUJITSU_AC; + results->bits = dataBitsSoFar; + + // Compliance + switch (dataBitsSoFar) { + case kFujitsuAcMinBits: + // Check if this values indicate that this should have been a long state + // message. + if (results->state[5] == 0xFC) return false; + return true; // Success + case kFujitsuAcMinBits + 8: + // Check if this values indicate that this should have been a long state + // message. + if (results->state[5] == 0xFE) return false; + // The last byte needs to be the inverse of the penultimate byte. + if (results->state[5] != (uint8_t)~results->state[6]) return false; + return true; // Success + case kFujitsuAcBits - 8: + // Long messages of this size require this byte be correct. + if (results->state[5] != 0xFC) return false; + break; + case kFujitsuAcBits: + // Long messages of this size require this byte be correct. + if (results->state[5] != 0xFE) return false; + break; + default: + return false; // Unexpected size. + } + if (!IRFujitsuAC::validChecksum(results->state, dataBitsSoFar / 8)) + return false; + + // Success + return true; // All good. +} +#endif // DECODE_FUJITSU_AC diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Fujitsu.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Fujitsu.h new file mode 100644 index 000000000..bba634be6 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Fujitsu.h @@ -0,0 +1,123 @@ +// Copyright 2017 Jonny Graham +// Copyright 2018 David Conran +#ifndef IR_FUJITSU_H_ +#define IR_FUJITSU_H_ + +#define __STDC_LIMIT_MACROS +#include +#ifdef ARDUINO +#include +#else +#include +#endif +#include "IRrecv.h" +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// FUJITSU A/C support added by Jonny Graham + +// Constants +const uint8_t kFujitsuAcModeAuto = 0x00; +const uint8_t kFujitsuAcModeCool = 0x01; +const uint8_t kFujitsuAcModeDry = 0x02; +const uint8_t kFujitsuAcModeFan = 0x03; +const uint8_t kFujitsuAcModeHeat = 0x04; + +const uint8_t kFujitsuAcCmdStayOn = 0x00; +const uint8_t kFujitsuAcCmdTurnOn = 0x01; +const uint8_t kFujitsuAcCmdTurnOff = 0x02; +const uint8_t kFujitsuAcCmdStepHoriz = 0x79; +const uint8_t kFujitsuAcCmdStepVert = 0x6C; + +const uint8_t kFujitsuAcFanAuto = 0x00; +const uint8_t kFujitsuAcFanHigh = 0x01; +const uint8_t kFujitsuAcFanMed = 0x02; +const uint8_t kFujitsuAcFanLow = 0x03; +const uint8_t kFujitsuAcFanQuiet = 0x04; + +const uint8_t kFujitsuAcMinTemp = 16; // 16C +const uint8_t kFujitsuAcMaxTemp = 30; // 30C + +const uint8_t kFujitsuAcSwingOff = 0x00; +const uint8_t kFujitsuAcSwingVert = 0x01; +const uint8_t kFujitsuAcSwingHoriz = 0x02; +const uint8_t kFujitsuAcSwingBoth = 0x03; + +// Legacy defines. +#define FUJITSU_AC_MODE_AUTO kFujitsuAcModeAuto +#define FUJITSU_AC_MODE_COOL kFujitsuAcModeCool +#define FUJITSU_AC_MODE_DRY kFujitsuAcModeDry +#define FUJITSU_AC_MODE_FAN kFujitsuAcModeFan +#define FUJITSU_AC_MODE_HEAT kFujitsuAcModeHeat +#define FUJITSU_AC_CMD_STAY_ON kFujitsuAcCmdStayOn +#define FUJITSU_AC_CMD_TURN_ON kFujitsuAcCmdTurnOn +#define FUJITSU_AC_CMD_TURN_OFF kFujitsuAcCmdTurnOff +#define FUJITSU_AC_CMD_STEP_HORIZ kFujitsuAcCmdStepHoriz +#define FUJITSU_AC_CMD_STEP_VERT kFujitsuAcCmdStepVert +#define FUJITSU_AC_FAN_AUTO kFujitsuAcFanAuto +#define FUJITSU_AC_FAN_HIGH kFujitsuAcFanHigh +#define FUJITSU_AC_FAN_MED kFujitsuAcFanMed +#define FUJITSU_AC_FAN_LOW kFujitsuAcFanLow +#define FUJITSU_AC_FAN_QUIET kFujitsuAcFanQuiet +#define FUJITSU_AC_MIN_TEMP kFujitsuAcMinTemp +#define FUJITSU_AC_MAX_TEMP kFujitsuAcMaxTemp +#define FUJITSU_AC_SWING_OFF kFujitsuAcSwingOff +#define FUJITSU_AC_SWING_VERT kFujitsuAcSwingVert +#define FUJITSU_AC_SWING_HORIZ kFujitsuAcSwingHoriz +#define FUJITSU_AC_SWING_BOTH kFujitsuAcSwingBoth + +enum fujitsu_ac_remote_model_t { + ARRAH2E = 1, + ARDB1, +}; + +class IRFujitsuAC { + public: + explicit IRFujitsuAC(uint16_t pin, fujitsu_ac_remote_model_t model = ARRAH2E); + + void setModel(fujitsu_ac_remote_model_t model); + void stateReset(); +#if SEND_FUJITSU_AC + void send(); +#endif // SEND_FUJITSU_AC + void begin(); + void off(); + void stepHoriz(); + void stepVert(); + void setCmd(uint8_t cmd); + uint8_t getCmd(); + void setTemp(uint8_t temp); + uint8_t getTemp(); + void setFanSpeed(uint8_t fan); + uint8_t getFanSpeed(); + void setMode(uint8_t mode); + uint8_t getMode(); + void setSwing(uint8_t mode); + uint8_t getSwing(); + uint8_t* getRaw(); + bool setRaw(const uint8_t newState[], const uint16_t length); + uint8_t getStateLength(); + static bool validChecksum(uint8_t* state, uint16_t length); + bool getPower(); +#ifdef ARDUINO + String toString(); +#else + std::string toString(); +#endif + + private: + uint8_t remote_state[kFujitsuAcStateLength]; + IRsend _irsend; + uint8_t _temp; + uint8_t _fanSpeed; + uint8_t _mode; + uint8_t _swingMode; + uint8_t _cmd; + fujitsu_ac_remote_model_t _model; + uint8_t _state_length; + uint8_t _state_length_short; + void buildState(); + void buildFromState(const uint16_t length); +}; + +#endif // IR_FUJITSU_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_GICable.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_GICable.cpp new file mode 100644 index 000000000..229e4e5bb --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_GICable.cpp @@ -0,0 +1,116 @@ +// Copyright 2018 David Conran + +#define __STDC_LIMIT_MACROS +#include +#include +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// GGGG IIIII CCCCC AAA BBBBB LL EEEEEEE +// GG GG III CC C AAAAA BB B LL EE +// GG III CC AA AA BBBBBB LL EEEEE +// GG GG ... III ... CC C AAAAAAA BB BB LL EE +// GGGGGG ... IIIII ... CCCCC AA AA BBBBBB LLLLLLL EEEEEEE +// +// Ref: +// https://github.com/cyborg5/IRLib2/blob/master/IRLibProtocols/IRLib_P09_GICable.h +// https://github.com/markszabo/IRremoteESP8266/issues/447 + +// Constants +const uint16_t kGicableHdrMark = 9000; +const uint16_t kGicableHdrSpace = 4400; +const uint16_t kGicableBitMark = 550; +const uint16_t kGicableOneSpace = 4400; +const uint16_t kGicableZeroSpace = 2200; +const uint16_t kGicableRptSpace = 2200; +const uint32_t kGicableMinCommandLength = 99600; +const uint32_t kGicableMinGap = + kGicableMinCommandLength - + (kGicableHdrMark + kGicableHdrSpace + + kGicableBits * (kGicableBitMark + kGicableOneSpace) + kGicableBitMark); + +#if SEND_GICABLE +// Send a raw G.I. Cable formatted message. +// +// Args: +// data: The message to be sent. +// nbits: The number of bits of the message to be sent. +// Typically kGicableBits. +// repeat: The number of times the command is to be repeated. +// +// Status: Alpha / Untested. +// +// Ref: +void IRsend::sendGICable(uint64_t data, uint16_t nbits, uint16_t repeat) { + sendGeneric(kGicableHdrMark, kGicableHdrSpace, kGicableBitMark, + kGicableOneSpace, kGicableBitMark, kGicableZeroSpace, + kGicableBitMark, kGicableMinGap, kGicableMinCommandLength, data, + nbits, 39, true, 0, // Repeats are handled later. + 50); + // Message repeat sequence. + if (repeat) + sendGeneric(kGicableHdrMark, kGicableRptSpace, 0, 0, 0, + 0, // No actual data sent. + kGicableBitMark, kGicableMinGap, kGicableMinCommandLength, 0, + 0, // No data to be sent. + 39, true, repeat - 1, 50); +} +#endif // SEND_GICABLE + +#if DECODE_GICABLE +// Decode the supplied G.I. Cable message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kGicableBits. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: Alpha / Not tested against a real device. +bool IRrecv::decodeGICable(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < 2 * (nbits + kHeader + kFooter) - 1) + return false; // Can't possibly be a valid GICABLE message. + if (strict && nbits != kGicableBits) + return false; // Not strictly an GICABLE message. + + uint64_t data = 0; + uint16_t offset = kStartOffset; + + // Header + if (!matchMark(results->rawbuf[offset++], kGicableHdrMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kGicableHdrSpace)) return false; + + // Data + match_result_t data_result = + matchData(&(results->rawbuf[offset]), nbits, kGicableBitMark, + kGicableOneSpace, kGicableBitMark, kGicableZeroSpace); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + + // Footer + if (!matchMark(results->rawbuf[offset++], kGicableBitMark)) return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset++], kGicableMinGap)) + return false; + + // Compliance + if (strict) { + // We expect a repeat frame. + if (!matchMark(results->rawbuf[offset++], kGicableHdrMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kGicableRptSpace)) return false; + if (!matchMark(results->rawbuf[offset++], kGicableBitMark)) return false; + } + + // Success + results->bits = nbits; + results->value = data; + results->decode_type = GICABLE; + results->command = 0; + results->address = 0; + return true; +} +#endif // DECODE_GICABLE diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_GlobalCache.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_GlobalCache.cpp similarity index 66% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_GlobalCache.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_GlobalCache.cpp index 019413b96..daa9dd22c 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_GlobalCache.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_GlobalCache.cpp @@ -3,7 +3,6 @@ #include #include "IRsend.h" -#include "IRtimer.h" // GGG L OOOO BBBB AA L CCCC AA CCCC H H EEEEEE // G G L O O B B AAAA L C C AAAA C C H H E @@ -15,12 +14,12 @@ // (http://www.hishamkhalifa.com) // Constants -#define GLOBALCACHE_MAX_REPEAT 50U -#define GLOBALCACHE_MIN_USEC 80U -#define GLOBALCACHE_FREQ_INDEX 0U -#define GLOBALCACHE_RPT_INDEX GLOBALCACHE_FREQ_INDEX + 1U -#define GLOBALCACHE_RPT_START_INDEX GLOBALCACHE_RPT_INDEX + 1U -#define GLOBALCACHE_START_INDEX GLOBALCACHE_RPT_START_INDEX + 1U +const uint16_t kGlobalCacheMaxRepeat = 50; +const uint32_t kGlobalCacheMinUsec = 80; +const uint8_t kGlobalCacheFreqIndex = 0; +const uint8_t kGlobalCacheRptIndex = kGlobalCacheFreqIndex + 1; +const uint8_t kGlobalCacheRptStartIndex = kGlobalCacheRptIndex + 1; +const uint8_t kGlobalCacheStartIndex = kGlobalCacheRptStartIndex + 1; #if SEND_GLOBALCACHE // Send a shortened GlobalCache (GC) IRdb/control tower formatted message. @@ -41,24 +40,23 @@ // Ref: // https://irdb.globalcache.com/Home/Database void IRsend::sendGC(uint16_t buf[], uint16_t len) { - uint16_t hz = buf[GLOBALCACHE_FREQ_INDEX]; // GC frequency is in Hz. + uint16_t hz = buf[kGlobalCacheFreqIndex]; // GC frequency is in Hz. enableIROut(hz); uint32_t periodic_time = calcUSecPeriod(hz, false); - uint8_t emits = std::min(buf[GLOBALCACHE_RPT_INDEX], - (uint16_t) GLOBALCACHE_MAX_REPEAT); + uint8_t emits = + std::min(buf[kGlobalCacheRptIndex], (uint16_t)kGlobalCacheMaxRepeat); // Repeat for (uint8_t repeat = 0; repeat < emits; repeat++) { - // First time through, start at the beginning (GLOBALCACHE_START_INDEX), + // First time through, start at the beginning (kGlobalCacheStartIndex), // otherwise for repeats, we start a specified offset from that. - uint16_t offset = GLOBALCACHE_START_INDEX; - if (repeat) - offset += buf[GLOBALCACHE_RPT_START_INDEX] - 1; + uint16_t offset = kGlobalCacheStartIndex; + if (repeat) offset += buf[kGlobalCacheRptStartIndex] - 1; // Data for (; offset < len; offset++) { // Convert periodic units to microseconds. - // Minimum is GLOBALCACHE_MIN_USEC for actual GC units. - uint32_t microseconds = std::max(buf[offset] * periodic_time, - GLOBALCACHE_MIN_USEC); + // Minimum is kGlobalCacheMinUsec for actual GC units. + uint32_t microseconds = + std::max(buf[offset] * periodic_time, kGlobalCacheMinUsec); // These codes start at an odd index (not even as with sendRaw). if (offset & 1) // Odd bit. mark(microseconds); diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Gree.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Gree.cpp new file mode 100644 index 000000000..df8afada6 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Gree.cpp @@ -0,0 +1,478 @@ +// Copyright 2017 Ville Skyttä (scop) +// Copyright 2017, 2018 David Conran +// +// Code to emulate Gree protocol compatible HVAC devices. +// Should be compatible with: +// * Heat pumps carrying the "Ultimate" brand name. +// * EKOKAI air conditioners. +// + +#include "ir_Gree.h" +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRremoteESP8266.h" +#include "IRsend.h" +#include "IRutils.h" +#include "ir_Kelvinator.h" + +// GGGG RRRRRR EEEEEEE EEEEEEE +// GG GG RR RR EE EE +// GG RRRRRR EEEEE EEEEE +// GG GG RR RR EE EE +// GGGGGG RR RR EEEEEEE EEEEEEE + +// Constants +// Ref: https://github.com/ToniA/arduino-heatpumpir/blob/master/GreeHeatpumpIR.h +const uint16_t kGreeHdrMark = 9000; +const uint16_t kGreeHdrSpace = 4000; +const uint16_t kGreeBitMark = 620; +const uint16_t kGreeOneSpace = 1600; +const uint16_t kGreeZeroSpace = 540; +const uint16_t kGreeMsgSpace = 19000; +const uint8_t kGreeBlockFooter = 0b010; +const uint8_t kGreeBlockFooterBits = 3; + +#if SEND_GREE +// Send a Gree Heat Pump message. +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. (>=kGreeStateLength) +// repeat: Nr. of times the message is to be repeated. (Default = 0). +// +// Status: ALPHA / Untested. +// +// Ref: +// https://github.com/ToniA/arduino-heatpumpir/blob/master/GreeHeatpumpIR.cpp +void IRsend::sendGree(unsigned char data[], uint16_t nbytes, uint16_t repeat) { + if (nbytes < kGreeStateLength) + return; // Not enough bytes to send a proper message. + + for (uint16_t r = 0; r <= repeat; r++) { + // Block #1 + sendGeneric(kGreeHdrMark, kGreeHdrSpace, kGreeBitMark, kGreeOneSpace, + kGreeBitMark, kGreeZeroSpace, 0, 0, // No Footer. + data, 4, 38, false, 0, 50); + // Footer #1 + sendGeneric(0, 0, // No Header + kGreeBitMark, kGreeOneSpace, kGreeBitMark, kGreeZeroSpace, + kGreeBitMark, kGreeMsgSpace, 0b010, 3, 38, true, 0, false); + + // Block #2 + sendGeneric(0, 0, // No Header for Block #2 + kGreeBitMark, kGreeOneSpace, kGreeBitMark, kGreeZeroSpace, + kGreeBitMark, kGreeMsgSpace, data + 4, nbytes - 4, 38, false, 0, + 50); + } +} + +// Send a Gree Heat Pump message. +// +// Args: +// data: The raw message to be sent. +// nbits: Nr. of bits of data in the message. (Default is kGreeBits) +// repeat: Nr. of times the message is to be repeated. (Default = 0). +// +// Status: ALPHA / Untested. +// +// Ref: +// https://github.com/ToniA/arduino-heatpumpir/blob/master/GreeHeatpumpIR.cpp +void IRsend::sendGree(uint64_t data, uint16_t nbits, uint16_t repeat) { + if (nbits != kGreeBits) + return; // Wrong nr. of bits to send a proper message. + // Set IR carrier frequency + enableIROut(38); + + for (uint16_t r = 0; r <= repeat; r++) { + // Header + mark(kGreeHdrMark); + space(kGreeHdrSpace); + + // Data + for (int16_t i = 8; i <= nbits; i += 8) { + sendData(kGreeBitMark, kGreeOneSpace, kGreeBitMark, kGreeZeroSpace, + (data >> (nbits - i)) & 0xFF, 8, false); + if (i == nbits / 2) { + // Send the mid-message Footer. + sendData(kGreeBitMark, kGreeOneSpace, kGreeBitMark, kGreeZeroSpace, + 0b010, 3); + mark(kGreeBitMark); + space(kGreeMsgSpace); + } + } + // Footer + mark(kGreeBitMark); + space(kGreeMsgSpace); + } +} +#endif // SEND_GREE + +IRGreeAC::IRGreeAC(uint16_t pin) : _irsend(pin) { stateReset(); } + +void IRGreeAC::stateReset() { + // This resets to a known-good state to Power Off, Fan Auto, Mode Auto, 25C. + for (uint8_t i = 0; i < kGreeStateLength; i++) remote_state[i] = 0x0; + remote_state[1] = 0x09; + remote_state[2] = 0x20; + remote_state[3] = 0x50; + remote_state[5] = 0x20; + remote_state[7] = 0x50; +} + +void IRGreeAC::fixup() { + checksum(); // Calculate the checksums +} + +void IRGreeAC::begin() { _irsend.begin(); } + +#if SEND_GREE +void IRGreeAC::send() { + fixup(); // Ensure correct settings before sending. + _irsend.sendGree(remote_state); +} +#endif // SEND_GREE + +uint8_t* IRGreeAC::getRaw() { + fixup(); // Ensure correct settings before sending. + return remote_state; +} + +void IRGreeAC::setRaw(uint8_t new_code[]) { + for (uint8_t i = 0; i < kGreeStateLength; i++) { + remote_state[i] = new_code[i]; + } +} + +void IRGreeAC::checksum(const uint16_t length) { + // Gree uses the same checksum alg. as Kelvinator's block checksum. + uint8_t sum = IRKelvinatorAC::calcBlockChecksum(remote_state, length); + remote_state[length - 1] = (sum << 4) | (remote_state[length - 1] & 0xFU); +} + +// Verify the checksum is valid for a given state. +// Args: +// state: The array to verify the checksum of. +// length: The size of the state. +// Returns: +// A boolean. +bool IRGreeAC::validChecksum(const uint8_t state[], const uint16_t length) { + // Top 4 bits of the last byte in the state is the state's checksum. + if (state[length - 1] >> 4 == + IRKelvinatorAC::calcBlockChecksum(state, length)) + return true; + else + return false; +} + +void IRGreeAC::on() { + remote_state[0] |= kGreePower1Mask; + remote_state[2] |= kGreePower2Mask; +} + +void IRGreeAC::off() { + remote_state[0] &= ~kGreePower1Mask; + remote_state[2] &= ~kGreePower2Mask; +} + +void IRGreeAC::setPower(const bool state) { + if (state) + on(); + else + off(); +} + +bool IRGreeAC::getPower() { + return (remote_state[0] & kGreePower1Mask) && + (remote_state[2] & kGreePower2Mask); +} + +// Set the temp. in deg C +void IRGreeAC::setTemp(const uint8_t temp) { + uint8_t new_temp = std::max((uint8_t)kGreeMinTemp, temp); + new_temp = std::min((uint8_t)kGreeMaxTemp, new_temp); + if (getMode() == kGreeAuto) new_temp = 25; + remote_state[1] = (remote_state[1] & 0xF0U) | (new_temp - kGreeMinTemp); +} + +// Return the set temp. in deg C +uint8_t IRGreeAC::getTemp() { + return ((remote_state[1] & 0xFU) + kGreeMinTemp); +} + +// Set the speed of the fan, 0-3, 0 is auto, 1-3 is the speed +void IRGreeAC::setFan(const uint8_t speed) { + uint8_t fan = std::min((uint8_t)kGreeFanMax, speed); // Bounds check + + if (getMode() == kGreeDry) fan = 1; // DRY mode is always locked to fan 1. + // Set the basic fan values. + remote_state[0] &= ~kGreeFanMask; + remote_state[0] |= (fan << 4); +} + +uint8_t IRGreeAC::getFan() { return ((remote_state[0] & kGreeFanMask) >> 4); } + +void IRGreeAC::setMode(const uint8_t new_mode) { + uint8_t mode = new_mode; + switch (mode) { + case kGreeAuto: + // AUTO is locked to 25C + setTemp(25); + break; + case kGreeDry: + // DRY always sets the fan to 1. + setFan(1); + break; + case kGreeCool: + case kGreeFan: + case kGreeHeat: + break; + default: + // If we get an unexpected mode, default to AUTO. + mode = kGreeAuto; + } + remote_state[0] &= ~kGreeModeMask; + remote_state[0] |= mode; +} + +uint8_t IRGreeAC::getMode() { return (remote_state[0] & kGreeModeMask); } + +void IRGreeAC::setLight(const bool state) { + remote_state[2] &= ~kGreeLightMask; + remote_state[2] |= (state << 5); +} + +bool IRGreeAC::getLight() { return remote_state[2] & kGreeLightMask; } + +void IRGreeAC::setXFan(const bool state) { + remote_state[2] &= ~kGreeXfanMask; + remote_state[2] |= (state << 7); +} + +bool IRGreeAC::getXFan() { return remote_state[2] & kGreeXfanMask; } + +void IRGreeAC::setSleep(const bool state) { + remote_state[0] &= ~kGreeSleepMask; + remote_state[0] |= (state << 7); +} + +bool IRGreeAC::getSleep() { return remote_state[0] & kGreeSleepMask; } + +void IRGreeAC::setTurbo(const bool state) { + remote_state[2] &= ~kGreeTurboMask; + remote_state[2] |= (state << 4); +} + +bool IRGreeAC::getTurbo() { return remote_state[2] & kGreeTurboMask; } + +void IRGreeAC::setSwingVertical(const bool automatic, const uint8_t position) { + remote_state[0] &= ~kGreeSwingAutoMask; + remote_state[0] |= (automatic << 6); + uint8_t new_position = position; + if (!automatic) { + switch (position) { + case kGreeSwingUp: + case kGreeSwingMiddleUp: + case kGreeSwingMiddle: + case kGreeSwingMiddleDown: + case kGreeSwingDown: + break; + default: + new_position = kGreeSwingLastPos; + } + } else { + switch (position) { + case kGreeSwingAuto: + case kGreeSwingDownAuto: + case kGreeSwingMiddleAuto: + case kGreeSwingUpAuto: + break; + default: + new_position = kGreeSwingAuto; + } + } + remote_state[4] &= ~kGreeSwingPosMask; + remote_state[4] |= new_position; +} + +bool IRGreeAC::getSwingVerticalAuto() { + return remote_state[0] & kGreeSwingAutoMask; +} + +uint8_t IRGreeAC::getSwingVerticalPosition() { + return remote_state[4] & kGreeSwingPosMask; +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRGreeAC::toString() { + String result = ""; +#else +std::string IRGreeAC::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Power: "; + if (getPower()) + result += "On"; + else + result += "Off"; + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kGreeAuto: + result += " (AUTO)"; + break; + case kGreeCool: + result += " (COOL)"; + break; + case kGreeHeat: + result += " (HEAT)"; + break; + case kGreeDry: + result += " (DRY)"; + break; + case kGreeFan: + result += " (FAN)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", Fan: " + uint64ToString(getFan()); + switch (getFan()) { + case 0: + result += " (AUTO)"; + break; + case kGreeFanMax: + result += " (MAX)"; + break; + } + result += ", Turbo: "; + if (getTurbo()) + result += "On"; + else + result += "Off"; + result += ", XFan: "; + if (getXFan()) + result += "On"; + else + result += "Off"; + result += ", Light: "; + if (getLight()) + result += "On"; + else + result += "Off"; + result += ", Sleep: "; + if (getSleep()) + result += "On"; + else + result += "Off"; + result += ", Swing Vertical Mode: "; + if (getSwingVerticalAuto()) + result += "Auto"; + else + result += "Manual"; + result += + ", Swing Vertical Pos: " + uint64ToString(getSwingVerticalPosition()); + switch (getSwingVerticalPosition()) { + case kGreeSwingLastPos: + result += " (Last Pos)"; + break; + case kGreeSwingAuto: + result += " (Auto)"; + break; + } + return result; +} + +#if DECODE_GREE +// Decode the supplied Gree message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kGreeBits. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: ALPHA / Untested. +bool IRrecv::decodeGree(decode_results* results, uint16_t nbits, bool strict) { + if (results->rawlen < + 2 * (nbits + kGreeBlockFooterBits) + (kHeader + kFooter + 1)) + return false; // Can't possibly be a valid Gree message. + if (strict && nbits != kGreeBits) + return false; // Not strictly a Gree message. + + uint32_t data; + uint16_t offset = kStartOffset; + + // There are two blocks back-to-back in a full Gree IR message + // sequence. + int8_t state_pos = 0; + match_result_t data_result; + + // Header + if (!matchMark(results->rawbuf[offset++], kGreeHdrMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kGreeHdrSpace)) return false; + // Data Block #1 (32 bits) + data_result = + matchData(&(results->rawbuf[offset]), 32, kGreeBitMark, kGreeOneSpace, + kGreeBitMark, kGreeZeroSpace, kTolerance, kMarkExcess, false); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + + // Record Data Block #1 in the state. + for (uint16_t i = 0; i < 4; i++, data >>= 8) + results->state[state_pos + i] = data & 0xFF; + state_pos += 4; + + // Block #1 footer (3 bits, B010) + data_result = matchData(&(results->rawbuf[offset]), kGreeBlockFooterBits, + kGreeBitMark, kGreeOneSpace, kGreeBitMark, + kGreeZeroSpace, kTolerance, kMarkExcess, false); + if (data_result.success == false) return false; + if (data_result.data != kGreeBlockFooter) return false; + offset += data_result.used; + + // Inter-block gap. + if (!matchMark(results->rawbuf[offset++], kGreeBitMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kGreeMsgSpace)) return false; + + // Data Block #2 (32 bits) + data_result = + matchData(&(results->rawbuf[offset]), 32, kGreeBitMark, kGreeOneSpace, + kGreeBitMark, kGreeZeroSpace, kTolerance, kMarkExcess, false); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + + // Record Data Block #2 in the state. + for (uint16_t i = 0; i < 4; i++, data >>= 8) + results->state[state_pos + i] = data & 0xFF; + state_pos += 4; + + // Footer. + if (!matchMark(results->rawbuf[offset++], kGreeBitMark)) return false; + if (offset <= results->rawlen && + !matchAtLeast(results->rawbuf[offset], kGreeMsgSpace)) + return false; + + // Compliance + if (strict) { + // Correct size/length) + if (state_pos != kGreeStateLength) return false; + // Verify the message's checksum is correct. + if (!IRGreeAC::validChecksum(results->state)) return false; + } + + // Success + results->decode_type = GREE; + results->bits = state_pos * 8; + // No need to record the state as we stored it as we decoded it. + // As we use result->state, we don't record value, address, or command as it + // is a union data type. + return true; +} +#endif // DECODE_GREE diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Gree.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Gree.h new file mode 100644 index 000000000..73f69eb31 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Gree.h @@ -0,0 +1,130 @@ +// Kelvinator A/C +// +// Copyright 2016 David Conran + +#ifndef IR_GREE_H_ +#define IR_GREE_H_ + +#define __STDC_LIMIT_MACROS +#include +#ifndef UNIT_TEST +#include +#else +#include +#endif +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// GGGG RRRRRR EEEEEEE EEEEEEE +// GG GG RR RR EE EE +// GG RRRRRR EEEEE EEEEE +// GG GG RR RR EE EE +// GGGGGG RR RR EEEEEEE EEEEEEE + +// Constants +const uint8_t kGreeAuto = 0; +const uint8_t kGreeCool = 1; +const uint8_t kGreeDry = 2; +const uint8_t kGreeFan = 3; +const uint8_t kGreeHeat = 4; + +// Byte 0 +const uint8_t kGreeModeMask = 0b00000111; +const uint8_t kGreePower1Mask = 0b00001000; +const uint8_t kGreeFanMask = 0b00110000; +const uint8_t kGreeSwingAutoMask = 0b01000000; +const uint8_t kGreeSleepMask = 0b10000000; +// Byte 2 +const uint8_t kGreeTurboMask = 0b00010000; +const uint8_t kGreeLightMask = 0b00100000; +const uint8_t kGreePower2Mask = 0b01000000; +const uint8_t kGreeXfanMask = 0b10000000; +// Byte 4 +const uint8_t kGreeSwingPosMask = 0b00001111; + +const uint8_t kGreeMinTemp = 16; // Celsius +const uint8_t kGreeMaxTemp = 30; // Celsius +const uint8_t kGreeFanMax = 3; + +const uint8_t kGreeSwingLastPos = 0b00000000; +const uint8_t kGreeSwingAuto = 0b00000001; +const uint8_t kGreeSwingUp = 0b00000010; +const uint8_t kGreeSwingMiddleUp = 0b00000011; +const uint8_t kGreeSwingMiddle = 0b00000100; +const uint8_t kGreeSwingMiddleDown = 0b00000101; +const uint8_t kGreeSwingDown = 0b00000110; +const uint8_t kGreeSwingDownAuto = 0b00000111; +const uint8_t kGreeSwingMiddleAuto = 0b00001001; +const uint8_t kGreeSwingUpAuto = 0b00001011; + +// Legacy defines. +#define GREE_AUTO kGreeAuto +#define GREE_COOL kGreeCool +#define GREE_DRY kGreeDry +#define GREE_FAN kGreeFan +#define GREE_HEAT kGreeHeat +#define GREE_MIN_TEMP kGreeMinTemp +#define GREE_MAX_TEMP kGreeMaxTemp +#define GREE_FAN_MAX kGreeFanMax +#define GREE_SWING_LAST_POS kGreeSwingLastPos +#define GREE_SWING_AUTO kGreeSwingAuto +#define GREE_SWING_UP kGreeSwingUp +#define GREE_SWING_MIDDLE_UP kGreeSwingMiddleUp +#define GREE_SWING_MIDDLE kGreeSwingMiddle +#define GREE_SWING_MIDDLE_DOWN kGreeSwingMiddleDown +#define GREE_SWING_DOWN kGreeSwingDown +#define GREE_SWING_DOWN_AUTO kGreeSwingDownAuto +#define GREE_SWING_MIDDLE_AUTO kGreeSwingMiddleAuto +#define GREE_SWING_UP_AUTO kGreeSwingUpAuto + +// Classes +class IRGreeAC { + public: + explicit IRGreeAC(uint16_t pin); + + void stateReset(); +#if SEND_GREE + void send(); +#endif // SEND_GREE + void begin(); + void on(); + void off(); + void setPower(const bool state); + bool getPower(); + void setTemp(const uint8_t temp); + uint8_t getTemp(); + void setFan(const uint8_t speed); + uint8_t getFan(); + void setMode(const uint8_t new_mode); + uint8_t getMode(); + void setLight(const bool state); + bool getLight(); + void setXFan(const bool state); + bool getXFan(); + void setSleep(const bool state); + bool getSleep(); + void setTurbo(const bool state); + bool getTurbo(); + void setSwingVertical(const bool automatic, const uint8_t position); + bool getSwingVerticalAuto(); + uint8_t getSwingVerticalPosition(); + + uint8_t* getRaw(); + void setRaw(uint8_t new_code[]); + static bool validChecksum(const uint8_t state[], + const uint16_t length = kGreeStateLength); +#ifdef ARDUINO + String toString(); +#else + std::string toString(); +#endif + + private: + // The state of the IR remote in IR code form. + uint8_t remote_state[kGreeStateLength]; + void checksum(const uint16_t length = kGreeStateLength); + void fixup(); + IRsend _irsend; +}; + +#endif // IR_GREE_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Haier.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Haier.cpp new file mode 100644 index 000000000..2c47e4eac --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Haier.cpp @@ -0,0 +1,865 @@ +// Copyright 2018 crankyoldgit +// The specifics of reverse engineering the protocols details: +// * HSU07-HEA03 by kuzin2006. +// * YR-W02/HSU-09HMC203 by non7top. + +#include "ir_Haier.h" +#ifndef UNIT_TEST +#include +#else +#include +#endif +#include "IRremoteESP8266.h" +#include "IRutils.h" + +// HH HH AAA IIIII EEEEEEE RRRRRR +// HH HH AAAAA III EE RR RR +// HHHHHHH AA AA III EEEEE RRRRRR +// HH HH AAAAAAA III EE RR RR +// HH HH AA AA IIIII EEEEEEE RR RR + +// Supported devices: +// * Haier HSU07-HEA03 Remote control. +// * Haier YR-W02 Remote control +// * Haier HSU-09HMC203 A/C unit. + +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/404 +// https://www.dropbox.com/s/mecyib3lhdxc8c6/IR%20data%20reverse%20engineering.xlsx?dl=0 +// https://github.com/markszabo/IRremoteESP8266/issues/485 +// https://www.dropbox.com/sh/w0bt7egp0fjger5/AADRFV6Wg4wZskJVdFvzb8Z0a?dl=0&preview=haer2.ods + +// Constants +const uint16_t kHaierAcHdr = 3000; +const uint16_t kHaierAcHdrGap = 4300; +const uint16_t kHaierAcBitMark = 520; +const uint16_t kHaierAcOneSpace = 1650; +const uint16_t kHaierAcZeroSpace = 650; +const uint32_t kHaierAcMinGap = 150000; // Completely made up value. + +#if (SEND_HAIER_AC || SEND_HAIER_AC_YRW02) +// Send a Haier A/C message. (HSU07-HEA03 remote) +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. (>=kHaierACStateLength) +// repeat: Nr. of times the message is to be repeated. (Default = 0). +// +// Status: Beta / Probably working. +// +void IRsend::sendHaierAC(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + if (nbytes < kHaierACStateLength) return; + + for (uint16_t r = 0; r <= repeat; r++) { + enableIROut(38000); + mark(kHaierAcHdr); + space(kHaierAcHdr); + sendGeneric(kHaierAcHdr, kHaierAcHdrGap, kHaierAcBitMark, kHaierAcOneSpace, + kHaierAcBitMark, kHaierAcZeroSpace, kHaierAcBitMark, + kHaierAcMinGap, data, nbytes, 38, true, + 0, // Repeats handled elsewhere + 50); + } +} +#endif // (SEND_HAIER_AC || SEND_HAIER_AC_YRW02) + +#if SEND_HAIER_AC_YRW02 +// Send a Haier YR-W02 remote A/C message. +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. (>=kHaierACYRW02StateLength) +// repeat: Nr. of times the message is to be repeated. (Default = 0). +// +// Status: Alpha / Untested on a real device. +// +void IRsend::sendHaierACYRW02(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + if (nbytes >= kHaierACYRW02StateLength) sendHaierAC(data, nbytes, repeat); +} +#endif // SEND_HAIER_AC_YRW02 + +// Class for emulating a Haier HSU07-HEA03 remote +IRHaierAC::IRHaierAC(uint16_t pin) : _irsend(pin) { stateReset(); } + +void IRHaierAC::begin() { _irsend.begin(); } + +#if SEND_HAIER_AC +void IRHaierAC::send() { + checksum(); + _irsend.sendHaierAC(remote_state); +} +#endif // SEND_HAIER_AC + +void IRHaierAC::checksum() { + remote_state[8] = sumBytes(remote_state, kHaierACStateLength - 1); +} + +bool IRHaierAC::validChecksum(uint8_t state[], const uint16_t length) { + if (length < 2) return false; // 1 byte of data can't have a checksum. + return (state[length - 1] == sumBytes(state, length - 1)); +} + +void IRHaierAC::stateReset() { + for (uint8_t i = 1; i < kHaierACStateLength; i++) remote_state[i] = 0x0; + remote_state[0] = kHaierAcPrefix; + remote_state[2] = 0b00100000; + + setTemp(kHaierAcDefTemp); + setFan(kHaierAcFanAuto); + setMode(kHaierAcAuto); + setCommand(kHaierAcCmdOn); +} + +uint8_t* IRHaierAC::getRaw() { + checksum(); + return remote_state; +} + +void IRHaierAC::setRaw(uint8_t new_code[]) { + for (uint8_t i = 0; i < kHaierACStateLength; i++) { + remote_state[i] = new_code[i]; + } +} + +void IRHaierAC::setCommand(uint8_t state) { + remote_state[1] &= 0b11110000; + switch (state) { + case kHaierAcCmdOff: + case kHaierAcCmdOn: + case kHaierAcCmdMode: + case kHaierAcCmdFan: + case kHaierAcCmdTempUp: + case kHaierAcCmdTempDown: + case kHaierAcCmdSleep: + case kHaierAcCmdTimerSet: + case kHaierAcCmdTimerCancel: + case kHaierAcCmdHealth: + case kHaierAcCmdSwing: + remote_state[1] |= (state & 0b00001111); + } +} + +uint8_t IRHaierAC::getCommand() { return remote_state[1] & (0b00001111); } + +void IRHaierAC::setFan(uint8_t speed) { + uint8_t new_speed = kHaierAcFanAuto; + switch (speed) { + case kHaierAcFanLow: + new_speed = 3; + break; + case kHaierAcFanMed: + new_speed = 1; + break; + case kHaierAcFanHigh: + new_speed = 2; + break; + default: + new_speed = kHaierAcFanAuto; // Default to auto for anything else. + } + + if (speed != getFan()) setCommand(kHaierAcCmdFan); + remote_state[5] &= 0b11111100; + remote_state[5] |= new_speed; +} + +uint8_t IRHaierAC::getFan() { + switch (remote_state[5] & 0b00000011) { + case 1: + return kHaierAcFanMed; + case 2: + return kHaierAcFanHigh; + case 3: + return kHaierAcFanLow; + default: + return kHaierAcFanAuto; + } +} + +void IRHaierAC::setMode(uint8_t mode) { + uint8_t new_mode = mode; + setCommand(kHaierAcCmdMode); + if (mode > kHaierAcFan) // If out of range, default to auto mode. + new_mode = kHaierAcAuto; + remote_state[7] &= 0b00011111; + remote_state[7] |= (new_mode << 5); +} + +uint8_t IRHaierAC::getMode() { return (remote_state[7] & 0b11100000) >> 5; } + +void IRHaierAC::setTemp(const uint8_t celsius) { + uint8_t temp = celsius; + if (temp < kHaierAcMinTemp) + temp = kHaierAcMinTemp; + else if (temp > kHaierAcMaxTemp) + temp = kHaierAcMaxTemp; + + uint8_t old_temp = getTemp(); + if (old_temp == temp) return; + if (old_temp > temp) + setCommand(kHaierAcCmdTempDown); + else + setCommand(kHaierAcCmdTempUp); + + remote_state[1] &= 0b00001111; // Clear the previous temp. + remote_state[1] |= ((temp - kHaierAcMinTemp) << 4); +} + +uint8_t IRHaierAC::getTemp() { + return ((remote_state[1] & 0b11110000) >> 4) + kHaierAcMinTemp; +} + +void IRHaierAC::setHealth(bool state) { + setCommand(kHaierAcCmdHealth); + remote_state[4] &= 0b11011111; + remote_state[4] |= (state << 5); +} + +bool IRHaierAC::getHealth(void) { return remote_state[4] & (1 << 5); } + +void IRHaierAC::setSleep(bool state) { + setCommand(kHaierAcCmdSleep); + remote_state[7] &= 0b10111111; + remote_state[7] |= (state << 6); +} + +bool IRHaierAC::getSleep(void) { return remote_state[7] & 0b01000000; } + +uint16_t IRHaierAC::getTime(const uint8_t ptr[]) { + return (ptr[0] & 0b00011111) * 60 + (ptr[1] & 0b00111111); +} + +int16_t IRHaierAC::getOnTimer() { + if (remote_state[3] & 0b10000000) // Check if the timer is turned on. + return getTime(remote_state + 6); + else + return -1; +} + +int16_t IRHaierAC::getOffTimer() { + if (remote_state[3] & 0b01000000) // Check if the timer is turned on. + return getTime(remote_state + 4); + else + return -1; +} + +uint16_t IRHaierAC::getCurrTime() { return getTime(remote_state + 2); } + +void IRHaierAC::setTime(uint8_t ptr[], const uint16_t nr_mins) { + uint16_t mins = nr_mins; + if (nr_mins > kHaierAcMaxTime) mins = kHaierAcMaxTime; + + // Hours + ptr[0] &= 0b11100000; + ptr[0] |= (mins / 60); + // Minutes + ptr[1] &= 0b11000000; + ptr[1] |= (mins % 60); +} + +void IRHaierAC::setOnTimer(const uint16_t nr_mins) { + setCommand(kHaierAcCmdTimerSet); + remote_state[3] |= 0b10000000; + setTime(remote_state + 6, nr_mins); +} + +void IRHaierAC::setOffTimer(const uint16_t nr_mins) { + setCommand(kHaierAcCmdTimerSet); + remote_state[3] |= 0b01000000; + setTime(remote_state + 4, nr_mins); +} + +void IRHaierAC::cancelTimers() { + setCommand(kHaierAcCmdTimerCancel); + remote_state[3] &= 0b00111111; +} + +void IRHaierAC::setCurrTime(const uint16_t nr_mins) { + setTime(remote_state + 2, nr_mins); +} + +uint8_t IRHaierAC::getSwing() { return (remote_state[2] & 0b11000000) >> 6; } + +void IRHaierAC::setSwing(const uint8_t state) { + if (state == getSwing()) return; // Nothing to do. + setCommand(kHaierAcCmdSwing); + switch (state) { + case kHaierAcSwingOff: + case kHaierAcSwingUp: + case kHaierAcSwingDown: + case kHaierAcSwingChg: + remote_state[2] &= 0b00111111; + remote_state[2] |= (state << 6); + break; + } +} + +// Convert a Haier time into a human readable string. +#ifdef ARDUINO +String IRHaierAC::timeToString(const uint16_t nr_mins) { + String result = ""; +#else +std::string IRHaierAC::timeToString(const uint16_t nr_mins) { + std::string result = ""; +#endif // ARDUINO + + if (nr_mins / 24 < 10) result += "0"; // Zero pad. + result += uint64ToString(nr_mins / 60); + result += ":"; + if (nr_mins % 60 < 10) result += "0"; // Zero pad. + result += uint64ToString(nr_mins % 60); + return result; +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRHaierAC::toString() { + String result = ""; +#else +std::string IRHaierAC::toString() { + std::string result = ""; +#endif // ARDUINO + uint8_t cmd = getCommand(); + result += "Command: " + uint64ToString(cmd) + " ("; + switch (cmd) { + case kHaierAcCmdOff: + result += "Off"; + break; + case kHaierAcCmdOn: + result += "On"; + break; + case kHaierAcCmdMode: + result += "Mode"; + break; + case kHaierAcCmdFan: + result += "Fan"; + break; + case kHaierAcCmdTempUp: + result += "Temp Up"; + break; + case kHaierAcCmdTempDown: + result += "Temp Down"; + break; + case kHaierAcCmdSleep: + result += "Sleep"; + break; + case kHaierAcCmdTimerSet: + result += "Timer Set"; + break; + case kHaierAcCmdTimerCancel: + result += "Timer Cancel"; + break; + case kHaierAcCmdHealth: + result += "Health"; + break; + case kHaierAcCmdSwing: + result += "Swing"; + break; + default: + result += "Unknown"; + } + result += ")"; + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kHaierAcAuto: + result += " (AUTO)"; + break; + case kHaierAcCool: + result += " (COOL)"; + break; + case kHaierAcHeat: + result += " (HEAT)"; + break; + case kHaierAcDry: + result += " (DRY)"; + break; + case kHaierAcFan: + result += " (FAN)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", Fan: " + uint64ToString(getFan()); + switch (getFan()) { + case kHaierAcFanAuto: + result += " (AUTO)"; + break; + case kHaierAcFanHigh: + result += " (MAX)"; + break; + } + result += ", Swing: " + uint64ToString(getSwing()) + " ("; + switch (getSwing()) { + case kHaierAcSwingOff: + result += "Off"; + break; + case kHaierAcSwingUp: + result += "Up"; + break; + case kHaierAcSwingDown: + result += "Down"; + break; + case kHaierAcSwingChg: + result += "Chg"; + break; + default: + result += "Unknown"; + } + result += ")"; + result += ", Sleep: "; + if (getSleep()) + result += "On"; + else + result += "Off"; + result += ", Health: "; + if (getHealth()) + result += "On"; + else + result += "Off"; + result += ", Current Time: " + timeToString(getCurrTime()); + result += ", On Timer: "; + if (getOnTimer() >= 0) + result += timeToString(getOnTimer()); + else + result += "Off"; + result += ", Off Timer: "; + if (getOffTimer() >= 0) + result += timeToString(getOffTimer()); + else + result += "Off"; + + return result; +} +// End of IRHaierAC class. + +// Class for emulating a Haier YRW02 remote +IRHaierACYRW02::IRHaierACYRW02(uint16_t pin) : _irsend(pin) { stateReset(); } + +void IRHaierACYRW02::begin() { _irsend.begin(); } + +#if SEND_HAIER_AC_YRW02 +void IRHaierACYRW02::send() { + checksum(); + _irsend.sendHaierACYRW02(remote_state); +} +#endif // SEND_HAIER_AC_YRW02 + +void IRHaierACYRW02::checksum() { + remote_state[kHaierACYRW02StateLength - 1] = + sumBytes(remote_state, kHaierACYRW02StateLength - 1); +} + +bool IRHaierACYRW02::validChecksum(uint8_t state[], const uint16_t length) { + if (length < 2) return false; // 1 byte of data can't have a checksum. + return (state[length - 1] == sumBytes(state, length - 1)); +} + +void IRHaierACYRW02::stateReset() { + for (uint8_t i = 1; i < kHaierACYRW02StateLength; i++) remote_state[i] = 0x0; + remote_state[0] = kHaierAcYrw02Prefix; + + setTemp(kHaierAcDefTemp); + setHealth(true); + setTurbo(kHaierAcYrw02TurboOff); + setSleep(false); + setFan(kHaierAcYrw02FanAuto); + setSwing(kHaierAcYrw02SwingOff); + setMode(kHaierAcYrw02Auto); + setPower(true); +} + +uint8_t* IRHaierACYRW02::getRaw() { + checksum(); + return remote_state; +} + +void IRHaierACYRW02::setRaw(uint8_t new_code[]) { + for (uint8_t i = 0; i < kHaierACYRW02StateLength; i++) { + remote_state[i] = new_code[i]; + } +} + +void IRHaierACYRW02::setButton(uint8_t button) { + switch (button) { + case kHaierAcYrw02ButtonTempUp: + case kHaierAcYrw02ButtonTempDown: + case kHaierAcYrw02ButtonSwing: + case kHaierAcYrw02ButtonFan: + case kHaierAcYrw02ButtonPower: + case kHaierAcYrw02ButtonMode: + case kHaierAcYrw02ButtonHealth: + case kHaierAcYrw02ButtonTurbo: + case kHaierAcYrw02ButtonSleep: + remote_state[12] &= 0b11110000; + remote_state[12] |= (button & 0b00001111); + } +} + +uint8_t IRHaierACYRW02::getButton() { return remote_state[12] & (0b00001111); } + +void IRHaierACYRW02::setMode(uint8_t mode) { + uint8_t new_mode = mode; + setButton(kHaierAcYrw02ButtonMode); + switch (mode) { + case kHaierAcYrw02Auto: + case kHaierAcYrw02Cool: + case kHaierAcYrw02Dry: + case kHaierAcYrw02Heat: + case kHaierAcYrw02Fan: + break; + default: // If unexpected, default to auto mode. + new_mode = kHaierAcYrw02Auto; + } + remote_state[7] &= 0b0001111; + remote_state[7] |= (new_mode << 4); +} + +uint8_t IRHaierACYRW02::getMode() { return remote_state[7] >> 4; } + +void IRHaierACYRW02::setTemp(const uint8_t celcius) { + uint8_t temp = celcius; + if (temp < kHaierAcMinTemp) + temp = kHaierAcMinTemp; + else if (temp > kHaierAcMaxTemp) + temp = kHaierAcMaxTemp; + + uint8_t old_temp = getTemp(); + if (old_temp == temp) return; + if (old_temp > temp) + setButton(kHaierAcYrw02ButtonTempDown); + else + setButton(kHaierAcYrw02ButtonTempUp); + + remote_state[1] &= 0b00001111; // Clear the previous temp. + remote_state[1] |= ((temp - kHaierAcMinTemp) << 4); +} + +uint8_t IRHaierACYRW02::getTemp() { + return ((remote_state[1] & 0b11110000) >> 4) + kHaierAcMinTemp; +} + +void IRHaierACYRW02::setHealth(bool state) { + setButton(kHaierAcYrw02ButtonHealth); + remote_state[3] &= 0b11111101; + remote_state[3] |= (state << 1); +} + +bool IRHaierACYRW02::getHealth(void) { return remote_state[3] & 0b00000010; } + +bool IRHaierACYRW02::getPower() { return remote_state[4] & kHaierAcYrw02Power; } + +void IRHaierACYRW02::setPower(bool state) { + setButton(kHaierAcYrw02ButtonPower); + if (state) + remote_state[4] |= kHaierAcYrw02Power; + else + remote_state[4] &= ~kHaierAcYrw02Power; +} + +void IRHaierACYRW02::on() { setPower(true); } + +void IRHaierACYRW02::off() { setPower(false); } + +bool IRHaierACYRW02::getSleep() { return remote_state[8] & kHaierAcYrw02Sleep; } + +void IRHaierACYRW02::setSleep(bool state) { + setButton(kHaierAcYrw02ButtonSleep); + if (state) + remote_state[8] |= kHaierAcYrw02Sleep; + else + remote_state[8] &= ~kHaierAcYrw02Sleep; +} + +uint8_t IRHaierACYRW02::getTurbo() { return remote_state[6] >> 6; } + +void IRHaierACYRW02::setTurbo(uint8_t speed) { + switch (speed) { + case kHaierAcYrw02TurboOff: + case kHaierAcYrw02TurboLow: + case kHaierAcYrw02TurboHigh: + remote_state[6] &= 0b00111111; + remote_state[6] |= (speed << 6); + setButton(kHaierAcYrw02ButtonTurbo); + } +} + +uint8_t IRHaierACYRW02::getFan() { return remote_state[5] >> 4; } + +void IRHaierACYRW02::setFan(uint8_t speed) { + switch (speed) { + case kHaierAcYrw02FanLow: + case kHaierAcYrw02FanMed: + case kHaierAcYrw02FanHigh: + case kHaierAcYrw02FanAuto: + remote_state[5] &= 0b00001111; + remote_state[5] |= (speed << 4); + setButton(kHaierAcYrw02ButtonFan); + } +} + +uint8_t IRHaierACYRW02::getSwing() { return remote_state[1] & 0b00001111; } + +void IRHaierACYRW02::setSwing(uint8_t state) { + uint8_t newstate = state; + switch (state) { + case kHaierAcYrw02SwingOff: + case kHaierAcYrw02SwingAuto: + case kHaierAcYrw02SwingTop: + case kHaierAcYrw02SwingMiddle: + case kHaierAcYrw02SwingBottom: + case kHaierAcYrw02SwingDown: + setButton(kHaierAcYrw02ButtonSwing); + break; + default: + return; // Unexpected value so don't do anything. + } + + // Heat mode has no MIDDLE setting, use BOTTOM instead. + if (state == kHaierAcYrw02SwingMiddle && getMode() == kHaierAcYrw02Heat) + newstate = kHaierAcYrw02SwingBottom; + + // BOTTOM is only allowed if we are in Heat mode, otherwise MIDDLE. + if (state == kHaierAcYrw02SwingBottom && getMode() != kHaierAcYrw02Heat) + newstate = kHaierAcYrw02SwingMiddle; + + remote_state[1] &= 0b11110000; + remote_state[1] |= newstate; +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRHaierACYRW02::toString() { + String result = ""; +#else +std::string IRHaierACYRW02::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Power: "; + if (getPower()) + result += "On"; + else + result += "Off"; + uint8_t cmd = getButton(); + result += ", Button: " + uint64ToString(cmd) + " ("; + switch (cmd) { + case kHaierAcYrw02ButtonPower: + result += "Power"; + break; + case kHaierAcYrw02ButtonMode: + result += "Mode"; + break; + case kHaierAcYrw02ButtonFan: + result += "Fan"; + break; + case kHaierAcYrw02ButtonTempUp: + result += "Temp Up"; + break; + case kHaierAcYrw02ButtonTempDown: + result += "Temp Down"; + break; + case kHaierAcYrw02ButtonSleep: + result += "Sleep"; + break; + case kHaierAcYrw02ButtonHealth: + result += "Health"; + break; + case kHaierAcYrw02ButtonSwing: + result += "Swing"; + break; + case kHaierAcYrw02ButtonTurbo: + result += "Turbo"; + break; + default: + result += "Unknown"; + } + result += ")"; + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kHaierAcYrw02Auto: + result += " (Auto)"; + break; + case kHaierAcYrw02Cool: + result += " (Cool)"; + break; + case kHaierAcYrw02Heat: + result += " (Heat)"; + break; + case kHaierAcYrw02Dry: + result += " (Dry)"; + break; + case kHaierAcYrw02Fan: + result += " (Fan)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", Fan: " + uint64ToString(getFan()); + switch (getFan()) { + case kHaierAcYrw02FanAuto: + result += " (Auto)"; + break; + case kHaierAcYrw02FanHigh: + result += " (High)"; + break; + case kHaierAcYrw02FanLow: + result += " (Low)"; + break; + case kHaierAcYrw02FanMed: + result += " (Med)"; + break; + default: + result += " (Unknown)"; + } + result += ", Turbo: " + uint64ToString(getTurbo()) + " ("; + switch (getTurbo()) { + case kHaierAcYrw02TurboOff: + result += "Off"; + break; + case kHaierAcYrw02TurboLow: + result += "Low"; + break; + case kHaierAcYrw02TurboHigh: + result += "High"; + break; + default: + result += "Unknown"; + } + result += ")"; + result += ", Swing: " + uint64ToString(getSwing()) + " ("; + switch (getSwing()) { + case kHaierAcYrw02SwingOff: + result += "Off"; + break; + case kHaierAcYrw02SwingAuto: + result += "Auto"; + break; + case kHaierAcYrw02SwingBottom: + result += "Bottom"; + break; + case kHaierAcYrw02SwingDown: + result += "Down"; + break; + case kHaierAcYrw02SwingTop: + result += "Top"; + break; + case kHaierAcYrw02SwingMiddle: + result += "Middle"; + break; + default: + result += "Unknown"; + } + result += ")"; + result += ", Sleep: "; + if (getSleep()) + result += "On"; + else + result += "Off"; + result += ", Health: "; + if (getHealth()) + result += "On"; + else + result += "Off"; + + return result; +} +// End of IRHaierACYRW02 class. + +#if (DECODE_HAIER_AC || DECODE_HAIER_AC_YRW02) +// Decode the supplied Haier HSU07-HEA03 remote message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kHaierACBits. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA / Appears to be working. +// +bool IRrecv::decodeHaierAC(decode_results* results, uint16_t nbits, + bool strict) { + if (nbits % 8 != 0) // nbits has to be a multiple of nr. of bits in a byte. + return false; + + if (strict) { + if (nbits != kHaierACBits) + return false; // Not strictly a HAIER_AC message. + } + + if (results->rawlen < (2 * nbits + kHeader) + kFooter - 1) + return false; // Can't possibly be a valid HAIER_AC message. + + uint16_t offset = kStartOffset; + + // Header + if (!matchMark(results->rawbuf[offset++], kHaierAcHdr)) return false; + if (!matchSpace(results->rawbuf[offset++], kHaierAcHdr)) return false; + if (!matchMark(results->rawbuf[offset++], kHaierAcHdr)) return false; + if (!matchSpace(results->rawbuf[offset++], kHaierAcHdrGap)) return false; + + // Data + for (uint16_t i = 0; i < nbits / 8; i++) { + match_result_t data_result = + matchData(&(results->rawbuf[offset]), 8, kHaierAcBitMark, + kHaierAcOneSpace, kHaierAcBitMark, kHaierAcZeroSpace); + if (data_result.success == false) return false; + offset += data_result.used; + results->state[i] = (uint8_t)data_result.data; + } + + // Footer + if (!matchMark(results->rawbuf[offset++], kHaierAcBitMark)) return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset++], kHaierAcMinGap)) + return false; + + // Compliance + if (strict) { + if (results->state[0] != kHaierAcPrefix) return false; + if (!IRHaierAC::validChecksum(results->state, nbits / 8)) return false; + } + + // Success + results->decode_type = HAIER_AC; + results->bits = nbits; + return true; +} +#endif // (DECODE_HAIER_AC || DECODE_HAIER_AC_YRW02) + +#if DECODE_HAIER_AC_YRW02 +// Decode the supplied Haier YR-W02 remote A/C message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kHaierACYRW02Bits. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA / Appears to be working. +// +bool IRrecv::decodeHaierACYRW02(decode_results* results, uint16_t nbits, + bool strict) { + if (strict) { + if (nbits != kHaierACYRW02Bits) + return false; // Not strictly a HAIER_AC_YRW02 message. + } + + // The protocol is almost exactly the same as HAIER_AC + if (!decodeHaierAC(results, nbits, false)) return false; + + // Compliance + if (strict) { + if (results->state[0] != kHaierAcYrw02Prefix) return false; + if (!IRHaierACYRW02::validChecksum(results->state, nbits / 8)) return false; + } + + // Success + // It looks correct, but we haven't check the checksum etc. + results->decode_type = HAIER_AC_YRW02; + return true; +} +#endif // DECODE_HAIER_AC_YRW02 diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Haier.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Haier.h new file mode 100644 index 000000000..fdc15a3a8 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Haier.h @@ -0,0 +1,297 @@ +// Copyright 2018 crankyoldgit +// The specifics of reverse engineering the protocol details by kuzin2006 + +#ifndef IR_HAIER_H_ +#define IR_HAIER_H_ + +#ifndef UNIT_TEST +#include +#else +#include +#endif +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// HH HH AAA IIIII EEEEEEE RRRRRR +// HH HH AAAAA III EE RR RR +// HHHHHHH AA AA III EEEEE RRRRRR +// HH HH AAAAAAA III EE RR RR +// HH HH AA AA IIIII EEEEEEE RR RR + +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/404 +// https://www.dropbox.com/s/mecyib3lhdxc8c6/IR%20data%20reverse%20engineering.xlsx?dl=0 +// https://github.com/markszabo/IRremoteESP8266/issues/485 +// https://www.dropbox.com/sh/w0bt7egp0fjger5/AADRFV6Wg4wZskJVdFvzb8Z0a?dl=0&preview=haer2.ods + +// Constants + +// Haier HSU07-HEA03 remote +// Byte 0 +const uint8_t kHaierAcPrefix = 0b10100101; + +// Byte 1 +const uint8_t kHaierAcMinTemp = 16; +const uint8_t kHaierAcDefTemp = 25; +const uint8_t kHaierAcMaxTemp = 30; +const uint8_t kHaierAcCmdOff = 0b00000000; +const uint8_t kHaierAcCmdOn = 0b00000001; +const uint8_t kHaierAcCmdMode = 0b00000010; +const uint8_t kHaierAcCmdFan = 0b00000011; +const uint8_t kHaierAcCmdTempUp = 0b00000110; +const uint8_t kHaierAcCmdTempDown = 0b00000111; +const uint8_t kHaierAcCmdSleep = 0b00001000; +const uint8_t kHaierAcCmdTimerSet = 0b00001001; +const uint8_t kHaierAcCmdTimerCancel = 0b00001010; +const uint8_t kHaierAcCmdHealth = 0b00001100; +const uint8_t kHaierAcCmdSwing = 0b00001101; + +// Byte 2 +const uint8_t kHaierAcSwingOff = 0b00000000; +const uint8_t kHaierAcSwingUp = 0b00000001; +const uint8_t kHaierAcSwingDown = 0b00000010; +const uint8_t kHaierAcSwingChg = 0b00000011; + +// Byte 6 +const uint8_t kHaierAcAuto = 0; +const uint8_t kHaierAcCool = 1; +const uint8_t kHaierAcDry = 2; +const uint8_t kHaierAcHeat = 3; +const uint8_t kHaierAcFan = 4; + +const uint8_t kHaierAcFanAuto = 0; +const uint8_t kHaierAcFanLow = 1; +const uint8_t kHaierAcFanMed = 2; +const uint8_t kHaierAcFanHigh = 3; + +const uint16_t kHaierAcMaxTime = (23 * 60) + 59; + +// Legacy Haier AC defines. +#define HAIER_AC_MIN_TEMP kHaierAcMinTemp +#define HAIER_AC_DEF_TEMP kHaierAcDefTemp +#define HAIER_AC_MAX_TEMP kHaierAcMaxTemp +#define HAIER_AC_CMD_OFF kHaierAcCmdOff +#define HAIER_AC_CMD_ON kHaierAcCmdOn +#define HAIER_AC_CMD_MODE kHaierAcCmdMode +#define HAIER_AC_CMD_FAN kHaierAcCmdFan +#define HAIER_AC_CMD_TEMP_UP kHaierAcCmdTempUp +#define HAIER_AC_CMD_TEMP_DOWN kHaierAcCmdTempDown +#define HAIER_AC_CMD_SLEEP kHaierAcCmdSleep +#define HAIER_AC_CMD_TIMER_SET kHaierAcCmdTimerSet +#define HAIER_AC_CMD_TIMER_CANCEL kHaierAcCmdTimerCancel +#define HAIER_AC_CMD_HEALTH kHaierAcCmdHealth +#define HAIER_AC_CMD_SWING kHaierAcCmdSwing +#define HAIER_AC_SWING_OFF kHaierAcSwingOff +#define HAIER_AC_SWING_UP kHaierAcSwingUp +#define HAIER_AC_SWING_DOWN kHaierAcSwingDown +#define HAIER_AC_SWING_CHG kHaierAcSwingChg +#define HAIER_AC_AUTO kHaierAcAuto +#define HAIER_AC_COOL kHaierAcCool +#define HAIER_AC_DRY kHaierAcDry +#define HAIER_AC_HEAT kHaierAcHeat +#define HAIER_AC_FAN kHaierAcFan +#define HAIER_AC_FAN_AUTO kHaierAcFanAuto +#define HAIER_AC_FAN_LOW kHaierAcFanLow +#define HAIER_AC_FAN_MED kHaierAcFanMed +#define HAIER_AC_FAN_HIGH kHaierAcFanHigh + +// Haier YRW02 remote +// Byte 0 +const uint8_t kHaierAcYrw02Prefix = 0xA6; + +// Byte 1 +// Bits 0-3 +// 0x0 = 16DegC, ... 0xE = 30DegC +// Bits 4-7 - Swing +const uint8_t kHaierAcYrw02SwingOff = 0x0; +const uint8_t kHaierAcYrw02SwingTop = 0x1; +const uint8_t kHaierAcYrw02SwingMiddle = 0x2; // Not available in heat mode. +const uint8_t kHaierAcYrw02SwingBottom = 0x3; // Only available in heat mode. +const uint8_t kHaierAcYrw02SwingDown = 0xA; +const uint8_t kHaierAcYrw02SwingAuto = 0xC; // Airflow + +// Byte 3 +// Bit 7 - Health mode + +// Byte 4 +const uint8_t kHaierAcYrw02Power = 0b01000000; + +// Byte 5 +// Bits 0-3 +const uint8_t kHaierAcYrw02FanHigh = 0x2; +const uint8_t kHaierAcYrw02FanMed = 0x4; +const uint8_t kHaierAcYrw02FanLow = 0x6; +const uint8_t kHaierAcYrw02FanAuto = 0xA; + +// Byte 6 +// Bits 0-1 +const uint8_t kHaierAcYrw02TurboOff = 0x0; +const uint8_t kHaierAcYrw02TurboHigh = 0x1; +const uint8_t kHaierAcYrw02TurboLow = 0x2; + +// Byte 7 +// Bits 0-3 +const uint8_t kHaierAcYrw02Auto = 0x0; +const uint8_t kHaierAcYrw02Cool = 0x2; +const uint8_t kHaierAcYrw02Dry = 0x4; +const uint8_t kHaierAcYrw02Heat = 0x8; +const uint8_t kHaierAcYrw02Fan = 0xC; + +// Byte 8 +const uint8_t kHaierAcYrw02Sleep = 0b10000000; + +// Byte 12 +// Bits 4-7 +const uint8_t kHaierAcYrw02ButtonTempUp = 0x0; +const uint8_t kHaierAcYrw02ButtonTempDown = 0x1; +const uint8_t kHaierAcYrw02ButtonSwing = 0x2; +const uint8_t kHaierAcYrw02ButtonFan = 0x4; +const uint8_t kHaierAcYrw02ButtonPower = 0x5; +const uint8_t kHaierAcYrw02ButtonMode = 0x6; +const uint8_t kHaierAcYrw02ButtonHealth = 0x7; +const uint8_t kHaierAcYrw02ButtonTurbo = 0x8; +const uint8_t kHaierAcYrw02ButtonSleep = 0xB; + +// Legacy Haier YRW02 remote defines. +#define HAIER_AC_YRW02_SWING_OFF kHaierAcYrw02SwingOff +#define HAIER_AC_YRW02_SWING_TOP kHaierAcYrw02SwingTop +#define HAIER_AC_YRW02_SWING_MIDDLE kHaierAcYrw02SwingMiddle +#define HAIER_AC_YRW02_SWING_BOTTOM kHaierAcYrw02SwingBottom +#define HAIER_AC_YRW02_SWING_DOWN kHaierAcYrw02SwingDown +#define HAIER_AC_YRW02_SWING_AUTO kHaierAcYrw02SwingAuto +#define HAIER_AC_YRW02_FAN_HIGH kHaierAcYrw02FanHigh +#define HAIER_AC_YRW02_FAN_MED kHaierAcYrw02FanMed +#define HAIER_AC_YRW02_FAN_LOW kHaierAcYrw02FanLow +#define HAIER_AC_YRW02_FAN_AUTO kHaierAcYrw02FanAuto +#define HAIER_AC_YRW02_TURBO_OFF kHaierAcYrw02TurboOff +#define HAIER_AC_YRW02_TURBO_HIGH kHaierAcYrw02TurboHigh +#define HAIER_AC_YRW02_TURBO_LOW kHaierAcYrw02TurboLow +#define HAIER_AC_YRW02_AUTO kHaierAcYrw02Auto +#define HAIER_AC_YRW02_COOL kHaierAcYrw02Cool +#define HAIER_AC_YRW02_DRY kHaierAcYrw02Dry +#define HAIER_AC_YRW02_HEAT kHaierAcYrw02Heat +#define HAIER_AC_YRW02_FAN kHaierAcYrw02Fan +#define HAIER_AC_YRW02_BUTTON_TEMP_UP kHaierAcYrw02ButtonTempUp +#define HAIER_AC_YRW02_BUTTON_TEMP_DOWN kHaierAcYrw02ButtonTempDown +#define HAIER_AC_YRW02_BUTTON_SWING kHaierAcYrw02ButtonSwing +#define HAIER_AC_YRW02_BUTTON_FAN kHaierAcYrw02ButtonFan +#define HAIER_AC_YRW02_BUTTON_POWER kHaierAcYrw02ButtonPower +#define HAIER_AC_YRW02_BUTTON_MODE kHaierAcYrw02ButtonMode +#define HAIER_AC_YRW02_BUTTON_HEALTH kHaierAcYrw02ButtonHealth +#define HAIER_AC_YRW02_BUTTON_TURBO kHaierAcYrw02ButtonTurbo +#define HAIER_AC_YRW02_BUTTON_SLEEP kHaierAcYrw02ButtonSleep + +class IRHaierAC { + public: + explicit IRHaierAC(uint16_t pin); + +#if SEND_HAIER_AC + void send(); +#endif // SEND_HAIER_AC + void begin(); + + void setCommand(const uint8_t command); + uint8_t getCommand(); + + void setTemp(const uint8_t temp); + uint8_t getTemp(); + + void setFan(const uint8_t speed); + uint8_t getFan(); + + uint8_t getMode(); + void setMode(const uint8_t mode); + + bool getSleep(); + void setSleep(const bool state); + bool getHealth(); + void setHealth(const bool state); + + int16_t getOnTimer(); + void setOnTimer(const uint16_t mins); + int16_t getOffTimer(); + void setOffTimer(const uint16_t mins); + void cancelTimers(); + + uint16_t getCurrTime(); + void setCurrTime(const uint16_t mins); + + uint8_t getSwing(); + void setSwing(const uint8_t state); + + uint8_t* getRaw(); + void setRaw(uint8_t new_code[]); + static bool validChecksum(uint8_t state[], + const uint16_t length = kHaierACStateLength); +#ifdef ARDUINO + String toString(); + static String timeToString(const uint16_t nr_mins); +#else + std::string toString(); + static std::string timeToString(const uint16_t nr_mins); +#endif + + private: + uint8_t remote_state[kHaierACStateLength]; + void stateReset(); + void checksum(); + static uint16_t getTime(const uint8_t ptr[]); + static void setTime(uint8_t ptr[], const uint16_t nr_mins); + IRsend _irsend; +}; + +class IRHaierACYRW02 { + public: + explicit IRHaierACYRW02(uint16_t pin); + +#if SEND_HAIER_AC_YRW02 + void send(); +#endif // SEND_HAIER_AC_YRW02 + void begin(); + + void setButton(const uint8_t button); + uint8_t getButton(); + + void setTemp(const uint8_t temp); + uint8_t getTemp(); + + void setFan(const uint8_t speed); + uint8_t getFan(); + + uint8_t getMode(); + void setMode(const uint8_t mode); + + bool getPower(); + void setPower(const bool state); + void on(); + void off(); + + bool getSleep(); + void setSleep(const bool state); + bool getHealth(); + void setHealth(const bool state); + + uint8_t getTurbo(); + void setTurbo(const uint8_t speed); + + uint8_t getSwing(); + void setSwing(const uint8_t state); + + uint8_t* getRaw(); + void setRaw(uint8_t new_code[]); + static bool validChecksum(uint8_t state[], + const uint16_t length = kHaierACYRW02StateLength); +#ifdef ARDUINO + String toString(); +#else + std::string toString(); +#endif + + private: + uint8_t remote_state[kHaierACYRW02StateLength]; + void stateReset(); + void checksum(); + IRsend _irsend; +}; + +#endif // IR_HAIER_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Hitachi.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Hitachi.cpp new file mode 100644 index 000000000..111051974 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Hitachi.cpp @@ -0,0 +1,424 @@ +// Copyright 2018 David Conran +// +// Code to emulate Hitachi protocol compatible devices. +// Should be compatible with: +// * Hitachi RAS-35THA6 remote +// + +#include "ir_Hitachi.h" +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRremoteESP8266.h" +#include "IRsend.h" +#include "IRutils.h" + +// HH HH IIIII TTTTTTT AAA CCCCC HH HH IIIII +// HH HH III TTT AAAAA CC C HH HH III +// HHHHHHH III TTT AA AA CC HHHHHHH III +// HH HH III TTT AAAAAAA CC C HH HH III +// HH HH IIIII TTT AA AA CCCCC HH HH IIIII + +// Constants +// Ref: https://github.com/markszabo/IRremoteESP8266/issues/417 +const uint16_t kHitachiAcHdrMark = 3300; +const uint16_t kHitachiAcHdrSpace = 1700; +const uint16_t kHitachiAc1HdrMark = 3400; +const uint16_t kHitachiAc1HdrSpace = 3400; +const uint16_t kHitachiAcBitMark = 400; +const uint16_t kHitachiAcOneSpace = 1250; +const uint16_t kHitachiAcZeroSpace = 500; +const uint32_t kHitachiAcMinGap = 100000; // Completely made up value. + +#if (SEND_HITACHI_AC || SEND_HITACHI_AC2) +// Send a Hitachi A/C message. +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. (>=kHitachiAcStateLength) +// repeat: Nr. of times the message is to be repeated. (Default = 0). +// +// Status: ALPHA / Untested. +// +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/417 +void IRsend::sendHitachiAC(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + if (nbytes < kHitachiAcStateLength) + return; // Not enough bytes to send a proper message. + sendGeneric(kHitachiAcHdrMark, kHitachiAcHdrSpace, kHitachiAcBitMark, + kHitachiAcOneSpace, kHitachiAcBitMark, kHitachiAcZeroSpace, + kHitachiAcBitMark, kHitachiAcMinGap, data, nbytes, 38, true, + repeat, 50); +} +#endif // (SEND_HITACHI_AC || SEND_HITACHI_AC2) + +#if SEND_HITACHI_AC1 +// Send a Hitachi A/C 13-byte message. +// +// For devices: +// Hitachi A/C Series VI (Circa 2007) / Remote: LT0541-HTA +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. (>=kHitachiAc1StateLength) +// repeat: Nr. of times the message is to be repeated. (Default = 0). +// +// Status: BETA / Appears to work. +// +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/453 +// Basically the same as sendHitatchiAC() except different size and header. +void IRsend::sendHitachiAC1(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + if (nbytes < kHitachiAc1StateLength) + return; // Not enough bytes to send a proper message. + sendGeneric(kHitachiAc1HdrMark, kHitachiAc1HdrSpace, kHitachiAcBitMark, + kHitachiAcOneSpace, kHitachiAcBitMark, kHitachiAcZeroSpace, + kHitachiAcBitMark, kHitachiAcMinGap, data, nbytes, 38, true, + repeat, 50); +} +#endif // SEND_HITACHI_AC1 + +#if SEND_HITACHI_AC2 +// Send a Hitachi A/C 53-byte message. +// +// For devices: +// Hitachi A/C Series VI (Circa 2007) / Remote: LT0541-HTA +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. (>=kHitachiAc2StateLength) +// repeat: Nr. of times the message is to be repeated. (Default = 0). +// +// Status: BETA / Appears to work. +// +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/417 +// Basically the same as sendHitatchiAC() except different size. +void IRsend::sendHitachiAC2(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + if (nbytes < kHitachiAc2StateLength) + return; // Not enough bytes to send a proper message. + sendHitachiAC(data, nbytes, repeat); +} +#endif // SEND_HITACHI_AC2 + +// Class for handling the remote control oh a Hitachi 28 byte A/C message. +// Inspired by: +// https://github.com/ToniA/arduino-heatpumpir/blob/master/HitachiHeatpumpIR.cpp + +IRHitachiAc::IRHitachiAc(uint16_t pin) : _irsend(pin) { stateReset(); } + +void IRHitachiAc::stateReset() { + remote_state[0] = 0x80; + remote_state[1] = 0x08; + remote_state[2] = 0x0C; + remote_state[3] = 0x02; + remote_state[4] = 0xFD; + remote_state[5] = 0x80; + remote_state[6] = 0x7F; + remote_state[7] = 0x88; + remote_state[8] = 0x48; + remote_state[9] = 0x10; + for (uint8_t i = 10; i < kHitachiAcStateLength; i++) remote_state[i] = 0x00; + remote_state[14] = 0x60; + remote_state[15] = 0x60; + remote_state[24] = 0x80; + setTemp(23); +} + +void IRHitachiAc::begin() { _irsend.begin(); } + +uint8_t IRHitachiAc::calcChecksum(const uint8_t state[], + const uint16_t length) { + int8_t sum = 62; + for (uint16_t i = 0; i < length - 1; i++) sum -= reverseBits(state[i], 8); + return reverseBits((uint8_t)sum, 8); +} + +void IRHitachiAc::checksum(const uint16_t length) { + remote_state[length - 1] = calcChecksum(remote_state, length); +} + +bool IRHitachiAc::validChecksum(const uint8_t state[], const uint16_t length) { + if (length < 2) return true; // Assume true for lengths that are too short. + return (state[length - 1] == calcChecksum(state, length)); +} + +uint8_t *IRHitachiAc::getRaw() { + checksum(); + return remote_state; +} + +void IRHitachiAc::setRaw(const uint8_t new_code[], const uint16_t length) { + for (uint8_t i = 0; i < length && i < kHitachiAcStateLength; i++) + remote_state[i] = new_code[i]; +} + +#if SEND_HITACHI_AC +void IRHitachiAc::send() { + checksum(); + _irsend.sendHitachiAC(remote_state); +} +#endif // SEND_HITACHI_AC + +bool IRHitachiAc::getPower() { return (remote_state[17] & 0x01); } + +void IRHitachiAc::setPower(const bool on) { + if (on) + remote_state[17] |= 0x01; + else + remote_state[17] &= 0xFE; +} + +void IRHitachiAc::on() { setPower(true); } + +void IRHitachiAc::off() { setPower(false); } + +uint8_t IRHitachiAc::getMode() { return reverseBits(remote_state[10], 8); } + +void IRHitachiAc::setMode(const uint8_t mode) { + uint8_t newmode = mode; + switch (mode) { + case kHitachiAcFan: + // Fan mode sets a special temp. + setTemp(64); + break; + case kHitachiAcAuto: + case kHitachiAcHeat: + case kHitachiAcCool: + case kHitachiAcDry: + break; + default: + newmode = kHitachiAcAuto; + } + remote_state[10] = reverseBits(newmode, 8); + if (mode != kHitachiAcFan) setTemp(_previoustemp); + setFan(getFan()); // Reset the fan speed after the mode change. +} + +uint8_t IRHitachiAc::getTemp() { return reverseBits(remote_state[11], 8) >> 1; } + +void IRHitachiAc::setTemp(const uint8_t celsius) { + uint8_t temp; + if (celsius != 64) _previoustemp = celsius; + switch (celsius) { + case 64: + temp = celsius; + break; + default: + temp = std::min(celsius, kHitachiAcMaxTemp); + temp = std::max(temp, kHitachiAcMinTemp); + } + remote_state[11] = reverseBits(temp << 1, 8); + if (temp == kHitachiAcMinTemp) + remote_state[9] = 0x90; + else + remote_state[9] = 0x10; +} + +uint8_t IRHitachiAc::getFan() { return reverseBits(remote_state[13], 8); } + +void IRHitachiAc::setFan(const uint8_t speed) { + uint8_t fanmin = kHitachiAcFanAuto; + uint8_t fanmax = kHitachiAcFanHigh; + switch (getMode()) { + case kHitachiAcDry: // Only 2 x low speeds in Dry mode. + fanmin = kHitachiAcFanLow; + fanmax = kHitachiAcFanLow + 1; + break; + case kHitachiAcFan: + fanmin = kHitachiAcFanLow; // No Auto in Fan mode. + break; + } + uint8_t newspeed = std::max(speed, fanmin); + newspeed = std::min(newspeed, fanmax); + remote_state[13] = reverseBits(newspeed, 8); +} + +bool IRHitachiAc::getSwingVertical() { return remote_state[14] & 0x80; } + +void IRHitachiAc::setSwingVertical(const bool on) { + if (on) + remote_state[14] |= 0x80; + else + remote_state[14] &= 0x7F; +} + +bool IRHitachiAc::getSwingHorizontal() { return remote_state[15] & 0x80; } + +void IRHitachiAc::setSwingHorizontal(const bool on) { + if (on) + remote_state[15] |= 0x80; + else + remote_state[15] &= 0x7F; +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRHitachiAc::toString() { + String result = ""; +#else +std::string IRHitachiAc::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Power: "; + if (getPower()) + result += "On"; + else + result += "Off"; + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kHitachiAcAuto: + result += " (AUTO)"; + break; + case kHitachiAcCool: + result += " (COOL)"; + break; + case kHitachiAcHeat: + result += " (HEAT)"; + break; + case kHitachiAcDry: + result += " (DRY)"; + break; + case kHitachiAcFan: + result += " (FAN)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", Fan: " + uint64ToString(getFan()); + switch (getFan()) { + case kHitachiAcFanAuto: + result += " (AUTO)"; + break; + case kHitachiAcFanLow: + result += " (LOW)"; + break; + case kHitachiAcFanHigh: + result += " (HIGH)"; + break; + default: + result += " (UNKNOWN)"; + break; + } + result += ", Swing (Vertical): "; + if (getSwingVertical()) + result += "On"; + else + result += "Off"; + result += ", Swing (Horizontal): "; + if (getSwingHorizontal()) + result += "On"; + else + result += "Off"; + return result; +} + +#if (DECODE_HITACHI_AC || DECODE_HITACHI_AC1 || DECODE_HITACHI_AC2) +// Decode the supplied Hitachi A/C message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. +// Typically kHitachiAcBits, kHitachiAc1Bits, kHitachiAc2Bits +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: ALPHA / Untested. +// +// Supported devices: +// Hitachi A/C Series VI (Circa 2007) / Remote: LT0541-HTA +// +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/417 +// https://github.com/markszabo/IRremoteESP8266/issues/453 +bool IRrecv::decodeHitachiAC(decode_results *results, uint16_t nbits, + bool strict) { + const uint8_t kTolerance = 30; + if (results->rawlen < 2 * nbits + kHeader + kFooter - 1) + return false; // Can't possibly be a valid HitachiAC message. + if (strict) { + switch (nbits) { + case kHitachiAcBits: + case kHitachiAc1Bits: + case kHitachiAc2Bits: + break; // Okay to continue. + default: + return false; // Not strictly a Hitachi message. + } + } + uint16_t offset = kStartOffset; + uint16_t dataBitsSoFar = 0; + match_result_t data_result; + + // Header + if (nbits == kHitachiAc1Bits) { + if (!matchMark(results->rawbuf[offset++], kHitachiAc1HdrMark, kTolerance)) + return false; + if (!matchSpace(results->rawbuf[offset++], kHitachiAc1HdrSpace, kTolerance)) + return false; + } else { // Everything else. + if (!matchMark(results->rawbuf[offset++], kHitachiAcHdrMark, kTolerance)) + return false; + if (!matchSpace(results->rawbuf[offset++], kHitachiAcHdrSpace, kTolerance)) + return false; + } + // Data + // Keep reading bytes until we either run out of message or state to fill. + for (uint16_t i = 0; offset <= results->rawlen - 16 && i < nbits / 8; + i++, dataBitsSoFar += 8, offset += data_result.used) { + data_result = matchData(&(results->rawbuf[offset]), 8, kHitachiAcBitMark, + kHitachiAcOneSpace, kHitachiAcBitMark, + kHitachiAcZeroSpace, kTolerance); + if (data_result.success == false) break; // Fail + results->state[i] = (uint8_t)data_result.data; + } + + // Footer + if (!matchMark(results->rawbuf[offset++], kHitachiAcBitMark, kTolerance)) + return false; + if (offset <= results->rawlen && + !matchAtLeast(results->rawbuf[offset], kHitachiAcMinGap, kTolerance)) + return false; + + // Compliance + if (strict) { + // Re-check we got the correct size/length due to the way we read the data. + switch (dataBitsSoFar / 8) { + case kHitachiAcStateLength: + case kHitachiAc1StateLength: + case kHitachiAc2StateLength: + break; // Continue + default: + return false; + } + if (dataBitsSoFar / 8 == kHitachiAcStateLength && + !IRHitachiAc::validChecksum(results->state, kHitachiAcStateLength)) + return false; + } + + // Success + switch (dataBitsSoFar) { + case kHitachiAc1Bits: + results->decode_type = HITACHI_AC1; + break; + case kHitachiAc2Bits: + results->decode_type = HITACHI_AC2; + break; + case kHitachiAcBits: + default: + results->decode_type = HITACHI_AC; + } + results->bits = dataBitsSoFar; + // No need to record the state as we stored it as we decoded it. + // As we use result->state, we don't record value, address, or command as it + // is a union data type. + return true; +} +#endif // (DECODE_HITACHI_AC || DECODE_HITACHI_AC1 || DECODE_HITACHI_AC2) diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Hitachi.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Hitachi.h new file mode 100644 index 000000000..eddab59e4 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Hitachi.h @@ -0,0 +1,76 @@ +// Hitachi A/C +// +// Copyright 2018 David Conran + +#ifndef IR_HITACHI_H_ +#define IR_HITACHI_H_ + +#define __STDC_LIMIT_MACROS +#include +#ifndef UNIT_TEST +#include +#else +#include +#endif +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// Constants +const uint8_t kHitachiAcAuto = 2; +const uint8_t kHitachiAcHeat = 3; +const uint8_t kHitachiAcCool = 4; +const uint8_t kHitachiAcDry = 5; +const uint8_t kHitachiAcFan = 0xC; +const uint8_t kHitachiAcFanAuto = 1; +const uint8_t kHitachiAcFanLow = 2; +const uint8_t kHitachiAcFanHigh = 5; +const uint8_t kHitachiAcMinTemp = 16; // 16C +const uint8_t kHitachiAcMaxTemp = 32; // 32C +const uint8_t kHitachiAcAutoTemp = 23; // 23C + +// Classes +class IRHitachiAc { + public: + explicit IRHitachiAc(uint16_t pin); + + void stateReset(); +#if SEND_HITACHI_AC + void send(); +#endif // SEND_HITACHI_AC + void begin(); + void on(); + void off(); + void setPower(const bool on); + bool getPower(); + void setTemp(const uint8_t temp); + uint8_t getTemp(); + void setFan(const uint8_t speed); + uint8_t getFan(); + void setMode(const uint8_t mode); + uint8_t getMode(); + void setSwingVertical(const bool on); + bool getSwingVertical(); + void setSwingHorizontal(const bool on); + bool getSwingHorizontal(); + uint8_t* getRaw(); + void setRaw(const uint8_t new_code[], + const uint16_t length = kHitachiAcStateLength); + static bool validChecksum(const uint8_t state[], + const uint16_t length = kHitachiAcStateLength); + static uint8_t calcChecksum(const uint8_t state[], + const uint16_t length = kHitachiAcStateLength); +#ifdef ARDUINO + String toString(); +#else + std::string toString(); +#endif + + private: + // The state of the IR remote in IR code form. + uint8_t remote_state[kHitachiAcStateLength]; + void checksum(const uint16_t length = kHitachiAcStateLength); + IRsend _irsend; + uint8_t _previoustemp; +}; + +#endif // IR_HITACHI_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_JVC.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_JVC.cpp similarity index 57% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_JVC.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_JVC.cpp index 194e39250..47df29dc4 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_JVC.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_JVC.cpp @@ -19,31 +19,31 @@ // Constants // Ref: // http://www.sbprojects.com/knowledge/ir/jvc.php -#define JVC_TICK 75U -#define JVC_HDR_MARK_TICKS 112U -#define JVC_HDR_MARK (JVC_HDR_MARK_TICKS * JVC_TICK) -#define JVC_HDR_SPACE_TICKS 56U -#define JVC_HDR_SPACE (JVC_HDR_SPACE_TICKS * JVC_TICK) -#define JVC_BIT_MARK_TICKS 7U -#define JVC_BIT_MARK (JVC_BIT_MARK_TICKS * JVC_TICK) -#define JVC_ONE_SPACE_TICKS 23U -#define JVC_ONE_SPACE (JVC_ONE_SPACE_TICKS * JVC_TICK) -#define JVC_ZERO_SPACE_TICKS 7U -#define JVC_ZERO_SPACE (JVC_ZERO_SPACE_TICKS * JVC_TICK) -#define JVC_RPT_LENGTH_TICKS 800U -#define JVC_RPT_LENGTH (JVC_RPT_LENGTH_TICKS * JVC_TICK) -#define JVC_MIN_GAP_TICKS (JVC_RPT_LENGTH_TICKS - \ - (JVC_HDR_MARK_TICKS + JVC_HDR_SPACE_TICKS + \ - JVC_BITS * (JVC_BIT_MARK_TICKS + JVC_ONE_SPACE_TICKS) + \ - JVC_BIT_MARK_TICKS)) -#define JVC_MIN_GAP (JVC_MIN_GAP_TICKS * JVC_TICK) +const uint16_t kJvcTick = 75; +const uint16_t kJvcHdrMarkTicks = 112; +const uint16_t kJvcHdrMark = kJvcHdrMarkTicks * kJvcTick; +const uint16_t kJvcHdrSpaceTicks = 56; +const uint16_t kJvcHdrSpace = kJvcHdrSpaceTicks * kJvcTick; +const uint16_t kJvcBitMarkTicks = 7; +const uint16_t kJvcBitMark = kJvcBitMarkTicks * kJvcTick; +const uint16_t kJvcOneSpaceTicks = 23; +const uint16_t kJvcOneSpace = kJvcOneSpaceTicks * kJvcTick; +const uint16_t kJvcZeroSpaceTicks = 7; +const uint16_t kJvcZeroSpace = kJvcZeroSpaceTicks * kJvcTick; +const uint16_t kJvcRptLengthTicks = 800; +const uint16_t kJvcRptLength = kJvcRptLengthTicks * kJvcTick; +const uint16_t kJvcMinGapTicks = + kJvcRptLengthTicks - + (kJvcHdrMarkTicks + kJvcHdrSpaceTicks + + kJvcBits * (kJvcBitMarkTicks + kJvcOneSpaceTicks) + kJvcBitMarkTicks); +const uint16_t kJvcMinGap = kJvcMinGapTicks * kJvcTick; #if SEND_JVC // Send a JVC message. // // Args: // data: The contents of the command you want to send. -// nbits: The bit size of the command being sent. (JVC_BITS) +// nbits: The bit size of the command being sent. (kJvcBits) // repeat: The number of times you want the command to be repeated. // // Status: STABLE. @@ -57,18 +57,21 @@ void IRsend::sendJVC(uint64_t data, uint16_t nbits, uint16_t repeat) { IRtimer usecs = IRtimer(); // Header // Only sent for the first message. - mark(JVC_HDR_MARK); - space(JVC_HDR_SPACE); + mark(kJvcHdrMark); + space(kJvcHdrSpace); // We always send the data & footer at least once, hence '<= repeat'. for (uint16_t i = 0; i <= repeat; i++) { - // Data - sendData(JVC_BIT_MARK, JVC_ONE_SPACE, JVC_BIT_MARK, JVC_ZERO_SPACE, - data, nbits, true); - // Footer - mark(JVC_BIT_MARK); + sendGeneric(0, 0, // No Header + kJvcBitMark, kJvcOneSpace, kJvcBitMark, kJvcZeroSpace, + kJvcBitMark, kJvcMinGap, data, nbits, 38, true, + 0, // Repeats are handles elsewhere. + 33); // Wait till the end of the repeat time window before we send another code. - space(std::max(JVC_MIN_GAP, JVC_RPT_LENGTH - usecs.elapsed())); + uint32_t elapsed = usecs.elapsed(); + // Avoid potential unsigned integer underflow. + // e.g. when elapsed > kJvcRptLength. + if (elapsed < kJvcRptLength) space(kJvcRptLength - elapsed); usecs.reset(); } } @@ -95,7 +98,7 @@ uint16_t IRsend::encodeJVC(uint8_t address, uint8_t command) { // // Args: // results: Ptr to the data to decode and where to store the decode result. -// nbits: Nr. of bits of data to expect. Typically JVC_BITS. +// nbits: Nr. of bits of data to expect. Typically kJvcBits. // strict: Flag indicating if we should perform strict matching. // Returns: // boolean: True if it can decode it, false if it can't. @@ -106,50 +109,48 @@ uint16_t IRsend::encodeJVC(uint8_t address, uint8_t command) { // JVC repeat codes don't have a header. // Ref: // http://www.sbprojects.com/knowledge/ir/jvc.php -bool IRrecv::decodeJVC(decode_results *results, uint16_t nbits, bool strict) { - if (strict && nbits != JVC_BITS) +bool IRrecv::decodeJVC(decode_results *results, uint16_t nbits, bool strict) { + if (strict && nbits != kJvcBits) return false; // Must be called with the correct nr. of bits. - if (results->rawlen < 2 * nbits + FOOTER - 1) + if (results->rawlen < 2 * nbits + kFooter - 1) return false; // Can't possibly be a valid JVC message. uint64_t data = 0; - uint16_t offset = OFFSET_START; + uint16_t offset = kStartOffset; bool isRepeat = true; uint32_t m_tick; uint32_t s_tick; // Header // (Optional as repeat codes don't have the header) - if (matchMark(results->rawbuf[offset], JVC_HDR_MARK)) { + if (matchMark(results->rawbuf[offset], kJvcHdrMark)) { isRepeat = false; - m_tick = results->rawbuf[offset++] * RAWTICK / JVC_HDR_MARK_TICKS; + m_tick = results->rawbuf[offset++] * kRawTick / kJvcHdrMarkTicks; if (results->rawlen < 2 * nbits + 4) return false; // Can't possibly be a valid JVC message with a header. - if (!matchSpace(results->rawbuf[offset], JVC_HDR_SPACE)) - return false; - s_tick = results->rawbuf[offset++] * RAWTICK / JVC_HDR_SPACE_TICKS; + if (!matchSpace(results->rawbuf[offset], kJvcHdrSpace)) return false; + s_tick = results->rawbuf[offset++] * kRawTick / kJvcHdrSpaceTicks; } else { // We can't easily auto-calibrate as there is no header, so assume // the default tick time. - m_tick = JVC_TICK; - s_tick = JVC_TICK; + m_tick = kJvcTick; + s_tick = kJvcTick; } // Data - match_result_t data_result = matchData(&(results->rawbuf[offset]), nbits, - JVC_BIT_MARK_TICKS * m_tick, - JVC_ONE_SPACE_TICKS * s_tick, - JVC_BIT_MARK_TICKS * m_tick, - JVC_ZERO_SPACE_TICKS * s_tick); + match_result_t data_result = + matchData(&(results->rawbuf[offset]), nbits, kJvcBitMarkTicks * m_tick, + kJvcOneSpaceTicks * s_tick, kJvcBitMarkTicks * m_tick, + kJvcZeroSpaceTicks * s_tick); if (data_result.success == false) return false; data = data_result.data; offset += data_result.used; // Footer - if (!matchMark(results->rawbuf[offset++], JVC_BIT_MARK_TICKS * m_tick)) + if (!matchMark(results->rawbuf[offset++], kJvcBitMarkTicks * m_tick)) return false; if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], JVC_MIN_GAP_TICKS * s_tick)) + !matchAtLeast(results->rawbuf[offset], kJvcMinGapTicks * s_tick)) return false; // Success @@ -157,7 +158,7 @@ bool IRrecv::decodeJVC(decode_results *results, uint16_t nbits, bool strict) { results->bits = nbits; results->value = data; // command & address are transmitted LSB first, so we need to reverse them. - results->address = reverseBits(data >> 8, 8); // The first 8 bits sent. + results->address = reverseBits(data >> 8, 8); // The first 8 bits sent. results->command = reverseBits(data & 0xFF, 8); // The last 8 bits sent. results->repeat = isRepeat; return true; diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Kelvinator.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Kelvinator.cpp new file mode 100644 index 000000000..ddf61b097 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Kelvinator.cpp @@ -0,0 +1,550 @@ +// Copyright 2016 David Conran +// +// Code to emulate IR Kelvinator YALIF remote control unit, which should control +// at least the following Kelvinator A/C units: +// KSV26CRC, KSV26HRC, KSV35CRC, KSV35HRC, KSV53HRC, KSV62HRC, KSV70CRC, +// KSV70HRC, KSV80HRC. +// +// Note: +// * Unsupported: +// - All Sleep modes. +// - All Timer modes. +// - "I Feel" button & mode. +// - Energy Saving mode. +// - Low Heat mode. +// - Fahrenheit. + +#include "ir_Kelvinator.h" +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// KK KK EEEEEEE LL VV VV IIIII NN NN AAA TTTTTTT OOOOO RRRRRR +// KK KK EE LL VV VV III NNN NN AAAAA TTT OO OO RR RR +// KKKK EEEEE LL VV VV III NN N NN AA AA TTT OO OO RRRRRR +// KK KK EE LL VV VV III NN NNN AAAAAAA TTT OO OO RR RR +// KK KK EEEEEEE LLLLLLL VVV IIIII NN NN AA AA TTT OOOO0 RR RR + +// Constants + +const uint16_t kKelvinatorTick = 85; +const uint16_t kKelvinatorHdrMarkTicks = 106; +const uint16_t kKelvinatorHdrMark = kKelvinatorHdrMarkTicks * kKelvinatorTick; +const uint16_t kKelvinatorHdrSpaceTicks = 53; +const uint16_t kKelvinatorHdrSpace = kKelvinatorHdrSpaceTicks * kKelvinatorTick; +const uint16_t kKelvinatorBitMarkTicks = 8; +const uint16_t kKelvinatorBitMark = kKelvinatorBitMarkTicks * kKelvinatorTick; +const uint16_t kKelvinatorOneSpaceTicks = 18; +const uint16_t kKelvinatorOneSpace = kKelvinatorOneSpaceTicks * kKelvinatorTick; +const uint16_t kKelvinatorZeroSpaceTicks = 6; +const uint16_t kKelvinatorZeroSpace = + kKelvinatorZeroSpaceTicks * kKelvinatorTick; +const uint16_t kKelvinatorGapSpaceTicks = 235; +const uint16_t kKelvinatorGapSpace = kKelvinatorGapSpaceTicks * kKelvinatorTick; + +const uint8_t kKelvinatorCmdFooter = 2; +const uint8_t kKelvinatorCmdFooterBits = 3; + +const uint8_t kKelvinatorPower = 8; +const uint8_t kKelvinatorModeMask = 0xF8; +const uint8_t kKelvinatorFanOffset = 4; +const uint8_t kKelvinatorBasicFanMask = 0xFF ^ (3U << kKelvinatorFanOffset); +const uint8_t kKelvinatorFanMask = 0xFF ^ (7U << kKelvinatorFanOffset); +const uint8_t kKelvinatorChecksumStart = 10; +const uint8_t kKelvinatorVentSwingOffset = 6; +const uint8_t kKelvinatorVentSwing = 1 << kKelvinatorVentSwingOffset; +const uint8_t kKelvinatorVentSwingV = 1; +const uint8_t kKelvinatorVentSwingH = 1 << 4; +const uint8_t kKelvinatorSleep1And3 = 1 << 7; +const uint8_t kKelvinatorQuietOffset = 7; +const uint8_t kKelvinatorQuiet = 1 << kKelvinatorQuietOffset; +const uint8_t kKelvinatorIonFilterOffset = 6; +const uint8_t kKelvinatorIonFilter = 1 << kKelvinatorIonFilterOffset; +const uint8_t kKelvinatorLightOffset = 5; +const uint8_t kKelvinatorLight = 1 << kKelvinatorLightOffset; +const uint8_t kKelvinatorXfanOffset = 7; +const uint8_t kKelvinatorXfan = 1 << kKelvinatorXfanOffset; +const uint8_t kKelvinatorTurboOffset = 4; +const uint8_t kKelvinatorTurbo = 1 << kKelvinatorTurboOffset; + +#if SEND_KELVINATOR +// Send a Kelvinator A/C message. +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. (>=kKelvinatorStateLength) +// repeat: Nr. of times the message is to be repeated. (Default = 0). +// +// Status: STABLE / Known working. +// +void IRsend::sendKelvinator(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + if (nbytes < kKelvinatorStateLength) + return; // Not enough bytes to send a proper message. + + for (uint16_t r = 0; r <= repeat; r++) { + // Command Block #1 (4 bytes) + sendGeneric(kKelvinatorHdrMark, kKelvinatorHdrSpace, kKelvinatorBitMark, + kKelvinatorOneSpace, kKelvinatorBitMark, kKelvinatorZeroSpace, + 0, 0, // No Footer yet. + data, 4, 38, false, 0, 50); + // Send Footer for the command block (3 bits (b010)) + sendGeneric(0, 0, // No Header + kKelvinatorBitMark, kKelvinatorOneSpace, kKelvinatorBitMark, + kKelvinatorZeroSpace, kKelvinatorBitMark, kKelvinatorGapSpace, + kKelvinatorCmdFooter, kKelvinatorCmdFooterBits, 38, false, 0, + 50); + // Data Block #1 (4 bytes) + sendGeneric(0, 0, // No header + kKelvinatorBitMark, kKelvinatorOneSpace, kKelvinatorBitMark, + kKelvinatorZeroSpace, kKelvinatorBitMark, + kKelvinatorGapSpace * 2, data + 4, 4, 38, false, 0, 50); + // Command Block #2 (4 bytes) + sendGeneric(kKelvinatorHdrMark, kKelvinatorHdrSpace, kKelvinatorBitMark, + kKelvinatorOneSpace, kKelvinatorBitMark, kKelvinatorZeroSpace, + 0, 0, // No Footer yet. + data + 8, 4, 38, false, 0, 50); + // Send Footer for the command block (3 bits (B010)) + sendGeneric(0, 0, // No Header + kKelvinatorBitMark, kKelvinatorOneSpace, kKelvinatorBitMark, + kKelvinatorZeroSpace, kKelvinatorBitMark, kKelvinatorGapSpace, + kKelvinatorCmdFooter, kKelvinatorCmdFooterBits, 38, false, 0, + 50); + // Data Block #2 (4 bytes) + sendGeneric(0, 0, // No header + kKelvinatorBitMark, kKelvinatorOneSpace, kKelvinatorBitMark, + kKelvinatorZeroSpace, kKelvinatorBitMark, + kKelvinatorGapSpace * 2, data + 12, 4, 38, false, 0, 50); + } +} +#endif // SEND_KELVINATOR + +IRKelvinatorAC::IRKelvinatorAC(uint16_t pin) : _irsend(pin) { stateReset(); } + +void IRKelvinatorAC::stateReset() { + for (uint8_t i = 0; i < kKelvinatorStateLength; i++) remote_state[i] = 0x0; + remote_state[3] = 0x50; + remote_state[11] = 0x70; +} + +void IRKelvinatorAC::begin() { _irsend.begin(); } + +void IRKelvinatorAC::fixup() { + // X-Fan mode is only valid in COOL or DRY modes. + if (getMode() != kKelvinatorCool && getMode() != kKelvinatorDry) + setXFan(false); + checksum(); // Calculate the checksums +} + +#if SEND_KELVINATOR +void IRKelvinatorAC::send() { + fixup(); // Ensure correct settings before sending. + _irsend.sendKelvinator(remote_state); +} +#endif // SEND_KELVINATOR + +uint8_t *IRKelvinatorAC::getRaw() { + fixup(); // Ensure correct settings before sending. + return remote_state; +} + +void IRKelvinatorAC::setRaw(uint8_t new_code[]) { + for (uint8_t i = 0; i < kKelvinatorStateLength; i++) { + remote_state[i] = new_code[i]; + } +} + +uint8_t IRKelvinatorAC::calcBlockChecksum(const uint8_t *block, + const uint16_t length) { + uint8_t sum = kKelvinatorChecksumStart; + // Sum the lower half of the first 4 bytes of this block. + for (uint8_t i = 0; i < 4 && i < length - 1; i++, block++) + sum += (*block & 0x0FU); + // then sum the upper half of the next 3 bytes. + for (uint8_t i = 4; i < length - 1; i++, block++) sum += (*block >> 4); + // Trim it down to fit into the 4 bits allowed. i.e. Mod 16. + return sum & 0x0FU; +} + +// Many Bothans died to bring us this information. +void IRKelvinatorAC::checksum(const uint16_t length) { + // For each command + options block. + for (uint16_t offset = 0; offset + 7 < length; offset += 8) { + uint8_t sum = calcBlockChecksum(remote_state + offset); + remote_state[7 + offset] = (sum << 4) | (remote_state[7 + offset] & 0xFU); + } +} + +// Verify the checksum is valid for a given state. +// Args: +// state: The array to verify the checksum of. +// length: The size of the state. +// Returns: +// A boolean. +bool IRKelvinatorAC::validChecksum(const uint8_t state[], + const uint16_t length) { + for (uint16_t offset = 0; offset + 7 < length; offset += 8) { + // Top 4 bits of the last byte in the block is the block's checksum. + if (state[offset + 7] >> 4 != calcBlockChecksum(state + offset)) + return false; + } + return true; +} + +void IRKelvinatorAC::on() { + remote_state[0] |= kKelvinatorPower; + remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. +} + +void IRKelvinatorAC::off() { + remote_state[0] &= ~kKelvinatorPower; + remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. +} + +void IRKelvinatorAC::setPower(bool state) { + if (state) + on(); + else + off(); +} + +bool IRKelvinatorAC::getPower() { + return ((remote_state[0] & kKelvinatorPower) != 0); +} + +// Set the temp. in deg C +void IRKelvinatorAC::setTemp(uint8_t temp) { + temp = std::max(kKelvinatorMinTemp, temp); + temp = std::min(kKelvinatorMaxTemp, temp); + remote_state[1] = (remote_state[1] & 0xF0U) | (temp - kKelvinatorMinTemp); + remote_state[9] = remote_state[1]; // Duplicate to the 2nd command chunk. +} + +// Return the set temp. in deg C +uint8_t IRKelvinatorAC::getTemp() { + return ((remote_state[1] & 0xFU) + kKelvinatorMinTemp); +} + +// Set the speed of the fan, 0-5, 0 is auto, 1-5 is the speed +void IRKelvinatorAC::setFan(uint8_t fan) { + fan = std::min(kKelvinatorFanMax, fan); // Bounds check + + // Only change things if we need to. + if (fan != getFan()) { + // Set the basic fan values. + uint8_t fan_basic = std::min(kKelvinatorBasicFanMax, fan); + remote_state[0] = (remote_state[0] & kKelvinatorBasicFanMask) | + (fan_basic << kKelvinatorFanOffset); + remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. + // Set the advanced(?) fan value. + remote_state[14] = + (remote_state[14] & kKelvinatorFanMask) | (fan << kKelvinatorFanOffset); + setTurbo(false); // Turbo mode is turned off if we change the fan settings. + } +} + +uint8_t IRKelvinatorAC::getFan() { + return ((remote_state[14] & ~kKelvinatorFanMask) >> kKelvinatorFanOffset); +} + +uint8_t IRKelvinatorAC::getMode() { + return (remote_state[0] & ~kKelvinatorModeMask); +} + +void IRKelvinatorAC::setMode(uint8_t mode) { + // If we get an unexpected mode, default to AUTO. + if (mode > kKelvinatorHeat) mode = kKelvinatorAuto; + remote_state[0] = (remote_state[0] & kKelvinatorModeMask) | mode; + remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. + if (mode == kKelvinatorAuto || kKelvinatorDry) + // When the remote is set to Auto or Dry, it defaults to 25C and doesn't + // show it. + setTemp(kKelvinatorAutoTemp); +} + +void IRKelvinatorAC::setSwingVertical(bool state) { + if (state) { + remote_state[0] |= kKelvinatorVentSwing; + remote_state[4] |= kKelvinatorVentSwingV; + } else { + remote_state[4] &= ~kKelvinatorVentSwingV; + if (!getSwingHorizontal()) remote_state[0] &= ~kKelvinatorVentSwing; + } + remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. +} + +bool IRKelvinatorAC::getSwingVertical() { + return ((remote_state[4] & kKelvinatorVentSwingV) != 0); +} + +void IRKelvinatorAC::setSwingHorizontal(bool state) { + if (state) { + remote_state[0] |= kKelvinatorVentSwing; + remote_state[4] |= kKelvinatorVentSwingH; + } else { + remote_state[4] &= ~kKelvinatorVentSwingH; + if (!getSwingVertical()) remote_state[0] &= ~kKelvinatorVentSwing; + } + remote_state[8] = remote_state[0]; // Duplicate to the 2nd command chunk. +} + +bool IRKelvinatorAC::getSwingHorizontal() { + return ((remote_state[4] & kKelvinatorVentSwingH) != 0); +} + +void IRKelvinatorAC::setQuiet(bool state) { + remote_state[12] &= ~kKelvinatorQuiet; + remote_state[12] |= (state << kKelvinatorQuietOffset); +} + +bool IRKelvinatorAC::getQuiet() { + return ((remote_state[12] & kKelvinatorQuiet) != 0); +} + +void IRKelvinatorAC::setIonFilter(bool state) { + remote_state[2] &= ~kKelvinatorIonFilter; + remote_state[2] |= (state << kKelvinatorIonFilterOffset); + remote_state[10] = remote_state[2]; // Duplicate to the 2nd command chunk. +} + +bool IRKelvinatorAC::getIonFilter() { + return ((remote_state[2] & kKelvinatorIonFilter) != 0); +} + +void IRKelvinatorAC::setLight(bool state) { + remote_state[2] &= ~kKelvinatorLight; + remote_state[2] |= (state << kKelvinatorLightOffset); + remote_state[10] = remote_state[2]; // Duplicate to the 2nd command chunk. +} + +bool IRKelvinatorAC::getLight() { + return ((remote_state[2] & kKelvinatorLight) != 0); +} + +// Note: XFan mode is only valid in Cool or Dry mode. +void IRKelvinatorAC::setXFan(bool state) { + remote_state[2] &= ~kKelvinatorXfan; + remote_state[2] |= (state << kKelvinatorXfanOffset); + remote_state[10] = remote_state[2]; // Duplicate to the 2nd command chunk. +} + +bool IRKelvinatorAC::getXFan() { + return ((remote_state[2] & kKelvinatorXfan) != 0); +} + +// Note: Turbo mode is turned off if the fan speed is changed. +void IRKelvinatorAC::setTurbo(bool state) { + remote_state[2] &= ~kKelvinatorTurbo; + remote_state[2] |= (state << kKelvinatorTurboOffset); + remote_state[10] = remote_state[2]; // Duplicate to the 2nd command chunk. +} + +bool IRKelvinatorAC::getTurbo() { + return ((remote_state[2] & kKelvinatorTurbo) != 0); +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRKelvinatorAC::toString() { + String result = ""; +#else +std::string IRKelvinatorAC::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Power: "; + if (getPower()) + result += "On"; + else + result += "Off"; + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kKelvinatorAuto: + result += " (AUTO)"; + break; + case kKelvinatorCool: + result += " (COOL)"; + break; + case kKelvinatorHeat: + result += " (HEAT)"; + break; + case kKelvinatorDry: + result += " (DRY)"; + break; + case kKelvinatorFan: + result += " (FAN)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", Fan: " + uint64ToString(getFan()); + switch (getFan()) { + case kKelvinatorFanAuto: + result += " (AUTO)"; + break; + case kKelvinatorFanMax: + result += " (MAX)"; + break; + } + result += ", Turbo: "; + if (getTurbo()) + result += "On"; + else + result += "Off"; + result += ", Quiet: "; + if (getQuiet()) + result += "On"; + else + result += "Off"; + result += ", XFan: "; + if (getXFan()) + result += "On"; + else + result += "Off"; + result += ", IonFilter: "; + if (getIonFilter()) + result += "On"; + else + result += "Off"; + result += ", Light: "; + if (getLight()) + result += "On"; + else + result += "Off"; + result += ", Swing (Horizontal): "; + if (getSwingHorizontal()) + result += "On"; + else + result += "Off"; + result += ", Swing (Vertical): "; + if (getSwingVertical()) + result += "On"; + else + result += "Off"; + return result; +} + +#if DECODE_KELVINATOR +// Decode the supplied Kelvinator message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kKelvinatorBits. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: ALPHA / Untested. +bool IRrecv::decodeKelvinator(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < + 2 * (nbits + kKelvinatorCmdFooterBits) + (kHeader + kFooter + 1) * 2 - 1) + return false; // Can't possibly be a valid Kelvinator message. + if (strict && nbits != kKelvinatorBits) + return false; // Not strictly a Kelvinator message. + + uint32_t data; + uint16_t offset = kStartOffset; + + // There are two messages back-to-back in a full Kelvinator IR message + // sequence. + int8_t state_pos = 0; + for (uint8_t s = 0; s < 2; s++) { + match_result_t data_result; + + // Header + if (!matchMark(results->rawbuf[offset], kKelvinatorHdrMark)) return false; + // Calculate how long the lowest tick time is based on the header mark. + uint32_t mark_tick = + results->rawbuf[offset++] * kRawTick / kKelvinatorHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kKelvinatorHdrSpace)) return false; + // Calculate how long the common tick time is based on the header space. + uint32_t space_tick = + results->rawbuf[offset++] * kRawTick / kKelvinatorHdrSpaceTicks; + + // Data (Command) (32 bits) + data_result = matchData( + &(results->rawbuf[offset]), 32, kKelvinatorBitMarkTicks * mark_tick, + kKelvinatorOneSpaceTicks * space_tick, + kKelvinatorBitMarkTicks * mark_tick, + kKelvinatorZeroSpaceTicks * space_tick, kTolerance, kMarkExcess, false); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + + // Record command data in the state. + for (uint16_t i = 0; i < 4; i++, data >>= 8) + results->state[state_pos + i] = data & 0xFF; + state_pos += 4; + + // Command data footer (3 bits, B010) + data_result = matchData( + &(results->rawbuf[offset]), kKelvinatorCmdFooterBits, + kKelvinatorBitMarkTicks * mark_tick, + kKelvinatorOneSpaceTicks * space_tick, + kKelvinatorBitMarkTicks * mark_tick, + kKelvinatorZeroSpaceTicks * space_tick, kTolerance, kMarkExcess, false); + if (data_result.success == false) return false; + if (data_result.data != kKelvinatorCmdFooter) return false; + offset += data_result.used; + + // Interdata gap. + if (!matchMark(results->rawbuf[offset++], + kKelvinatorBitMarkTicks * mark_tick)) + return false; + if (!matchSpace(results->rawbuf[offset++], + kKelvinatorGapSpaceTicks * space_tick)) + return false; + + // Data (Options) (32 bits) + data_result = matchData( + &(results->rawbuf[offset]), 32, kKelvinatorBitMarkTicks * mark_tick, + kKelvinatorOneSpaceTicks * space_tick, + kKelvinatorBitMarkTicks * mark_tick, + kKelvinatorZeroSpaceTicks * space_tick, kTolerance, kMarkExcess, false); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + + // Record option data in the state. + for (uint16_t i = 0; i < 4; i++, data >>= 8) + results->state[state_pos + i] = data & 0xFF; + state_pos += 4; + + // Inter-sequence gap. (Double length gap) + if (!matchMark(results->rawbuf[offset++], + kKelvinatorBitMarkTicks * mark_tick)) + return false; + if (s == 0) { + if (!matchSpace(results->rawbuf[offset++], + kKelvinatorGapSpaceTicks * space_tick * 2)) + return false; + } else { + if (offset <= results->rawlen && + !matchAtLeast(results->rawbuf[offset], + kKelvinatorGapSpaceTicks * 2 * space_tick)) + return false; + } + } + + // Compliance + if (strict) { + // Correct size/length) + if (state_pos != kKelvinatorStateLength) return false; + // Verify the message's checksum is correct. + if (!IRKelvinatorAC::validChecksum(results->state)) return false; + } + + // Success + results->decode_type = KELVINATOR; + results->bits = state_pos * 8; + // No need to record the state as we stored it as we decoded it. + // As we use result->state, we don't record value, address, or command as it + // is a union data type. + return true; +} +#endif // DECODE_KELVINATOR diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Kelvinator.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Kelvinator.h similarity index 71% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_Kelvinator.h rename to lib/IRremoteESP8266-2.5.2.03/src/ir_Kelvinator.h index c15d85c6e..1508d6cdc 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Kelvinator.h +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Kelvinator.h @@ -7,6 +7,11 @@ #define __STDC_LIMIT_MACROS #include +#ifndef UNIT_TEST +#include +#else +#include +#endif #include "IRremoteESP8266.h" #include "IRsend.h" @@ -17,19 +22,33 @@ // KK KK EEEEEEE LLLLLLL VVV IIIII NN NN AA AA TTT OOOO0 RR RR // Constants -#define KELVINATOR_AUTO 0U -#define KELVINATOR_COOL 1U -#define KELVINATOR_DRY 2U -#define KELVINATOR_FAN 3U -#define KELVINATOR_HEAT 4U -#define KELVINATOR_BASIC_FAN_MAX 3U -#define KELVINATOR_FAN_MAX 5U -#define KELVINATOR_MIN_TEMP 16U // 16C -#define KELVINATOR_MAX_TEMP 30U // 30C -#define KELVINATOR_AUTO_TEMP 25U // 25C +const uint8_t kKelvinatorAuto = 0; +const uint8_t kKelvinatorCool = 1; +const uint8_t kKelvinatorDry = 2; +const uint8_t kKelvinatorFan = 3; +const uint8_t kKelvinatorHeat = 4; +const uint8_t kKelvinatorBasicFanMax = 3; +const uint8_t kKelvinatorFanAuto = 0; +const uint8_t kKelvinatorFanMax = 5; +const uint8_t kKelvinatorMinTemp = 16; // 16C +const uint8_t kKelvinatorMaxTemp = 30; // 30C +const uint8_t kKelvinatorAutoTemp = 25; // 25C + +// Legacy defines (Deprecated) +#define KELVINATOR_MIN_TEMP kKelvinatorMinTemp +#define KELVINATOR_MAX_TEMP kKelvinatorMaxTemp +#define KELVINATOR_HEAT kKelvinatorHeat +#define KELVINATOR_FAN_MAX kKelvinatorFanMax +#define KELVINATOR_FAN_AUTO kKelvinatorFanAuto +#define KELVINATOR_FAN kKelvinatorFan +#define KELVINATOR_DRY kKelvinatorDry +#define KELVINATOR_COOL kKelvinatorCool +#define KELVINATOR_BASIC_FAN_MAX kKelvinatorBasicFanMax +#define KELVINATOR_AUTO_TEMP kKelvinatorAutoTemp +#define KELVINATOR_AUTO kKelvinatorAuto /* - Kelvinator AC map + Kelvinator AC map (header mark and space) byte 0 = Basic Modes @@ -104,15 +123,15 @@ b7-4 = checksum of the previous bytes (8-14) */ -#if SEND_KELVINATOR - // Classes class IRKelvinatorAC { public: explicit IRKelvinatorAC(uint16_t pin); void stateReset(); +#if SEND_KELVINATOR void send(); +#endif // SEND_KELVINATOR void begin(); void on(); void off(); @@ -139,14 +158,23 @@ class IRKelvinatorAC { void setTurbo(bool state); bool getTurbo(); uint8_t* getRaw(); + void setRaw(uint8_t new_code[]); + static uint8_t calcBlockChecksum( + const uint8_t* block, const uint16_t length = kKelvinatorStateLength / 2); + static bool validChecksum(const uint8_t state[], + const uint16_t length = kKelvinatorStateLength); +#ifdef ARDUINO + String toString(); +#else + std::string toString(); +#endif private: // The state of the IR remote in IR code form. - uint8_t remote_state[KELVINATOR_STATE_LENGTH]; - void checksum(); + uint8_t remote_state[kKelvinatorStateLength]; + void checksum(const uint16_t length = kKelvinatorStateLength); void fixup(); IRsend _irsend; }; -#endif #endif // IR_KELVINATOR_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_LG.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_LG.cpp new file mode 100644 index 000000000..f9d922fc7 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_LG.cpp @@ -0,0 +1,290 @@ +// Copyright 2015 Darryl Smith +// Copyright 2015 cheaplin +// Copyright 2017, 2018 David Conran + +#include "ir_LG.h" +#include +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// L GGGG +// L G +// L G GG +// L G G +// LLLLL GGG + +// LG decode originally added by Darryl Smith (based on the JVC protocol) +// LG send originally added by https://github.com/chaeplin +// +// Known supported devices: +// IR Remotes: +// 6711A20083V +// AKB74395308 + +// Constants +const uint16_t kLgTick = 50; +const uint16_t kLgHdrMarkTicks = 170; +const uint16_t kLgHdrMark = kLgHdrMarkTicks * kLgTick; // 8500 +const uint16_t kLgHdrSpaceTicks = 85; +const uint16_t kLgHdrSpace = kLgHdrSpaceTicks * kLgTick; // 4250 +const uint16_t kLgBitMarkTicks = 11; +const uint16_t kLgBitMark = kLgBitMarkTicks * kLgTick; // 550 +const uint16_t kLgOneSpaceTicks = 32; +const uint16_t kLgOneSpace = kLgOneSpaceTicks * kLgTick; // 1600 +const uint16_t kLgZeroSpaceTicks = 11; +const uint16_t kLgZeroSpace = kLgZeroSpaceTicks * kLgTick; // 550 +const uint16_t kLgRptSpaceTicks = 45; +const uint16_t kLgRptSpace = kLgRptSpaceTicks * kLgTick; // 2250 +const uint16_t kLgMinGapTicks = 795; +const uint16_t kLgMinGap = kLgMinGapTicks * kLgTick; // 39750 +const uint16_t kLgMinMessageLengthTicks = 2161; +const uint32_t kLgMinMessageLength = kLgMinMessageLengthTicks * kLgTick; + +const uint16_t kLg32HdrMarkTicks = 90; +const uint16_t kLg32HdrMark = kLg32HdrMarkTicks * kLgTick; // 4500 +const uint16_t kLg32HdrSpaceTicks = 89; +const uint16_t kLg32HdrSpace = kLg32HdrSpaceTicks * kLgTick; // 4450 +const uint16_t kLg32RptHdrMarkTicks = 179; +const uint16_t kLg32RptHdrMark = kLg32RptHdrMarkTicks * kLgTick; // 8950 + +const uint16_t kLg2HdrMarkTicks = 64; +const uint16_t kLg2HdrMark = kLg2HdrMarkTicks * kLgTick; // 3200 +const uint16_t kLg2HdrSpaceTicks = 197; +const uint16_t kLg2HdrSpace = kLg2HdrSpaceTicks * kLgTick; // 9850 +const uint16_t kLg2BitMarkTicks = 10; +const uint16_t kLg2BitMark = kLg2BitMarkTicks * kLgTick; // 500 + +#if (SEND_LG || DECODE_LG) +// Calculate the rolling 4-bit wide checksum over all of the data. +// Args: +// data: The value to be checksum'ed. +// Returns: +// A 4-bit checksum. +uint8_t calcLGChecksum(uint16_t data) { + return (((data >> 12) + ((data >> 8) & 0xF) + ((data >> 4) & 0xF) + + (data & 0xF)) & + 0xF); +} +#endif + +#if SEND_LG +// Send an LG formatted message. +// +// Args: +// data: The contents of the message you want to send. +// nbits: The bit size of the message being sent. +// Typically kLgBits or kLg32Bits. +// repeat: The number of times you want the message to be repeated. +// +// Status: Beta / Should be working. +// +// Notes: +// LG has a separate message to indicate a repeat, like NEC does. +// Supports: +// IR Remote models: 6711A20083V +void IRsend::sendLG(uint64_t data, uint16_t nbits, uint16_t repeat) { + uint16_t repeatHeaderMark = 0; + + if (nbits >= kLg32Bits) { + // LG 32bit protocol is near identical to Samsung except for repeats. + sendSAMSUNG(data, nbits, 0); // Send it as a single Samsung message. + repeatHeaderMark = kLg32RptHdrMark; + repeat++; + } else { + // LG (28-bit) protocol. + repeatHeaderMark = kLgHdrMark; + sendGeneric(kLgHdrMark, kLgHdrSpace, kLgBitMark, kLgOneSpace, kLgBitMark, + kLgZeroSpace, kLgBitMark, kLgMinGap, kLgMinMessageLength, data, + nbits, 38, true, 0, // Repeats are handled later. + 50); + } + + // Repeat + // Protocol has a mandatory repeat-specific code sent after every command. + if (repeat) + sendGeneric(repeatHeaderMark, kLgRptSpace, 0, 0, 0, 0, // No data is sent. + kLgBitMark, kLgMinGap, kLgMinMessageLength, 0, 0, // No data. + 38, true, repeat - 1, 50); +} + +// Send an LG Variant-2 formatted message. +// +// Args: +// data: The contents of the message you want to send. +// nbits: The bit size of the message being sent. +// Typically kLgBits or kLg32Bits. +// repeat: The number of times you want the message to be repeated. +// +// Status: Beta / Should be working. +// +// Notes: +// LG has a separate message to indicate a repeat, like NEC does. +// Supports: +// IR Remote models: AKB74395308 +void IRsend::sendLG2(uint64_t data, uint16_t nbits, uint16_t repeat) { + if (nbits >= kLg32Bits) { + // Let the original routine handle it. + sendLG(data, nbits, repeat); // Send it as a single Samsung message. + return; + } + + // LGv2 (28-bit) protocol. + sendGeneric(kLg2HdrMark, kLg2HdrSpace, kLgBitMark, kLgOneSpace, kLgBitMark, + kLgZeroSpace, kLgBitMark, kLgMinGap, kLgMinMessageLength, data, + nbits, 38, true, 0, // Repeats are handled later. + 50); + + // TODO(crackn): Verify the details of what repeat messages look like. + // Repeat + // Protocol has a mandatory repeat-specific code sent after every command. + if (repeat) + sendGeneric(kLg2HdrMark, kLgRptSpace, 0, 0, 0, 0, // No data is sent. + kLgBitMark, kLgMinGap, kLgMinMessageLength, 0, 0, // No data. + 38, true, repeat - 1, 50); +} + +// Construct a raw 28-bit LG message code from the supplied address & command. +// +// Args: +// address: The address code. +// command: The command code. +// Returns: +// A raw 28-bit LG message code suitable for sendLG() etc. +// +// Status: BETA / Should work. +// +// Notes: +// e.g. Sequence of bits = address + command + checksum. +uint32_t IRsend::encodeLG(uint16_t address, uint16_t command) { + return ((address << 20) | (command << 4) | calcLGChecksum(command)); +} +#endif + +#if DECODE_LG +// Decode the supplied LG message. +// LG protocol has a repeat code which is 4 items long. +// Even though the protocol has 28/32 bits of data, only 24/28 bits are +// distinct. +// In transmission order, the 28/32 bits are constructed as follows: +// 8/12 bits of address + 16 bits of command + 4 bits of checksum. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: Nr. of bits to expect in the data portion. +// Typically kLgBits or kLg32Bits. +// strict: Flag to indicate if we strictly adhere to the specification. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA / Should work. +// +// Note: +// LG 32bit protocol appears near identical to the Samsung protocol. +// They possibly differ on how they repeat and initial HDR mark. +// +// Supports: +// IR Remote models: 6711A20083V, AKB74395308 + +// Ref: +// https://funembedded.wordpress.com/2014/11/08/ir-remote-control-for-lg-conditioner-using-stm32f302-mcu-on-mbed-platform/ +bool IRrecv::decodeLG(decode_results *results, uint16_t nbits, bool strict) { + if (nbits >= kLg32Bits) { + if (results->rawlen < 2 * nbits + 2 * (kHeader + kFooter) - 1) + return false; // Can't possibly be a valid LG32 message. + } else { + if (results->rawlen < 2 * nbits + kHeader + kFooter - 1) + return false; // Can't possibly be a valid LG message. + } + if (strict && nbits != kLgBits && nbits != kLg32Bits) + return false; // Doesn't comply with expected LG protocol. + + uint64_t data = 0; + uint16_t offset = kStartOffset; + bool isLg2 = false; + + // Header + uint32_t m_tick; + if (matchMark(results->rawbuf[offset], kLgHdrMark)) { + m_tick = results->rawbuf[offset++] * kRawTick / kLgHdrMarkTicks; + } else if (matchMark(results->rawbuf[offset], kLg2HdrMark)) { + m_tick = results->rawbuf[offset++] * kRawTick / kLg2HdrMarkTicks; + isLg2 = true; + } else if (matchMark(results->rawbuf[offset], kLg32HdrMark)) { + m_tick = results->rawbuf[offset++] * kRawTick / kLg32HdrMarkTicks; + } else { + return false; + } + uint32_t s_tick; + if (isLg2) { + if (matchSpace(results->rawbuf[offset], kLg2HdrSpace)) + s_tick = results->rawbuf[offset++] * kRawTick / kLg2HdrSpaceTicks; + else + return false; + } else { + if (matchSpace(results->rawbuf[offset], kLgHdrSpace)) + s_tick = results->rawbuf[offset++] * kRawTick / kLgHdrSpaceTicks; + else if (matchSpace(results->rawbuf[offset], kLg2HdrSpace)) + s_tick = results->rawbuf[offset++] * kRawTick / kLg32HdrSpaceTicks; + else + return false; + } + + // Set up the expected tick sizes based on variant. + uint16_t bitmarkticks; + if (isLg2) { + bitmarkticks = kLg2BitMarkTicks; + } else { + bitmarkticks = kLgBitMarkTicks; + } + + // Data + match_result_t data_result = + matchData(&(results->rawbuf[offset]), nbits, bitmarkticks * m_tick, + kLgOneSpaceTicks * s_tick, bitmarkticks * m_tick, + kLgZeroSpaceTicks * s_tick, kTolerance, 0); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + + // Footer + if (!matchMark(results->rawbuf[offset++], bitmarkticks * m_tick)) + return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset], kLgMinGapTicks * s_tick)) + return false; + + // Repeat + if (nbits >= kLg32Bits) { + // If we are expecting the LG 32-bit protocol, there is always + // a repeat message. So, check for it. + offset++; + if (!matchMark(results->rawbuf[offset++], kLg32RptHdrMarkTicks * m_tick)) + return false; + if (!matchSpace(results->rawbuf[offset++], kLgRptSpaceTicks * s_tick)) + return false; + if (!matchMark(results->rawbuf[offset++], bitmarkticks * m_tick)) + return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset], kLgMinGapTicks * s_tick)) + return false; + } + + // Compliance + uint16_t command = (data >> 4) & 0xFFFF; // The 16 bits before the checksum. + + if (strict && (data & 0xF) != calcLGChecksum(command)) + return false; // The last 4 bits sent are the expected checksum. + + // Success + if (isLg2) + results->decode_type = LG2; + else + results->decode_type = LG; + results->bits = nbits; + results->value = data; + results->command = command; + results->address = data >> 20; // The bits before the command. + return true; +} +#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_LG.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_LG.h similarity index 100% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_LG.h rename to lib/IRremoteESP8266-2.5.2.03/src/ir_LG.h diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Lasertag.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Lasertag.cpp new file mode 100644 index 000000000..7f0b89ae9 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Lasertag.cpp @@ -0,0 +1,122 @@ +// Copyright 2017 David Conran + +#include +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// LL AAA SSSSS EEEEEEE RRRRRR TTTTTTT AAA GGGG +// LL AAAAA SS EE RR RR TTT AAAAA GG GG +// LL AA AA SSSSS EEEEE RRRRRR TTT AA AA GG +// LL AAAAAAA SS EE RR RR TTT AAAAAAA GG GG +// LLLLLLL AA AA SSSSS EEEEEEE RR RR TTT AA AA GGGGGG + +// Constants +const uint16_t kLasertagMinSamples = 13; +const uint16_t kLasertagTick = 333; +const uint32_t kLasertagMinGap = 100000; // Completely made up amount. +const uint8_t kLasertagTolerance = 0; // Percentage error margin. +const uint16_t kLasertagExcess = 0; // See kMarkExcess. +const uint16_t kLasertagDelta = 150; // Use instead of Excess and Tolerance. +const int16_t kSpace = 1; +const int16_t kMark = 0; + +#if SEND_LASERTAG +// Send a Lasertag packet. +// This protocol is pretty much just raw Manchester encoding. +// +// Args: +// data: The message you wish to send. +// nbits: Bit size of the protocol you want to send. +// repeat: Nr. of extra times the data will be sent. +// +// Status: STABLE / Working. +// +void IRsend::sendLasertag(uint64_t data, uint16_t nbits, uint16_t repeat) { + if (nbits > sizeof(data) * 8) return; // We can't send something that big. + + // Set 36kHz IR carrier frequency & a 1/4 (25%) duty cycle. + // NOTE: duty cycle is not confirmed. Just guessing based on RC5/6 protocols. + enableIROut(36, 25); + + for (uint16_t i = 0; i <= repeat; i++) { + // Data + for (uint64_t mask = 1ULL << (nbits - 1); mask; mask >>= 1) + if (data & mask) { // 1 + space(kLasertagTick); // 1 is space, then mark. + mark(kLasertagTick); + } else { // 0 + mark(kLasertagTick); // 0 is mark, then space. + space(kLasertagTick); + } + // Footer + space(kLasertagMinGap); + } +} +#endif // SEND_LASERTAG + +#if DECODE_LASERTAG +// Decode the supplied Lasertag message. +// This protocol is pretty much just raw Manchester encoding. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA / Appears to be working 90% of the time. +// +// Ref: +// http://www.sbprojects.com/knowledge/ir/rc5.php +// https://en.wikipedia.org/wiki/RC-5 +// https://en.wikipedia.org/wiki/Manchester_code +bool IRrecv::decodeLasertag(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < kLasertagMinSamples) return false; + + // Compliance + if (strict && nbits != kLasertagBits) return false; + + uint16_t offset = kStartOffset; + uint16_t used = 0; + uint64_t data = 0; + uint16_t actual_bits = 0; + + // No Header + + // Data + for (; offset <= results->rawlen; actual_bits++) { + int16_t levelA = + getRClevel(results, &offset, &used, kLasertagTick, kLasertagTolerance, + kLasertagExcess, kLasertagDelta); + int16_t levelB = + getRClevel(results, &offset, &used, kLasertagTick, kLasertagTolerance, + kLasertagExcess, kLasertagDelta); + if (levelA == kSpace && levelB == kMark) { + data = (data << 1) | 1; // 1 + } else { + if (levelA == kMark && levelB == kSpace) { + data <<= 1; // 0 + } else { + break; + } + } + } + // Footer (None) + + // Compliance + if (actual_bits < nbits) return false; // Less data than we expected. + if (strict && actual_bits != kLasertagBits) return false; + + // Success + results->decode_type = LASERTAG; + results->value = data; + results->address = data & 0xF; // Unit + results->command = data >> 4; // Team + results->repeat = false; + results->bits = actual_bits; + return true; +} +#endif // DECODE_LASERTAG diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Lutron.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Lutron.cpp new file mode 100644 index 000000000..00eb9383b --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Lutron.cpp @@ -0,0 +1,156 @@ +// Copyright 2018 David Conran + +#define __STDC_LIMIT_MACROS +#include +#include +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// LL UU UU TTTTTTT RRRRRR OOOOO NN NN +// LL UU UU TTT RR RR OO OO NNN NN +// LL UU UU TTT RRRRRR OO OO NN N NN +// LL UU UU TTT RR RR OO OO NN NNN +// LLLLLLL UUUUU TTT RR RR OOOO0 NN NN + +// Notes: +// The Lutron protocol uses a sort of Run Length encoding to encode +// its data. There is no header or footer per-se. +// As a mark is the first data we will notice, we always assume the First +// bit of the technically 36-bit protocol is '1'. So it is assumed, and thus +// we only care about the 35 bits of data. + +// Constants +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/515 +const uint16_t kLutronTick = 2288; +const uint32_t kLutronGap = 150000; // Completely made up value. +const uint16_t kLutronDelta = 400; // +/- 300 usecs. + +#if SEND_LUTRON +// Send a Lutron formatted message. +// +// Args: +// data: The message to be sent. +// nbits: The number of bits of the message to be sent. Typically kLutronBits +// repeat: The number of times the command is to be repeated. +// +// Status: Stable / Appears to be working for real devices. + +// Notes: +// Protocol is really 36 bits long, but the first bit is always a 1. +// So, assume the 1 and only have a normal payload of 35 bits. +// +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/515 +void IRsend::sendLutron(uint64_t data, uint16_t nbits, uint16_t repeat) { + enableIROut(40000, 40); // 40Khz & 40% dutycycle. + for (uint16_t r = 0; r <= repeat; r++) { + mark(kLutronTick); // 1st bit is always '1'. + // Send the supplied data in MSB First order. + for (uint64_t mask = 1ULL << (nbits - 1); mask; mask >>= 1) + if (data & mask) + mark(kLutronTick); // Send a 1 + else + space(kLutronTick); // Send a 0 + space(kLutronGap); // Inter-message gap. + } +} +#endif // SEND_LUTRON + +#if DECODE_LUTRON +// Decode the supplied Lutron message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kLutronBits. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: ALPHA / Untested. +// +// Notes: +// +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/515 +bool IRrecv::decodeLutron(decode_results *results, uint16_t nbits, + bool strict) { + // Technically the smallest number of entries for the smallest message is '1'. + // i.e. All the bits set to 1, would produce a single huge mark signal. + // So no minimum length check is required. + if (strict && nbits != kLutronBits) + return false; // Not strictly an Lutron message. + + uint64_t data = 0; + int16_t bitsSoFar = -1; + + if (nbits > sizeof(data) * 8) return false; // To large to store the data. + for (uint16_t offset = kStartOffset; + bitsSoFar < nbits && offset < results->rawlen; offset++) { + uint16_t entry = results->rawbuf[offset]; + // It has to be large enough to qualify as a bit. + if (!matchAtLeast(entry, kLutronTick, 0, kLutronDelta)) { + DPRINTLN("Entry too small. Aborting."); + return false; + } + // Keep reading bits of the same value until we run out. + while (entry != 0 && matchAtLeast(entry, kLutronTick, 0, kLutronDelta)) { + bitsSoFar++; + DPRINT("Bit: "); + DPRINT(bitsSoFar); + if (offset % 2) { // Is Odd? + data = (data << 1) + 1; // Append a '1'. + DPRINTLN(" is a 1."); + } else { // Is it Even? + data <<= 1; // Append a '0'. + DPRINTLN(" is a 0."); + if (bitsSoFar == nbits && matchAtLeast(entry, kLutronGap)) + break; // We've likely reached the end of a message. + } + // Remove a bit length from the current entry. + entry = std::max(entry, (uint16_t)(kLutronTick / kRawTick)) - + kLutronTick / kRawTick; + } + if (offset % 2 && !match(entry, kLutronDelta, 0, kLutronDelta)) { + DPRINT("offset = "); + DPRINTLN(offset); + DPRINT("rawlen = "); + DPRINTLN(results->rawlen); + DPRINT("entry = "); + DPRINTLN(entry); + DPRINTLN("Odd Entry has too much left over. Aborting."); + return false; // Too much left over to be a good value. Reject it. + } + if (offset % 2 == 0 && offset <= results->rawlen - 1 && + !matchAtLeast(entry, kLutronDelta, 0, kLutronDelta)) { + DPRINT("offset = "); + DPRINTLN(offset); + DPRINT("rawlen = "); + DPRINTLN(results->rawlen); + DPRINT("entry = "); + DPRINTLN(entry); + DPRINTLN("Entry has too much left over. Aborting."); + return false; // Too much left over to be a good value. Reject it. + } + } + + // We got too many bits. + if (bitsSoFar > nbits || bitsSoFar < 0) { + DPRINTLN("Wrong number of bits found. Aborting."); + return false; + } + // If we got less bits than we were expecting, we need to pad with zeros + // until we get the correct number of bits. + if (bitsSoFar < nbits) data <<= (nbits - bitsSoFar); + + // Success + DPRINTLN("Lutron Success!"); + results->decode_type = LUTRON; + results->bits = bitsSoFar; + results->value = data ^ (1ULL << nbits); // Mask off the initial '1'. + results->address = 0; + results->command = 0; + return true; +} +#endif // DECODE_LUTRON diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_MWM.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_MWM.cpp new file mode 100644 index 000000000..a75e99e3a --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_MWM.cpp @@ -0,0 +1,202 @@ +// Copyright 2018 Brett T. Warden +// derived from ir_Lasertag.cpp, Copyright 2017 David Conran + +#include +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// MM MM WW WW MM MM +// MMM MMM WW WW MMM MMM +// MM M MM WW W WW MM M MM +// MM MM WWW WWW MM MM +// MM MM WW WW MM MM + +// Constants +const uint16_t kMWMMinSamples = 6; // Msgs are >=3 bytes, bytes have >=2 + // samples +const uint16_t kMWMTick = 417; +const uint32_t kMWMMinGap = 30000; // Typical observed delay b/w commands +const uint8_t kMWMTolerance = 0; // Percentage error margin. +const uint16_t kMWMExcess = 0; // See kMarkExcess. +const uint16_t kMWMDelta = 150; // Use instead of Excess and Tolerance. +const uint8_t kMWMMaxWidth = 9; // Maximum number of successive bits at a + // single level - worst case +const int16_t kSpace = 1; +const int16_t kMark = 0; + +#if SEND_MWM +// Send a MWM packet. +// This protocol is 2400 bps serial, 1 start bit (mark), 1 stop bit (space), no +// parity +// +// Args: +// data: The message you wish to send. +// nbits: Bit size of the protocol you want to send. +// repeat: Nr. of extra times the data will be sent. +// +// Status: Implemented. +// +void IRsend::sendMWM(uint8_t data[], uint16_t nbytes, uint16_t repeat) { + if (nbytes < 3) return; // Shortest possible message is 3 bytes + + // Set 38kHz IR carrier frequency & a 1/4 (25%) duty cycle. + // NOTE: duty cycle is not confirmed. Just guessing based on RC5/6 protocols. + enableIROut(38, 25); + + for (uint16_t r = 0; r <= repeat; r++) { + // Data + for (uint16_t i = 0; i < nbytes; i++) { + uint8_t byte = data[i]; + + // Start bit + mark(kMWMTick); + + // LSB first, space=1 + for (uint8_t mask = 0x1; mask; mask <<= 1) { + if (byte & mask) { // 1 + space(kMWMTick); + } else { // 0 + mark(kMWMTick); + } + } + // Stop bit + space(kMWMTick); + } + // Footer + space(kMWMMinGap); + } +} +#endif // SEND_MWM + +#if DECODE_MWM +// Decode the supplied MWM message. +// This protocol is 2400 bps serial, 1 start bit (mark), 1 stop bit (space), no +// parity +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: Implemented. +// +bool IRrecv::decodeMWM(decode_results *results, uint16_t nbits, bool strict) { + DPRINTLN("DEBUG: decodeMWM"); + + // Compliance + if (results->rawlen < kMWMMinSamples) { + DPRINTLN("DEBUG: decodeMWM: too few samples"); + return false; + } + + uint16_t offset = kStartOffset; + uint16_t used = 0; + uint64_t data = 0; + uint16_t frame_bits = 0; + uint16_t data_bits = 0; + + // No Header + + // Data + uint8_t bits_per_frame = 10; + for (; offset < results->rawlen && results->bits < 8 * kStateSizeMax; + frame_bits++) { + DPRINT("DEBUG: decodeMWM: offset = "); + DPRINTLN(uint64ToString(offset)); + int16_t level = getRClevel(results, &offset, &used, kMWMTick, kMWMTolerance, + kMWMExcess, kMWMDelta, kMWMMaxWidth); + if (level < 0) { + DPRINTLN("DEBUG: decodeMWM: getRClevel returned error"); + break; + } + switch (frame_bits % bits_per_frame) { + case 0: + // Start bit + if (level != kMark) { + DPRINTLN("DEBUG: decodeMWM: framing error - invalid start bit"); + goto done; + } + break; + case 9: + // Stop bit + if (level != kSpace) { + DPRINTLN("DEBUG: decodeMWM: framing error - invalid stop bit"); + return false; + } else { + DPRINT("DEBUG: decodeMWM: data_bits = "); + DPRINTLN(data_bits); + DPRINT("DEBUG: decodeMWM: Finished byte: "); + DPRINTLN(data); + results->state[data_bits / 8 - 1] = data & 0xFF; + results->bits = data_bits; + data = 0; + } + break; + default: + // Data bits + DPRINT("DEBUG: decodeMWM: Storing bit: "); + DPRINTLN((level == kSpace)); + // Transmission is LSB-first, space=1 + data |= ((level == kSpace)) << 8; + data >>= 1; + data_bits++; + break; + } + } + +done: + // Footer (None) + + // Compliance + DPRINT("DEBUG: decodeMWM: frame_bits = "); + DPRINTLN(frame_bits); + DPRINT("DEBUG: decodeMWM: data_bits = "); + DPRINTLN(data_bits); + if (data_bits < nbits) { + DPRINT("DEBUG: decodeMWM: too few bits; expected "); + DPRINTLN(nbits); + return false; // Less data than we expected. + } + + uint16_t payload_length = 0; + switch (results->state[0] & 0xf0) { + case 0x90: + case 0xf0: + // Normal commands + payload_length = results->state[0] & 0x0f; + DPRINT("DEBUG: decodeMWM: payload_length = "); + DPRINTLN(payload_length); + break; + default: + if (strict) { + // Show commands + if (results->state[0] != 0x55 && results->state[1] != 0xAA) { + return false; + } + } + break; + } + if (data_bits < (payload_length + 3) * 8) { + DPRINT("DEBUG: decodeMWM: too few bytes; expected "); + DPRINTLN((payload_length + 3)); + return false; + } + if (strict) { + if (payload_length && (data_bits > (payload_length + 3) * 8)) { + DPRINT("DEBUG: decodeMWM: too many bytes; expected "); + DPRINTLN((payload_length + 3)); + return false; + } + } + + // Success + results->decode_type = MWM; + results->repeat = false; + return true; +} +#endif // DECODE_MWM + +// vim: et:ts=2:sw=2 diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Magiquest.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Magiquest.cpp new file mode 100644 index 000000000..863aa0ec3 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Magiquest.cpp @@ -0,0 +1,166 @@ +// Copyright 2013 mpflaga +// Copyright 2015 kitlaan +// Copyright 2017 Jason kendall, David Conran + +#include "ir_Magiquest.h" +#include +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +#define IS_ZERO(m, s) (((m)*100 / ((m) + (s))) <= kMagiQuestZeroRatio) +#define IS_ONE(m, s) (((m)*100 / ((m) + (s))) >= kMagiQuestOneRatio) + +// Strips taken from: +// https://github.com/kitlaan/Arduino-IRremote/blob/master/ir_Magiquest.cpp +// and +// https://github.com/mpflaga/Arduino-IRremote + +// Source: https://github.com/mpflaga/Arduino-IRremote + +#if SEND_MAGIQUEST +// Send a MagiQuest formatted message. +// +// Args: +// data: The contents of the message you want to send. +// nbits: The bit size of the message being sent. +// Typically kMagiquestBits. +// repeat: The number of times you want the message to be repeated. +// +// Status: Alpha / Should be working. +// +void IRsend::sendMagiQuest(uint64_t data, uint16_t nbits, uint16_t repeat) { + sendGeneric(0, 0, // No Headers - Technically it's included in the data. + // i.e. 8 zeros. + kMagiQuestMarkOne, kMagiQuestSpaceOne, kMagiQuestMarkZero, + kMagiQuestSpaceZero, + 0, // No footer mark. + kMagiQuestGap, data, nbits, 36, true, repeat, 50); +} + +// Encode a MagiQuest wand_id, and a magnitude into a single 64bit value. +// (Only 48 bits of real data + 8 leading zero bits) +// This is suitable for calling sendMagiQuest() with. +// e.g. sendMagiQuest(encodeMagiQuest(wand_id, magnitude)); +uint64_t IRsend::encodeMagiQuest(uint32_t wand_id, uint16_t magnitude) { + uint64_t result = 0; + result = wand_id; + result <<= 16; + result |= magnitude; + // Shouldn't be needed, but ensure top 8/16 bit are zero. + result &= 0xFFFFFFFFFFFFULL; + return result; +} +#endif + +// Source: +// https://github.com/kitlaan/Arduino-IRremote/blob/master/ir_Magiquest.cpp + +#if DECODE_MAGIQUEST +// Decode the supplied MagiQuest message. +// MagiQuest protocol appears to be a header of 8 'zero' bits, followed +// by 32 bits of "wand ID" and finally 16 bits of "magnitude". +// Even though we describe this protocol as 56 bits, it really only has +// 48 bits of data that matter. +// +// In transmission order, 8 zeros + 32 wand_id + 16 magnitude. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: Nr. of bits to expect in the data portion, inc. the 8 bit header. +// Typically kMagiquestBits. +// strict: Flag to indicate if we strictly adhere to the specification. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: Alpha / Should work. +// +// Ref: +// https://github.com/kitlaan/Arduino-IRremote/blob/master/ir_Magiquest.cpp +bool IRrecv::decodeMagiQuest(decode_results *results, uint16_t nbits, + bool strict) { + uint16_t bits = 0; + uint64_t data = 0; + uint16_t offset = kStartOffset; + + if (results->rawlen < (2 * kMagiquestBits)) { + DPRINT("Not enough bits to be Magiquest - Rawlen: "); + DPRINT(results->rawlen); + DPRINT(" Expected: "); + DPRINTLN((2 * kMagiquestBits)); + return false; + } + + // Compliance + if (strict && nbits != kMagiquestBits) return false; + + // Of six wands as datapoints, so far they all start with 8 ZEROs. + // For example, here is the data from two wands + // 00000000 00100011 01001100 00100110 00000010 00000010 00010111 + // 00000000 00100000 10001000 00110001 00000010 00000010 10110100 + + // Decode the (MARK + SPACE) bits + while (offset + 1 < results->rawlen && bits < nbits - 1) { + uint16_t mark = results->rawbuf[offset]; + uint16_t space = results->rawbuf[offset + 1]; + if (!matchMark(mark + space, kMagiQuestTotalUsec)) { + DPRINT("Not enough time to be Magiquest - Mark: "); + DPRINT(mark); + DPRINT(" Space: "); + DPRINT(space); + DPRINT(" Total: "); + DPRINT(mark + space); + DPRINT("Expected: "); + DPRINTLN(kMagiQuestTotalUsec); + return false; + } + + if (IS_ZERO(mark, space)) + data = (data << 1) | 0; + else if (IS_ONE(mark, space)) + data = (data << 1) | 1; + else + return false; + + bits++; + offset += 2; + + // Compliance + // The first 8 bits of this protocol are supposed to all be 0. + // Exit out early as it is never going to match. + if (strict && bits == 8 && data != 0) return false; + } + + // Last bit is special as the protocol ends with a SPACE, not a MARK. + // Grab the last MARK bit, assuming a good SPACE after it + if (offset < results->rawlen) { + uint16_t mark = results->rawbuf[offset]; + uint16_t space = (kMagiQuestTotalUsec / kRawTick) - mark; + + if (IS_ZERO(mark, space)) + data = (data << 1) | 0; + else if (IS_ONE(mark, space)) + data = (data << 1) | 1; + else + return false; + + bits++; + } + + if (bits != nbits) return false; + + if (strict) { + // The top 8 bits of the 56 bits needs to be 0x00 to be valid. + // i.e. bits 56 to 49 are all zero. + if ((data >> (nbits - 8)) != 0) return false; + } + + // Success + results->decode_type = MAGIQUEST; + results->bits = bits; + results->value = data; + results->address = data >> 16; // Wand ID + results->command = data & 0xFFFF; // Magnitude + return true; +} +#endif diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Magiquest.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Magiquest.h new file mode 100644 index 000000000..d2d82d152 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Magiquest.h @@ -0,0 +1,35 @@ +// Copyright 2013 mpflaga +// Copyright 2015 kitlaan +// Copyright 2017 Jason kendall, David Conran + +#ifndef IR_MAGIQUEST_H_ +#define IR_MAGIQUEST_H_ + +#define __STDC_LIMIT_MACROS +#include +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// MagiQuest packet is both Wand ID and magnitude of swish and flick +union magiquest { + uint64_t llword; + uint8_t byte[8]; + // uint16_t word[4]; + uint32_t lword[2]; + struct { + uint16_t magnitude; + uint32_t wand_id; + uint8_t padding; + uint8_t scrap; + } cmd; +}; + +const uint16_t kMagiQuestTotalUsec = 1150; +const uint8_t kMagiQuestZeroRatio = 30; // usually <= ~25% +const uint8_t kMagiQuestOneRatio = 38; // usually >= ~50% +const uint16_t kMagiQuestMarkZero = 280; +const uint16_t kMagiQuestSpaceZero = 850; +const uint16_t kMagiQuestMarkOne = 580; +const uint16_t kMagiQuestSpaceOne = 600; +const uint32_t kMagiQuestGap = 100000; // A guess of the gap between messages +#endif // IR_MAGIQUEST_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Midea.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Midea.cpp new file mode 100644 index 000000000..8e55c7d22 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Midea.cpp @@ -0,0 +1,403 @@ +// Copyright 2017 bwze, crankyoldgit + +#include "ir_Midea.h" +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// MM MM IIIII DDDDD EEEEEEE AAA +// MMM MMM III DD DD EE AAAAA +// MM MM MM III DD DD EEEEE AA AA +// MM MM III DD DD EE AAAAAAA +// MM MM IIIII DDDDDD EEEEEEE AA AA + +// Midea A/C added by (send) bwze/crankyoldgit & (decode) crankyoldgit +// +// Equipment it seems compatible with: +// * Pioneer System Model RYBO12GMFILCAD (12K BTU) +// * Pioneer System Model RUBO18GMFILCAD (18K BTU) +// * + +// Ref: +// https://docs.google.com/spreadsheets/d/1TZh4jWrx4h9zzpYUI9aYXMl1fYOiqu-xVuOOMqagxrs/edit?usp=sharing + +// Constants +const uint16_t kMideaTick = 80; +const uint16_t kMideaBitMarkTicks = 7; +const uint16_t kMideaBitMark = kMideaBitMarkTicks * kMideaTick; +const uint16_t kMideaOneSpaceTicks = 21; +const uint16_t kMideaOneSpace = kMideaOneSpaceTicks * kMideaTick; +const uint16_t kMideaZeroSpaceTicks = 7; +const uint16_t kMideaZeroSpace = kMideaZeroSpaceTicks * kMideaTick; +const uint16_t kMideaHdrMarkTicks = 56; +const uint16_t kMideaHdrMark = kMideaHdrMarkTicks * kMideaTick; +const uint16_t kMideaHdrSpaceTicks = 56; +const uint16_t kMideaHdrSpace = kMideaHdrSpaceTicks * kMideaTick; +const uint16_t kMideaMinGapTicks = + kMideaHdrMarkTicks + kMideaZeroSpaceTicks + kMideaBitMarkTicks; +const uint16_t kMideaMinGap = kMideaMinGapTicks * kMideaTick; +const uint8_t kMideaTolerance = 30; // Percent + +#if SEND_MIDEA +// Send a Midea message +// +// Args: +// data: Contents of the message to be sent. +// nbits: Nr. of bits of data to be sent. Typically kMideaBits. +// repeat: Nr. of additional times the message is to be sent. +// +// Status: Alpha / Needs testing against a real device. +// +void IRsend::sendMidea(uint64_t data, uint16_t nbits, uint16_t repeat) { + if (nbits % 8 != 0) return; // nbits is required to be a multiple of 8. + + // Set IR carrier frequency + enableIROut(38); + + for (uint16_t r = 0; r <= repeat; r++) { + // The protcol sends the message, then follows up with an entirely + // inverted payload. + for (size_t inner_loop = 0; inner_loop < 2; inner_loop++) { + // Header + mark(kMideaHdrMark); + space(kMideaHdrSpace); + // Data + // Break data into byte segments, starting at the Most Significant + // Byte. Each byte then being sent normal, then followed inverted. + for (uint16_t i = 8; i <= nbits; i += 8) { + // Grab a bytes worth of data. + uint8_t segment = (data >> (nbits - i)) & 0xFF; + sendData(kMideaBitMark, kMideaOneSpace, kMideaBitMark, kMideaZeroSpace, + segment, 8, true); + } + // Footer + mark(kMideaBitMark); + space(kMideaMinGap); // Pause before repeating + + // Invert the data for the 2nd phase of the message. + // As we get called twice in the inner loop, we will always revert + // to the original 'data' state. + data = ~data; + } + } +} +#endif + +// Code to emulate Midea A/C IR remote control unit. +// Warning: Consider this very alpha code. + +// Initialise the object. +IRMideaAC::IRMideaAC(uint16_t pin) : _irsend(pin) { stateReset(); } + +// Reset the state of the remote to a known good state/sequence. +void IRMideaAC::stateReset() { + // Power On, Mode Auto, Fan Auto, Temp = 25C/77F + remote_state = 0xA1826FFFFF62; +} + +// Configure the pin for output. +void IRMideaAC::begin() { _irsend.begin(); } + +#if SEND_MIDEA +// Send the current desired state to the IR LED. +void IRMideaAC::send() { + checksum(); // Ensure correct checksum before sending. + _irsend.sendMidea(remote_state); +} +#endif // SEND_MIDEA + +// Return a pointer to the internal state date of the remote. +uint64_t IRMideaAC::getRaw() { + checksum(); + return remote_state & kMideaACStateMask; +} + +// Override the internal state with the new state. +void IRMideaAC::setRaw(uint64_t newState) { + remote_state = newState & kMideaACStateMask; +} + +// Set the requested power state of the A/C to off. +void IRMideaAC::on() { remote_state |= kMideaACPower; } + +// Set the requested power state of the A/C to off. +void IRMideaAC::off() { remote_state &= (kMideaACStateMask ^ kMideaACPower); } + +// Set the requested power state of the A/C. +void IRMideaAC::setPower(const bool state) { + if (state) + on(); + else + off(); +} + +// Return the requested power state of the A/C. +bool IRMideaAC::getPower() { return (remote_state & kMideaACPower); } + +// Set the temperature. +// Args: +// temp: Temp. in degrees. +// useCelsius: Degree type to use. Celsius (true) or Fahrenheit (false) +void IRMideaAC::setTemp(const uint8_t temp, const bool useCelsius) { + uint8_t new_temp = temp; + if (useCelsius) { + new_temp = std::max(kMideaACMinTempC, new_temp); + new_temp = std::min(kMideaACMaxTempC, new_temp); + new_temp = (uint8_t)((new_temp * 1.8) + 32.5); // 0.5 so we rounding. + } + new_temp = std::max(kMideaACMinTempF, new_temp); + new_temp = std::min(kMideaACMaxTempF, new_temp); + new_temp -= kMideaACMinTempF; + remote_state &= kMideaACTempMask; + remote_state |= ((uint64_t)new_temp << 24); +} + +// Return the set temp. +// Args: +// useCelsius: Flag indicating if the results are in Celsius or Fahrenheit. +// Returns: +// A uint8_t containing the temperature. +uint8_t IRMideaAC::getTemp(const bool useCelsius) { + uint8_t temp = ((remote_state >> 24) & 0x1F) + kMideaACMinTempF; + if (useCelsius) { + temp = (uint8_t)((temp - 32) / 1.8); + } + return temp; +} + +// Set the speed of the fan, +// 1-3 set the speed, 0 or anything else set it to auto. +void IRMideaAC::setFan(const uint8_t fan) { + uint64_t new_fan; + switch (fan) { + case kMideaACFanLow: + case kMideaACFanMed: + case kMideaACFanHigh: + new_fan = fan; + break; + default: + new_fan = kMideaACFanAuto; + } + remote_state &= kMideaACFanMask; + remote_state |= (new_fan << 35); +} + +// Return the requested state of the unit's fan. +uint8_t IRMideaAC::getFan() { return (remote_state >> 35) & 0b111; } + +// Get the requested climate operation mode of the a/c unit. +// Returns: +// A uint8_t containing the A/C mode. +uint8_t IRMideaAC::getMode() { return ((remote_state >> 32) & 0b111); } + +// Set the requested climate operation mode of the a/c unit. +void IRMideaAC::setMode(const uint8_t mode) { + // If we get an unexpected mode, default to AUTO. + uint64_t new_mode; + switch (mode) { + case kMideaACAuto: + case kMideaACCool: + case kMideaACHeat: + case kMideaACDry: + case kMideaACFan: + new_mode = mode; + break; + default: + new_mode = kMideaACAuto; + } + remote_state &= kMideaACModeMask; + remote_state |= (new_mode << 32); +} + +// Set the Sleep state of the A/C. +void IRMideaAC::setSleep(const bool state) { + if (state) + remote_state |= kMideaACSleep; + else + remote_state &= (kMideaACStateMask ^ kMideaACSleep); +} + +// Return the Sleep state of the A/C. +bool IRMideaAC::getSleep() { return (remote_state & kMideaACSleep); } + +// Calculate the checksum for a given array. +// Args: +// state: The state to calculate the checksum over. +// Returns: +// The 8 bit checksum value. +uint8_t IRMideaAC::calcChecksum(const uint64_t state) { + uint8_t sum = 0; + uint64_t temp_state = state; + + for (uint8_t i = 0; i < 5; i++) { + temp_state >>= 8; + sum += reverseBits((temp_state & 0xFF), 8); + } + sum = 256 - sum; + return reverseBits(sum, 8); +} + +// Verify the checksum is valid for a given state. +// Args: +// state: The state to verify the checksum of. +// Returns: +// A boolean. +bool IRMideaAC::validChecksum(const uint64_t state) { + return ((state & 0xFF) == calcChecksum(state)); +} + +// Calculate & set the checksum for the current internal state of the remote. +void IRMideaAC::checksum() { + // Stored the checksum value in the last byte. + remote_state &= kMideaACChecksumMask; + remote_state |= calcChecksum(remote_state); +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRMideaAC::toString() { + String result = ""; +#else +std::string IRMideaAC::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Power: "; + if (getPower()) + result += "On"; + else + result += "Off"; + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kMideaACAuto: + result += " (AUTO)"; + break; + case kMideaACCool: + result += " (COOL)"; + break; + case kMideaACHeat: + result += " (HEAT)"; + break; + case kMideaACDry: + result += " (DRY)"; + break; + case kMideaACFan: + result += " (FAN)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp(true)) + "C/" + + uint64ToString(getTemp(false)) + "F"; + result += ", Fan: " + uint64ToString(getFan()); + switch (getFan()) { + case kMideaACFanAuto: + result += " (AUTO)"; + break; + case kMideaACFanLow: + result += " (LOW)"; + break; + case kMideaACFanMed: + result += " (MED)"; + break; + case kMideaACFanHigh: + result += " (HI)"; + break; + } + result += ", Sleep: "; + if (getSleep()) + result += "On"; + else + result += "Off"; + return result; +} + +#if DECODE_MIDEA +// Decode the supplied Midea message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kMideaBits. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: Alpha / Needs testing against a real device. +// +bool IRrecv::decodeMidea(decode_results *results, uint16_t nbits, bool strict) { + if (nbits % 8 != 0) // nbits has to be a multiple of nr. of bits in a byte. + return false; + + uint8_t min_nr_of_messages = 1; + if (strict) { + if (nbits != kMideaBits) return false; // Not strictly a MIDEA message. + min_nr_of_messages = 2; + } + + // The protocol sends the data normal + inverted, alternating on + // each byte. Hence twice the number of expected data bits. + if (results->rawlen < + min_nr_of_messages * (2 * nbits + kHeader + kFooter) - 1) + return false; // Can't possibly be a valid MIDEA message. + + uint64_t data = 0; + uint64_t inverted = 0; + uint16_t offset = kStartOffset; + + if (nbits > sizeof(data) * 8) + return false; // We can't possibly capture a Midea packet that big. + + for (uint8_t i = 0; i < min_nr_of_messages; i++) { + // Header + if (!matchMark(results->rawbuf[offset], kMideaHdrMark)) return false; + // Calculate how long the common tick time is based on the header mark. + uint32_t m_tick = results->rawbuf[offset++] * kRawTick / kMideaHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kMideaHdrSpace)) return false; + // Calculate how long the common tick time is based on the header space. + uint32_t s_tick = + results->rawbuf[offset++] * kRawTick / kMideaHdrSpaceTicks; + + // Data (Normal) + match_result_t data_result = matchData( + &(results->rawbuf[offset]), nbits, kMideaBitMarkTicks * m_tick, + kMideaOneSpaceTicks * s_tick, kMideaBitMarkTicks * m_tick, + kMideaZeroSpaceTicks * s_tick, kMideaTolerance); + if (data_result.success == false) return false; + offset += data_result.used; + if (i % 2 == 0) + data = data_result.data; + else + inverted = data_result.data; + + // Footer + if (!matchMark(results->rawbuf[offset++], kMideaBitMarkTicks * m_tick, + kMideaTolerance)) + return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset++], kMideaMinGapTicks * s_tick, + kMideaTolerance)) + return false; + } + + // Compliance + if (strict) { + // Protocol requires a second message with all the data bits inverted. + // We should have checked we got a second message in the previous loop. + // Just need to check it's value is an inverted copy of the first message. + uint64_t mask = (1ULL << kMideaBits) - 1; + if ((data & mask) != ((inverted ^ mask) & mask)) return false; + if (!IRMideaAC::validChecksum(data)) return false; + } + + // Success + results->decode_type = MIDEA; + results->bits = nbits; + results->value = data; + results->address = 0; + results->command = 0; + return true; +} +#endif // DECODE_MIDEA diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Midea.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Midea.h new file mode 100644 index 000000000..aa9f94a92 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Midea.h @@ -0,0 +1,103 @@ +// Copyright 2017 David Conran +#ifndef IR_MIDEA_H_ +#define IR_MIDEA_H_ + +#define __STDC_LIMIT_MACROS +#include +#ifdef ARDUINO +#include +#else +#include +#endif +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// MM MM IIIII DDDDD EEEEEEE AAA +// MMM MMM III DD DD EE AAAAA +// MM MM MM III DD DD EEEEE AA AA +// MM MM III DD DD EE AAAAAAA +// MM MM IIIII DDDDDD EEEEEEE AA AA + +// Midea added by crankyoldgit & bwze +// Ref: +// https://docs.google.com/spreadsheets/d/1TZh4jWrx4h9zzpYUI9aYXMl1fYOiqu-xVuOOMqagxrs/edit?usp=sharing + +// Constants +const uint8_t kMideaACCool = 0; // 0b000 +const uint8_t kMideaACDry = 1; // 0b001 +const uint8_t kMideaACAuto = 2; // 0b010 +const uint8_t kMideaACHeat = 3; // 0b011 +const uint8_t kMideaACFan = 4; // 0b100 +const uint8_t kMideaACFanAuto = 0; // 0b000 +const uint8_t kMideaACFanLow = 1; // 0b001 +const uint8_t kMideaACFanMed = 2; // 0b010 +const uint8_t kMideaACFanHigh = 3; // 0b011 +const uint64_t kMideaACPower = 1ULL << 39; +const uint64_t kMideaACSleep = 1ULL << 38; +const uint8_t kMideaACMinTempF = 62; // Fahrenheit +const uint8_t kMideaACMaxTempF = 86; // Fahrenheit +const uint8_t kMideaACMinTempC = 16; // Celsius +const uint8_t kMideaACMaxTempC = 30; // Celsius +const uint64_t kMideaACStateMask = 0x0000FFFFFFFFFFFF; +const uint64_t kMideaACTempMask = 0x0000FFFFE0FFFFFF; +const uint64_t kMideaACFanMask = 0x0000FFC7FFFFFFFF; +const uint64_t kMideaACModeMask = 0x0000FFF8FFFFFFFF; +const uint64_t kMideaACChecksumMask = 0x0000FFFFFFFFFF00; + +// Legacy defines. (Deprecated) +#define MIDEA_AC_COOL kMideaACCool +#define MIDEA_AC_DRY kMideaACDry +#define MIDEA_AC_AUTO kMideaACAuto +#define MIDEA_AC_HEAT kMideaACHeat +#define MIDEA_AC_FAN kMideaACFan +#define MIDEA_AC_FAN_AUTO kMideaACFanAuto +#define MIDEA_AC_FAN_LOW kMideaACFanLow +#define MIDEA_AC_FAN_MED kMideaACFanMed +#define MIDEA_AC_FAN_HI kMideaACFanHigh +#define MIDEA_AC_POWER kMideaACPower +#define MIDEA_AC_SLEEP kMideaACSleep +#define MIDEA_AC_MIN_TEMP_F kMideaACMinTempF +#define MIDEA_AC_MAX_TEMP_F kMideaACMaxTempF +#define MIDEA_AC_MIN_TEMP_C kMideaACMinTempC +#define MIDEA_AC_MAX_TEMP_C kMideaACMaxTempC + +class IRMideaAC { + public: + explicit IRMideaAC(uint16_t pin); + + void stateReset(); +#if SEND_MIDEA + void send(); +#endif // SEND_MIDEA + void begin(); + void on(); + void off(); + void setPower(const bool state); + bool getPower(); + void setTemp(const uint8_t temp, const bool useCelsius = false); + uint8_t getTemp(const bool useCelsius = false); + void setFan(const uint8_t fan); + uint8_t getFan(); + void setMode(const uint8_t mode); + uint8_t getMode(); + void setRaw(uint64_t newState); + uint64_t getRaw(); + static bool validChecksum(const uint64_t state); + void setSleep(const bool state); + bool getSleep(); +#ifdef ARDUINO + String toString(); +#else + std::string toString(); +#endif +#ifndef UNIT_TEST + + private: +#endif + uint64_t remote_state; + void checksum(); + static uint8_t calcChecksum(const uint64_t state); + IRsend _irsend; +}; + +#endif // IR_MIDEA_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Mitsubishi.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Mitsubishi.cpp new file mode 100644 index 000000000..b092c27b9 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Mitsubishi.cpp @@ -0,0 +1,714 @@ +// Copyright 2009 Ken Shirriff +// Copyright 2017-2018 David Conran +// Copyright 2018 Denes Varga + +#include "ir_Mitsubishi.h" +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// MMMMM IIIII TTTTT SSSS U U BBBB IIIII SSSS H H IIIII +// M M M I T S U U B B I S H H I +// M M M I T SSS U U BBBB I SSS HHHHH I +// M M I T S U U B B I S H H I +// M M IIIII T SSSS UUU BBBBB IIIII SSSS H H IIIII + +// Mitsubishi (TV) decoding added from https://github.com/z3t0/Arduino-IRremote +// Mitsubishi (TV) sending & Mitsubishi A/C support added by David Conran + +// Constants +// Mitsubishi TV +// period time is 1/33000Hz = 30.303 uSeconds (T) +// Ref: +// GlobalCache's Control Tower's Mitsubishi TV data. +// https://github.com/marcosamarinho/IRremoteESP8266/blob/master/ir_Mitsubishi.cpp +const uint16_t kMitsubishiTick = 30; +const uint16_t kMitsubishiBitMarkTicks = 10; +const uint16_t kMitsubishiBitMark = kMitsubishiBitMarkTicks * kMitsubishiTick; +const uint16_t kMitsubishiOneSpaceTicks = 70; +const uint16_t kMitsubishiOneSpace = kMitsubishiOneSpaceTicks * kMitsubishiTick; +const uint16_t kMitsubishiZeroSpaceTicks = 30; +const uint16_t kMitsubishiZeroSpace = + kMitsubishiZeroSpaceTicks * kMitsubishiTick; +const uint16_t kMitsubishiMinCommandLengthTicks = 1786; +const uint16_t kMitsubishiMinCommandLength = + kMitsubishiMinCommandLengthTicks * kMitsubishiTick; +const uint16_t kMitsubishiMinGapTicks = 936; +const uint16_t kMitsubishiMinGap = kMitsubishiMinGapTicks * kMitsubishiTick; + +// Mitsubishi Projector (HC3000) +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/441 + +const uint16_t kMitsubishi2HdrMark = 8400; +const uint16_t kMitsubishi2HdrSpace = kMitsubishi2HdrMark / 2; +const uint16_t kMitsubishi2BitMark = 560; +const uint16_t kMitsubishi2ZeroSpace = 520; +const uint16_t kMitsubishi2OneSpace = kMitsubishi2ZeroSpace * 3; +const uint16_t kMitsubishi2MinGap = 28500; + +// Mitsubishi A/C +// Ref: +// https://github.com/r45635/HVAC-IR-Control/blob/master/HVAC_ESP8266/HVAC_ESP8266.ino#L84 + +const uint16_t kMitsubishiAcHdrMark = 3400; +const uint16_t kMitsubishiAcHdrSpace = 1750; +const uint16_t kMitsubishiAcBitMark = 450; +const uint16_t kMitsubishiAcOneSpace = 1300; +const uint16_t kMitsubishiAcZeroSpace = 420; +const uint16_t kMitsubishiAcRptMark = 440; +const uint16_t kMitsubishiAcRptSpace = 17100; + +#if SEND_MITSUBISHI +// Send a Mitsubishi message +// +// Args: +// data: Contents of the message to be sent. +// nbits: Nr. of bits of data to be sent. Typically kMitsubishiBits. +// repeat: Nr. of additional times the message is to be sent. +// +// Status: ALPHA / untested. +// +// Notes: +// This protocol appears to have no header. +// Ref: +// https://github.com/marcosamarinho/IRremoteESP8266/blob/master/ir_Mitsubishi.cpp +// GlobalCache's Control Tower's Mitsubishi TV data. +void IRsend::sendMitsubishi(uint64_t data, uint16_t nbits, uint16_t repeat) { + sendGeneric(0, 0, // No Header + kMitsubishiBitMark, kMitsubishiOneSpace, kMitsubishiBitMark, + kMitsubishiZeroSpace, kMitsubishiBitMark, kMitsubishiMinGap, + kMitsubishiMinCommandLength, data, nbits, 33, true, repeat, 50); +} +#endif // SEND_MITSUBISHI + +#if DECODE_MITSUBISHI +// Decode the supplied Mitsubishi message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: Nr. of data bits to expect. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA / previously working. +// +// Notes: +// This protocol appears to have no header. +// +// Ref: +// GlobalCache's Control Tower's Mitsubishi TV data. +bool IRrecv::decodeMitsubishi(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < 2 * nbits + kFooter - 1) + return false; // Shorter than shortest possibly expected. + if (strict && nbits != kMitsubishiBits) + return false; // Request is out of spec. + + uint16_t offset = kStartOffset; + uint64_t data = 0; + + // No Header + // But try to auto-calibrate off the initial mark signal. + if (!matchMark(results->rawbuf[offset], kMitsubishiBitMark, 30)) return false; + // Calculate how long the common tick time is based on the initial mark. + uint32_t tick = results->rawbuf[offset] * kRawTick / kMitsubishiBitMarkTicks; + + // Data + match_result_t data_result = matchData( + &(results->rawbuf[offset]), nbits, kMitsubishiBitMarkTicks * tick, + kMitsubishiOneSpaceTicks * tick, kMitsubishiBitMarkTicks * tick, + kMitsubishiZeroSpaceTicks * tick); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + uint16_t actualBits = data_result.used / 2; + + // Footer + if (!matchMark(results->rawbuf[offset++], kMitsubishiBitMarkTicks * tick, 30)) + return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset], kMitsubishiMinGapTicks * tick)) + return false; + + // Compliance + if (actualBits < nbits) return false; + if (strict && actualBits != nbits) return false; // Not as we expected. + + // Success + results->decode_type = MITSUBISHI; + results->bits = actualBits; + results->value = data; + results->address = 0; + results->command = 0; + return true; +} +#endif // DECODE_MITSUBISHI + +#if SEND_MITSUBISHI2 +// Send a Mitsubishi2 message +// +// Args: +// data: Contents of the message to be sent. +// nbits: Nr. of bits of data to be sent. Typically kMitsubishiBits. +// repeat: Nr. of additional times the message is to be sent. +// +// Status: ALPHA / untested. +// +// Notes: +// Based on a Mitsubishi HC3000 projector's remote. +// This protocol appears to have a manditory in-protocol repeat. +// That is in *addition* to the entire message needing to be sent twice +// for the device to accept the command. That is separate from the repeat. +// i.e. Allegedly, the real remote requires the "OFF" button pressed twice. +// You will need to add a suitable gap yourself. +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/441 +void IRsend::sendMitsubishi2(uint64_t data, uint16_t nbits, uint16_t repeat) { + for (uint16_t i = 0; i <= repeat; i++) { + // First half of the data. + sendGeneric(kMitsubishi2HdrMark, kMitsubishi2HdrSpace, kMitsubishi2BitMark, + kMitsubishi2OneSpace, kMitsubishi2BitMark, + kMitsubishi2ZeroSpace, kMitsubishi2BitMark, + kMitsubishi2HdrSpace, data >> (nbits / 2), nbits / 2, 33, true, + 0, 50); + // Second half of the data. + sendGeneric(0, 0, // No header for the second data block + kMitsubishi2BitMark, kMitsubishi2OneSpace, kMitsubishi2BitMark, + kMitsubishi2ZeroSpace, kMitsubishi2BitMark, kMitsubishi2MinGap, + data & ((1 << (nbits / 2)) - 1), nbits / 2, 33, true, 0, 50); + } +} +#endif // SEND_MITSUBISHI2 + +#if DECODE_MITSUBISHI2 +// Decode the supplied Mitsubishi2 message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: Nr. of data bits to expect. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA / Works with simulated data. +// +// Notes: +// Hardware supported: +// * Mitsubishi HC3000 projector's remote. +// +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/441 +bool IRrecv::decodeMitsubishi2(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < 2 * nbits + kHeader + (kFooter * 2) - 1) + return false; // Shorter than shortest possibly expected. + if (strict && nbits != kMitsubishiBits) + return false; // Request is out of spec. + + uint16_t offset = kStartOffset; + uint64_t data = 0; + uint16_t actualBits = 0; + + // Header + if (!matchMark(results->rawbuf[offset++], kMitsubishi2HdrMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kMitsubishi2HdrSpace)) + return false; + for (uint8_t i = 1; i <= 2; i++) { + // Data + match_result_t data_result = matchData( + &(results->rawbuf[offset]), nbits / 2, kMitsubishi2BitMark, + kMitsubishi2OneSpace, kMitsubishi2BitMark, kMitsubishi2ZeroSpace); + if (data_result.success == false) return false; + data <<= nbits / 2; + data += data_result.data; + offset += data_result.used; + actualBits += data_result.used / 2; + + // Footer + if (!matchMark(results->rawbuf[offset++], kMitsubishi2BitMark)) + return false; + if (i % 2) { // Every odd data block, we expect a HDR space. + if (!matchSpace(results->rawbuf[offset++], kMitsubishi2HdrSpace)) + return false; + } else { // Every even data block, we expect Min Gap or end of the message. + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset++], kMitsubishi2MinGap)) + return false; + } + } + + // Compliance + if (actualBits < nbits) return false; + if (strict && actualBits != nbits) return false; // Not as we expected. + + // Success + results->decode_type = MITSUBISHI2; + results->bits = actualBits; + results->value = data; + results->address = data >> actualBits / 2; + results->command = data & ((1 << (actualBits / 2)) - 1); + return true; +} +#endif // DECODE_MITSUBISHI2 + +#if SEND_MITSUBISHI_AC +// Send a Mitsubishi A/C message. +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. (>=kMitsubishiACStateLength) +// repeat: Nr. of times the message is to be repeated. +// (Default = kMitsubishiACMinRepeat). +// +// Status: BETA / Appears to be working. +// +void IRsend::sendMitsubishiAC(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + if (nbytes < kMitsubishiACStateLength) + return; // Not enough bytes to send a proper message. + + sendGeneric(kMitsubishiAcHdrMark, kMitsubishiAcHdrSpace, kMitsubishiAcBitMark, + kMitsubishiAcOneSpace, kMitsubishiAcBitMark, + kMitsubishiAcZeroSpace, kMitsubishiAcRptMark, + kMitsubishiAcRptSpace, data, nbytes, 38, false, repeat, 50); +} +#endif // SEND_MITSUBISHI_AC + +#if DECODE_MITSUBISHI_AC +// Decode the supplied Mitsubishi message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: Nr. of data bits to expect. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: ALPHA / Under development +// +// Ref: +// https://www.analysir.com/blog/2015/01/06/reverse-engineering-mitsubishi-ac-infrared-protocol/ +bool IRrecv::decodeMitsubishiAC(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < ((kMitsubishiACBits * 2) + 2)) { + DPRINTLN("Shorter than shortest possibly expected."); + return false; // Shorter than shortest possibly expected. + } + if (strict && nbits != kMitsubishiACBits) { + DPRINTLN("Request is out of spec."); + return false; // Request is out of spec. + } + uint16_t offset = kStartOffset; + for (uint8_t i = 0; i < kMitsubishiACStateLength; i++) { + results->state[i] = 0; + } + bool failure = false; + uint8_t rep = 0; + do { + failure = false; + // Header: + // Somtime happens that junk signals arrives before the real message + bool headerFound = false; + while (!headerFound && + offset < (results->rawlen - (kMitsubishiACBits * 2 + 2))) { + headerFound = + matchMark(results->rawbuf[offset++], kMitsubishiAcHdrMark) && + matchSpace(results->rawbuf[offset++], kMitsubishiAcHdrSpace); + } + if (!headerFound) { + DPRINTLN("Header mark not found."); + failure = true; + } + // Decode byte-by-byte: + match_result_t data_result; + for (uint8_t i = 0; i < kMitsubishiACStateLength && !failure; i++) { + results->state[i] = 0; + data_result = + matchData(&(results->rawbuf[offset]), 8, kMitsubishiAcBitMark, + kMitsubishiAcOneSpace, kMitsubishiAcBitMark, + kMitsubishiAcZeroSpace, kTolerance, kMarkExcess, false); + if (data_result.success == false) { + failure = true; + DPRINT("Byte decode failed at #"); + DPRINTLN((uint16_t)i); + } else { + results->state[i] = data_result.data; + offset += data_result.used; + DPRINT((uint16_t)results->state[i]); + DPRINT(","); + } + DPRINTLN(""); + } + // HEADER validation: + if (failure || results->state[0] != 0x23 || results->state[1] != 0xCB || + results->state[2] != 0x26 || results->state[3] != 0x01 || + results->state[4] != 0x00) { + DPRINTLN("Header mismatch."); + failure = true; + } else { + // DATA part: + + // FOOTER checksum: + if (IRMitsubishiAC::calculateChecksum(results->state) != + results->state[kMitsubishiACStateLength - 1]) { + DPRINTLN("Checksum error."); + failure = true; + } + } + if (rep != kMitsubishiACMinRepeat && failure) { + bool repeatMarkFound = false; + while (!repeatMarkFound && + offset < (results->rawlen - (kMitsubishiACBits * 2 + 4))) { + repeatMarkFound = + matchMark(results->rawbuf[offset++], kMitsubishiAcRptMark) && + matchSpace(results->rawbuf[offset++], kMitsubishiAcRptSpace); + } + if (!repeatMarkFound) { + DPRINTLN("First attempt failure and repeat mark not found."); + return false; + } + } + rep++; + // Check if the repeat is correct if we need strict decode: + if (strict && !failure) { + DPRINTLN("Strict repeat check enabled."); + // Repeat mark and space: + if (!matchMark(results->rawbuf[offset++], kMitsubishiAcRptMark) || + !matchSpace(results->rawbuf[offset++], kMitsubishiAcRptSpace)) { + DPRINTLN("Repeat mark error."); + return false; + } + // Header mark and space: + if (!matchMark(results->rawbuf[offset++], kMitsubishiAcHdrMark) || + !matchSpace(results->rawbuf[offset++], kMitsubishiAcHdrSpace)) { + DPRINTLN("Repeat header error."); + return false; + } + // Payload: + for (uint8_t i = 0; i < kMitsubishiACStateLength; i++) { + data_result = + matchData(&(results->rawbuf[offset]), 8, kMitsubishiAcBitMark, + kMitsubishiAcOneSpace, kMitsubishiAcBitMark, + kMitsubishiAcZeroSpace, kTolerance, kMarkExcess, false); + if (data_result.success == false || + data_result.data != results->state[i]) { + DPRINTLN("Repeat payload error."); + return false; + } + offset += data_result.used; + } + } // strict repeat check + } while (failure && rep <= kMitsubishiACMinRepeat); + results->decode_type = MITSUBISHI_AC; + results->bits = kMitsubishiACStateLength * 8; + return true; +} +#endif // DECODE_MITSUBISHI_AC + +// Code to emulate Mitsubishi A/C IR remote control unit. +// Inspired and derived from the work done at: +// https://github.com/r45635/HVAC-IR-Control +// +// Warning: Consider this very alpha code. Seems to work, but not validated. +// +// Equipment it seems compatible with: +// * +// Initialise the object. +IRMitsubishiAC::IRMitsubishiAC(uint16_t pin) : _irsend(pin) { stateReset(); } + +// Reset the state of the remote to a known good state/sequence. +void IRMitsubishiAC::stateReset() { + // The state of the IR remote in IR code form. + // Known good state obtained from: + // https://github.com/r45635/HVAC-IR-Control/blob/master/HVAC_ESP8266/HVAC_ESP8266.ino#L108 + // Note: Can't use the following because it requires -std=c++11 + // uint8_t known_good_state[kMitsubishiACStateLength] = { + // 0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, 0x08, 0x06, 0x30, 0x45, 0x67, 0x00, + // 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F}; + remote_state[0] = 0x23; + remote_state[1] = 0xCB; + remote_state[2] = 0x26; + remote_state[3] = 0x01; + remote_state[4] = 0x00; + remote_state[5] = 0x20; + remote_state[6] = 0x08; + remote_state[7] = 0x06; + remote_state[8] = 0x30; + remote_state[9] = 0x45; + remote_state[10] = 0x67; + for (uint8_t i = 11; i < kMitsubishiACStateLength - 1; i++) + remote_state[i] = 0; + remote_state[kMitsubishiACStateLength - 1] = 0x1F; + checksum(); // Calculate the checksum +} + +// Configure the pin for output. +void IRMitsubishiAC::begin() { _irsend.begin(); } + +#if SEND_MITSUBISHI_AC +// Send the current desired state to the IR LED. +void IRMitsubishiAC::send() { + checksum(); // Ensure correct checksum before sending. + _irsend.sendMitsubishiAC(remote_state); +} +#endif // SEND_MITSUBISHI_AC + +// Return a pointer to the internal state date of the remote. +uint8_t *IRMitsubishiAC::getRaw() { + checksum(); + return remote_state; +} + +void IRMitsubishiAC::setRaw(uint8_t *data) { + for (uint8_t i = 0; i < (kMitsubishiACStateLength - 1); i++) { + remote_state[i] = data[i]; + } + checksum(); +} + +// Calculate the checksum for the current internal state of the remote. +void IRMitsubishiAC::checksum() { + remote_state[17] = calculateChecksum(remote_state); +} + +uint8_t IRMitsubishiAC::calculateChecksum(uint8_t *data) { + uint8_t sum = 0; + // Checksum is simple addition of all previous bytes stored + // as an 8 bit value. + for (uint8_t i = 0; i < 17; i++) sum += data[i]; + return sum & 0xFFU; +} + +// Set the requested power state of the A/C to off. +void IRMitsubishiAC::on() { + // state = ON; + remote_state[5] |= kMitsubishiAcPower; +} + +// Set the requested power state of the A/C to off. +void IRMitsubishiAC::off() { + // state = OFF; + remote_state[5] &= ~kMitsubishiAcPower; +} + +// Set the requested power state of the A/C. +void IRMitsubishiAC::setPower(bool state) { + if (state) + on(); + else + off(); +} + +// Return the requested power state of the A/C. +bool IRMitsubishiAC::getPower() { + return ((remote_state[5] & kMitsubishiAcPower) != 0); +} + +// Set the temp. in deg C +void IRMitsubishiAC::setTemp(uint8_t temp) { + temp = std::max((uint8_t)kMitsubishiAcMinTemp, temp); + temp = std::min((uint8_t)kMitsubishiAcMaxTemp, temp); + remote_state[7] = temp - kMitsubishiAcMinTemp; +} + +// Return the set temp. in deg C +uint8_t IRMitsubishiAC::getTemp() { + return (remote_state[7] + kMitsubishiAcMinTemp); +} + +// Set the speed of the fan, 0-6. +// 0 is auto, 1-5 is the speed, 6 is silent. +void IRMitsubishiAC::setFan(uint8_t fan) { + // Bounds check + if (fan > kMitsubishiAcFanSilent) + fan = kMitsubishiAcFanMax; // Set the fan to maximum if out of range. + if (fan == kMitsubishiAcFanAuto) { // Automatic is a special case. + remote_state[9] = 0b10000000 | (remote_state[9] & 0b01111000); + return; + } else if (fan >= kMitsubishiAcFanMax) { + fan--; // There is no spoon^H^H^Heed 5 (max), pretend it doesn't exist. + } + remote_state[9] &= 0b01111000; // Clear the previous state + remote_state[9] |= fan; +} + +// Return the requested state of the unit's fan. +uint8_t IRMitsubishiAC::getFan() { + uint8_t fan = remote_state[9] & 0b111; + if (fan == kMitsubishiAcFanMax) return kMitsubishiAcFanSilent; + return fan; +} + +// Return the requested climate operation mode of the a/c unit. +uint8_t IRMitsubishiAC::getMode() { return (remote_state[6]); } + +// Set the requested climate operation mode of the a/c unit. +void IRMitsubishiAC::setMode(uint8_t mode) { + // If we get an unexpected mode, default to AUTO. + switch (mode) { + case kMitsubishiAcAuto: + remote_state[8] = 0b00110000; + break; + case kMitsubishiAcCool: + remote_state[8] = 0b00110110; + break; + case kMitsubishiAcDry: + remote_state[8] = 0b00110010; + break; + case kMitsubishiAcHeat: + remote_state[8] = 0b00110000; + break; + default: + mode = kMitsubishiAcAuto; + remote_state[8] = 0b00110000; + } + remote_state[6] = mode; +} + +// Set the requested vane operation mode of the a/c unit. +void IRMitsubishiAC::setVane(uint8_t mode) { + mode = std::min(mode, (uint8_t)0b111); // bounds check + mode |= 0b1000; + mode <<= 3; + remote_state[9] &= 0b11000111; // Clear the previous setting. + remote_state[9] |= mode; +} + +// Return the requested vane operation mode of the a/c unit. +uint8_t IRMitsubishiAC::getVane() { + return ((remote_state[9] & 0b00111000) >> 3); +} + +// Return the clock setting of the message. 1=1/6 hour. e.g. 4pm = 48 +uint8_t IRMitsubishiAC::getClock() { return remote_state[10]; } + +// Set the current time. 1 = 1/6 hour. e.g. 6am = 36. +void IRMitsubishiAC::setClock(uint8_t clock) { remote_state[10] = clock; } + +// Return the desired start time. 1 = 1/6 hour. e.g. 1am = 6 +uint8_t IRMitsubishiAC::getStartClock() { return remote_state[12]; } + +// Set the desired start tiem of the AC. 1 = 1/6 hour. e.g. 8pm = 120 +void IRMitsubishiAC::setStartClock(uint8_t clock) { remote_state[12] = clock; } + +// Return the desired stop time of the AC. 1 = 1/6 hour. e.g 10pm = 132 +uint8_t IRMitsubishiAC::getStopClock() { return remote_state[11]; } + +// Set the desired stop time of the AC. 1 = 1/6 hour. e.g 10pm = 132 +void IRMitsubishiAC::setStopClock(uint8_t clock) { remote_state[11] = clock; } + +// Return the timer setting. Possible values: kMitsubishiAcNoTimer, +// kMitsubishiAcStartTimer, kMitsubishiAcStopTimer, +// kMitsubishiAcStartStopTimer +uint8_t IRMitsubishiAC::getTimer() { return remote_state[13] & 0b111; } + +// Set the timer setting. Possible values: kMitsubishiAcNoTimer, +// kMitsubishiAcStartTimer, kMitsubishiAcStopTimer, +// kMitsubishiAcStartStopTimer +void IRMitsubishiAC::setTimer(uint8_t timer) { + remote_state[13] = timer & 0b111; +} + +#ifdef ARDUINO +String IRMitsubishiAC::timeToString(uint64_t time) { + String result = ""; +#else +std::string IRMitsubishiAC::timeToString(uint64_t time) { + std::string result = ""; +#endif // ARDUINO + if (time / 6 < 10) result += "0"; + result += uint64ToString(time / 6); + result += ":"; + if (time * 10 % 60 < 10) result += "0"; + result += uint64ToString(time * 10 % 60); + return result; +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRMitsubishiAC::toString() { + String result = ""; +#else +std::string IRMitsubishiAC::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Power: "; + if (getPower()) + result += "On"; + else + result += "Off"; + switch (getMode()) { + case MITSUBISHI_AC_AUTO: + result += " (AUTO)"; + break; + case MITSUBISHI_AC_COOL: + result += " (COOL)"; + break; + case MITSUBISHI_AC_DRY: + result += " (DRY)"; + break; + case MITSUBISHI_AC_HEAT: + result += " (HEAT)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", FAN: "; + switch (getFan()) { + case MITSUBISHI_AC_FAN_AUTO: + result += "AUTO"; + break; + case MITSUBISHI_AC_FAN_MAX: + result += "MAX"; + break; + case MITSUBISHI_AC_FAN_SILENT: + result += "SILENT"; + break; + default: + result += uint64ToString(getFan()); + } + result += ", VANE: "; + switch (getVane()) { + case MITSUBISHI_AC_VANE_AUTO: + result += "AUTO"; + break; + case MITSUBISHI_AC_VANE_AUTO_MOVE: + result += "AUTO MOVE"; + break; + default: + result += uint64ToString(getVane()); + } + result += ", Time: "; + result += timeToString(getClock()); + result += ", On timer: "; + result += timeToString(getStartClock()); + result += ", Off timer: "; + result += timeToString(getStopClock()); + result += ", Timer: "; + switch (getTimer()) { + case kMitsubishiAcNoTimer: + result += "-"; + break; + case kMitsubishiAcStartTimer: + result += "Start"; + break; + case kMitsubishiAcStopTimer: + result += "Stop"; + break; + case kMitsubishiAcStartStopTimer: + result += "Start+Stop"; + break; + default: + result += "? ("; + result += getTimer(); + result += ")\n"; + } + return result; +} diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Mitsubishi.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Mitsubishi.h new file mode 100644 index 000000000..7b03efce6 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Mitsubishi.h @@ -0,0 +1,109 @@ +// Copyright 2009 Ken Shirriff +// Copyright 2017 David Conran +#ifndef IR_MITSUBISHI_H_ +#define IR_MITSUBISHI_H_ + +#define __STDC_LIMIT_MACROS +#include +#ifndef UNIT_TEST +#include +#else +#include +#endif +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// MMMMM IIIII TTTTT SSSS U U BBBB IIIII SSSS H H IIIII +// M M M I T S U U B B I S H H I +// M M M I T SSS U U BBBB I SSS HHHHH I +// M M I T S U U B B I S H H I +// M M IIIII T SSSS UUU BBBBB IIIII SSSS H H IIIII + +// Mitsubishi (TV) decoding added from https://github.com/z3t0/Arduino-IRremote +// Mitsubishi (TV) sending & Mitsubishi A/C support added by David Conran + +// Constants +const uint8_t kMitsubishiAcAuto = 0x20; +const uint8_t kMitsubishiAcCool = 0x18; +const uint8_t kMitsubishiAcDry = 0x10; +const uint8_t kMitsubishiAcHeat = 0x08; +const uint8_t kMitsubishiAcPower = 0x20; +const uint8_t kMitsubishiAcFanAuto = 0; +const uint8_t kMitsubishiAcFanMax = 5; +const uint8_t kMitsubishiAcFanRealMax = 4; +const uint8_t kMitsubishiAcFanSilent = 6; +const uint8_t kMitsubishiAcMinTemp = 16; // 16C +const uint8_t kMitsubishiAcMaxTemp = 31; // 31C +const uint8_t kMitsubishiAcVaneAuto = 0; +const uint8_t kMitsubishiAcVaneAutoMove = 7; +const uint8_t kMitsubishiAcNoTimer = 0; +const uint8_t kMitsubishiAcStartTimer = 5; +const uint8_t kMitsubishiAcStopTimer = 3; +const uint8_t kMitsubishiAcStartStopTimer = 7; + +// Legacy defines (Deprecated) +#define MITSUBISHI_AC_VANE_AUTO_MOVE kMitsubishiAcVaneAutoMove +#define MITSUBISHI_AC_VANE_AUTO kMitsubishiAcVaneAuto +#define MITSUBISHI_AC_POWER kMitsubishiAcPower +#define MITSUBISHI_AC_MIN_TEMP kMitsubishiAcMinTemp +#define MITSUBISHI_AC_MAX_TEMP kMitsubishiAcMaxTemp +#define MITSUBISHI_AC_HEAT kMitsubishiAcHeat +#define MITSUBISHI_AC_FAN_SILENT kMitsubishiAcFanSilent +#define MITSUBISHI_AC_FAN_REAL_MAX kMitsubishiAcFanRealMax +#define MITSUBISHI_AC_FAN_MAX kMitsubishiAcFanMax +#define MITSUBISHI_AC_FAN_AUTO kMitsubishiAcFanAuto +#define MITSUBISHI_AC_DRY kMitsubishiAcDry +#define MITSUBISHI_AC_COOL kMitsubishiAcCool +#define MITSUBISHI_AC_AUTO kMitsubishiAcAuto + +class IRMitsubishiAC { + public: + explicit IRMitsubishiAC(uint16_t pin); + + static uint8_t calculateChecksum(uint8_t* data); + + void stateReset(); +#if SEND_MITSUBISHI_AC + void send(); +#endif // SEND_MITSUBISHI_AC + void begin(); + void on(); + void off(); + void setPower(bool state); + bool getPower(); + void setTemp(uint8_t temp); + uint8_t getTemp(); + void setFan(uint8_t fan); + uint8_t getFan(); + void setMode(uint8_t mode); + uint8_t getMode(); + void setVane(uint8_t mode); + uint8_t getVane(); + uint8_t* getRaw(); + void setRaw(uint8_t* data); + uint8_t getClock(); + void setClock(uint8_t clock); + uint8_t getStartClock(); + void setStartClock(uint8_t clock); + uint8_t getStopClock(); + void setStopClock(uint8_t clock); + uint8_t getTimer(); + void setTimer(uint8_t timer); +#ifdef ARDUINO + String toString(); +#else + std::string toString(); +#endif + + private: +#ifdef ARDUINO + String timeToString(uint64_t time); +#else + std::string timeToString(uint64_t time); +#endif + uint8_t remote_state[kMitsubishiACStateLength]; + void checksum(); + IRsend _irsend; +}; + +#endif // IR_MITSUBISHI_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_NEC.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_NEC.cpp similarity index 53% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_NEC.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_NEC.cpp index a5febe1b8..660b51109 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_NEC.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_NEC.cpp @@ -2,11 +2,11 @@ // Copyright 2017 David Conran #define __STDC_LIMIT_MACROS +#include "ir_NEC.h" #include #include #include "IRrecv.h" #include "IRsend.h" -#include "IRtimer.h" #include "IRutils.h" // N N EEEEE CCCC @@ -17,39 +17,13 @@ // NEC originally added from https://github.com/shirriff/Arduino-IRremote/ -// Constants -// Ref: -// http://www.sbprojects.com/knowledge/ir/nec.php -#define NEC_TICK 560U -#define NEC_HDR_MARK_TICKS 16U -#define NEC_HDR_MARK (NEC_HDR_MARK_TICKS * NEC_TICK) -#define NEC_HDR_SPACE_TICKS 8U -#define NEC_HDR_SPACE (NEC_HDR_SPACE_TICKS * NEC_TICK) -#define NEC_BIT_MARK_TICKS 1U -#define NEC_BIT_MARK (NEC_BIT_MARK_TICKS * NEC_TICK) -#define NEC_ONE_SPACE_TICKS 3U -#define NEC_ONE_SPACE (NEC_TICK * NEC_ONE_SPACE_TICKS) -#define NEC_ZERO_SPACE_TICKS 1U -#define NEC_ZERO_SPACE (NEC_TICK * NEC_ZERO_SPACE_TICKS) -#define NEC_RPT_SPACE_TICKS 4U -#define NEC_RPT_SPACE (NEC_RPT_SPACE_TICKS * NEC_TICK) -#define NEC_RPT_LENGTH 4U -#define NEC_MIN_COMMAND_LENGTH_TICKS 193U -#define NEC_MIN_COMMAND_LENGTH (NEC_MIN_COMMAND_LENGTH_TICKS * NEC_TICK) -#define NEC_MIN_GAP (NEC_MIN_COMMAND_LENGTH - \ - (NEC_HDR_MARK + NEC_HDR_SPACE + NEC_BITS * (NEC_BIT_MARK + NEC_ONE_SPACE) \ - + NEC_BIT_MARK)) -#define NEC_MIN_GAP_TICKS (NEC_MIN_COMMAND_LENGTH_TICKS - \ - (NEC_HDR_MARK_TICKS + NEC_HDR_SPACE_TICKS + \ - NEC_BITS * (NEC_BIT_MARK_TICKS + NEC_ONE_SPACE_TICKS) + \ - NEC_BIT_MARK_TICKS)) - -#if (SEND_NEC || SEND_SHERWOOD || SEND_AIWA_RC_T501 || SEND_SANYO) +#if (SEND_NEC || SEND_SHERWOOD || SEND_AIWA_RC_T501 || SEND_SANYO || \ + SEND_PIONEER) // Send a raw NEC(Renesas) formatted message. // // Args: // data: The message to be sent. -// nbits: The number of bits of the message to be sent. Typically NEC_BITS. +// nbits: The number of bits of the message to be sent. Typically kNECBits. // repeat: The number of times the command is to be repeated. // // Status: STABLE / Known working. @@ -57,29 +31,17 @@ // Ref: // http://www.sbprojects.com/knowledge/ir/nec.php void IRsend::sendNEC(uint64_t data, uint16_t nbits, uint16_t repeat) { - // Set 38kHz IR carrier frequency & a 1/3 (33%) duty cycle. - enableIROut(38, 33); - IRtimer usecs = IRtimer(); - // Header - mark(NEC_HDR_MARK); - space(NEC_HDR_SPACE); - // Data - sendData(NEC_BIT_MARK, NEC_ONE_SPACE, NEC_BIT_MARK, NEC_ZERO_SPACE, - data, nbits, true); - // Footer - mark(NEC_BIT_MARK); - // Gap to next command. - space(std::max(NEC_MIN_GAP, NEC_MIN_COMMAND_LENGTH - usecs.elapsed())); - + sendGeneric(kNecHdrMark, kNecHdrSpace, kNecBitMark, kNecOneSpace, kNecBitMark, + kNecZeroSpace, kNecBitMark, kNecMinGap, kNecMinCommandLength, + data, nbits, 38, true, 0, // Repeats are handled later. + 33); // Optional command repeat sequence. - for (uint16_t i = 0; i < repeat; i++) { - usecs.reset(); - mark(NEC_HDR_MARK); - space(NEC_RPT_SPACE); - mark(NEC_BIT_MARK); - // Gap till next command. - space(std::max(NEC_MIN_GAP, NEC_MIN_COMMAND_LENGTH - usecs.elapsed())); - } + if (repeat) + sendGeneric(kNecHdrMark, kNecRptSpace, 0, 0, 0, 0, // No actual data sent. + kNecBitMark, kNecMinGap, kNecMinCommandLength, 0, + 0, // No data to be sent. + 38, true, repeat - 1, // We've already sent a one message. + 33); } // Calculate the raw NEC data based on address and command. @@ -97,8 +59,8 @@ uint32_t IRsend::encodeNEC(uint16_t address, uint16_t command) { command &= 0xFF; // We only want the least significant byte of command. // sendNEC() sends MSB first, but protocol says this is LSB first. command = reverseBits(command, 8); - command = (command << 8) + (command ^ 0xFF); // Calculate the new command. - if (address > 0xFF) { // Is it Extended NEC? + command = (command << 8) + (command ^ 0xFF); // Calculate the new command. + if (address > 0xFF) { // Is it Extended NEC? address = reverseBits(address, 16); return ((address << 16) + command); // Extended. } else { @@ -113,7 +75,7 @@ uint32_t IRsend::encodeNEC(uint16_t address, uint16_t command) { // // Args: // results: Ptr to the data to decode and where to store the decode result. -// nbits: The number of data bits to expect. Typically NEC_BITS. +// nbits: The number of data bits to expect. Typically kNECBits. // strict: Flag indicating if we should perform strict matching. // Returns: // boolean: True if it can decode it, false if it can't. @@ -122,34 +84,33 @@ uint32_t IRsend::encodeNEC(uint16_t address, uint16_t command) { // // Notes: // NEC protocol has three varients/forms. -// Normal: a 8 bit address & a 8 bit command in 32 bit data form. +// Normal: an 8 bit address & an 8 bit command in 32 bit data form. // i.e. address + inverted(address) + command + inverted(command) -// Extended: a 16 bit address & a 8 bit command in 32 bit data form. +// Extended: a 16 bit address & an 8 bit command in 32 bit data form. // i.e. address + command + inverted(command) // Repeat: a 0-bit code. i.e. No data bits. Just the header + footer. // // Ref: // http://www.sbprojects.com/knowledge/ir/nec.php bool IRrecv::decodeNEC(decode_results *results, uint16_t nbits, bool strict) { - if (results->rawlen < 2 * nbits + HEADER + FOOTER - 1 && - results->rawlen != NEC_RPT_LENGTH) + if (results->rawlen < 2 * nbits + kHeader + kFooter - 1 && + results->rawlen != kNecRptLength) return false; // Can't possibly be a valid NEC message. - if (strict && nbits != NEC_BITS) + if (strict && nbits != kNECBits) return false; // Not strictly an NEC message. uint64_t data = 0; - uint16_t offset = OFFSET_START; + uint16_t offset = kStartOffset; // Header - if (!matchMark(results->rawbuf[offset], NEC_HDR_MARK)) return false; + if (!matchMark(results->rawbuf[offset], kNecHdrMark)) return false; // Calculate how long the lowest tick time is based on the header mark. - uint32_t mark_tick = results->rawbuf[offset++] * RAWTICK / - NEC_HDR_MARK_TICKS; + uint32_t mark_tick = results->rawbuf[offset++] * kRawTick / kNecHdrMarkTicks; // Check if it is a repeat code. - if (results->rawlen == NEC_RPT_LENGTH && - matchSpace(results->rawbuf[offset], NEC_RPT_SPACE) && - matchMark(results->rawbuf[offset + 1], NEC_BIT_MARK_TICKS * mark_tick)) { - results->value = REPEAT; + if (results->rawlen == kNecRptLength && + matchSpace(results->rawbuf[offset], kNecRptSpace) && + matchMark(results->rawbuf[offset + 1], kNecBitMarkTicks * mark_tick)) { + results->value = kRepeat; results->decode_type = NEC; results->bits = 0; results->address = 0; @@ -159,34 +120,32 @@ bool IRrecv::decodeNEC(decode_results *results, uint16_t nbits, bool strict) { } // Header (cont.) - if (!matchSpace(results->rawbuf[offset], NEC_HDR_SPACE)) return false; + if (!matchSpace(results->rawbuf[offset], kNecHdrSpace)) return false; // Calculate how long the common tick time is based on the header space. - uint32_t space_tick = results->rawbuf[offset++] * RAWTICK / - NEC_HDR_SPACE_TICKS; + uint32_t space_tick = + results->rawbuf[offset++] * kRawTick / kNecHdrSpaceTicks; // Data - match_result_t data_result = matchData(&(results->rawbuf[offset]), nbits, - NEC_BIT_MARK_TICKS * mark_tick, - NEC_ONE_SPACE_TICKS * space_tick, - NEC_BIT_MARK_TICKS * mark_tick, - NEC_ZERO_SPACE_TICKS * space_tick); + match_result_t data_result = + matchData(&(results->rawbuf[offset]), nbits, kNecBitMarkTicks * mark_tick, + kNecOneSpaceTicks * space_tick, kNecBitMarkTicks * mark_tick, + kNecZeroSpaceTicks * space_tick); if (data_result.success == false) return false; data = data_result.data; offset += data_result.used; // Footer - if (!matchMark(results->rawbuf[offset++], NEC_BIT_MARK_TICKS * mark_tick)) - return false; - if (offset <= results->rawlen && - !matchAtLeast(results->rawbuf[offset], NEC_MIN_GAP_TICKS * space_tick)) + if (!matchMark(results->rawbuf[offset++], kNecBitMarkTicks * mark_tick)) + return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset], kNecMinGapTicks * space_tick)) return false; // Compliance // Calculate command and optionally enforce integrity checking. - uint8_t command = (data & 0xFF00) >> 8; + uint8_t command = (data & 0xFF00) >> 8; // Command is sent twice, once as plain and then inverted. if ((command ^ 0xFF) != (data & 0xFF)) { - if (strict) - return false; // Command integrity failed. + if (strict) return false; // Command integrity failed. command = 0; // The command value isn't valid, so default to zero. } diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_NEC.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_NEC.h new file mode 100644 index 000000000..c274c104e --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_NEC.h @@ -0,0 +1,46 @@ +// Copyright 2009 Ken Shirriff +// Copyright 2017, 2018 David Conran + +#ifndef IR_NEC_H_ +#define IR_NEC_H_ + +#include +#include "IRremoteESP8266.h" + +// N N EEEEE CCCC +// NN N E C +// N N N EEE C +// N NN E C +// N N EEEEE CCCC + +// NEC originally added from https://github.com/shirriff/Arduino-IRremote/ + +// Constants +// Ref: +// http://www.sbprojects.com/knowledge/ir/nec.php +const uint16_t kNecTick = 560; +const uint16_t kNecHdrMarkTicks = 16; +const uint16_t kNecHdrMark = kNecHdrMarkTicks * kNecTick; +const uint16_t kNecHdrSpaceTicks = 8; +const uint16_t kNecHdrSpace = kNecHdrSpaceTicks * kNecTick; +const uint16_t kNecBitMarkTicks = 1; +const uint16_t kNecBitMark = kNecBitMarkTicks * kNecTick; +const uint16_t kNecOneSpaceTicks = 3; +const uint16_t kNecOneSpace = kNecOneSpaceTicks * kNecTick; +const uint16_t kNecZeroSpaceTicks = 1; +const uint16_t kNecZeroSpace = kNecZeroSpaceTicks * kNecTick; +const uint16_t kNecRptSpaceTicks = 4; +const uint16_t kNecRptSpace = kNecRptSpaceTicks * kNecTick; +const uint16_t kNecRptLength = 4; +const uint16_t kNecMinCommandLengthTicks = 193; +const uint32_t kNecMinCommandLength = kNecMinCommandLengthTicks * kNecTick; +const uint32_t kNecMinGap = + kNecMinCommandLength - + (kNecHdrMark + kNecHdrSpace + kNECBits * (kNecBitMark + kNecOneSpace) + + kNecBitMark); +const uint16_t kNecMinGapTicks = + kNecMinCommandLengthTicks - + (kNecHdrMarkTicks + kNecHdrSpaceTicks + + kNECBits * (kNecBitMarkTicks + kNecOneSpaceTicks) + kNecBitMarkTicks); + +#endif // IR_NEC_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Nikai.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Nikai.cpp new file mode 100644 index 000000000..9ac22a849 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Nikai.cpp @@ -0,0 +1,104 @@ +// Copyright 2009 Ken Shirriff +// Copyright 2017 David Conran + +#include +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// NN NN IIIII KK KK AAA IIIII +// NNN NN III KK KK AAAAA III +// NN N NN III KKKK AA AA III +// NN NNN III KK KK AAAAAAA III +// NN NN IIIII KK KK AA AA IIIII + +// Constants +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/309 +const uint16_t kNikaiTick = 500; +const uint16_t kNikaiHdrMarkTicks = 8; +const uint16_t kNikaiHdrMark = kNikaiHdrMarkTicks * kNikaiTick; +const uint16_t kNikaiHdrSpaceTicks = 8; +const uint16_t kNikaiHdrSpace = kNikaiHdrSpaceTicks * kNikaiTick; +const uint16_t kNikaiBitMarkTicks = 1; +const uint16_t kNikaiBitMark = kNikaiBitMarkTicks * kNikaiTick; +const uint16_t kNikaiOneSpaceTicks = 2; +const uint16_t kNikaiOneSpace = kNikaiOneSpaceTicks * kNikaiTick; +const uint16_t kNikaiZeroSpaceTicks = 4; +const uint16_t kNikaiZeroSpace = kNikaiZeroSpaceTicks * kNikaiTick; +const uint16_t kNikaiMinGapTicks = 17; +const uint16_t kNikaiMinGap = kNikaiMinGapTicks * kNikaiTick; + +#if SEND_NIKAI +// Send a Nikai TV formatted message. +// +// Args: +// data: The message to be sent. +// nbits: The bit size of the message being sent. typically kNikaiBits. +// repeat: The number of times the message is to be repeated. +// +// Status: STABLE / Working. +// +// Ref: https://github.com/markszabo/IRremoteESP8266/issues/309 +void IRsend::sendNikai(uint64_t data, uint16_t nbits, uint16_t repeat) { + sendGeneric(kNikaiHdrMark, kNikaiHdrSpace, kNikaiBitMark, kNikaiOneSpace, + kNikaiBitMark, kNikaiZeroSpace, kNikaiBitMark, kNikaiMinGap, data, + nbits, 38, true, repeat, 33); +} +#endif + +#if DECODE_NIKAI +// Decode the supplied Nikai message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: Nr. of bits to expect in the data portion. +// Typically kNikaiBits. +// strict: Flag to indicate if we strictly adhere to the specification. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: STABLE / Working. +// +bool IRrecv::decodeNikai(decode_results *results, uint16_t nbits, bool strict) { + if (results->rawlen < 2 * nbits + kHeader + kFooter - 1) + return false; // Can't possibly be a valid Nikai message. + if (strict && nbits != kNikaiBits) + return false; // We expect Nikai to be a certain sized message. + + uint64_t data = 0; + uint16_t offset = kStartOffset; + + // Header + if (!matchMark(results->rawbuf[offset], kNikaiHdrMark)) return false; + // Calculate how long the common tick time is based on the header mark. + uint32_t m_tick = results->rawbuf[offset++] * kRawTick / kNikaiHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kNikaiHdrSpace)) return false; + // Calculate how long the common tick time is based on the header space. + uint32_t s_tick = results->rawbuf[offset++] * kRawTick / kNikaiHdrSpaceTicks; + // Data + match_result_t data_result = + matchData(&(results->rawbuf[offset]), nbits, kNikaiBitMarkTicks * m_tick, + kNikaiOneSpaceTicks * s_tick, kNikaiBitMarkTicks * m_tick, + kNikaiZeroSpaceTicks * s_tick); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + // Footer + if (!matchMark(results->rawbuf[offset++], kNikaiBitMarkTicks * m_tick)) + return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset], kNikaiMinGapTicks * s_tick)) + return false; + + // Compliance + + // Success + results->bits = nbits; + results->value = data; + results->decode_type = NIKAI; + results->command = 0; + results->address = 0; + return true; +} +#endif diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Panasonic.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Panasonic.cpp new file mode 100644 index 000000000..e79b136a5 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Panasonic.cpp @@ -0,0 +1,863 @@ +// Copyright 2015 Kristian Lauszus +// Copyright 2017, 2018 David Conran + +#include "ir_Panasonic.h" +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// PPPP AAA N N AAA SSSS OOO N N IIIII CCCC +// P P A A NN N A A S O O NN N I C +// PPPP AAAAA N N N AAAAA SSS O O N N N I C +// P A A N NN A A S O O N NN I C +// P A A N N A A SSSS OOO N N IIIII CCCC + +// Panasonic protocol originally added by Kristian Lauszus from: +// https://github.com/z3t0/Arduino-IRremote +// (Thanks to zenwheel and other people at the original blog post) +// +// Panasonic A/C support add by crankyoldgit but heavily influenced by: +// https://github.com/ToniA/ESPEasy/blob/HeatpumpIR/lib/HeatpumpIR/PanasonicHeatpumpIR.cpp +// Panasonic A/C Clock & Timer support: +// Reverse Engineering by MikkelTb +// Code by crankyoldgit +// Panasonic A/C models supported: +// A/C Series/models: +// JKE, LKE, DKE, CKP, & NKE series. (In theory) +// CS-YW9MKD (confirmed) +// CS-ME14CKPG / CS-ME12CKPG / CS-ME10CKPG +// A/C Remotes: +// A75C3747 (confirmed) +// A75C3704 +// A75C2311 (CKP) + +// Constants +// Ref: +// http://www.remotecentral.com/cgi-bin/mboard/rc-pronto/thread.cgi?26152 + +const uint16_t kPanasonicTick = 432; +const uint16_t kPanasonicHdrMarkTicks = 8; +const uint16_t kPanasonicHdrMark = kPanasonicHdrMarkTicks * kPanasonicTick; +const uint16_t kPanasonicHdrSpaceTicks = 4; +const uint16_t kPanasonicHdrSpace = kPanasonicHdrSpaceTicks * kPanasonicTick; +const uint16_t kPanasonicBitMarkTicks = 1; +const uint16_t kPanasonicBitMark = kPanasonicBitMarkTicks * kPanasonicTick; +const uint16_t kPanasonicOneSpaceTicks = 3; +const uint16_t kPanasonicOneSpace = kPanasonicOneSpaceTicks * kPanasonicTick; +const uint16_t kPanasonicZeroSpaceTicks = 1; +const uint16_t kPanasonicZeroSpace = kPanasonicZeroSpaceTicks * kPanasonicTick; +const uint16_t kPanasonicMinCommandLengthTicks = 378; +const uint32_t kPanasonicMinCommandLength = + kPanasonicMinCommandLengthTicks * kPanasonicTick; +const uint16_t kPanasonicEndGap = 5000; // See issue #245 +const uint16_t kPanasonicMinGapTicks = + kPanasonicMinCommandLengthTicks - + (kPanasonicHdrMarkTicks + kPanasonicHdrSpaceTicks + + kPanasonicBits * (kPanasonicBitMarkTicks + kPanasonicOneSpaceTicks) + + kPanasonicBitMarkTicks); +const uint32_t kPanasonicMinGap = kPanasonicMinGapTicks * kPanasonicTick; + +const uint16_t kPanasonicAcSectionGap = 10000; +const uint16_t kPanasonicAcSection1Length = 8; +const uint32_t kPanasonicAcMessageGap = 100000; // A complete guess. + +#if (SEND_PANASONIC || SEND_DENON) +// Send a Panasonic formatted message. +// +// Args: +// data: The message to be sent. +// nbits: The number of bits of the message to be sent. (kPanasonicBits). +// repeat: The number of times the command is to be repeated. +// +// Status: BETA / Should be working. +// +// Note: +// This protocol is a modified version of Kaseikyo. +void IRsend::sendPanasonic64(uint64_t data, uint16_t nbits, uint16_t repeat) { + sendGeneric(kPanasonicHdrMark, kPanasonicHdrSpace, kPanasonicBitMark, + kPanasonicOneSpace, kPanasonicBitMark, kPanasonicZeroSpace, + kPanasonicBitMark, kPanasonicMinGap, kPanasonicMinCommandLength, + data, nbits, kPanasonicFreq, true, repeat, 50); +} + +// Send a Panasonic formatted message. +// +// Args: +// address: The manufacturer code. +// data: The data portion to be sent. +// nbits: The number of bits of the message to be sent. (kPanasonicBits). +// repeat: The number of times the command is to be repeated. +// +// Status: STABLE. +// +// Note: +// This protocol is a modified version of Kaseikyo. +void IRsend::sendPanasonic(uint16_t address, uint32_t data, uint16_t nbits, + uint16_t repeat) { + sendPanasonic64(((uint64_t)address << 32) | (uint64_t)data, nbits, repeat); +} + +// Calculate the raw Panasonic data based on device, subdevice, & function. +// +// Args: +// manufacturer: A 16-bit manufacturer code. e.g. 0x4004 is Panasonic. +// device: An 8-bit code. +// subdevice: An 8-bit code. +// function: An 8-bit code. +// Returns: +// A raw uint64_t Panasonic message. +// +// Status: BETA / Should be working.. +// +// Note: +// Panasonic 48-bit protocol is a modified version of Kaseikyo. +// Ref: +// http://www.remotecentral.com/cgi-bin/mboard/rc-pronto/thread.cgi?2615 +uint64_t IRsend::encodePanasonic(uint16_t manufacturer, uint8_t device, + uint8_t subdevice, uint8_t function) { + uint8_t checksum = device ^ subdevice ^ function; + return (((uint64_t)manufacturer << 32) | ((uint64_t)device << 24) | + ((uint64_t)subdevice << 16) | ((uint64_t)function << 8) | checksum); +} +#endif // (SEND_PANASONIC || SEND_DENON) + +#if (DECODE_PANASONIC || DECODE_DENON) +// Decode the supplied Panasonic message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: Nr. of data bits to expect. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA / Should be working. +// Note: +// Panasonic 48-bit protocol is a modified version of Kaseikyo. +// Ref: +// http://www.remotecentral.com/cgi-bin/mboard/rc-pronto/thread.cgi?26152 +// http://www.hifi-remote.com/wiki/index.php?title=Panasonic +bool IRrecv::decodePanasonic(decode_results *results, uint16_t nbits, + bool strict, uint32_t manufacturer) { + if (results->rawlen < 2 * nbits + kHeader + kFooter - 1) + return false; // Not enough entries to be a Panasonic message. + if (strict && nbits != kPanasonicBits) + return false; // Request is out of spec. + + uint64_t data = 0; + uint16_t offset = kStartOffset; + + // Header + if (!matchMark(results->rawbuf[offset], kPanasonicHdrMark)) return false; + // Calculate how long the common tick time is based on the header mark. + uint32_t m_tick = + results->rawbuf[offset++] * kRawTick / kPanasonicHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kPanasonicHdrSpace)) return false; + // Calculate how long the common tick time is based on the header space. + uint32_t s_tick = + results->rawbuf[offset++] * kRawTick / kPanasonicHdrSpaceTicks; + + // Data + match_result_t data_result = matchData( + &(results->rawbuf[offset]), nbits, kPanasonicBitMarkTicks * m_tick, + kPanasonicOneSpaceTicks * s_tick, kPanasonicBitMarkTicks * m_tick, + kPanasonicZeroSpaceTicks * s_tick); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + + // Footer + if (!match(results->rawbuf[offset++], kPanasonicBitMarkTicks * m_tick)) + return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset], kPanasonicEndGap)) + return false; + + // Compliance + uint32_t address = data >> 32; + uint32_t command = data & 0xFFFFFFFF; + if (strict) { + if (address != manufacturer) // Verify the Manufacturer code. + return false; + // Verify the checksum. + uint8_t checksumOrig = data & 0xFF; + uint8_t checksumCalc = ((data >> 24) ^ (data >> 16) ^ (data >> 8)) & 0xFF; + if (checksumOrig != checksumCalc) return false; + } + + // Success + results->value = data; + results->address = address; + results->command = command; + results->decode_type = PANASONIC; + results->bits = nbits; + return true; +} +#endif // (DECODE_PANASONIC || DECODE_DENON) + +#if SEND_PANASONIC_AC +// Send a Panasonic A/C message. +// +// Args: +// data: Contents of the message to be sent. (Guessing MSBF order) +// nbits: Nr. of bits of data to be sent. Typically kPanasonicAcBits. +// repeat: Nr. of additional times the message is to be sent. +// +// Status: Beta / Appears to work with real device(s). +//: +// Panasonic A/C models supported: +// A/C Series/models: +// JKE, LKE, DKE, & NKE series. +// CS-YW9MKD +// A/C Remotes: +// A75C3747 +// A75C3704 +// +void IRsend::sendPanasonicAC(uint8_t data[], uint16_t nbytes, uint16_t repeat) { + if (nbytes < kPanasonicAcSection1Length) return; + for (uint16_t r = 0; r <= repeat; r++) { + // First section. (8 bytes) + sendGeneric(kPanasonicHdrMark, kPanasonicHdrSpace, kPanasonicBitMark, + kPanasonicOneSpace, kPanasonicBitMark, kPanasonicZeroSpace, + kPanasonicBitMark, kPanasonicAcSectionGap, data, + kPanasonicAcSection1Length, kPanasonicFreq, false, 0, 50); + // First section. (The rest of the data bytes) + sendGeneric(kPanasonicHdrMark, kPanasonicHdrSpace, kPanasonicBitMark, + kPanasonicOneSpace, kPanasonicBitMark, kPanasonicZeroSpace, + kPanasonicBitMark, kPanasonicAcMessageGap, + data + kPanasonicAcSection1Length, + nbytes - kPanasonicAcSection1Length, kPanasonicFreq, false, 0, + 50); + } +} +#endif // SEND_PANASONIC_AC + +IRPanasonicAc::IRPanasonicAc(uint16_t pin) : _irsend(pin) { stateReset(); } + +void IRPanasonicAc::stateReset() { + for (uint8_t i = 0; i < kPanasonicAcStateLength; i++) + remote_state[i] = kPanasonicKnownGoodState[i]; + _temp = 25; // An initial saved desired temp. Completely made up. + _swingh = kPanasonicAcSwingHMiddle; // A similar made up value for H Swing. +} + +void IRPanasonicAc::begin() { _irsend.begin(); } + +// Verify the checksum is valid for a given state. +// Args: +// state: The array to verify the checksum of. +// length: The size of the state. +// Returns: +// A boolean. +bool IRPanasonicAc::validChecksum(uint8_t state[], const uint16_t length) { + if (length < 2) return false; // 1 byte of data can't have a checksum. + return (state[length - 1] == + sumBytes(state, length - 1, kPanasonicAcChecksumInit)); +} + +uint8_t IRPanasonicAc::calcChecksum(uint8_t state[], const uint16_t length) { + return sumBytes(state, length - 1, kPanasonicAcChecksumInit); +} + +void IRPanasonicAc::fixChecksum(const uint16_t length) { + remote_state[length - 1] = calcChecksum(remote_state, length); +} + +#if SEND_PANASONIC_AC +void IRPanasonicAc::send() { + fixChecksum(); + _irsend.sendPanasonicAC(remote_state); +} +#endif // SEND_PANASONIC_AC + +void IRPanasonicAc::setModel(const panasonic_ac_remote_model_t model) { + switch (model) { + case kPanasonicDke: + case kPanasonicJke: + case kPanasonicLke: + case kPanasonicNke: + case kPanasonicCkp: + break; + default: // Only proceed if we know what to do. + return; + } + // clear & set the various bits and bytes. + remote_state[13] &= 0xF0; + remote_state[17] = 0x00; + remote_state[21] &= 0b11101111; + remote_state[23] = 0x81; + remote_state[25] = 0x00; + + switch (model) { + case kPanasonicLke: + remote_state[13] |= 0x02; + remote_state[17] = 0x06; + break; + case kPanasonicDke: + remote_state[23] = 0x01; + remote_state[25] = 0x06; + // Has to be done last as setSwingHorizontal has model check built-in + setSwingHorizontal(_swingh); + break; + case kPanasonicNke: + remote_state[17] = 0x06; + break; + case kPanasonicJke: + break; + case kPanasonicCkp: + remote_state[21] |= 0x10; + remote_state[23] = 0x01; + default: + break; + } +} + +panasonic_ac_remote_model_t IRPanasonicAc::getModel() { + if (remote_state[17] == 0x00) { + if ((remote_state[21] & 0x10) && (remote_state[23] & 0x01)) + return kPanasonicCkp; + if (remote_state[23] & 0x80) return kPanasonicJke; + } + if (remote_state[17] == 0x06 && (remote_state[13] & 0x0F) == 0x02) + return kPanasonicLke; + if (remote_state[23] == 0x01) return kPanasonicDke; + if (remote_state[17] == 0x06) return kPanasonicNke; + return kPanasonicUnknown; +} + +uint8_t *IRPanasonicAc::getRaw() { + fixChecksum(); + return remote_state; +} + +void IRPanasonicAc::setRaw(const uint8_t state[]) { + for (uint8_t i = 0; i < kPanasonicAcStateLength; i++) { + remote_state[i] = state[i]; + } +} + +// Control the power state of the A/C unit. +// +// For CKP models, the remote has no memory of the power state the A/C unit +// should be in. For those models setting this on/true will toggle the power +// state of the Panasonic A/C unit with the next meessage. +// e.g. If the A/C unit is already on, setPower(true) will turn it off. +// If the A/C unit is already off, setPower(true) will turn it on. +// setPower(false) will leave the A/C power state as it was. +// +// For all other models, setPower(true) should set the internal state to +// turn it on, and setPower(false) should turn it off. +void IRPanasonicAc::setPower(const bool state) { + if (state) + on(); + else + off(); +} + +// Return the A/C power state of the remote. +// Except for CKP models, where it returns if the power state will be toggled +// on the A/C unit when the next message is sent. +bool IRPanasonicAc::getPower() { + return (remote_state[13] & kPanasonicAcPower) == kPanasonicAcPower; +} + +void IRPanasonicAc::on() { remote_state[13] |= kPanasonicAcPower; } + +void IRPanasonicAc::off() { remote_state[13] &= ~kPanasonicAcPower; } + +uint8_t IRPanasonicAc::getMode() { return remote_state[13] >> 4; } + +void IRPanasonicAc::setMode(const uint8_t desired) { + uint8_t mode = kPanasonicAcAuto; // Default to Auto mode. + switch (desired) { + case kPanasonicAcFan: + // Allegedly Fan mode has a temperature of 27. + setTemp(kPanasonicAcFanModeTemp, false); + mode = desired; + break; + case kPanasonicAcAuto: + case kPanasonicAcCool: + case kPanasonicAcHeat: + case kPanasonicAcDry: + mode = desired; + // Set the temp to the saved temp, just incase our previous mode was Fan. + setTemp(_temp); + break; + } + remote_state[13] &= 0x0F; // Clear the previous mode bits. + remote_state[13] |= mode << 4; +} + +uint8_t IRPanasonicAc::getTemp() { return remote_state[14] >> 1; } + +// Set the desitred temperature in Celcius. +// Args: +// celsius: The temperature to set the A/C unit to. +// remember: A boolean flag for the class to remember the temperature. +// +// Automatically safely limits the temp to the operating range supported. +void IRPanasonicAc::setTemp(const uint8_t celsius, const bool remember) { + uint8_t temperature; + temperature = std::max(celsius, kPanasonicAcMinTemp); + temperature = std::min(temperature, kPanasonicAcMaxTemp); + remote_state[14] = temperature << 1; + if (remember) _temp = temperature; +} + +uint8_t IRPanasonicAc::getSwingVertical() { return remote_state[16] & 0x0F; } + +void IRPanasonicAc::setSwingVertical(const uint8_t desired_elevation) { + uint8_t elevation = desired_elevation; + if (elevation != kPanasonicAcSwingVAuto) { + elevation = std::max(elevation, kPanasonicAcSwingVUp); + elevation = std::min(elevation, kPanasonicAcSwingVDown); + } + remote_state[16] &= 0xF0; + remote_state[16] |= elevation; +} + +uint8_t IRPanasonicAc::getSwingHorizontal() { return remote_state[17]; } + +void IRPanasonicAc::setSwingHorizontal(const uint8_t desired_direction) { + switch (desired_direction) { + case kPanasonicAcSwingHAuto: + case kPanasonicAcSwingHMiddle: + case kPanasonicAcSwingHFullLeft: + case kPanasonicAcSwingHLeft: + case kPanasonicAcSwingHRight: + case kPanasonicAcSwingHFullRight: + break; + default: // Ignore anything that isn't valid. + return; + } + _swingh = desired_direction; // Store the direction for later. + uint8_t direction = desired_direction; + switch (getModel()) { + case kPanasonicDke: + break; + case kPanasonicNke: + case kPanasonicLke: + direction = kPanasonicAcSwingHMiddle; + break; + default: // Ignore everything else. + return; + } + remote_state[17] = direction; +} + +void IRPanasonicAc::setFan(const uint8_t speed) { + if (speed <= kPanasonicAcFanMax || speed == kPanasonicAcFanAuto) + remote_state[16] = + (remote_state[16] & 0x0F) | ((speed + kPanasonicAcFanOffset) << 4); +} + +uint8_t IRPanasonicAc::getFan() { + return (remote_state[16] >> 4) - kPanasonicAcFanOffset; +} + +bool IRPanasonicAc::getQuiet() { + if (getModel() == kPanasonicCkp) + return remote_state[21] & kPanasonicAcQuietCkp; + else + return remote_state[21] & kPanasonicAcQuiet; +} + +void IRPanasonicAc::setQuiet(const bool state) { + uint8_t quiet; + if (getModel() == kPanasonicCkp) + quiet = kPanasonicAcQuietCkp; + else + quiet = kPanasonicAcQuiet; + + if (state) { + setPowerful(false); // Powerful is mutually exclusive. + remote_state[21] |= quiet; + } else { + remote_state[21] &= ~quiet; + } +} + +bool IRPanasonicAc::getPowerful() { + if (getModel() == kPanasonicCkp) + return remote_state[21] & kPanasonicAcPowerfulCkp; + else + return remote_state[21] & kPanasonicAcPowerful; +} + +void IRPanasonicAc::setPowerful(const bool state) { + uint8_t powerful; + if (getModel() == kPanasonicCkp) + powerful = kPanasonicAcPowerfulCkp; + else + powerful = kPanasonicAcPowerful; + + if (state) { + setQuiet(false); // Quiet is mutually exclusive. + remote_state[21] |= powerful; + } else { + remote_state[21] &= ~powerful; + } +} + +uint16_t IRPanasonicAc::encodeTime(const uint8_t hours, const uint8_t mins) { + return std::min(hours, (uint8_t)23) * 60 + std::min(mins, (uint8_t)59); +} + +uint16_t IRPanasonicAc::getClock() { + uint16_t result = ((remote_state[25] & 0b00000111) << 8) + remote_state[24]; + if (result == kPanasonicAcTimeSpecial) return 0; + return result; +} + +void IRPanasonicAc::setClock(const uint16_t mins_since_midnight) { + uint16_t corrected = std::min(mins_since_midnight, kPanasonicAcTimeMax); + if (mins_since_midnight == kPanasonicAcTimeSpecial) + corrected = kPanasonicAcTimeSpecial; + remote_state[24] = corrected & 0xFF; + remote_state[25] &= 0b11111000; + remote_state[25] |= (corrected >> 8); +} + +uint16_t IRPanasonicAc::getOnTimer() { + uint16_t result = ((remote_state[19] & 0b00000111) << 8) + remote_state[18]; + if (result == kPanasonicAcTimeSpecial) return 0; + return result; +} + +void IRPanasonicAc::setOnTimer(const uint16_t mins_since_midnight, + const bool enable) { + // Ensure it's on a 10 minute boundary and no overflow. + uint16_t corrected = std::min(mins_since_midnight, kPanasonicAcTimeMax); + corrected -= corrected % 10; + if (mins_since_midnight == kPanasonicAcTimeSpecial) + corrected = kPanasonicAcTimeSpecial; + + if (enable) + remote_state[13] |= kPanasonicAcOnTimer; // Set the Ontimer flag. + else + remote_state[13] &= ~kPanasonicAcOnTimer; // Clear the Ontimer flag. + // Store the time. + remote_state[18] = corrected & 0xFF; + remote_state[19] &= 0b11111000; + remote_state[19] |= (corrected >> 8); +} + +void IRPanasonicAc::cancelOnTimer() { setOnTimer(0, false); } + +bool IRPanasonicAc::isOnTimerEnabled() { + return remote_state[13] & kPanasonicAcOnTimer; +} + +uint16_t IRPanasonicAc::getOffTimer() { + uint16_t result = + ((remote_state[20] & 0b01111111) << 4) + (remote_state[19] >> 4); + if (result == kPanasonicAcTimeSpecial) return 0; + return result; +} + +void IRPanasonicAc::setOffTimer(const uint16_t mins_since_midnight, + const bool enable) { + // Ensure its on a 10 minute boundary and no overflow. + uint16_t corrected = std::min(mins_since_midnight, kPanasonicAcTimeMax); + corrected -= corrected % 10; + if (mins_since_midnight == kPanasonicAcTimeSpecial) + corrected = kPanasonicAcTimeSpecial; + + if (enable) + remote_state[13] |= kPanasonicAcOffTimer; // Set the OffTimer flag. + else + remote_state[13] &= ~kPanasonicAcOffTimer; // Clear the OffTimer flag. + // Store the time. + remote_state[19] &= 0b00001111; + remote_state[19] |= (corrected & 0b00001111) << 4; + remote_state[20] &= 0b10000000; + remote_state[20] |= corrected >> 4; +} + +void IRPanasonicAc::cancelOffTimer() { setOffTimer(0, false); } + +bool IRPanasonicAc::isOffTimerEnabled() { + return remote_state[13] & kPanasonicAcOffTimer; +} + +#ifdef ARDUINO +String IRPanasonicAc::timeToString(const uint16_t mins_since_midnight) { + String result = ""; +#else +std::string IRPanasonicAc::timeToString(const uint16_t mins_since_midnight) { + std::string result = ""; +#endif // ARDUINO + result += uint64ToString(mins_since_midnight / 60) + ":"; + uint8_t mins = mins_since_midnight % 60; + if (mins < 10) result += "0"; // Zero pad the minutes. + return result + uint64ToString(mins); +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRPanasonicAc::toString() { + String result = ""; +#else +std::string IRPanasonicAc::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Model: " + uint64ToString(getModel()); + switch (getModel()) { + case kPanasonicDke: + result += " (DKE)"; + break; + case kPanasonicJke: + result += " (JKE)"; + break; + case kPanasonicNke: + result += " (NKE)"; + break; + case kPanasonicLke: + result += " (LKE)"; + break; + case kPanasonicCkp: + result += " (CKP)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Power: "; + if (getPower()) + result += "On"; + else + result += "Off"; + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kPanasonicAcAuto: + result += " (AUTO)"; + break; + case kPanasonicAcCool: + result += " (COOL)"; + break; + case kPanasonicAcHeat: + result += " (HEAT)"; + break; + case kPanasonicAcDry: + result += " (DRY)"; + break; + case kPanasonicAcFan: + result += " (FAN)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", Fan: " + uint64ToString(getFan()); + switch (getFan()) { + case kPanasonicAcFanAuto: + result += " (AUTO)"; + break; + case kPanasonicAcFanMax: + result += " (MAX)"; + break; + case kPanasonicAcFanMin: + result += " (MIN)"; + break; + default: + result += " (UNKNOWN)"; + break; + } + result += ", Swing (Vertical): " + uint64ToString(getSwingVertical()); + switch (getSwingVertical()) { + case kPanasonicAcSwingVAuto: + result += " (AUTO)"; + break; + case kPanasonicAcSwingVUp: + result += " (Full Up)"; + break; + case kPanasonicAcSwingVDown: + result += " (Full Down)"; + break; + case 2: + case 3: + case 4: + break; + default: + result += " (UNKNOWN)"; + break; + } + switch (getModel()) { + case kPanasonicJke: + case kPanasonicCkp: + break; // No Horizontal Swing support. + default: + result += ", Swing (Horizontal): " + uint64ToString(getSwingHorizontal()); + switch (getSwingHorizontal()) { + case kPanasonicAcSwingHAuto: + result += " (AUTO)"; + break; + case kPanasonicAcSwingHFullLeft: + result += " (Full Left)"; + break; + case kPanasonicAcSwingHLeft: + result += " (Left)"; + break; + case kPanasonicAcSwingHMiddle: + result += " (Middle)"; + break; + case kPanasonicAcSwingHFullRight: + result += " (Full Right)"; + break; + case kPanasonicAcSwingHRight: + result += " (Right)"; + break; + default: + result += " (UNKNOWN)"; + break; + } + } + result += ", Quiet: "; + if (getQuiet()) + result += "On"; + else + result += "Off"; + result += ", Powerful: "; + if (getPowerful()) + result += "On"; + else + result += "Off"; + result += ", Clock: " + timeToString(getClock()); + result += ", On Timer: "; + if (isOnTimerEnabled()) + result += timeToString(getOnTimer()); + else + result += "Off"; + result += ", Off Timer: "; + if (isOffTimerEnabled()) + result += timeToString(getOffTimer()); + else + result += "Off"; + return result; +} + +#if DECODE_PANASONIC_AC +// Decode the supplied Panasonic AC message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kPanasonicAcBits. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: Beta / Appears to work with real device(s). +// +// Panasonic A/C models supported: +// A/C Series/models: +// JKE, LKE, DKE, & NKE series. +// CS-YW9MKD +// A/C Remotes: +// A75C3747 (Confirmed) +// A75C3704 +bool IRrecv::decodePanasonicAC(decode_results *results, uint16_t nbits, + bool strict) { + if (nbits % 8 != 0) // nbits has to be a multiple of nr. of bits in a byte. + return false; + + uint8_t min_nr_of_messages = 1; + if (strict) { + if (nbits != kPanasonicAcBits && nbits != kPanasonicAcShortBits) + return false; // Not strictly a PANASONIC_AC message. + } + + if (results->rawlen < + min_nr_of_messages * (2 * nbits + kHeader + kFooter) - 1) + return false; // Can't possibly be a valid PANASONIC_AC message. + + uint16_t dataBitsSoFar = 0; + uint16_t offset = kStartOffset; + match_result_t data_result; + + // Header + if (!matchMark(results->rawbuf[offset], kPanasonicHdrMark, + kPanasonicAcTolerance, kPanasonicAcExcess)) + return false; + // Calculate how long the common tick time is based on the header mark. + uint32_t m_tick = + results->rawbuf[offset++] * kRawTick / kPanasonicHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kPanasonicHdrSpace, + kPanasonicAcTolerance, kPanasonicAcExcess)) + return false; + // Calculate how long the common tick time is based on the header space. + uint32_t s_tick = + results->rawbuf[offset++] * kRawTick / kPanasonicHdrSpaceTicks; + + uint16_t i = 0; + // Data (Section #1) + // Keep reading bytes until we either run out of section or state to fill. + for (; offset <= results->rawlen - 16 && i < kPanasonicAcSection1Length; + i++, dataBitsSoFar += 8, offset += data_result.used) { + data_result = matchData( + &(results->rawbuf[offset]), 8, kPanasonicBitMarkTicks * m_tick, + kPanasonicOneSpaceTicks * s_tick, kPanasonicBitMarkTicks * m_tick, + kPanasonicZeroSpaceTicks * s_tick, kPanasonicAcTolerance, + kPanasonicAcExcess, false); + if (data_result.success == false) { + DPRINT("DEBUG: offset = "); + DPRINTLN(offset + data_result.used); + return false; // Fail + } + results->state[i] = data_result.data; + } + // Section footer. + if (!matchMark(results->rawbuf[offset++], kPanasonicBitMarkTicks * m_tick, + kPanasonicAcTolerance, kPanasonicAcExcess)) + return false; + if (!matchSpace(results->rawbuf[offset++], kPanasonicAcSectionGap, + kPanasonicAcTolerance, kPanasonicAcExcess)) + return false; + // Header. + if (!matchMark(results->rawbuf[offset++], kPanasonicHdrMarkTicks * m_tick, + kPanasonicAcTolerance, kPanasonicAcExcess)) + return false; + if (!matchSpace(results->rawbuf[offset++], kPanasonicHdrSpaceTicks * s_tick, + kPanasonicAcTolerance, kPanasonicAcExcess)) + return false; + // Data (Section #2) + // Keep reading bytes until we either run out of data. + for (; offset <= results->rawlen - 16 && i < nbits / 8; + i++, dataBitsSoFar += 8, offset += data_result.used) { + data_result = matchData( + &(results->rawbuf[offset]), 8, kPanasonicBitMarkTicks * m_tick, + kPanasonicOneSpaceTicks * s_tick, kPanasonicBitMarkTicks * m_tick, + kPanasonicZeroSpaceTicks * s_tick, kPanasonicAcTolerance, + kPanasonicAcExcess, false); + if (data_result.success == false) { + DPRINT("DEBUG: offset = "); + DPRINTLN(offset + data_result.used); + return false; // Fail + } + results->state[i] = data_result.data; + } + // Message Footer. + if (!matchMark(results->rawbuf[offset++], kPanasonicBitMarkTicks * m_tick, + kPanasonicAcTolerance, kPanasonicAcExcess)) + return false; + if (offset <= results->rawlen && + !matchAtLeast(results->rawbuf[offset++], kPanasonicAcMessageGap)) + return false; + + // Compliance + if (strict) { + // Check the signatures of the section blocks. They start with 0x02& 0x20. + if (results->state[0] != 0x02 || results->state[1] != 0x20 || + results->state[8] != 0x02 || results->state[9] != 0x20) + return false; + if (!IRPanasonicAc::validChecksum(results->state, nbits / 8)) return false; + } + + // Success + results->decode_type = PANASONIC_AC; + results->bits = nbits; + return true; +} +#endif // DECODE_PANASONIC_AC diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Panasonic.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Panasonic.h new file mode 100644 index 000000000..762631fe7 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Panasonic.h @@ -0,0 +1,145 @@ +// Copyright 2018 David Conran + +#ifndef IR_PANASONIC_H_ +#define IR_PANASONIC_H_ + +#define __STDC_LIMIT_MACROS +#include +#ifdef ARDUINO +#include +#else +#include +#endif +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// PPPP AAA N N AAA SSSS OOO N N IIIII CCCC +// P P A A NN N A A S O O NN N I C +// PPPP AAAAA N N N AAAAA SSS O O N N N I C +// P A A N NN A A S O O N NN I C +// P A A N N A A SSSS OOO N N IIIII CCCC + +// Panasonic A/C support heavily influenced by: +// https://github.com/ToniA/ESPEasy/blob/HeatpumpIR/lib/HeatpumpIR/PanasonicHeatpumpIR.cpp + +// Constants +const uint16_t kPanasonicFreq = 36700; +const uint16_t kPanasonicAcExcess = 0; +// Much higher than usual. See issue #540. +const uint16_t kPanasonicAcTolerance = 40; + +const uint8_t kPanasonicAcAuto = 0; // 0b0000 +const uint8_t kPanasonicAcDry = 2; // 0b0010 +const uint8_t kPanasonicAcCool = 3; // 0b0011 +const uint8_t kPanasonicAcHeat = 4; // 0b0010 +const uint8_t kPanasonicAcFan = 6; // 0b0110 +const uint8_t kPanasonicAcFanMin = 0; +const uint8_t kPanasonicAcFanMax = 4; +const uint8_t kPanasonicAcFanAuto = 7; +const uint8_t kPanasonicAcFanOffset = 3; +const uint8_t kPanasonicAcPower = 1; // 0b1 +const uint8_t kPanasonicAcMinTemp = 16; // Celsius +const uint8_t kPanasonicAcMaxTemp = 30; // Celsius +const uint8_t kPanasonicAcFanModeTemp = 27; // Celsius +const uint8_t kPanasonicAcQuiet = 1; // 0b1 +const uint8_t kPanasonicAcPowerful = 0x20; // 0b100000 +// CKP models have Powerful and Quiet bits swapped. +const uint8_t kPanasonicAcQuietCkp = 0x20; // 0b100000 +const uint8_t kPanasonicAcPowerfulCkp = 1; // 0b1 +const uint8_t kPanasonicAcSwingVAuto = 0xF; +const uint8_t kPanasonicAcSwingVUp = 0x1; +const uint8_t kPanasonicAcSwingVDown = 0x5; +const uint8_t kPanasonicAcSwingHAuto = 0xD; +const uint8_t kPanasonicAcSwingHMiddle = 0x6; +const uint8_t kPanasonicAcSwingHFullLeft = 0x9; +const uint8_t kPanasonicAcSwingHLeft = 0xA; +const uint8_t kPanasonicAcSwingHRight = 0xB; +const uint8_t kPanasonicAcSwingHFullRight = 0xC; +const uint8_t kPanasonicAcChecksumInit = 0xF4; +const uint8_t kPanasonicAcOnTimer = 0b00000010; +const uint8_t kPanasonicAcOffTimer = 0b00000100; +const uint16_t kPanasonicAcTimeMax = 23 * 60 + 59; // Mins since midnight. +const uint16_t kPanasonicAcTimeSpecial = 0x600; + +const uint8_t kPanasonicKnownGoodState[kPanasonicAcStateLength] = { + 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, + 0x00, 0x0E, 0xE0, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00}; + +enum panasonic_ac_remote_model_t { + kPanasonicUnknown = 0, + kPanasonicLke = 1, + kPanasonicNke = 2, + kPanasonicDke = 3, + kPanasonicJke = 4, + kPanasonicCkp = 5, +}; + +class IRPanasonicAc { + public: + explicit IRPanasonicAc(uint16_t pin); + + void stateReset(); +#if SEND_PANASONIC + void send(); +#endif // SEND_PANASONIC + void begin(); + void on(); + void off(); + void setPower(const bool state); + bool getPower(); + void setTemp(const uint8_t temp, const bool remember = true); + uint8_t getTemp(); + void setFan(const uint8_t fan); + uint8_t getFan(); + void setMode(const uint8_t mode); + uint8_t getMode(); + void setRaw(const uint8_t state[]); + uint8_t *getRaw(); + static bool validChecksum(uint8_t *state, + const uint16_t length = kPanasonicAcStateLength); + static uint8_t calcChecksum(uint8_t *state, + const uint16_t length = kPanasonicAcStateLength); + void setQuiet(const bool state); + bool getQuiet(); + void setPowerful(const bool state); + bool getPowerful(); + void setModel(const panasonic_ac_remote_model_t model); + panasonic_ac_remote_model_t getModel(); + void setSwingVertical(const uint8_t elevation); + uint8_t getSwingVertical(); + void setSwingHorizontal(const uint8_t direction); + uint8_t getSwingHorizontal(); + static uint16_t encodeTime(const uint8_t hours, const uint8_t mins); + uint16_t getClock(); + void setClock(const uint16_t mins_since_midnight); + uint16_t getOnTimer(); + void setOnTimer(const uint16_t mins_since_midnight, const bool enable = true); + void cancelOnTimer(); + bool isOnTimerEnabled(); + uint16_t getOffTimer(); + void setOffTimer(const uint16_t mins_since_midnight, + const bool enable = true); + void cancelOffTimer(); + bool isOffTimerEnabled(); +#ifdef ARDUINO + String toString(); + static String timeToString(const uint16_t mins_since_midnight); +#else + std::string toString(); + static std::string timeToString(const uint16_t mins_since_midnight); +#endif +#ifndef UNIT_TEST + + private: +#endif + uint8_t remote_state[kPanasonicAcStateLength]; + uint8_t _swingh; + uint8_t _temp; + void fixChecksum(const uint16_t length = kPanasonicAcStateLength); + static uint8_t calcChecksum(const uint8_t *state, + const uint16_t length = kPanasonicAcStateLength); + IRsend _irsend; +}; + +#endif // IR_PANASONIC_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Pioneer.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Pioneer.cpp new file mode 100644 index 000000000..9134e3696 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Pioneer.cpp @@ -0,0 +1,143 @@ +// Copyright 2009 Ken Shirriff +// Copyright 2017, 2018 David Conran +// Copyright 2018 Kamil Palczewski + +#define __STDC_LIMIT_MACROS +#include +#include +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" +#include "ir_NEC.h" + +// PPPP III OOO N N EEEE EEEE RRRR +// P P I O O NN N E E R R +// PPPP I O O N N N EEE EEE RRRR +// P I O O N NN E E R R +// P III OOO N N EEEE EEEE R RR + +// Ref: +// http://adrian-kingston.com/IRFormatPioneer.htm + +#if SEND_PIONEER +// Send a raw Pioneer formatted message. +// +// Args: +// data: The message to be sent. +// nbits: The number of bits of the message to be sent. +// Typically kPioneerBits. +// repeat: The number of times the command is to be repeated. +// +// Status: BETA / Expected to be working. +// +// Ref: +// http://adrian-kingston.com/IRFormatPioneer.htm +void IRsend::sendPioneer(const uint64_t data, const uint16_t nbits, + const uint16_t repeat) { + // If nbits is to big, or is odd, abort. + if (nbits > sizeof(data) * 8 || nbits % 2 == 1) return; + + // send 1st part of the code + sendNEC(data >> (nbits / 2), nbits / 2, 0); + // send 2nd part of the code + sendNEC(data & (((uint64_t)1 << (nbits / 2)) - 1), nbits / 2, repeat); +} + +// Calculate the raw Pioneer data code based on two NEC sub-codes +// Args: +// address A 16-bit "published" NEC value. +// command: A 16-bit "published" NEC value. +// Returns: +// A raw 64-bit Pioneer message code. +// +// Status: BETA / Expected to work. +// +// Note: +// Address & Command can be take from a decode result OR from the spreadsheets +// located at: +// https://www.pioneerelectronics.com/PUSA/Support/Home-Entertainment-Custom-Install/IR+Codes/A+V+Receivers +// where the first part is considered the address, +// and the second the command. +// e.g. +// "A556+AF20" is an Address of 0xA556 & a Command of 0xAF20. +uint64_t IRsend::encodePioneer(const uint16_t address, const uint16_t command) { + return (((uint64_t)encodeNEC(address >> 8, address & 0xFF)) << 32) | + encodeNEC(command >> 8, command & 0xFF); +} +#endif // SEND_PIONEER + +#if DECODE_PIONEER +// Decode the supplied Pioneer message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kPioneerBits. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA / Should be working. (Self decodes & real examples) +// +bool IRrecv::decodePioneer(decode_results *results, const uint16_t nbits, + const bool strict) { + if (results->rawlen < 2 * (nbits + kHeader + kFooter) - 1) + return false; // Can't possibly be a valid Pioneer message. + if (strict && nbits != kPioneerBits) + return false; // Not strictly an Pioneer message. + + uint64_t data = 0; + uint16_t offset = kStartOffset; + + for (uint16_t section = 0; section < 2; section++) { + // Header + if (!matchMark(results->rawbuf[offset], kNecHdrMark)) return false; + // Calculate how long the lowest tick time is based on the header mark. + uint32_t mark_tick = + results->rawbuf[offset++] * kRawTick / kNecHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kNecHdrSpace)) return false; + // Calculate how long the common tick time is based on the header space. + uint32_t space_tick = + results->rawbuf[offset++] * kRawTick / kNecHdrSpaceTicks; + // + // Data + match_result_t data_result = matchData( + &(results->rawbuf[offset]), nbits / 2, kNecBitMarkTicks * mark_tick, + kNecOneSpaceTicks * space_tick, kNecBitMarkTicks * mark_tick, + kNecZeroSpaceTicks * space_tick); + if (data_result.success == false) return false; + uint8_t command = data_result.data >> 8; + uint8_t command_inverted = data_result.data; + uint8_t address = data_result.data >> 24; + uint8_t address_inverted = data_result.data >> 16; + // Compliance + if (strict) { + if (command != (command_inverted ^ 0xFF)) + return false; // Command integrity failed. + if (address != (address_inverted ^ 0xFF)) + return false; // Address integrity failed. + } + data = (data << (nbits / 2)) + data_result.data; + offset += data_result.used; + // NEC-like commands and addresses are technically in LSB first order so the + // final versions have to be reversed. + uint16_t code = reverseBits((command << 8) + address, 16); + if (section) + results->command = code; + else + results->address = code; + + // Footer + if (!matchMark(results->rawbuf[offset++], kNecBitMarkTicks * mark_tick)) + return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset++], kNecMinGapTicks * space_tick)) + return false; + } + + // Success + results->bits = nbits; + results->value = data; + results->decode_type = PIONEER; + return true; +} +#endif // DECODE_PIONEER diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Pronto.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Pronto.cpp similarity index 81% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_Pronto.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_Pronto.cpp index ca76f0848..9ab5c76d0 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Pronto.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Pronto.cpp @@ -2,7 +2,6 @@ #include #include "IRsend.h" -#include "IRtimer.h" // PPPPPP tt // PP PP rr rr oooo nn nnn tt oooo @@ -11,12 +10,12 @@ // PP rr oooo nn nn tttt oooo // Constants -#define PRONTO_FREQ_FACTOR 0.241246 -#define PRONTO_TYPE_OFFSET 0U -#define PRONTO_FREQ_OFFSET 1U -#define PRONTO_SEQ_1_LEN_OFFSET 2U -#define PRONTO_SEQ_2_LEN_OFFSET 3U -#define PRONTO_DATA_OFFSET 4U +const float kProntoFreqFactor = 0.241246; +const uint16_t kProntoTypeOffset = 0; +const uint16_t kProntoFreqOffset = 1; +const uint16_t kProntoSeq1LenOffset = 2; +const uint16_t kProntoSeq2LenOffset = 3; +const uint16_t kProntoDataOffset = 4; #if SEND_PRONTO // Send a Pronto Code formatted message. @@ -50,29 +49,29 @@ // 0x0030, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, // 0x0018, 0x03f6}; // // Send the Pronto(Sony) code. Repeat twice as Sony's require that. -// sendPronto(prontoCode, 46, SONY_MIN_REPEAT); +// sendPronto(prontoCode, 46, kSonyMinRepeat); // // Ref: // http://www.etcwiki.org/wiki/Pronto_Infrared_Format // http://www.remotecentral.com/features/irdisp2.htm void IRsend::sendPronto(uint16_t data[], uint16_t len, uint16_t repeat) { // Check we have enough data to work out what to send. - if (len < PRONTO_MIN_LENGTH) return; + if (len < kProntoMinLength) return; // We only know how to deal with 'raw' pronto codes types. Reject all others. - if (data[PRONTO_TYPE_OFFSET] != 0) return; + if (data[kProntoTypeOffset] != 0) return; // Pronto frequency is in Hz. - uint16_t hz = (uint16_t) (1000000U / (data[PRONTO_FREQ_OFFSET] * - PRONTO_FREQ_FACTOR)); + uint16_t hz = + (uint16_t)(1000000U / (data[kProntoFreqOffset] * kProntoFreqFactor)); enableIROut(hz); // Grab the length of the two sequences. - uint16_t seq_1_len = data[PRONTO_SEQ_1_LEN_OFFSET] * 2; - uint16_t seq_2_len = data[PRONTO_SEQ_2_LEN_OFFSET] * 2; + uint16_t seq_1_len = data[kProntoSeq1LenOffset] * 2; + uint16_t seq_2_len = data[kProntoSeq2LenOffset] * 2; // Calculate where each sequence starts in the buffer. - uint16_t seq_1_start = PRONTO_DATA_OFFSET; - uint16_t seq_2_start = PRONTO_DATA_OFFSET + seq_1_len; + uint16_t seq_1_start = kProntoDataOffset; + uint16_t seq_2_start = kProntoDataOffset + seq_1_len; uint32_t periodic_time = calcUSecPeriod(hz, false); diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_RC5_RC6.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_RC5_RC6.cpp similarity index 70% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_RC5_RC6.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_RC5_RC6.cpp index 65aaf88d7..ef1500d60 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_RC5_RC6.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_RC5_RC6.cpp @@ -21,30 +21,31 @@ // Ref: // https://en.wikipedia.org/wiki/RC-5 // http://www.sbprojects.com/knowledge/ir/rc5.php -#define MIN_RC5_SAMPLES 11U -#define MIN_RC6_SAMPLES 1U -#define RC5_T1 889U -#define RC5_MIN_COMMAND_LENGTH 113778UL -#define RC5_MIN_GAP (RC5_MIN_COMMAND_LENGTH - RC5_RAW_BITS * (2 * RC5_T1)) -#define RC5_TOGGLE_MASK 0x800U // (The 12th bit) + +const uint16_t kRc5T1 = 889; +const uint32_t kRc5MinCommandLength = 113778; +const uint32_t kRc5MinGap = kRc5MinCommandLength - kRC5RawBits * (2 * kRc5T1); +const uint16_t kRc5ToggleMask = 0x800; // The 12th bit. +const uint16_t kRc5SamplesMin = 11; + // RC-6 // Ref: // https://en.wikipedia.org/wiki/RC-6 // http://www.pcbheaven.com/userpages/The_Philips_RC6_Protocol/ -#define RC6_TICK 444U -#define RC6_HDR_MARK_TICKS 6U -#define RC6_HDR_MARK (RC6_HDR_MARK_TICKS * RC6_TICK) -#define RC6_HDR_SPACE_TICKS 2U -#define RC6_HDR_SPACE (RC6_HDR_SPACE_TICKS * RC6_TICK) -#define RC6_RPT_LENGTH_TICKS 187U -#define RC6_RPT_LENGTH (RC6_RPT_LENGTH_TICKS * RC6_TICK) -#define RC6_TOGGLE_MASK 0x10000UL // (The 17th bit) -#define RC6_36_TOGGLE_MASK 0x8000U // (The 16th bit) + +const uint16_t kRc6Tick = 444; +const uint16_t kRc6HdrMarkTicks = 6; +const uint16_t kRc6HdrMark = kRc6HdrMarkTicks * kRc6Tick; +const uint16_t kRc6HdrSpaceTicks = 2; +const uint16_t kRc6HdrSpace = kRc6HdrSpaceTicks * kRc6Tick; +const uint16_t kRc6RptLengthTicks = 187; +const uint32_t kRc6RptLength = kRc6RptLengthTicks * kRc6Tick; +const uint32_t kRc6ToggleMask = 0x10000UL; // The 17th bit. +const uint16_t kRc6_36ToggleMask = 0x8000; // The 16th bit. // Common (getRClevel()) -#define MARK 0U -#define SPACE 1U - +const int16_t kMark = 0; +const int16_t kSpace = 1; #if SEND_RC5 // Send a Philips RC-5/RC-5X packet. @@ -68,14 +69,13 @@ // TODO(anyone): // Testing of the RC-5X components. void IRsend::sendRC5(uint64_t data, uint16_t nbits, uint16_t repeat) { - if (nbits > sizeof(data) * 8) - return; // We can't send something that big. + if (nbits > sizeof(data) * 8) return; // We can't send something that big. bool skipSpace = true; bool field_bit = true; // Set 36kHz IR carrier frequency & a 1/4 (25%) duty cycle. enableIROut(36, 25); - if (nbits >= RC5X_BITS) { // Is this a RC-5X message? + if (nbits >= kRC5XBits) { // Is this a RC-5X message? // field bit is the inverted MSB of RC-5X data. field_bit = ((data >> (nbits - 1)) ^ 1) & 1; nbits--; @@ -90,28 +90,28 @@ void IRsend::sendRC5(uint64_t data, uint16_t nbits, uint16_t repeat) { if (skipSpace) skipSpace = false; // First time through, we assume the leading space(). else - space(RC5_T1); - mark(RC5_T1); + space(kRc5T1); + mark(kRc5T1); // Field/Second start bit. if (field_bit) { // Send a 1. Normal for RC-5. - space(RC5_T1); - mark(RC5_T1); + space(kRc5T1); + mark(kRc5T1); } else { // Send a 0. Special case for RC-5X. Means 7th command bit is 1. - mark(RC5_T1); - space(RC5_T1); + mark(kRc5T1); + space(kRc5T1); } // Data for (uint64_t mask = 1ULL << (nbits - 1); mask; mask >>= 1) if (data & mask) { // 1 - space(RC5_T1); // 1 is space, then mark. - mark(RC5_T1); - } else { // 0 - mark(RC5_T1); // 0 is mark, then space. - space(RC5_T1); + space(kRc5T1); // 1 is space, then mark. + mark(kRc5T1); + } else { // 0 + mark(kRc5T1); // 0 is mark, then space. + space(kRc5T1); } // Footer - space(std::max(RC5_MIN_GAP, RC5_MIN_COMMAND_LENGTH - usecTimer.elapsed())); + space(std::max(kRc5MinGap, kRc5MinCommandLength - usecTimer.elapsed())); } } @@ -132,8 +132,7 @@ void IRsend::sendRC5(uint64_t data, uint16_t nbits, uint16_t repeat) { // https://en.wikipedia.org/wiki/RC-5 uint16_t IRsend::encodeRC5(uint8_t address, uint8_t command, bool key_released) { - return (key_released << (RC5_BITS - 1)) | - ((address & 0x1f) << 6) | + return (key_released << (kRC5Bits - 1)) | ((address & 0x1f) << 6) | (command & 0x3F); } @@ -157,8 +156,8 @@ uint16_t IRsend::encodeRC5X(uint8_t address, uint8_t command, // The 2nd start/field bit (MSB of the return value) is the value of the 7th // command bit. bool s2 = (command >> 6) & 1; - return ((uint16_t) s2 << (RC5X_BITS - 1)) | - encodeRC5(address, command, key_released); + return ((uint16_t)s2 << (kRC5XBits - 1)) | + encodeRC5(address, command, key_released); } // Flip the toggle bit of a Philips RC-5/RC-5X data message. @@ -175,9 +174,7 @@ uint16_t IRsend::encodeRC5X(uint8_t address, uint8_t command, // Ref: // http://www.sbprojects.com/knowledge/ir/rc5.php // https://en.wikipedia.org/wiki/RC-5 -uint64_t IRsend::toggleRC5(uint64_t data) { - return data ^ RC5_TOGGLE_MASK; -} +uint64_t IRsend::toggleRC5(uint64_t data) { return data ^ kRc5ToggleMask; } #endif // SEND_RC5 #if SEND_RC6 @@ -199,9 +196,8 @@ uint64_t IRsend::toggleRC5(uint64_t data) { // http://www.sbprojects.com/knowledge/ir/rc6.php // http://www.righto.com/2010/12/64-bit-rc6-codes-arduino-and-xbox.html uint64_t IRsend::toggleRC6(uint64_t data, uint16_t nbits) { - if (nbits == RC6_36_BITS) - return data ^ RC6_36_TOGGLE_MASK; - return data ^ RC6_TOGGLE_MASK; + if (nbits == kRC6_36Bits) return data ^ kRc6_36ToggleMask; + return data ^ kRc6ToggleMask; } // Encode a Philips RC-6 data message. @@ -221,13 +217,12 @@ uint64_t IRsend::toggleRC6(uint64_t data, uint16_t nbits) { // http://www.sbprojects.com/knowledge/ir/rc6.php // http://www.righto.com/2010/12/64-bit-rc6-codes-arduino-and-xbox.html // http://www.pcbheaven.com/userpages/The_Philips_RC6_Protocol/ -uint64_t IRsend::encodeRC6(uint32_t address, uint8_t command, - uint16_t mode) { +uint64_t IRsend::encodeRC6(uint32_t address, uint8_t command, uint16_t mode) { switch (mode) { - case RC6_MODE0_BITS: + case kRC6Mode0Bits: return ((address & 0xFFF) << 8) | (command & 0xFF); - case RC6_36_BITS: - return ((uint64_t) (address & 0xFFFFFFF) << 8) | (command & 0xFF); + case kRC6_36Bits: + return ((uint64_t)(address & 0xFFFFFFF) << 8) | (command & 0xFF); default: return 0; } @@ -250,25 +245,24 @@ uint64_t IRsend::encodeRC6(uint32_t address, uint8_t command, // https://en.wikipedia.org/wiki/Manchester_code void IRsend::sendRC6(uint64_t data, uint16_t nbits, uint16_t repeat) { // Check we can send the number of bits requested. - if (nbits > sizeof(data) * 8) - return; + if (nbits > sizeof(data) * 8) return; // Set 36kHz IR carrier frequency & a 1/3 (33%) duty cycle. enableIROut(36, 33); for (uint16_t r = 0; r <= repeat; r++) { // Header - mark(RC6_HDR_MARK); - space(RC6_HDR_SPACE); + mark(kRc6HdrMark); + space(kRc6HdrSpace); // Start bit. - mark(RC6_TICK); // mark, then space == 0x1. - space(RC6_TICK); + mark(kRc6Tick); // mark, then space == 0x1. + space(kRc6Tick); // Data uint16_t bitTime; for (uint64_t i = 1, mask = 1ULL << (nbits - 1); mask; i++, mask >>= 1) { if (i == 4) // The fourth bit we send is a "double width trailer bit". - bitTime = 2 * RC6_TICK; // double-wide trailer bit + bitTime = 2 * kRc6Tick; // double-wide trailer bit else - bitTime = RC6_TICK; // Normal bit - if (data & mask) { // 1 + bitTime = kRc6Tick; // Normal bit + if (data & mask) { // 1 mark(bitTime); space(bitTime); } else { // 0 @@ -277,12 +271,12 @@ void IRsend::sendRC6(uint64_t data, uint16_t nbits, uint16_t repeat) { } } // Footer - space(RC6_RPT_LENGTH); + space(kRc6RptLength); } } #endif // SEND_RC6 -#if (DECODE_RC5 || DECODE_RC6) +#if (DECODE_RC5 || DECODE_RC6 || DECODE_LASERTAG) // Gets one undecoded level at a time from the raw buffer. // The RC5/6 decoding is easier if the data is broken into time intervals. // E.g. if the buffer has MARK for 2 time intervals and SPACE for 1, @@ -294,47 +288,65 @@ void IRsend::sendRC6(uint64_t data, uint16_t nbits, uint16_t repeat) { // offset: Ptr to the currect offset to the rawbuf. // used: Ptr to the current used counter. // bitTime: Time interval of single bit in microseconds. +// maxwidth: Maximum number of successive levels to find in a single level +// (default 3) // Returns: // int: MARK, SPACE, or -1 for error (The measured time interval is not a // multiple of t1.) // Ref: // https://en.wikipedia.org/wiki/Manchester_code -int16_t IRrecv::getRClevel(decode_results *results, uint16_t *offset, - uint16_t *used, uint16_t bitTime) { - if (*offset >= results->rawlen) - return SPACE; // After end of recorded buffer, assume SPACE. +int16_t IRrecv::getRClevel(decode_results *results, uint16_t *offset, + uint16_t *used, uint16_t bitTime, uint8_t tolerance, + int16_t excess, uint16_t delta, uint8_t maxwidth) { + DPRINT("DEBUG: getRClevel: offset = "); + DPRINTLN(uint64ToString(*offset)); + DPRINT("DEBUG: getRClevel: rawlen = "); + DPRINTLN(uint64ToString(results->rawlen)); + if (*offset >= results->rawlen) { + DPRINTLN("DEBUG: getRClevel: SPACE, past end of rawbuf"); + return kSpace; // After end of recorded buffer, assume SPACE. + } uint16_t width = results->rawbuf[*offset]; // If the value of offset is odd, it's a MARK. Even, it's a SPACE. - uint16_t val = ((*offset) % 2) ? MARK : SPACE; + uint16_t val = ((*offset) % 2) ? kMark : kSpace; // Check to see if we have hit an inter-message gap (> 20ms). - if (val == SPACE && width > 20000) - return SPACE; - int16_t correction = (val == MARK) ? MARK_EXCESS : -MARK_EXCESS; + if (val == kSpace && + (width > 20000 - delta || width > maxwidth * bitTime + delta)) { + DPRINTLN("DEBUG: getRClevel: SPACE, hit end of mesg gap."); + return kSpace; + } + int16_t correction = (val == kMark) ? excess : -excess; // Calculate the look-ahead for our current position in the buffer. uint16_t avail; // Note: We want to match in greedy order as the other way leads to // mismatches due to overlaps induced by the correction and tolerance // values. - if (match(width, 3 * bitTime + correction)) - avail = 3; - else if (match(width, 2 * bitTime + correction)) - avail = 2; - else if (match(width, bitTime + correction)) - avail = 1; - else + for (avail = maxwidth; avail > 0; avail--) { + if (match(width, avail * bitTime + correction, tolerance, delta)) { + break; + } + } + if (!avail) { + DPRINTLN("DEBUG: getRClevel: Unexpected width. Exiting."); return -1; // The width is not what we expected. + } - (*used)++; // Count another one of the avail slots as used. + (*used)++; // Count another one of the avail slots as used. if (*used >= avail) { // Are we out of look-ahead/avail slots? // Yes, so reset the used counter, and move the offset ahead. *used = 0; (*offset)++; } + if (val == kMark) { + DPRINTLN("DEBUG: getRClevel: MARK"); + } else { + DPRINTLN("DEBUG: getRClevel: SPACE"); + } return val; } -#endif // (DECODE_RC5 || DECODE_RC6) +#endif // (DECODE_RC5 || DECODE_RC6 || DECODE_LASERTAG) #if DECODE_RC5 // Decode the supplied RC-5/RC5X message. @@ -358,28 +370,28 @@ int16_t IRrecv::getRClevel(decode_results *results, uint16_t *offset, // TODO(anyone): // Serious testing of the RC-5X and strict aspects needs to be done. bool IRrecv::decodeRC5(decode_results *results, uint16_t nbits, bool strict) { - if (results->rawlen < MIN_RC5_SAMPLES + HEADER - 1) return false; + if (results->rawlen < kRc5SamplesMin + kHeader - 1) return false; // Compliance - if (strict && nbits != RC5_BITS && nbits != RC5X_BITS) + if (strict && nbits != kRC5Bits && nbits != kRC5XBits) return false; // It's neither RC-5 or RC-5X. - uint16_t offset = OFFSET_START; + uint16_t offset = kStartOffset; uint16_t used = 0; bool is_rc5x = false; uint64_t data = 0; // Header // Get start bit #1. - if (getRClevel(results, &offset, &used, RC5_T1) != MARK) return false; + if (getRClevel(results, &offset, &used, kRc5T1) != kMark) return false; // Get field/start bit #2 (inverted bit-7 of the command if RC-5X protocol) uint16_t actual_bits = 1; - int16_t levelA = getRClevel(results, &offset, &used, RC5_T1); - int16_t levelB = getRClevel(results, &offset, &used, RC5_T1); - if (levelA == SPACE && levelB == MARK) { // Matched a 1. + int16_t levelA = getRClevel(results, &offset, &used, kRc5T1); + int16_t levelB = getRClevel(results, &offset, &used, kRc5T1); + if (levelA == kSpace && levelB == kMark) { // Matched a 1. is_rc5x = false; - } else if (levelA == MARK && levelB == SPACE) { // Matched a 0. - if (nbits <= RC5_BITS) return false; // Field bit must be '1' for RC5. + } else if (levelA == kMark && levelB == kSpace) { // Matched a 0. + if (nbits <= kRC5Bits) return false; // Field bit must be '1' for RC5. is_rc5x = true; data = 1; } else { @@ -388,11 +400,11 @@ bool IRrecv::decodeRC5(decode_results *results, uint16_t nbits, bool strict) { // Data for (; offset < results->rawlen; actual_bits++) { - int16_t levelA = getRClevel(results, &offset, &used, RC5_T1); - int16_t levelB = getRClevel(results, &offset, &used, RC5_T1); - if (levelA == SPACE && levelB == MARK) + int16_t levelA = getRClevel(results, &offset, &used, kRc5T1); + int16_t levelB = getRClevel(results, &offset, &used, kRc5T1); + if (levelA == kSpace && levelB == kMark) data = (data << 1) | 1; // 1 - else if (levelA == MARK && levelB == SPACE) + else if (levelA == kMark && levelB == kSpace) data <<= 1; // 0 else break; @@ -401,8 +413,8 @@ bool IRrecv::decodeRC5(decode_results *results, uint16_t nbits, bool strict) { // Compliance if (actual_bits < nbits) return false; // Less data than we expected. - if (strict && actual_bits != RC5_BITS && - actual_bits != RC5X_BITS) return false; + if (strict && actual_bits != kRC5Bits && actual_bits != kRC5XBits) + return false; // Success results->value = data; @@ -411,7 +423,7 @@ bool IRrecv::decodeRC5(decode_results *results, uint16_t nbits, bool strict) { results->repeat = false; if (is_rc5x) { results->decode_type = RC5X; - results->command |= ((uint32_t) is_rc5x) << 6; + results->command |= ((uint32_t)is_rc5x) << 6; } else { results->decode_type = RC5; actual_bits--; // RC5 doesn't count the field bit as data. @@ -439,7 +451,7 @@ bool IRrecv::decodeRC5(decode_results *results, uint16_t nbits, bool strict) { // TODO(anyone): // Testing of the strict compliance aspects. bool IRrecv::decodeRC6(decode_results *results, uint16_t nbits, bool strict) { - if (results->rawlen < HEADER + 2 + 4) // Up to the double-wide T bit. + if (results->rawlen < kHeader + 2 + 4) // Up to the double-wide T bit. return false; // Smaller than absolute smallest possible RC6 message. if (strict) { // Compliance @@ -449,31 +461,31 @@ bool IRrecv::decodeRC6(decode_results *results, uint16_t nbits, bool strict) { // Also due to potential melding with the start bit, we can only count // the start bit as 1, instead of a more typical 2 value. The header still // remains as normal. - if (results->rawlen < nbits + HEADER + 1) + if (results->rawlen < nbits + kHeader + 1) return false; // Don't have enough entries/samples to be valid. switch (nbits) { - case RC6_MODE0_BITS: - case RC6_36_BITS: + case kRC6Mode0Bits: + case kRC6_36Bits: break; default: return false; // Asking for the wrong number of bits. } } - uint16_t offset = OFFSET_START; + uint16_t offset = kStartOffset; // Header - if (!matchMark(results->rawbuf[offset], RC6_HDR_MARK)) return false; + if (!matchMark(results->rawbuf[offset], kRc6HdrMark)) return false; // Calculate how long the common tick time is based on the header mark. - uint32_t tick = results->rawbuf[offset++] * RAWTICK / RC6_HDR_MARK_TICKS; - if (!matchSpace(results->rawbuf[offset++], RC6_HDR_SPACE_TICKS * tick)) + uint32_t tick = results->rawbuf[offset++] * kRawTick / kRc6HdrMarkTicks; + if (!matchSpace(results->rawbuf[offset++], kRc6HdrSpaceTicks * tick)) return false; uint16_t used = 0; // Get the start bit. e.g. 1. - if (getRClevel(results, &offset, &used, tick) != MARK) return false; - if (getRClevel(results, &offset, &used, tick) != SPACE) return false; + if (getRClevel(results, &offset, &used, tick) != kMark) return false; + if (getRClevel(results, &offset, &used, tick) != kSpace) return false; uint16_t actual_bits; uint64_t data = 0; @@ -483,17 +495,15 @@ bool IRrecv::decodeRC6(decode_results *results, uint16_t nbits, bool strict) { int16_t levelA, levelB; // Next two levels levelA = getRClevel(results, &offset, &used, tick); // T bit is double wide; make sure second half matches - if (actual_bits == 3 && - levelA != getRClevel(results, &offset, &used, tick)) + if (actual_bits == 3 && levelA != getRClevel(results, &offset, &used, tick)) return false; levelB = getRClevel(results, &offset, &used, tick); // T bit is double wide; make sure second half matches - if (actual_bits == 3 && - levelB != getRClevel(results, &offset, &used, tick)) + if (actual_bits == 3 && levelB != getRClevel(results, &offset, &used, tick)) return false; - if (levelA == MARK && levelB == SPACE) // reversed compared to RC5 - data = (data << 1) | 1; // 1 - else if (levelA == SPACE && levelB == MARK) + if (levelA == kMark && levelB == kSpace) // reversed compared to RC5 + data = (data << 1) | 1; // 1 + else if (levelA == kSpace && levelB == kMark) data <<= 1; // 0 else break; diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_RCMM.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_RCMM.cpp similarity index 58% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_RCMM.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_RCMM.cpp index 362702b66..1b03d2c07 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_RCMM.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_RCMM.cpp @@ -17,28 +17,28 @@ // Constants // Ref: // http://www.sbprojects.com/knowledge/ir/rcmm.php -#define RCMM_TICK 28U // Technically it would be 27.777* -#define RCMM_HDR_MARK_TICKS 15U -#define RCMM_HDR_MARK 416U -#define RCMM_HDR_SPACE_TICKS 10U -#define RCMM_HDR_SPACE 277U -#define RCMM_BIT_MARK_TICKS 6U -#define RCMM_BIT_MARK 166U -#define RCMM_BIT_SPACE_0_TICKS 10U -#define RCMM_BIT_SPACE_0 277U -#define RCMM_BIT_SPACE_1_TICKS 16U -#define RCMM_BIT_SPACE_1 444U -#define RCMM_BIT_SPACE_2_TICKS 22U -#define RCMM_BIT_SPACE_2 611U -#define RCMM_BIT_SPACE_3_TICKS 28U -#define RCMM_BIT_SPACE_3 777U -#define RCMM_RPT_LENGTH_TICKS 992U -#define RCMM_RPT_LENGTH 27778U -#define RCMM_MIN_GAP_TICKS 120U -#define RCMM_MIN_GAP 3360U +const uint16_t kRcmmTick = 28; // Technically it would be 27.777* +const uint16_t kRcmmHdrMarkTicks = 15; +const uint16_t kRcmmHdrMark = 416; +const uint16_t kRcmmHdrSpaceTicks = 10; +const uint16_t kRcmmHdrSpace = 277; +const uint16_t kRcmmBitMarkTicks = 6; +const uint16_t kRcmmBitMark = 166; +const uint16_t kRcmmBitSpace0Ticks = 10; +const uint16_t kRcmmBitSpace0 = 277; +const uint16_t kRcmmBitSpace1Ticks = 16; +const uint16_t kRcmmBitSpace1 = 444; +const uint16_t kRcmmBitSpace2Ticks = 22; +const uint16_t kRcmmBitSpace2 = 611; +const uint16_t kRcmmBitSpace3Ticks = 28; +const uint16_t kRcmmBitSpace3 = 777; +const uint16_t kRcmmRptLengthTicks = 992; +const uint32_t kRcmmRptLength = 27778; +const uint16_t kRcmmMinGapTicks = 120; +const uint32_t kRcmmMinGap = 3360; // Use a tolerance of +/-10% when matching some data spaces. -#define RCMM_TOLERANCE 10U -#define RCMM_EXCESS 50U +const uint8_t kRcmmTolerance = 10; +const uint16_t kRcmmExcess = 50; #if SEND_RCMM // Send a Philips RC-MM packet. @@ -60,27 +60,35 @@ void IRsend::sendRCMM(uint64_t data, uint16_t nbits, uint16_t repeat) { for (uint16_t r = 0; r <= repeat; r++) { usecs.reset(); // Header - mark(RCMM_HDR_MARK); - space(RCMM_HDR_SPACE); + mark(kRcmmHdrMark); + space(kRcmmHdrSpace); // Data uint64_t mask = 0b11ULL << (nbits - 2); // RC-MM sends data 2 bits at a time. for (int32_t i = nbits; i > 0; i -= 2) { - mark(RCMM_BIT_MARK); + mark(kRcmmBitMark); // Grab the next Most Significant Bits to send. switch ((data & mask) >> (i - 2)) { - case 0b00: space(RCMM_BIT_SPACE_0); break; - case 0b01: space(RCMM_BIT_SPACE_1); break; - case 0b10: space(RCMM_BIT_SPACE_2); break; - case 0b11: space(RCMM_BIT_SPACE_3); break; + case 0b00: + space(kRcmmBitSpace0); + break; + case 0b01: + space(kRcmmBitSpace1); + break; + case 0b10: + space(kRcmmBitSpace2); + break; + case 0b11: + space(kRcmmBitSpace3); + break; } mask >>= 2; } // Footer - mark(RCMM_BIT_MARK); - // Protocol requires us to wait at least RCMM_RPT_LENGTH usecs from the - // start or RCMM_MIN_GAP usecs. - space(std::max(RCMM_RPT_LENGTH - usecs.elapsed(), RCMM_MIN_GAP)); + mark(kRcmmBitMark); + // Protocol requires us to wait at least kRcmmRptLength usecs from the + // start or kRcmmMinGap usecs. + space(std::max(kRcmmRptLength - usecs.elapsed(), kRcmmMinGap)); } } #endif @@ -90,7 +98,7 @@ void IRsend::sendRCMM(uint64_t data, uint16_t nbits, uint16_t repeat) { // Places successful decode information in the results pointer. // Args: // results: Ptr to the data to decode and where to store the decode result. -// nbits: Nr. of bits to expect in the data portion. Typically RCMM_BITS. +// nbits: Nr. of bits to expect in the data portion. Typically kRCMMBits. // strict: Flag to indicate if we strictly adhere to the specification. // Returns: // boolean: True if it can decode it, false if it can't. @@ -101,67 +109,65 @@ void IRsend::sendRCMM(uint64_t data, uint16_t nbits, uint16_t repeat) { // http://www.sbprojects.com/knowledge/ir/rcmm.php bool IRrecv::decodeRCMM(decode_results *results, uint16_t nbits, bool strict) { uint64_t data = 0; - uint16_t offset = OFFSET_START; + uint16_t offset = kStartOffset; if (results->rawlen <= 4) return false; // Not enough entries to ever be RCMM. // Calc the maximum size in bits, the message can be, or that we can accept. - int16_t maxBitSize = std::min((uint16_t) results->rawlen - 4, - (uint16_t) sizeof(data) * 8); + int16_t maxBitSize = + std::min((uint16_t)results->rawlen - 5, (uint16_t)sizeof(data) * 8); // Compliance if (strict) { // Technically the spec says bit sizes should be 12 xor 24. however // 32 bits has been seen from a device. We are going to assume // 12 <= bits <= 32 is the 'required' bit length for the spec. - if (maxBitSize < 12 || maxBitSize > 32) - return false; + if (maxBitSize < 12 || maxBitSize > 32) return false; if (maxBitSize < nbits) return false; // Short cut, we can never reach the expected nr. of bits. } // Header decode - if (!matchMark(results->rawbuf[offset], RCMM_HDR_MARK)) return false; + if (!matchMark(results->rawbuf[offset], kRcmmHdrMark)) return false; // Calculate how long the common tick time is based on the header mark. - uint32_t m_tick = results->rawbuf[offset++] * RAWTICK / RCMM_HDR_MARK_TICKS; - if (!matchSpace(results->rawbuf[offset], RCMM_HDR_SPACE)) return false; + uint32_t m_tick = results->rawbuf[offset++] * kRawTick / kRcmmHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kRcmmHdrSpace)) return false; // Calculate how long the common tick time is based on the header space. - uint32_t s_tick = results->rawbuf[offset++] * RAWTICK / RCMM_HDR_SPACE_TICKS; + uint32_t s_tick = results->rawbuf[offset++] * kRawTick / kRcmmHdrSpaceTicks; // Data decode // RC-MM has two bits of data per mark/space pair. uint16_t actualBits; for (actualBits = 0; actualBits < maxBitSize; actualBits += 2, offset++) { - if (!match(results->rawbuf[offset++], RCMM_BIT_MARK_TICKS * m_tick)) + if (!match(results->rawbuf[offset++], kRcmmBitMarkTicks * m_tick)) return false; data <<= 2; // Use non-default tolerance & excess for matching some of the spaces as the // defaults are too generous and causes mis-matches in some cases. - if (match(results->rawbuf[offset], RCMM_BIT_SPACE_0_TICKS * s_tick, - TOLERANCE)) + if (match(results->rawbuf[offset], kRcmmBitSpace0Ticks * s_tick, + kTolerance)) data += 0; - else if (match(results->rawbuf[offset], RCMM_BIT_SPACE_1_TICKS * s_tick, - TOLERANCE)) + else if (match(results->rawbuf[offset], kRcmmBitSpace1Ticks * s_tick, + kTolerance)) data += 1; - else if (match(results->rawbuf[offset], RCMM_BIT_SPACE_2_TICKS * s_tick, - RCMM_TOLERANCE)) + else if (match(results->rawbuf[offset], kRcmmBitSpace2Ticks * s_tick, + kRcmmTolerance)) data += 2; - else if (match(results->rawbuf[offset], RCMM_BIT_SPACE_3_TICKS * s_tick, - RCMM_TOLERANCE)) + else if (match(results->rawbuf[offset], kRcmmBitSpace3Ticks * s_tick, + kRcmmTolerance)) data += 3; else return false; } // Footer decode - if (!match(results->rawbuf[offset++], RCMM_BIT_MARK_TICKS * m_tick)) + if (!match(results->rawbuf[offset++], kRcmmBitMarkTicks * m_tick)) return false; if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], RCMM_MIN_GAP_TICKS * s_tick)) + !matchAtLeast(results->rawbuf[offset], kRcmmMinGapTicks * s_tick)) return false; // Compliance - if (strict && actualBits != nbits) - return false; + if (strict && actualBits != nbits) return false; // Success results->value = data; diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Samsung.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Samsung.cpp new file mode 100644 index 000000000..d943f8cf9 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Samsung.cpp @@ -0,0 +1,590 @@ +// Copyright 2009 Ken Shirriff +// Copyright 2017 David Conran + +#include "ir_Samsung.h" +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// SSSS AAA MMM SSSS U U N N GGGG +// S A A M M M S U U NN N G +// SSS AAAAA M M M SSS U U N N N G GG +// S A A M M S U U N NN G G +// SSSS A A M M SSSS UUU N N GGG + +// Samsung originally added from https://github.com/shirriff/Arduino-IRremote/ + +// Constants +// Ref: +// http://elektrolab.wz.cz/katalog/samsung_protocol.pdf +const uint16_t kSamsungTick = 560; +const uint16_t kSamsungHdrMarkTicks = 8; +const uint16_t kSamsungHdrMark = kSamsungHdrMarkTicks * kSamsungTick; +const uint16_t kSamsungHdrSpaceTicks = 8; +const uint16_t kSamsungHdrSpace = kSamsungHdrSpaceTicks * kSamsungTick; +const uint16_t kSamsungBitMarkTicks = 1; +const uint16_t kSamsungBitMark = kSamsungBitMarkTicks * kSamsungTick; +const uint16_t kSamsungOneSpaceTicks = 3; +const uint16_t kSamsungOneSpace = kSamsungOneSpaceTicks * kSamsungTick; +const uint16_t kSamsungZeroSpaceTicks = 1; +const uint16_t kSamsungZeroSpace = kSamsungZeroSpaceTicks * kSamsungTick; +const uint16_t kSamsungRptSpaceTicks = 4; +const uint16_t kSamsungRptSpace = kSamsungRptSpaceTicks * kSamsungTick; +const uint16_t kSamsungMinMessageLengthTicks = 193; +const uint32_t kSamsungMinMessageLength = + kSamsungMinMessageLengthTicks * kSamsungTick; +const uint16_t kSamsungMinGapTicks = + kSamsungMinMessageLengthTicks - + (kSamsungHdrMarkTicks + kSamsungHdrSpaceTicks + + kSamsungBits * (kSamsungBitMarkTicks + kSamsungOneSpaceTicks) + + kSamsungBitMarkTicks); +const uint32_t kSamsungMinGap = kSamsungMinGapTicks * kSamsungTick; + +const uint16_t kSamsungAcHdrMark = 690; +const uint16_t kSamsungAcHdrSpace = 17844; +const uint8_t kSamsungAcSections = 2; +const uint16_t kSamsungAcSectionMark = 3086; +const uint16_t kSamsungAcSectionSpace = 8864; +const uint16_t kSamsungAcSectionGap = 2886; +const uint16_t kSamsungAcBitMark = 586; +const uint16_t kSamsungAcOneSpace = 1432; +const uint16_t kSamsungAcZeroSpace = 436; + +#if SEND_SAMSUNG +// Send a Samsung formatted message. +// Samsung has a separate message to indicate a repeat, like NEC does. +// TODO(crankyoldgit): Confirm that is actually how Samsung sends a repeat. +// The refdoc doesn't indicate it is true. +// +// Args: +// data: The message to be sent. +// nbits: The bit size of the message being sent. typically kSamsungBits. +// repeat: The number of times the message is to be repeated. +// +// Status: BETA / Should be working. +// +// Ref: http://elektrolab.wz.cz/katalog/samsung_protocol.pdf +void IRsend::sendSAMSUNG(uint64_t data, uint16_t nbits, uint16_t repeat) { + sendGeneric(kSamsungHdrMark, kSamsungHdrSpace, kSamsungBitMark, + kSamsungOneSpace, kSamsungBitMark, kSamsungZeroSpace, + kSamsungBitMark, kSamsungMinGap, kSamsungMinMessageLength, data, + nbits, 38, true, repeat, 33); +} + +// Construct a raw Samsung message from the supplied customer(address) & +// command. +// +// Args: +// customer: The customer code. (aka. Address) +// command: The command code. +// Returns: +// A raw 32-bit Samsung message suitable for sendSAMSUNG(). +// +// Status: BETA / Should be working. +uint32_t IRsend::encodeSAMSUNG(uint8_t customer, uint8_t command) { + customer = reverseBits(customer, sizeof(customer) * 8); + command = reverseBits(command, sizeof(command) * 8); + return ((command ^ 0xFF) | (command << 8) | (customer << 16) | + (customer << 24)); +} +#endif + +#if DECODE_SAMSUNG +// Decode the supplied Samsung message. +// Samsung messages whilst 32 bits in size, only contain 16 bits of distinct +// data. e.g. In transmition order: +// customer_byte + customer_byte(same) + address_byte + invert(address_byte) +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: Nr. of bits to expect in the data portion. Typically kSamsungBits. +// strict: Flag to indicate if we strictly adhere to the specification. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: STABLE +// +// Note: +// LG 32bit protocol appears near identical to the Samsung protocol. +// They differ on their compliance criteria and how they repeat. +// Ref: +// http://elektrolab.wz.cz/katalog/samsung_protocol.pdf +bool IRrecv::decodeSAMSUNG(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < 2 * nbits + kHeader + kFooter - 1) + return false; // Can't possibly be a valid Samsung message. + if (strict && nbits != kSamsungBits) + return false; // We expect Samsung to be 32 bits of message. + + uint64_t data = 0; + uint16_t offset = kStartOffset; + + // Header + if (!matchMark(results->rawbuf[offset], kSamsungHdrMark)) return false; + // Calculate how long the common tick time is based on the header mark. + uint32_t m_tick = results->rawbuf[offset++] * kRawTick / kSamsungHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kSamsungHdrSpace)) return false; + // Calculate how long the common tick time is based on the header space. + uint32_t s_tick = + results->rawbuf[offset++] * kRawTick / kSamsungHdrSpaceTicks; + // Data + match_result_t data_result = + matchData(&(results->rawbuf[offset]), nbits, + kSamsungBitMarkTicks * m_tick, kSamsungOneSpaceTicks * s_tick, + kSamsungBitMarkTicks * m_tick, kSamsungZeroSpaceTicks * s_tick); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + // Footer + if (!matchMark(results->rawbuf[offset++], kSamsungBitMarkTicks * m_tick)) + return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset], kSamsungMinGapTicks * s_tick)) + return false; + + // Compliance + + // According to the spec, the customer (address) code is the first 8 + // transmitted bits. It's then repeated. Check for that. + uint8_t address = data >> 24; + if (strict && address != ((data >> 16) & 0xFF)) return false; + // Spec says the command code is the 3rd block of transmitted 8-bits, + // followed by the inverted command code. + uint8_t command = (data & 0xFF00) >> 8; + if (strict && command != ((data & 0xFF) ^ 0xFF)) return false; + + // Success + results->bits = nbits; + results->value = data; + results->decode_type = SAMSUNG; + // command & address need to be reversed as they are transmitted LSB first, + results->command = reverseBits(command, sizeof(command) * 8); + results->address = reverseBits(address, sizeof(address) * 8); + return true; +} +#endif + +#if SEND_SAMSUNG_AC +// Send a Samsung A/C message. +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. (>=kSamsungAcStateLength) +// repeat: Nr. of times the message is to be repeated. (Default = 0). +// +// Status: ALPHA / Untested. +// +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/505 +void IRsend::sendSamsungAC(uint8_t data[], uint16_t nbytes, uint16_t repeat) { + if (nbytes < kSamsungAcStateLength && nbytes % kSamsungACSectionLength) + return; // Not an appropriate number of bytes to send a proper message. + + enableIROut(38); + for (uint16_t r = 0; r <= repeat; r++) { + // Header + mark(kSamsungAcHdrMark); + space(kSamsungAcHdrSpace); + // Send in 7 byte sections. + for (uint16_t offset = 0; offset < nbytes; + offset += kSamsungACSectionLength) { + sendGeneric(kSamsungAcSectionMark, kSamsungAcSectionSpace, + kSamsungAcBitMark, kSamsungAcOneSpace, kSamsungAcBitMark, + kSamsungAcZeroSpace, kSamsungAcBitMark, kSamsungAcSectionGap, + data + offset, kSamsungACSectionLength, // 7 bytes == 56 bits + 38000, false, 0, 50); // Send in LSBF order + } + // Complete made up guess at inter-message gap. + space(100000 - kSamsungAcSectionGap); + } +} +#endif // SEND_SAMSUNG_AC + +IRSamsungAc::IRSamsungAc(uint16_t pin) : _irsend(pin) { stateReset(); } + +void IRSamsungAc::stateReset() { + for (uint8_t i = 0; i < kSamsungAcExtendedStateLength; i++) + remote_state[i] = 0x0; + remote_state[0] = 0x02; + remote_state[1] = 0x92; + remote_state[2] = 0x0F; + remote_state[6] = 0xF0; + remote_state[7] = 0x01; + remote_state[8] = 0x02; + remote_state[9] = 0xAE; + remote_state[10] = 0x71; + remote_state[12] = 0x15; + remote_state[13] = 0xF0; +} + +void IRSamsungAc::begin() { _irsend.begin(); } + +uint8_t IRSamsungAc::calcChecksum(const uint8_t state[], + const uint16_t length) { + uint8_t sum = 0; + uint8_t currentbyte; + // Safety check so we don't go outside the array. + if (length <= 5) return 255; + // Shamelessly inspired by: + // https://github.com/adafruit/Raw-IR-decoder-for-Arduino/pull/3/files + // Count most of the '1' bits after the checksum location. + for (uint8_t i = length - 5; i < length - 1; i++) { + currentbyte = state[i]; + if (i == length - 5) currentbyte = state[length - 5] & 0b11111110; + for (; currentbyte; currentbyte >>= 1) + if (currentbyte & 1) sum++; + } + return (28 - sum) & 0xF; +} + +bool IRSamsungAc::validChecksum(const uint8_t state[], const uint16_t length) { + if (length <= 5) return true; // No checksum to compare with. Assume okay. + return (state[length - 6] >> 4) == calcChecksum(state, length); +} + +// Update the checksum for the internal state. +void IRSamsungAc::checksum(uint16_t length) { + if (length < 9) return; + remote_state[length - 6] &= 0x0F; + remote_state[length - 6] |= (calcChecksum(remote_state, length) << 4); +} + +#if SEND_SAMSUNG_AC +void IRSamsungAc::send(const bool calcchecksum) { + if (calcchecksum) checksum(); + _irsend.sendSamsungAC(remote_state); +} +#endif // SEND_SAMSUNG_AC + +#if SEND_SAMSUNG_AC +void IRSamsungAc::sendExtended(const bool calcchecksum) { + if (calcchecksum) checksum(); + uint8_t extended_state[kSamsungAcExtendedStateLength] = { + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0xD2, 0x0F, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}; + // Copy/convert the internal state to an extended state. + for (uint16_t i = 0; i < kSamsungACSectionLength; i++) + extended_state[i] = remote_state[i]; + for (uint16_t i = kSamsungACSectionLength; i < kSamsungAcStateLength; i++) + extended_state[i + kSamsungACSectionLength] = remote_state[i]; + // Send it. + _irsend.sendSamsungAC(extended_state, kSamsungAcExtendedStateLength); +} +#endif // SEND_SAMSUNG_AC + +uint8_t *IRSamsungAc::getRaw() { + checksum(); + return remote_state; +} + +void IRSamsungAc::setRaw(const uint8_t new_code[], const uint16_t length) { + for (uint8_t i = 0; i < length && i < kSamsungAcExtendedStateLength; i++) { + remote_state[i] = new_code[i]; + } + // Shrink the extended state into a normal state. + if (length > kSamsungAcStateLength) { + for (uint8_t i = kSamsungAcStateLength; i < length; i++) + remote_state[i - kSamsungACSectionLength] = remote_state[i]; + } +} + +void IRSamsungAc::on() { + remote_state[1] &= ~kSamsungAcPowerMask1; + remote_state[6] |= kSamsungAcPowerMask2; +} + +void IRSamsungAc::off() { + remote_state[1] |= kSamsungAcPowerMask1; + remote_state[6] &= ~kSamsungAcPowerMask2; +} + +void IRSamsungAc::setPower(const bool state) { + if (state) + on(); + else + off(); +} + +bool IRSamsungAc::getPower() { + return ((remote_state[6] & kSamsungAcPowerMask2) != 0) && + ((remote_state[1] & kSamsungAcPowerMask1) == 0); +} + +// Set the temp. in deg C +void IRSamsungAc::setTemp(const uint8_t temp) { + uint8_t newtemp = std::max(kSamsungAcMinTemp, temp); + newtemp = std::min(kSamsungAcMaxTemp, newtemp); + remote_state[11] = (remote_state[11] & ~kSamsungAcTempMask) | + ((newtemp - kSamsungAcMinTemp) << 4); +} + +// Return the set temp. in deg C +uint8_t IRSamsungAc::getTemp() { + return ((remote_state[11] & kSamsungAcTempMask) >> 4) + kSamsungAcMinTemp; +} + +void IRSamsungAc::setMode(const uint8_t mode) { + // If we get an unexpected mode, default to AUTO. + uint8_t newmode = mode; + if (newmode > kSamsungAcHeat) newmode = kSamsungAcAuto; + remote_state[12] = (remote_state[12] & ~kSamsungAcModeMask) | (newmode << 4); + + // Auto mode has a special fan setting valid only in auto mode. + if (newmode == kSamsungAcAuto) { + setFan(kSamsungAcFanAuto2); + } else { + if (getFan() == kSamsungAcFanAuto2) // Non-Auto can't have this fan setting + setFan(kSamsungAcFanAuto); // Default to something safe. + } +} + +uint8_t IRSamsungAc::getMode() { + return (remote_state[12] & kSamsungAcModeMask) >> 4; +} + +void IRSamsungAc::setFan(const uint8_t speed) { + switch (speed) { + case kSamsungAcFanAuto: + case kSamsungAcFanLow: + case kSamsungAcFanMed: + case kSamsungAcFanHigh: + case kSamsungAcFanTurbo: + if (getMode() == kSamsungAcAuto) return; // Not valid in Auto mode. + break; + case kSamsungAcFanAuto2: // Special fan setting for when in Auto mode. + if (getMode() != kSamsungAcAuto) return; + break; + default: + return; + } + remote_state[12] = (remote_state[12] & ~kSamsungAcFanMask) | (speed << 1); +} + +uint8_t IRSamsungAc::getFan() { + return ((remote_state[12] & kSamsungAcFanMask) >> 1); +} + +bool IRSamsungAc::getSwing() { + // TODO(Hollako): Explain why sometimes the LSB of remote_state[9] is a 1. + // e.g. 0xAE or 0XAF for swing move. + return ((remote_state[9] & kSamsungAcSwingMask) >> 4) == kSamsungAcSwingMove; +} + +void IRSamsungAc::setSwing(const bool state) { + // TODO(Hollako): Explain why sometimes the LSB of remote_state[9] is a 1. + // e.g. 0xAE or 0XAF for swing move. + remote_state[9] &= ~kSamsungAcSwingMask; // Clear the previous swing state. + if (state) + remote_state[9] |= (kSamsungAcSwingMove << 4); + else + remote_state[9] |= (kSamsungAcSwingStop << 4); +} + +bool IRSamsungAc::getBeep() { return remote_state[13] & kSamsungAcBeepMask; } + +void IRSamsungAc::setBeep(const bool state) { + if (state) + remote_state[13] |= kSamsungAcBeepMask; + else + remote_state[13] &= ~kSamsungAcBeepMask; +} + +bool IRSamsungAc::getClean() { + return (remote_state[10] & kSamsungAcCleanMask10) && + (remote_state[11] & kSamsungAcCleanMask11); +} + +void IRSamsungAc::setClean(const bool state) { + if (state) { + remote_state[10] |= kSamsungAcCleanMask10; + remote_state[11] |= kSamsungAcCleanMask11; + } else { + remote_state[10] &= ~kSamsungAcCleanMask10; + remote_state[11] &= ~kSamsungAcCleanMask11; + } +} + +// Very unsure this is correct. +bool IRSamsungAc::getQuiet() { + return remote_state[11] & kSamsungAcQuietMask11; +} + +// Very unsure this is correct. +void IRSamsungAc::setQuiet(const bool state) { + if (state) { + remote_state[11] |= kSamsungAcQuietMask11; + setFan(kSamsungAcFanAuto); // Quiet mode seems to set fan speed to auto. + } else { + remote_state[11] &= ~kSamsungAcQuietMask11; + } +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRSamsungAc::toString() { + String result = ""; +#else +std::string IRSamsungAc::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Power: "; + if (getPower()) + result += "On"; + else + result += "Off"; + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kSamsungAcAuto: + result += " (AUTO)"; + break; + case kSamsungAcCool: + result += " (COOL)"; + break; + case kSamsungAcHeat: + result += " (HEAT)"; + break; + case kSamsungAcDry: + result += " (DRY)"; + break; + case kSamsungAcFan: + result += " (FAN)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", Fan: " + uint64ToString(getFan()); + switch (getFan()) { + case kSamsungAcFanAuto: + case kSamsungAcFanAuto2: + result += " (AUTO)"; + break; + case kSamsungAcFanLow: + result += " (LOW)"; + break; + case kSamsungAcFanMed: + result += " (MED)"; + break; + case kSamsungAcFanHigh: + result += " (HIGH)"; + break; + case kSamsungAcFanTurbo: + result += " (TURBO)"; + break; + default: + result += " (UNKNOWN)"; + break; + } + result += ", Swing: "; + if (getSwing()) + result += "On"; + else + result += "Off"; + result += ", Beep: "; + if (getBeep()) + result += "On"; + else + result += "Off"; + result += ", Clean: "; + if (getBeep()) + result += "On"; + else + result += "Off"; + result += ", Quiet: "; + if (getQuiet()) + result += "On"; + else + result += "Off"; + return result; +} + +#if DECODE_SAMSUNG_AC +// Decode the supplied Samsung A/C message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kSamsungAcBits +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA / Appears to mostly work. +// +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/505 +bool IRrecv::decodeSamsungAC(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < 2 * nbits + kHeader * 3 + kFooter * 2 - 1) + return false; // Can't possibly be a valid Samsung A/C message. + if (nbits != kSamsungAcBits && nbits != kSamsungAcExtendedBits) return false; + + uint16_t offset = kStartOffset; + uint16_t dataBitsSoFar = 0; + match_result_t data_result; + + // Message Header + if (!matchMark(results->rawbuf[offset++], kSamsungAcBitMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kSamsungAcHdrSpace)) return false; + // Section(s) + for (uint16_t pos = kSamsungACSectionLength, i = 0; pos <= nbits / 8; + pos += kSamsungACSectionLength) { + uint64_t sectiondata = 0; + // Section Header + if (!matchMark(results->rawbuf[offset++], kSamsungAcSectionMark)) + return false; + if (!matchSpace(results->rawbuf[offset++], kSamsungAcSectionSpace)) + return false; + // Section Data + // Keep reading bytes until we either run out of section or state to fill. + for (; offset <= results->rawlen - 16 && i < pos; + i++, dataBitsSoFar += 8, offset += data_result.used) { + data_result = matchData(&(results->rawbuf[offset]), 8, kSamsungAcBitMark, + kSamsungAcOneSpace, kSamsungAcBitMark, + kSamsungAcZeroSpace, kTolerance, 0, false); + if (data_result.success == false) { + DPRINT("DEBUG: offset = "); + DPRINTLN(offset + data_result.used); + return false; // Fail + } + results->state[i] = data_result.data; + sectiondata = (sectiondata << 8) + data_result.data; + } + DPRINTLN("DEBUG: sectiondata = 0x" + uint64ToString(sectiondata, 16)); + // Section Footer + if (!matchMark(results->rawbuf[offset++], kSamsungAcBitMark)) return false; + if (pos < nbits / 8) { // Inter-section gap. + if (!matchSpace(results->rawbuf[offset++], kSamsungAcSectionGap)) + return false; + } else { // Last section / End of message gap. + if (offset <= results->rawlen && + !matchAtLeast(results->rawbuf[offset++], kSamsungAcSectionGap)) + return false; + } + } + // Compliance + // Re-check we got the correct size/length due to the way we read the data. + if (dataBitsSoFar != nbits) return false; + // Is the signature correct? + DPRINTLN("DEBUG: Checking signature."); + if (results->state[0] != 0x02 || results->state[2] != 0x0F) return false; + if (results->state[1] != 0x92 && results->state[1] != 0xB2) return false; + if (strict) { + // Is the checksum valid? + if (!IRSamsungAc::validChecksum(results->state, nbits / 8)) { + DPRINTLN("DEBUG: Checksum failed!"); + return false; + } + } + // Success + results->decode_type = SAMSUNG_AC; + results->bits = dataBitsSoFar; + // No need to record the state as we stored it as we decoded it. + // As we use result->state, we don't record value, address, or command as it + // is a union data type. + return true; +} +#endif // DECODE_SAMSUNG_AC diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Samsung.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Samsung.h new file mode 100644 index 000000000..f80b47d20 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Samsung.h @@ -0,0 +1,107 @@ +// Samsung A/C +// +// Copyright 2018 David Conran + +#ifndef IR_SAMSUNG_H_ +#define IR_SAMSUNG_H_ + +#define __STDC_LIMIT_MACROS +#include +#ifndef UNIT_TEST +#include +#else +#include +#endif +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// SSSS AAA MMM SSSS U U N N GGGG +// S A A M M M S U U NN N G +// SSS AAAAA M M M SSS U U N N N G GG +// S A A M M S U U N NN G G +// SSSS A A M M SSSS UUU N N GGG + +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/505 + +// Constants +const uint8_t kSamsungAcAuto = 0; +const uint8_t kSamsungAcCool = 1; +const uint8_t kSamsungAcDry = 2; +const uint8_t kSamsungAcFan = 3; +const uint8_t kSamsungAcHeat = 4; +const uint8_t kSamsungAcModeMask = 0x70; +const uint8_t kSamsungAcFanAuto = 0; +const uint8_t kSamsungAcFanLow = 2; +const uint8_t kSamsungAcFanMed = 4; +const uint8_t kSamsungAcFanHigh = 5; +const uint8_t kSamsungAcFanAuto2 = 6; +const uint8_t kSamsungAcFanTurbo = 7; +const uint8_t kSamsungAcMinTemp = 16; // 16C +const uint8_t kSamsungAcMaxTemp = 30; // 30C +const uint8_t kSamsungAcAutoTemp = 25; // 25C +const uint8_t kSamsungAcTempMask = 0xF0; +const uint8_t kSamsungAcPowerMask1 = 0x20; +const uint8_t kSamsungAcPowerMask2 = 0x30; +const uint8_t kSamsungAcFanMask = 0x0E; +const uint8_t kSamsungAcSwingMask = 0x70; +const uint8_t kSamsungAcSwingMove = 0b010; +const uint8_t kSamsungAcSwingStop = 0b111; +const uint8_t kSamsungAcBeepMask = 0x02; +const uint8_t kSamsungAcCleanMask10 = 0x80; +const uint8_t kSamsungAcCleanMask11 = 0x02; +const uint8_t kSamsungAcQuietMask11 = 0x01; + +const uint16_t kSamsungACSectionLength = 7; +const uint64_t kSamsungAcPowerSection = 0x1D20F00000000; + +// Classes +class IRSamsungAc { + public: + explicit IRSamsungAc(uint16_t pin); + + void stateReset(); +#if SEND_SAMSUNG_AC + void send(const bool calcchecksum = true); + void sendExtended(const bool calcchecksum = true); +#endif // SEND_SAMSUNG_AC + void begin(); + void on(); + void off(); + void setPower(const bool state); + bool getPower(); + void setTemp(const uint8_t temp); + uint8_t getTemp(); + void setFan(const uint8_t speed); + uint8_t getFan(); + void setMode(const uint8_t mode); + uint8_t getMode(); + void setSwing(const bool state); + bool getSwing(); + void setBeep(const bool state); + bool getBeep(); + void setClean(const bool state); + bool getClean(); + void setQuiet(const bool state); + bool getQuiet(); + uint8_t* getRaw(); + void setRaw(const uint8_t new_code[], + const uint16_t length = kSamsungAcStateLength); + static bool validChecksum(const uint8_t state[], + const uint16_t length = kSamsungAcStateLength); + static uint8_t calcChecksum(const uint8_t state[], + const uint16_t length = kSamsungAcStateLength); +#ifdef ARDUINO + String toString(); +#else + std::string toString(); +#endif + + private: + // The state of the IR remote in IR code form. + uint8_t remote_state[kSamsungAcExtendedStateLength]; + void checksum(const uint16_t length = kSamsungAcStateLength); + IRsend _irsend; +}; + +#endif // IR_SAMSUNG_H_ diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Sanyo.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Sanyo.cpp similarity index 70% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_Sanyo.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_Sanyo.cpp index cbb13a329..b2b4d7830 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Sanyo.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Sanyo.cpp @@ -5,7 +5,6 @@ #include #include "IRrecv.h" #include "IRsend.h" -#include "IRtimer.h" // SSSS AAA N N Y Y OOO // S A A NN N Y Y O O @@ -21,31 +20,35 @@ // Sanyo SA 8650B // Ref: // https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Sanyo.cpp -#define SANYO_SA8650B_HDR_MARK 3500U // seen range 3500 -#define SANYO_SA8650B_HDR_SPACE 950U // seen 950 -#define SANYO_SA8650B_ONE_MARK 2400U // seen 2400 -#define SANYO_SA8650B_ZERO_MARK 700U // seen 700 + +const uint16_t kSanyoSa8650bHdrMark = 3500; // seen range 3500 +const uint16_t kSanyoSa8650bHdrSpace = 950; // seen 950 +const uint16_t kSanyoSa8650bOneMark = 2400; // seen 2400 +const uint16_t kSanyoSa8650bZeroMark = 700; // seen 700 // usually see 713 - not using ticks as get number wrapround -#define SANYO_SA8650B_DOUBLE_SPACE_USECS 800U -#define SANYO_SA8650B_RPT_LENGTH 45000U +const uint16_t kSanyoSa8650bDoubleSpaceUsecs = 800; +const uint16_t kSanyoSa8650bRptLength = 45000; // Sanyo LC7461 // Ref: // https://github.com/marcosamarinho/IRremoteESP8266/blob/master/ir_Sanyo.cpp // http://slydiman.narod.ru/scr/kb/sanyo.htm // http://pdf.datasheetcatalog.com/datasheet/sanyo/LC7461.pdf -#define SANYO_LC7461_ADDRESS_MASK ((1 << SANYO_LC7461_ADDRESS_BITS) - 1) -#define SANYO_LC7461_COMMAND_MASK ((1 << SANYO_LC7461_COMMAND_BITS) - 1) -#define SANYO_LC7461_HDR_MARK 9000U -#define SANYO_LC7461_HDR_SPACE 4500U -#define SANYO_LC7461_BIT_MARK 560U // 1T -#define SANYO_LC7461_ONE_SPACE 1690U // 3T -#define SANYO_LC7461_ZERO_SPACE 560U // 1T -#define SANYO_LC7461_MIN_COMMAND_LENGTH 108000UL -#define SANYO_LC7461_MIN_GAP SANYO_LC7461_MIN_COMMAND_LENGTH - \ - (SANYO_LC7461_HDR_MARK + SANYO_LC7461_HDR_SPACE + SANYO_LC7461_BITS * \ - (SANYO_LC7461_BIT_MARK + (SANYO_LC7461_ONE_SPACE + \ - SANYO_LC7461_ZERO_SPACE) / 2) \ - + SANYO_LC7461_BIT_MARK) + +const uint16_t kSanyoLc7461AddressMask = (1 << kSanyoLC7461AddressBits) - 1; +const uint16_t kSanyoLc7461CommandMask = (1 << kSanyoLC7461CommandBits) - 1; +const uint16_t kSanyoLc7461HdrMark = 9000; +const uint16_t kSanyoLc7461HdrSpace = 4500; +const uint16_t kSanyoLc7461BitMark = 560; // 1T +const uint16_t kSanyoLc7461OneSpace = 1690; // 3T +const uint16_t kSanyoLc7461ZeroSpace = 560; // 1T +const uint32_t kSanyoLc7461MinCommandLength = 108000; + +const uint16_t kSanyoLc7461MinGap = + kSanyoLc7461MinCommandLength - + (kSanyoLc7461HdrMark + kSanyoLc7461HdrSpace + + kSanyoLC7461Bits * (kSanyoLc7461BitMark + + (kSanyoLc7461OneSpace + kSanyoLc7461ZeroSpace) / 2) + + kSanyoLc7461BitMark); #if SEND_SANYO // Construct a Sanyo LC7461 message. @@ -62,18 +65,18 @@ // According with LIRC, this protocol is used on Sanyo, Aiwa and Chinon uint64_t IRsend::encodeSanyoLC7461(uint16_t address, uint8_t command) { // Mask our input values to ensure the correct bit sizes. - address &= SANYO_LC7461_ADDRESS_MASK; - command &= SANYO_LC7461_COMMAND_MASK; + address &= kSanyoLc7461AddressMask; + command &= kSanyoLc7461CommandMask; uint64_t data = address; - address ^= SANYO_LC7461_ADDRESS_MASK; // Invert the 13 LSBs. + address ^= kSanyoLc7461AddressMask; // Invert the 13 LSBs. // Append the now inverted address. - data = (data << SANYO_LC7461_ADDRESS_BITS) | address; + data = (data << kSanyoLC7461AddressBits) | address; // Append the command. - data = (data << SANYO_LC7461_COMMAND_BITS) | command; - command ^= SANYO_LC7461_COMMAND_MASK; // Invert the command. + data = (data << kSanyoLC7461CommandBits) | command; + command ^= kSanyoLc7461CommandMask; // Invert the command. // Append the now inverted command. - data = (data << SANYO_LC7461_COMMAND_BITS) | command; + data = (data << kSanyoLC7461CommandBits) | command; return data; } @@ -128,31 +131,30 @@ void IRsend::sendSanyoLC7461(uint64_t data, uint16_t nbits, uint16_t repeat) { // http://pdf.datasheetcatalog.com/datasheet/sanyo/LC7461.pdf bool IRrecv::decodeSanyoLC7461(decode_results *results, uint16_t nbits, bool strict) { - if (strict && nbits != SANYO_LC7461_BITS) + if (strict && nbits != kSanyoLC7461Bits) return false; // Not strictly in spec. // This protocol is basically a 42-bit variant of the NEC protocol. if (!decodeNEC(results, nbits, false)) return false; // Didn't match a NEC format (without strict) // Bits 30 to 42+. - uint16_t address = results->value >> (SANYO_LC7461_BITS - - SANYO_LC7461_ADDRESS_BITS); + uint16_t address = + results->value >> (kSanyoLC7461Bits - kSanyoLC7461AddressBits); // Bits 9 to 16. - uint8_t command = (results->value >> SANYO_LC7461_COMMAND_BITS) & - SANYO_LC7461_COMMAND_MASK; + uint8_t command = + (results->value >> kSanyoLC7461CommandBits) & kSanyoLc7461CommandMask; // Compliance if (strict) { - if (results->bits != nbits) - return false; + if (results->bits != nbits) return false; // Bits 17 to 29. uint16_t inverted_address = - (results->value >> (SANYO_LC7461_COMMAND_BITS * 2)) & - SANYO_LC7461_ADDRESS_MASK; + (results->value >> (kSanyoLC7461CommandBits * 2)) & + kSanyoLc7461AddressMask; // Bits 1-8. - uint8_t inverted_command = results->value & SANYO_LC7461_COMMAND_MASK; - if ((address ^ SANYO_LC7461_ADDRESS_MASK) != inverted_address) + uint8_t inverted_command = results->value & kSanyoLc7461CommandMask; + if ((address ^ kSanyoLc7461AddressMask) != inverted_address) return false; // Address integrity check failed. - if ((command ^ SANYO_LC7461_COMMAND_MASK) != inverted_command) + if ((command ^ kSanyoLc7461CommandMask) != inverted_command) return false; // Command integrity check failed. } @@ -183,9 +185,9 @@ bool IRrecv::decodeSanyoLC7461(decode_results *results, uint16_t nbits, // Ref: // https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Sanyo.cpp bool IRrecv::decodeSanyo(decode_results *results, uint16_t nbits, bool strict) { - if (results->rawlen < 2 * nbits + HEADER - 1) + if (results->rawlen < 2 * nbits + kHeader - 1) return false; // Shorter than shortest possible. - if (strict && nbits != SANYO_SA8650B_BITS) + if (strict && nbits != kSanyoSA8650BBits) return false; // Doesn't match the spec. uint16_t offset = 0; @@ -193,9 +195,9 @@ bool IRrecv::decodeSanyo(decode_results *results, uint16_t nbits, bool strict) { // TODO(crankyoldgit): This repeat code looks like garbage, it should never // match or if it does, it won't be reliable. We should probably just // remove it. - if (results->rawbuf[offset++] < SANYO_SA8650B_DOUBLE_SPACE_USECS) { + if (results->rawbuf[offset++] < kSanyoSa8650bDoubleSpaceUsecs) { results->bits = 0; - results->value = REPEAT; + results->value = kRepeat; results->decode_type = SANYO; results->address = 0; results->command = 0; @@ -204,27 +206,27 @@ bool IRrecv::decodeSanyo(decode_results *results, uint16_t nbits, bool strict) { } // Header - if (!matchMark(results->rawbuf[offset++], SANYO_SA8650B_HDR_MARK)) + if (!matchMark(results->rawbuf[offset++], kSanyoSa8650bHdrMark)) return false; // NOTE: These next two lines look very wrong. Treat as suspect. - if (!matchMark(results->rawbuf[offset++], SANYO_SA8650B_HDR_MARK)) + if (!matchMark(results->rawbuf[offset++], kSanyoSa8650bHdrMark)) return false; // Data uint64_t data = 0; while (offset + 1 < results->rawlen) { - if (!matchSpace(results->rawbuf[offset], SANYO_SA8650B_HDR_SPACE)) + if (!matchSpace(results->rawbuf[offset], kSanyoSa8650bHdrSpace)) break; offset++; - if (matchMark(results->rawbuf[offset], SANYO_SA8650B_ONE_MARK)) + if (matchMark(results->rawbuf[offset], kSanyoSa8650bOneMark)) data = (data << 1) | 1; // 1 - else if (matchMark(results->rawbuf[offset], SANYO_SA8650B_ZERO_MARK)) + else if (matchMark(results->rawbuf[offset], kSanyoSa8650bZeroMark)) data <<= 1; // 0 else return false; offset++; } - if (strict && SANYO_SA8650B_BITS > (offset - 1U) / 2U) + if (strict && kSanyoSA8650BBits > (offset - 1U) / 2U) return false; // Success diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Sharp.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Sharp.cpp similarity index 68% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_Sharp.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_Sharp.cpp index 1a0bb3556..ae1b59c74 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Sharp.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Sharp.cpp @@ -4,7 +4,6 @@ #include #include "IRrecv.h" #include "IRsend.h" -#include "IRtimer.h" #include "IRutils.h" // SSSS H H AAA RRRR PPPP @@ -13,32 +12,37 @@ // S H H A A R R P // SSSS H H A A R R P +// Equipment it seems compatible with: +// * Sharp LC-52D62U +// * +// + // Constants // period time = 1/38000Hz = 26.316 microseconds. // Ref: // GlobalCache's IR Control Tower data. // http://www.sbprojects.com/knowledge/ir/sharp.php -#define SHARP_TICK 26U -#define SHARP_BIT_MARK_TICKS 10U -#define SHARP_BIT_MARK (SHARP_BIT_MARK_TICKS * SHARP_TICK) -#define SHARP_ONE_SPACE_TICKS 70U -#define SHARP_ONE_SPACE (SHARP_ONE_SPACE_TICKS * SHARP_TICK) -#define SHARP_ZERO_SPACE_TICKS 30U -#define SHARP_ZERO_SPACE (SHARP_ZERO_SPACE_TICKS * SHARP_TICK) -#define SHARP_GAP_TICKS 1677U -#define SHARP_GAP (SHARP_GAP_TICKS * SHARP_TICK) - +const uint16_t kSharpTick = 26; +const uint16_t kSharpBitMarkTicks = 10; +const uint16_t kSharpBitMark = kSharpBitMarkTicks * kSharpTick; +const uint16_t kSharpOneSpaceTicks = 70; +const uint16_t kSharpOneSpace = kSharpOneSpaceTicks * kSharpTick; +const uint16_t kSharpZeroSpaceTicks = 30; +const uint16_t kSharpZeroSpace = kSharpZeroSpaceTicks * kSharpTick; +const uint16_t kSharpGapTicks = 1677; +const uint16_t kSharpGap = kSharpGapTicks * kSharpTick; // Address(5) + Command(8) + Expansion(1) + Check(1) -#define SHARP_TOGGLE_MASK ((1 << (SHARP_BITS - SHARP_ADDRESS_BITS)) - 1) -#define SHARP_ADDRESS_MASK ((1 << SHARP_ADDRESS_BITS) - 1) -#define SHARP_COMMAND_MASK ((1 << SHARP_COMMAND_BITS) - 1) +const uint64_t kSharpToggleMask = + ((uint64_t)1 << (kSharpBits - kSharpAddressBits)) - 1; +const uint64_t kSharpAddressMask = ((uint64_t)1 << kSharpAddressBits) - 1; +const uint64_t kSharpCommandMask = ((uint64_t)1 << kSharpCommandBits) - 1; #if (SEND_SHARP || SEND_DENON) // Send a (raw) Sharp message // // Args: // data: Contents of the message to be sent. -// nbits: Nr. of bits of data to be sent. Typically SHARP_BITS. +// nbits: Nr. of bits of data to be sent. Typically kSharpBits. // repeat: Nr. of additional times the message is to be sent. // // Status: BETA / Previously working fine. @@ -56,28 +60,20 @@ // http://www.mwftr.com/ucF08/LEC14%20PIC%20IR.pdf // http://www.hifi-remote.com/johnsfine/DecodeIR.html#Sharp void IRsend::sendSharpRaw(uint64_t data, uint16_t nbits, uint16_t repeat) { - // Set 38kHz IR carrier frequency & a 1/3 (33%) duty cycle. - enableIROut(38, 33); - for (uint16_t i = 0; i <= repeat; i++) { // Protocol demands that the data be sent twice; once normally, // then with all but the address bits inverted. // Note: Previously this used to be performed 3 times (normal, inverted, // normal), however all data points to that being incorrect. for (uint8_t n = 0; n < 2; n++) { - // No Header - - // Data - sendData(SHARP_BIT_MARK, SHARP_ONE_SPACE, - SHARP_BIT_MARK, SHARP_ZERO_SPACE, - data, nbits, true); - // Footer - mark(SHARP_BIT_MARK); - space(SHARP_GAP); - + sendGeneric(0, 0, // No Header + kSharpBitMark, kSharpOneSpace, kSharpBitMark, kSharpZeroSpace, + kSharpBitMark, kSharpGap, data, nbits, 38, true, + 0, // Repeats are handled already. + 33); // Invert the data per protocol. This is always called twice, so it's // retured to original upon exiting the inner loop. - data ^= SHARP_TOGGLE_MASK; + data ^= kSharpToggleMask; } } } @@ -110,17 +106,17 @@ uint32_t IRsend::encodeSharp(uint16_t address, uint16_t command, uint16_t expansion, uint16_t check, bool MSBfirst) { // Mask any unexpected bits. - address &= ((1 << SHARP_ADDRESS_BITS) - 1); - command &= ((1 << SHARP_COMMAND_BITS) - 1); + address &= ((1 << kSharpAddressBits) - 1); + command &= ((1 << kSharpCommandBits) - 1); expansion &= 1; check &= 1; if (!MSBfirst) { // Correct bit order if needed. - address = reverseBits(address, SHARP_ADDRESS_BITS); - command = reverseBits(command, SHARP_COMMAND_BITS); + address = reverseBits(address, kSharpAddressBits); + command = reverseBits(command, kSharpCommandBits); } // Concatinate all the bits. - return (address << (SHARP_COMMAND_BITS + 2)) | (command << 2) | + return (address << (kSharpCommandBits + 2)) | (command << 2) | (expansion << 1) | check; } @@ -129,7 +125,7 @@ uint32_t IRsend::encodeSharp(uint16_t address, uint16_t command, // Args: // address: Address value to be sent. // command: Command value to be sent. -// nbits: Nr. of bits of data to be sent. Typically SHARP_BITS. +// nbits: Nr. of bits of data to be sent. Typically kSharpBits. // repeat: Nr. of additional times the message is to be sent. // // Status: DEPRICATED / Previously working fine. @@ -159,13 +155,13 @@ void IRsend::sendSharp(uint16_t address, uint16_t command, uint16_t nbits, // // Args: // results: Ptr to the data to decode and where to store the decode result. -// nbits: Nr. of data bits to expect. Typically SHARP_BITS. +// nbits: Nr. of data bits to expect. Typically kSharpBits. // strict: Flag indicating if we should perform strict matching. // expansion: Should we expect the expansion bit to be set. Default is true. // Returns: // boolean: True if it can decode it, false if it can't. // -// Status: BETA / Should work okay. +// Status: STABLE / Working fine. // // Note: // This procedure returns a value suitable for use in sendSharpRaw(). @@ -178,90 +174,83 @@ void IRsend::sendSharp(uint16_t address, uint16_t command, uint16_t nbits, // http://www.hifi-remote.com/johnsfine/DecodeIR.html#Sharp bool IRrecv::decodeSharp(decode_results *results, uint16_t nbits, bool strict, bool expansion) { - if (results->rawlen < 2 * nbits + FOOTER - 1) + if (results->rawlen < 2 * nbits + kFooter - 1) return false; // Not enough entries to be a Sharp message. // Compliance if (strict) { - if (nbits != SHARP_BITS) - return false; // Request is out of spec. + if (nbits != kSharpBits) return false; // Request is out of spec. // DISABLED - See TODO #ifdef UNIT_TEST // An in spec message has the data sent normally, then inverted. So we // expect twice as many entries than to just get the results. - if (results->rawlen < 2 * (2 * nbits + FOOTER)) - return false; + if (results->rawlen < 2 * (2 * nbits + kFooter)) return false; #endif } uint64_t data = 0; - uint16_t offset = OFFSET_START; + uint16_t offset = kStartOffset; // No header // But try to auto-calibrate off the initial mark signal. - if (!matchMark(results->rawbuf[offset], SHARP_BIT_MARK, 35)) return false; + if (!matchMark(results->rawbuf[offset], kSharpBitMark, 35)) return false; // Calculate how long the common tick time is based on the header mark. - uint32_t tick = results->rawbuf[offset] * RAWTICK / SHARP_BIT_MARK_TICKS; + uint32_t tick = results->rawbuf[offset] * kRawTick / kSharpBitMarkTicks; // Data for (uint16_t i = 0; i < nbits; i++, offset++) { - // Use a higher tolerance value for SHARP_BIT_MARK as it is quite small. - if (!matchMark(results->rawbuf[offset++], SHARP_BIT_MARK_TICKS * tick, 35)) + // Use a higher tolerance value for kSharpBitMark as it is quite small. + if (!matchMark(results->rawbuf[offset++], kSharpBitMarkTicks * tick, 35)) return false; - if (matchSpace(results->rawbuf[offset], SHARP_ONE_SPACE_TICKS * tick)) + if (matchSpace(results->rawbuf[offset], kSharpOneSpaceTicks * tick)) data = (data << 1) | 1; // 1 - else if (matchSpace(results->rawbuf[offset], SHARP_ZERO_SPACE_TICKS * tick)) + else if (matchSpace(results->rawbuf[offset], kSharpZeroSpaceTicks * tick)) data <<= 1; // 0 else return false; } // Footer - if (!match(results->rawbuf[offset++], SHARP_BIT_MARK_TICKS * tick)) + if (!match(results->rawbuf[offset++], kSharpBitMarkTicks * tick)) return false; if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], SHARP_GAP_TICKS * tick)) + !matchAtLeast(results->rawbuf[offset], kSharpGapTicks * tick)) return false; // Compliance if (strict) { // Check the state of the expansion bit is what we expect. - if ((data & 0b10) >> 1 != expansion) - return false; + if ((data & 0b10) >> 1 != expansion) return false; // The check bit should be cleared in a normal message. - if (data & 0b1) - return false; - // DISABLED - See TODO + if (data & 0b1) return false; + // DISABLED - See TODO #ifdef UNIT_TEST // Grab the second copy of the data (i.e. inverted) // Header // i.e. The inter-data/command repeat gap. - if (!matchSpace(results->rawbuf[offset++], SHARP_GAP_TICKS * tick)) + if (!matchSpace(results->rawbuf[offset++], kSharpGapTicks * tick)) return false; // Data uint64_t second_data = 0; for (uint16_t i = 0; i < nbits; i++, offset++) { - // Use a higher tolerance value for SHARP_BIT_MARK as it is quite small. - if (!matchMark(results->rawbuf[offset++], SHARP_BIT_MARK_TICKS * tick, - 35)) + // Use a higher tolerance value for kSharpBitMark as it is quite small. + if (!matchMark(results->rawbuf[offset++], kSharpBitMarkTicks * tick, 35)) return false; - if (matchSpace(results->rawbuf[offset], SHARP_ONE_SPACE_TICKS * tick)) + if (matchSpace(results->rawbuf[offset], kSharpOneSpaceTicks * tick)) second_data = (second_data << 1) | 1; // 1 - else if (matchSpace(results->rawbuf[offset], - SHARP_ZERO_SPACE_TICKS * tick)) + else if (matchSpace(results->rawbuf[offset], kSharpZeroSpaceTicks * tick)) second_data <<= 1; // 0 else return false; } // Footer - if (!match(results->rawbuf[offset++], SHARP_BIT_MARK_TICKS * tick)) + if (!match(results->rawbuf[offset++], kSharpBitMarkTicks * tick)) return false; if (offset < results->rawlen && - !matchAtLeast(results->rawbuf[offset], SHARP_GAP_TICKS * tick)) + !matchAtLeast(results->rawbuf[offset], kSharpGapTicks * tick)) return false; // Check that second_data has been inverted correctly. - if (data != (second_data ^ SHARP_TOGGLE_MASK)) - return false; + if (data != (second_data ^ kSharpToggleMask)) return false; #endif // UNIT_TEST } @@ -270,9 +259,9 @@ bool IRrecv::decodeSharp(decode_results *results, uint16_t nbits, bool strict, results->bits = nbits; results->value = data; // Address & command are actually transmitted in LSB first order. - results->address = reverseBits(data, nbits) & SHARP_ADDRESS_MASK; - results->command = reverseBits((data >> 2) & SHARP_COMMAND_MASK, - SHARP_COMMAND_BITS); + results->address = reverseBits(data, nbits) & kSharpAddressMask; + results->command = + reverseBits((data >> 2) & kSharpCommandMask, kSharpCommandBits); return true; } #endif // (DECODE_SHARP || DECODE_DENON) diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Sherwood.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Sherwood.cpp similarity index 71% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_Sherwood.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_Sherwood.cpp index 97e75067a..8af7dfb34 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Sherwood.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Sherwood.cpp @@ -14,16 +14,15 @@ // // Args: // data: The contents of the command you want to send. -// nbits: The bit size of the command being sent. (SHERWOOD_BITS) +// nbits: The bit size of the command being sent. (kSherwoodBits) // repeat: The nr. of times you want the command to be repeated. (Default: 1) // // Status: STABLE / Known working. // // Note: // Sherwood remote codes appear to be NEC codes with a manditory repeat code. -// i.e. repeat should be >= SHERWOOD_MIN_REPEAT (1). -void IRsend::sendSherwood(uint64_t data, uint16_t nbits, - uint16_t repeat) { - sendNEC(data, nbits, std::max((uint16_t) SHERWOOD_MIN_REPEAT, repeat)); +// i.e. repeat should be >= kSherwoodMinRepeat (1). +void IRsend::sendSherwood(uint64_t data, uint16_t nbits, uint16_t repeat) { + sendNEC(data, nbits, std::max((uint16_t)kSherwoodMinRepeat, repeat)); } #endif diff --git a/lib/IRremoteESP8266-2.2.1.02/src/ir_Sony.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Sony.cpp similarity index 62% rename from lib/IRremoteESP8266-2.2.1.02/src/ir_Sony.cpp rename to lib/IRremoteESP8266-2.5.2.03/src/ir_Sony.cpp index fd2652d1d..efa6e6a46 100644 --- a/lib/IRremoteESP8266-2.2.1.02/src/ir_Sony.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Sony.cpp @@ -5,7 +5,6 @@ #include #include "IRrecv.h" #include "IRsend.h" -#include "IRtimer.h" #include "IRutils.h" // SSSS OOO N N Y Y @@ -20,19 +19,19 @@ // Constants // Ref: // http://www.sbprojects.com/knowledge/ir/sirc.php -#define SONY_TICK 200U -#define SONY_HDR_MARK_TICKS 12U -#define SONY_HDR_MARK (SONY_HDR_MARK_TICKS * SONY_TICK) -#define SONY_SPACE_TICKS 3U -#define SONY_SPACE (SONY_SPACE_TICKS * SONY_TICK) -#define SONY_ONE_MARK_TICKS 6U -#define SONY_ONE_MARK (SONY_ONE_MARK_TICKS * SONY_TICK) -#define SONY_ZERO_MARK_TICKS 3U -#define SONY_ZERO_MARK (SONY_ZERO_MARK_TICKS * SONY_TICK) -#define SONY_RPT_LENGTH_TICKS 225U -#define SONY_RPT_LENGTH (SONY_RPT_LENGTH_TICKS * SONY_TICK) -#define SONY_MIN_GAP_TICKS 50U -#define SONY_MIN_GAP (SONY_MIN_GAP_TICKS * SONY_TICK) +const uint16_t kSonyTick = 200; +const uint16_t kSonyHdrMarkTicks = 12; +const uint16_t kSonyHdrMark = kSonyHdrMarkTicks * kSonyTick; +const uint16_t kSonySpaceTicks = 3; +const uint16_t kSonySpace = kSonySpaceTicks * kSonyTick; +const uint16_t kSonyOneMarkTicks = 6; +const uint16_t kSonyOneMark = kSonyOneMarkTicks * kSonyTick; +const uint16_t kSonyZeroMarkTicks = 3; +const uint16_t kSonyZeroMark = kSonyZeroMarkTicks * kSonyTick; +const uint16_t kSonyRptLengthTicks = 225; +const uint16_t kSonyRptLength = kSonyRptLengthTicks * kSonyTick; +const uint16_t kSonyMinGapTicks = 50; +const uint16_t kSonyMinGap = kSonyMinGapTicks * kSonyTick; #if SEND_SONY // Send a Sony/SIRC(Serial Infra-Red Control) message. @@ -51,24 +50,10 @@ // Ref: // http://www.sbprojects.com/knowledge/ir/sirc.php void IRsend::sendSony(uint64_t data, uint16_t nbits, uint16_t repeat) { - // Sony devices use a 40kHz IR carrier frequency & a 1/3 (33%) duty cycle. - enableIROut(40, 33); - IRtimer usecs = IRtimer(); - - for (uint16_t i = 0; i <= repeat; i++) { // Typically loop 3 or more times. - usecs.reset(); - // Header - mark(SONY_HDR_MARK); - space(SONY_SPACE); - // Data - sendData(SONY_ONE_MARK, SONY_SPACE, SONY_ZERO_MARK, SONY_SPACE, - data, nbits, true); - // Footer - // The Sony protocol requires us to wait 45ms from start of a code to the - // start of the next one. A 10ms minimum gap is also required. - space(std::max(SONY_MIN_GAP, SONY_RPT_LENGTH - usecs.elapsed())); - } - // A space() is always performed last, so no need to turn off the LED. + sendGeneric(kSonyHdrMark, kSonySpace, kSonyOneMark, kSonySpace, kSonyZeroMark, + kSonySpace, + 0, // No Footer mark. + kSonyMinGap, kSonyRptLength, data, nbits, 40, true, repeat, 33); } // Convert Sony/SIRC command, address, & extended bits into sendSony format. @@ -81,8 +66,8 @@ void IRsend::sendSony(uint64_t data, uint16_t nbits, uint16_t repeat) { // A sendSony compatible data message. // // Status: BETA / Should be working. -uint32_t IRsend::encodeSony(uint16_t nbits, uint16_t command, - uint16_t address, uint16_t extended) { +uint32_t IRsend::encodeSony(uint16_t nbits, uint16_t command, uint16_t address, + uint16_t extended) { uint32_t result = 0; switch (nbits) { case 12: // 5 address bits. @@ -120,7 +105,7 @@ uint32_t IRsend::encodeSony(uint16_t nbits, uint16_t command, // Ref: // http://www.sbprojects.com/knowledge/ir/sirc.php bool IRrecv::decodeSony(decode_results *results, uint16_t nbits, bool strict) { - if (results->rawlen < 2 * nbits + HEADER - 1) + if (results->rawlen < 2 * nbits + kHeader - 1) return false; // Message is smaller than we expected. // Compliance @@ -136,31 +121,30 @@ bool IRrecv::decodeSony(decode_results *results, uint16_t nbits, bool strict) { } uint64_t data = 0; - uint16_t offset = OFFSET_START; + uint16_t offset = kStartOffset; uint16_t actualBits; uint32_t timeSoFar = 0; // Time in uSecs of the message length. // Header - timeSoFar += results->rawbuf[offset] * RAWTICK; - if (!matchMark(results->rawbuf[offset], SONY_HDR_MARK)) - return false; + timeSoFar += results->rawbuf[offset] * kRawTick; + if (!matchMark(results->rawbuf[offset], kSonyHdrMark)) return false; // Calculate how long the common tick time is based on the header mark. - uint32_t tick = results->rawbuf[offset++] * RAWTICK / SONY_HDR_MARK_TICKS; + uint32_t tick = results->rawbuf[offset++] * kRawTick / kSonyHdrMarkTicks; // Data for (actualBits = 0; offset < results->rawlen - 1; actualBits++, offset++) { - // The gap after a Sony packet for a repeat should be SONY_MIN_GAP or - // (SONY_RPT_LENGTH - timeSoFar) according to the spec. - if (matchSpace(results->rawbuf[offset], SONY_MIN_GAP_TICKS * tick) || - matchAtLeast(results->rawbuf[offset], SONY_RPT_LENGTH - timeSoFar)) + // The gap after a Sony packet for a repeat should be kSonyMinGap or + // (kSonyRptLength - timeSoFar) according to the spec. + if (matchSpace(results->rawbuf[offset], kSonyMinGapTicks * tick) || + matchAtLeast(results->rawbuf[offset], kSonyRptLength - timeSoFar)) break; // Found a repeat space. - timeSoFar += results->rawbuf[offset] * RAWTICK; - if (!matchSpace(results->rawbuf[offset++], SONY_SPACE_TICKS * tick)) + timeSoFar += results->rawbuf[offset] * kRawTick; + if (!matchSpace(results->rawbuf[offset++], kSonySpaceTicks * tick)) return false; - timeSoFar += results->rawbuf[offset] * RAWTICK; - if (matchMark(results->rawbuf[offset], SONY_ONE_MARK_TICKS * tick)) + timeSoFar += results->rawbuf[offset] * kRawTick; + if (matchMark(results->rawbuf[offset], kSonyOneMarkTicks * tick)) data = (data << 1) | 1; - else if (matchMark(results->rawbuf[offset], SONY_ZERO_MARK_TICKS * tick)) + else if (matchMark(results->rawbuf[offset], kSonyZeroMarkTicks * tick)) data <<= 1; else return false; @@ -179,14 +163,14 @@ bool IRrecv::decodeSony(decode_results *results, uint16_t nbits, bool strict) { data = reverseBits(data, actualBits); // Decode the address & command from raw decode value. switch (actualBits) { - case 12: // 7 command bits, 5 address bits. - case 15: // 7 command bits, 8 address bits. + case 12: // 7 command bits, 5 address bits. + case 15: // 7 command bits, 8 address bits. results->command = data & 0x7F; // Bits 0-6 - results->address = data >> 7; // Bits 7-14 + results->address = data >> 7; // Bits 7-14 break; case 20: // 7 command bits, 5 address bits, 8 extended (command) bits. results->command = (data & 0x7F) + ((data >> 12) << 7); // Bits 0-6,12-19 - results->address = (data >> 7) & 0x1F; // Bits 7-11 + results->address = (data >> 7) & 0x1F; // Bits 7-11 break; default: // Shouldn't happen, but just in case. results->address = 0; diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Toshiba.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Toshiba.cpp new file mode 100644 index 000000000..817b5fbaa --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Toshiba.cpp @@ -0,0 +1,340 @@ +// Copyright 2017 David Conran + +#include "ir_Toshiba.h" +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// TTTTTTT OOOOO SSSSS HH HH IIIII BBBBB AAA +// TTT OO OO SS HH HH III BB B AAAAA +// TTT OO OO SSSSS HHHHHHH III BBBBBB AA AA +// TTT OO OO SS HH HH III BB BB AAAAAAA +// TTT OOOO0 SSSSS HH HH IIIII BBBBBB AA AA + +// Toshiba A/C support added by David Conran +// +// Equipment it seems compatible with: +// * Toshiba RAS-B13N3KV2 / Akita EVO II +// * Toshiba RAS-B13N3KVP-E, RAS 18SKP-ES +// * Toshiba WH-TA04NE, WC-L03SE +// * + +// Constants + +// Toshiba A/C +// Ref: +// https://github.com/r45635/HVAC-IR-Control/blob/master/HVAC_ESP8266/HVAC_ESP8266T.ino#L77 +const uint16_t kToshibaAcHdrMark = 4400; +const uint16_t kToshibaAcHdrSpace = 4300; +const uint16_t kToshibaAcBitMark = 543; +const uint16_t kToshibaAcOneSpace = 1623; +const uint16_t kToshibaAcZeroSpace = 472; +const uint16_t kToshibaAcMinGap = 7048; + +#if SEND_TOSHIBA_AC +// Send a Toshiba A/C message. +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. (>=kToshibaACStateLength) +// repeat: Nr. of times the message is to be repeated. +// (Default = kToshibaACMinRepeat). +// +// Status: StABLE / Working. +// +void IRsend::sendToshibaAC(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + if (nbytes < kToshibaACStateLength) + return; // Not enough bytes to send a proper message. + sendGeneric(kToshibaAcHdrMark, kToshibaAcHdrSpace, kToshibaAcBitMark, + kToshibaAcOneSpace, kToshibaAcBitMark, kToshibaAcZeroSpace, + kToshibaAcBitMark, kToshibaAcMinGap, data, nbytes, 38, true, + repeat, 50); +} +#endif // SEND_TOSHIBA_AC + +// Code to emulate Toshiba A/C IR remote control unit. +// Inspired and derived from the work done at: +// https://github.com/r45635/HVAC-IR-Control +// +// Status: STABLE / Working. +// +// Initialise the object. +IRToshibaAC::IRToshibaAC(uint16_t pin) : _irsend(pin) { stateReset(); } + +// Reset the state of the remote to a known good state/sequence. +void IRToshibaAC::stateReset() { + // The state of the IR remote in IR code form. + // Known good state obtained from: + // https://github.com/r45635/HVAC-IR-Control/blob/master/HVAC_ESP8266/HVAC_ESP8266T.ino#L103 + // Note: Can't use the following because it requires -std=c++11 + // uint8_t remote_state[kToshibaACStateLength] = { + // 0xF2, 0x0D, 0x03, 0xFC, 0x01, 0x00, 0x00, 0x00, 0x00 }; + remote_state[0] = 0xF2; + remote_state[1] = 0x0D; + remote_state[2] = 0x03; + remote_state[3] = 0xFC; + remote_state[4] = 0x01; + for (uint8_t i = 5; i < kToshibaACStateLength; i++) remote_state[i] = 0; + mode_state = remote_state[6] & 0b00000011; + checksum(); // Calculate the checksum +} + +// Configure the pin for output. +void IRToshibaAC::begin() { _irsend.begin(); } + +#if SEND_TOSHIBA_AC +// Send the current desired state to the IR LED. +void IRToshibaAC::send() { + checksum(); // Ensure correct checksum before sending. + _irsend.sendToshibaAC(remote_state); +} +#endif // SEND_TOSHIBA_AC + +// Return a pointer to the internal state date of the remote. +uint8_t* IRToshibaAC::getRaw() { + checksum(); + return remote_state; +} + +// Override the internal state with the new state. +void IRToshibaAC::setRaw(uint8_t newState[]) { + for (uint8_t i = 0; i < kToshibaACStateLength; i++) { + remote_state[i] = newState[i]; + } + mode_state = getMode(true); +} + +// Calculate the checksum for a given array. +// Args: +// state: The array to calculate the checksum over. +// length: The size of the array. +// Returns: +// The 8 bit checksum value. +uint8_t IRToshibaAC::calcChecksum(const uint8_t state[], + const uint16_t length) { + uint8_t checksum = 0; + // Only calculate it for valid lengths. + if (length > 1) { + // Checksum is simple XOR of all bytes except the last one. + for (uint8_t i = 0; i < length - 1; i++) checksum ^= state[i]; + } + return checksum; +} + +// Verify the checksum is valid for a given state. +// Args: +// state: The array to verify the checksum of. +// length: The size of the state. +// Returns: +// A boolean. +bool IRToshibaAC::validChecksum(const uint8_t state[], const uint16_t length) { + return (length > 1 && state[length - 1] == calcChecksum(state, length)); +} + +// Calculate & set the checksum for the current internal state of the remote. +void IRToshibaAC::checksum(const uint16_t length) { + // Stored the checksum value in the last byte. + if (length > 1) remote_state[length - 1] = calcChecksum(remote_state, length); +} + +// Set the requested power state of the A/C to off. +void IRToshibaAC::on() { + // state = ON; + remote_state[6] &= ~kToshibaAcPower; + setMode(mode_state); +} + +// Set the requested power state of the A/C to off. +void IRToshibaAC::off() { + // state = OFF; + remote_state[6] |= (kToshibaAcPower | 0b00000011); +} + +// Set the requested power state of the A/C. +void IRToshibaAC::setPower(bool state) { + if (state) + on(); + else + off(); +} + +// Return the requested power state of the A/C. +bool IRToshibaAC::getPower() { + return ((remote_state[6] & kToshibaAcPower) == 0); +} + +// Set the temp. in deg C +void IRToshibaAC::setTemp(uint8_t temp) { + temp = std::max((uint8_t)kToshibaAcMinTemp, temp); + temp = std::min((uint8_t)kToshibaAcMaxTemp, temp); + remote_state[5] = (temp - kToshibaAcMinTemp) << 4; +} + +// Return the set temp. in deg C +uint8_t IRToshibaAC::getTemp() { + return ((remote_state[5] >> 4) + kToshibaAcMinTemp); +} + +// Set the speed of the fan, 0-5. +// 0 is auto, 1-5 is the speed, 5 is Max. +void IRToshibaAC::setFan(uint8_t fan) { + // Bounds check + if (fan > kToshibaAcFanMax) + fan = kToshibaAcFanMax; // Set the fan to maximum if out of range. + if (fan > kToshibaAcFanAuto) fan++; + remote_state[6] &= 0b00011111; // Clear the previous fan state + remote_state[6] |= (fan << 5); +} + +// Return the requested state of the unit's fan. +uint8_t IRToshibaAC::getFan() { + uint8_t fan = remote_state[6] >> 5; + if (fan == kToshibaAcFanAuto) return kToshibaAcFanAuto; + return --fan; +} + +// Get the requested climate operation mode of the a/c unit. +// Args: +// useRaw: Indicate to get the mode from the state array. (Default: false) +// Returns: +// A uint8_t containing the A/C mode. +uint8_t IRToshibaAC::getMode(bool useRaw) { + if (useRaw) + return (remote_state[6] & 0b00000011); + else + return mode_state; +} + +// Set the requested climate operation mode of the a/c unit. +void IRToshibaAC::setMode(uint8_t mode) { + // If we get an unexpected mode, default to AUTO. + switch (mode) { + case kToshibaAcAuto: + break; + case kToshibaAcCool: + break; + case kToshibaAcDry: + break; + case kToshibaAcHeat: + break; + default: + mode = kToshibaAcAuto; + } + mode_state = mode; + // Only adjust the remote_state if we have power set to on. + if (getPower()) { + remote_state[6] &= 0b11111100; // Clear the previous mode. + remote_state[6] |= mode_state; + } +} + +// Convert the internal state into a human readable string. +#ifdef ARDUINO +String IRToshibaAC::toString() { + String result = ""; +#else +std::string IRToshibaAC::toString() { + std::string result = ""; +#endif // ARDUINO + result += "Power: "; + if (getPower()) + result += "On"; + else + result += "Off"; + result += ", Mode: " + uint64ToString(getMode()); + switch (getMode()) { + case kToshibaAcAuto: + result += " (AUTO)"; + break; + case kToshibaAcCool: + result += " (COOL)"; + break; + case kToshibaAcHeat: + result += " (HEAT)"; + break; + case kToshibaAcDry: + result += " (DRY)"; + break; + default: + result += " (UNKNOWN)"; + } + result += ", Temp: " + uint64ToString(getTemp()) + "C"; + result += ", Fan: " + uint64ToString(getFan()); + switch (getFan()) { + case kToshibaAcFanAuto: + result += " (AUTO)"; + break; + case kToshibaAcFanMax: + result += " (MAX)"; + break; + } + return result; +} + +#if DECODE_TOSHIBA_AC +// Decode a Toshiba AC IR message if possible. +// Places successful decode information in the results pointer. +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kToshibaACBits. +// strict: Flag to indicate if we strictly adhere to the specification. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: STABLE / Working. +// +// Ref: +// +bool IRrecv::decodeToshibaAC(decode_results* results, uint16_t nbits, + bool strict) { + uint16_t offset = kStartOffset; + uint16_t dataBitsSoFar = 0; + + // Have we got enough data to successfully decode? + if (results->rawlen < kToshibaACBits + kHeader + kFooter - 1) + return false; // Can't possibly be a valid message. + + // Compliance + if (strict && nbits != kToshibaACBits) + return false; // Must be called with the correct nr. of bytes. + + // Header + if (!matchMark(results->rawbuf[offset++], kToshibaAcHdrMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kToshibaAcHdrSpace)) return false; + + // Data + for (uint8_t i = 0; i < kToshibaACStateLength; i++) { + // Read a byte's worth of data. + match_result_t data_result = + matchData(&(results->rawbuf[offset]), 8, kToshibaAcBitMark, + kToshibaAcOneSpace, kToshibaAcBitMark, kToshibaAcZeroSpace); + if (data_result.success == false) return false; // Fail + dataBitsSoFar += 8; + results->state[i] = (uint8_t)data_result.data; + offset += data_result.used; + } + + // Footer + if (!matchMark(results->rawbuf[offset++], kToshibaAcBitMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kToshibaAcMinGap)) return false; + + // Compliance + if (strict) { + // Check that the checksum of the message is correct. + if (!IRToshibaAC::validChecksum(results->state)) return false; + } + + // Success + results->decode_type = TOSHIBA_AC; + results->bits = dataBitsSoFar; + // No need to record the state as we stored it as we decoded it. + // As we use result->state, we don't record value, address, or command as it + // is a union data type. + return true; +} +#endif // DECODE_TOSHIBA_AC diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Toshiba.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Toshiba.h new file mode 100644 index 000000000..1a1e6cdc8 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Toshiba.h @@ -0,0 +1,85 @@ +// Copyright 2017 David Conran +#ifndef IR_TOSHIBA_H_ +#define IR_TOSHIBA_H_ + +#define __STDC_LIMIT_MACROS +#include +#ifdef ARDUINO +#include +#else +#include +#endif +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// TTTTTTT OOOOO SSSSS HH HH IIIII BBBBB AAA +// TTT OO OO SS HH HH III BB B AAAAA +// TTT OO OO SSSSS HHHHHHH III BBBBBB AA AA +// TTT OO OO SS HH HH III BB BB AAAAAAA +// TTT OOOO0 SSSSS HH HH IIIII BBBBBB AA AA + +// Toshiba A/C support added by David Conran + +// Constants +const uint8_t kToshibaAcAuto = 0; +const uint8_t kToshibaAcCool = 1; +const uint8_t kToshibaAcDry = 2; +const uint8_t kToshibaAcHeat = 3; +const uint8_t kToshibaAcPower = 4; +const uint8_t kToshibaAcFanAuto = 0; +const uint8_t kToshibaAcFanMax = 5; +const uint8_t kToshibaAcMinTemp = 17; // 17C +const uint8_t kToshibaAcMaxTemp = 30; // 30C + +// Legacy defines. (Deperecated) +#define TOSHIBA_AC_AUTO kToshibaAcAuto +#define TOSHIBA_AC_COOL kToshibaAcCool +#define TOSHIBA_AC_DRY kToshibaAcDry +#define TOSHIBA_AC_HEAT kToshibaAcHeat +#define TOSHIBA_AC_POWER kToshibaAcPower +#define TOSHIBA_AC_FAN_AUTO kToshibaAcFanAuto +#define TOSHIBA_AC_FAN_MAX kToshibaAcFanMax +#define TOSHIBA_AC_MIN_TEMP kToshibaAcMinTemp +#define TOSHIBA_AC_MAX_TEMP kToshibaAcMaxTemp + +class IRToshibaAC { + public: + explicit IRToshibaAC(uint16_t pin); + + void stateReset(); +#if SEND_TOSHIBA_AC + void send(); +#endif // SEND_TOSHIBA_AC + void begin(); + void on(); + void off(); + void setPower(bool state); + bool getPower(); + void setTemp(uint8_t temp); + uint8_t getTemp(); + void setFan(uint8_t fan); + uint8_t getFan(); + void setMode(uint8_t mode); + uint8_t getMode(bool useRaw = false); + void setRaw(uint8_t newState[]); + uint8_t* getRaw(); + static bool validChecksum(const uint8_t state[], + const uint16_t length = kToshibaACStateLength); +#ifdef ARDUINO + String toString(); +#else + std::string toString(); +#endif +#ifndef UNIT_TEST + + private: +#endif + uint8_t remote_state[kToshibaACStateLength]; + void checksum(const uint16_t length = kToshibaACStateLength); + static uint8_t calcChecksum(const uint8_t state[], + const uint16_t length = kToshibaACStateLength); + uint8_t mode_state; + IRsend _irsend; +}; + +#endif // IR_TOSHIBA_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Trotec.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Trotec.cpp new file mode 100644 index 000000000..0bece2664 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Trotec.cpp @@ -0,0 +1,127 @@ +// Copyright 2017 stufisher + +#include "ir_Trotec.h" +#include "IRremoteESP8266.h" +#include "IRutils.h" + +// Constants +const uint16_t kTrotecHdrMark = 5952; +const uint16_t kTrotecHdrSpace = 7364; +const uint16_t kTrotecOneMark = 592; +const uint16_t kTrotecOneSpace = 1560; +const uint16_t kTrotecZeroMark = 592; +const uint16_t kTrotecZeroSpace = 592; +const uint16_t kTrotecGap = 6184; +const uint16_t kTrotecGapEnd = 1500; // made up value + +#if SEND_TROTEC + +void IRsend::sendTrotec(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + if (nbytes < kTrotecStateLength) return; + + for (uint16_t r = 0; r <= repeat; r++) { + sendGeneric(kTrotecHdrMark, kTrotecHdrSpace, kTrotecOneMark, + kTrotecOneSpace, kTrotecZeroMark, kTrotecZeroSpace, + kTrotecOneMark, kTrotecGap, data, nbytes, 36, false, + 0, // Repeats handled elsewhere + 50); + // More footer + enableIROut(36); + mark(kTrotecOneMark); + space(kTrotecGapEnd); + } +} +#endif // SEND_TROTEC + +IRTrotecESP::IRTrotecESP(uint16_t pin) : _irsend(pin) { stateReset(); } + +void IRTrotecESP::begin() { _irsend.begin(); } + +#if SEND_TROTEC +void IRTrotecESP::send() { + checksum(); + _irsend.sendTrotec(trotec); +} +#endif // SEND_TROTEC + +void IRTrotecESP::checksum() { + uint8_t sum = 0; + uint8_t i; + + for (i = 2; i < 8; i++) sum += trotec[i]; + + trotec[8] = sum & 0xFF; +} + +void IRTrotecESP::stateReset() { + for (uint8_t i = 2; i < kTrotecStateLength; i++) trotec[i] = 0x0; + + trotec[0] = kTrotecIntro1; + trotec[1] = kTrotecIntro2; + + setPower(false); + setTemp(kTrotecDefTemp); + setSpeed(kTrotecFanMed); + setMode(kTrotecAuto); +} + +uint8_t* IRTrotecESP::getRaw() { + checksum(); + return trotec; +} + +void IRTrotecESP::setPower(bool state) { + if (state) + trotec[2] |= (kTrotecOn << 3); + else + trotec[2] &= ~(kTrotecOn << 3); +} + +uint8_t IRTrotecESP::getPower() { return trotec[2] & (kTrotecOn << 3); } + +void IRTrotecESP::setSpeed(uint8_t speed) { + trotec[2] = (trotec[2] & 0xcf) | (speed << 4); +} + +uint8_t IRTrotecESP::getSpeed() { return trotec[2] & 0x30; } + +void IRTrotecESP::setMode(uint8_t mode) { + trotec[2] = (trotec[2] & 0xfc) | mode; +} + +uint8_t IRTrotecESP::getMode() { return trotec[2] & 0x03; } + +void IRTrotecESP::setTemp(uint8_t temp) { + if (temp < kTrotecMinTemp) + temp = kTrotecMinTemp; + else if (temp > kTrotecMaxTemp) + temp = kTrotecMaxTemp; + + trotec[3] = (trotec[3] & 0x80) | (temp - kTrotecMinTemp); +} + +uint8_t IRTrotecESP::getTemp() { return trotec[3] & 0x7f; } + +void IRTrotecESP::setSleep(bool sleep) { + if (sleep) + trotec[3] |= (kTrotecSleepOn << 7); + else + trotec[3] &= ~(kTrotecSleepOn << 7); +} + +bool IRTrotecESP::getSleep(void) { return trotec[3] & (kTrotecSleepOn << 7); } + +void IRTrotecESP::setTimer(uint8_t timer) { + if (timer > kTrotecMaxTimer) timer = kTrotecMaxTimer; + + if (timer) { + trotec[5] |= (kTrotecTimerOn << 6); + trotec[6] = timer; + } else { + trotec[5] &= ~(kTrotecTimerOn << 6); + trotec[6] = 0; + } +} + +uint8_t IRTrotecESP::getTimer() { return trotec[6]; } diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Trotec.h b/lib/IRremoteESP8266-2.5.2.03/src/ir_Trotec.h new file mode 100644 index 000000000..040d9a722 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Trotec.h @@ -0,0 +1,92 @@ +// Copyright 2017 stufisher + +#ifndef IR_TROTEC_H_ +#define IR_TROTEC_H_ + +#include "IRremoteESP8266.h" +#include "IRsend.h" + +// Constants +// Byte 0 +const uint8_t kTrotecIntro1 = 0x12; + +// Byte 1 +const uint8_t kTrotecIntro2 = 0x34; + +// Byte 2 +const uint8_t kTrotecAuto = 0; +const uint8_t kTrotecCool = 1; +const uint8_t kTrotecDry = 2; +const uint8_t kTrotecFan = 3; + +const uint8_t kTrotecOn = 1; +const uint8_t kTrotecOff = 0; + +const uint8_t kTrotecFanLow = 1; +const uint8_t kTrotecFanMed = 2; +const uint8_t kTrotecFanHigh = 3; + +// Byte 3 +const uint8_t kTrotecMinTemp = 18; +const uint8_t kTrotecDefTemp = 25; +const uint8_t kTrotecMaxTemp = 32; + +const uint8_t kTrotecSleepOn = 1; + +// Byte 5 +const uint8_t kTrotecTimerOn = 1; + +// Byte 6 +const uint8_t kTrotecMinTimer = 0; +const uint8_t kTrotecMaxTimer = 23; + +// Legacy defines. (Deperecated) +#define TROTEC_AUTO kTrotecAuto +#define TROTEC_COOL kTrotecCool +#define TROTEC_DRY kTrotecDry +#define TROTEC_FAN kTrotecFan +#define TROTEC_FAN_LOW kTrotecFanLow +#define TROTEC_FAN_MED kTrotecFanMed +#define TROTEC_FAN_HIGH kTrotecFanHigh +#define TROTEC_MIN_TEMP kTrotecMinTemp +#define TROTEC_MAX_TEMP kTrotecMaxTemp +#define TROTEC_MIN_TIMER kTrotecMinTimer +#define TROTEC_MAX_TIMER kTrotecMaxTimer + +class IRTrotecESP { + public: + explicit IRTrotecESP(uint16_t pin); + +#if SEND_TROTEC + void send(); +#endif // SEND_TROTEC + void begin(); + + void setPower(bool state); + uint8_t getPower(); + + void setTemp(uint8_t temp); + uint8_t getTemp(); + + void setSpeed(uint8_t fan); + uint8_t getSpeed(); + + uint8_t getMode(); + void setMode(uint8_t mode); + + bool getSleep(); + void setSleep(bool sleep); + + uint8_t getTimer(); + void setTimer(uint8_t timer); + + uint8_t* getRaw(); + + private: + uint8_t trotec[kTrotecStateLength]; + void stateReset(); + void checksum(); + IRsend _irsend; +}; + +#endif // IR_TROTEC_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Whirlpool.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Whirlpool.cpp new file mode 100644 index 000000000..671513991 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Whirlpool.cpp @@ -0,0 +1,149 @@ +// Copyright 2018 David Conran +// +// Code to emulate Whirlpool protocol compatible devices. +// Should be compatible with: +// * SPIS409L, SPIS412L, SPIW409L, SPIW412L, SPIW418L +// + +#include +#ifndef ARDUINO +#include +#endif +#include "IRrecv.h" +#include "IRremoteESP8266.h" +#include "IRsend.h" +#include "IRutils.h" + +// WW WW HH HH IIIII RRRRRR LL PPPPPP OOOOO OOOOO LL +// WW WW HH HH III RR RR LL PP PP OO OO OO OO LL +// WW W WW HHHHHHH III RRRRRR LL PPPPPP OO OO OO OO LL +// WW WWW WW HH HH III RR RR LL PP OO OO OO OO LL +// WW WW HH HH IIIII RR RR LLLLLLL PP OOOO0 OOOO0 LLLLLLL + +// Constants +// Ref: https://github.com/markszabo/IRremoteESP8266/issues/509 +const uint16_t kWhirlpoolAcHdrMark = 8950; +const uint16_t kWhirlpoolAcHdrSpace = 4484; +const uint16_t kWhirlpoolAcBitMark = 597; +const uint16_t kWhirlpoolAcOneSpace = 1649; +const uint16_t kWhirlpoolAcZeroSpace = 533; +const uint16_t kWhirlpoolAcGap = 7920; +const uint32_t kWhirlpoolAcMinGap = 100000; // Completely made up value. +const uint8_t kWhirlpoolAcSections = 3; + +#if SEND_WHIRLPOOL_AC +// Send a Whirlpool A/C message. +// +// Args: +// data: An array of bytes containing the IR command. +// nbytes: Nr. of bytes of data in the array. (>=kWhirlpoolAcStateLength) +// repeat: Nr. of times the message is to be repeated. (Default = 0). +// +// Status: ALPHA / Untested. +// +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/509 +void IRsend::sendWhirlpoolAC(unsigned char data[], uint16_t nbytes, + uint16_t repeat) { + if (nbytes < kWhirlpoolAcStateLength) + return; // Not enough bytes to send a proper message. + for (uint16_t r = 0; r <= repeat; r++) { + // Section 1 + sendGeneric(kWhirlpoolAcHdrMark, kWhirlpoolAcHdrSpace, kWhirlpoolAcBitMark, + kWhirlpoolAcOneSpace, kWhirlpoolAcBitMark, + kWhirlpoolAcZeroSpace, kWhirlpoolAcBitMark, kWhirlpoolAcGap, + data, 6, // 6 bytes == 48 bits + 38000, // Complete guess of the modulation frequency. + false, 0, 50); + // Section 2 + sendGeneric(0, 0, kWhirlpoolAcBitMark, kWhirlpoolAcOneSpace, + kWhirlpoolAcBitMark, kWhirlpoolAcZeroSpace, kWhirlpoolAcBitMark, + kWhirlpoolAcGap, data + 6, 8, // 8 bytes == 64 bits + 38000, // Complete guess of the modulation frequency. + false, 0, 50); + // Section 3 + sendGeneric(0, 0, kWhirlpoolAcBitMark, kWhirlpoolAcOneSpace, + kWhirlpoolAcBitMark, kWhirlpoolAcZeroSpace, kWhirlpoolAcBitMark, + kWhirlpoolAcMinGap, data + 14, 7, // 7 bytes == 56 bits + 38000, // Complete guess of the modulation frequency. + false, 0, 50); + } +} +#endif // SEND_WHIRLPOOL_AC + +#if DECODE_WHIRLPOOL_AC +// Decode the supplied Whirlpool A/C message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: The number of data bits to expect. Typically kWhirlpoolAcBits +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: ALPHA / Untested. +// +// +// Ref: +// https://github.com/markszabo/IRremoteESP8266/issues/509 +bool IRrecv::decodeWhirlpoolAC(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < 2 * nbits + 4 + kHeader + kFooter - 1) + return false; // Can't possibly be a valid Whirlpool A/C message. + if (strict) { + if (nbits != kWhirlpoolAcBits) return false; + } + + uint16_t offset = kStartOffset; + uint16_t dataBitsSoFar = 0; + uint16_t i = 0; + match_result_t data_result; + uint8_t sectionSize[kWhirlpoolAcSections] = {6, 8, 7}; + + // Header + if (!matchMark(results->rawbuf[offset++], kWhirlpoolAcHdrMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kWhirlpoolAcHdrSpace)) + return false; + + // Data Section + // Keep reading bytes until we either run out of section or state to fill. + for (uint8_t section = 0, pos = 0; section < kWhirlpoolAcSections; + section++) { + pos += sectionSize[section]; + for (; offset <= results->rawlen - 16 && i < pos; + i++, dataBitsSoFar += 8, offset += data_result.used) { + data_result = + matchData(&(results->rawbuf[offset]), 8, kWhirlpoolAcBitMark, + kWhirlpoolAcOneSpace, kWhirlpoolAcBitMark, + kWhirlpoolAcZeroSpace, kTolerance, kMarkExcess, false); + if (data_result.success == false) break; // Fail + // Data is in LSB order. We need to reverse it. + results->state[i] = (uint8_t)data_result.data; + } + // Section Footer + if (!matchMark(results->rawbuf[offset++], kWhirlpoolAcBitMark)) + return false; + if (section < kWhirlpoolAcSections - 1) { // Inter-section gaps. + if (!matchSpace(results->rawbuf[offset++], kWhirlpoolAcGap)) return false; + } else { // Last section / End of message gap. + if (offset <= results->rawlen && + !matchAtLeast(results->rawbuf[offset++], kWhirlpoolAcGap)) + return false; + } + } + + // Compliance + if (strict) { + // Re-check we got the correct size/length due to the way we read the data. + if (dataBitsSoFar != kWhirlpoolAcBits) return false; + } + + // Success + results->decode_type = WHIRLPOOL_AC; + results->bits = dataBitsSoFar; + // No need to record the state as we stored it as we decoded it. + // As we use result->state, we don't record value, address, or command as it + // is a union data type. + return true; +} +#endif // WHIRLPOOL_AC diff --git a/lib/IRremoteESP8266-2.5.2.03/src/ir_Whynter.cpp b/lib/IRremoteESP8266-2.5.2.03/src/ir_Whynter.cpp new file mode 100644 index 000000000..555c50788 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/src/ir_Whynter.cpp @@ -0,0 +1,135 @@ +// Copyright 2009 Ken Shirriff +// Copyright 2017 David Conran + +#include +#include "IRrecv.h" +#include "IRsend.h" +#include "IRutils.h" + +// W W H H Y Y N N TTTTT EEEEE RRRRR +// W W H H Y Y NN N T E R R +// W W W HHHHH Y N N N T EEE RRRR +// W W W H H Y N NN T E R R +// WWW H H Y N N T EEEEE R R + +// Whynter A/C ARC-110WD added by Francesco Meschia +// Whynter originally added from https://github.com/shirriff/Arduino-IRremote/ + +// Constants + +const uint16_t kWhynterTick = 50; +const uint16_t kWhynterHdrMarkTicks = 57; +const uint16_t kWhynterHdrMark = kWhynterHdrMarkTicks * kWhynterTick; +const uint16_t kWhynterHdrSpaceTicks = 57; +const uint16_t kWhynterHdrSpace = kWhynterHdrSpaceTicks * kWhynterTick; +const uint16_t kWhynterBitMarkTicks = 15; +const uint16_t kWhynterBitMark = kWhynterBitMarkTicks * kWhynterTick; +const uint16_t kWhynterOneSpaceTicks = 43; +const uint16_t kWhynterOneSpace = kWhynterOneSpaceTicks * kWhynterTick; +const uint16_t kWhynterZeroSpaceTicks = 15; +const uint16_t kWhynterZeroSpace = kWhynterZeroSpaceTicks * kWhynterTick; +const uint16_t kWhynterMinCommandLengthTicks = 2160; // Totally made up value. +const uint32_t kWhynterMinCommandLength = + kWhynterMinCommandLengthTicks * kWhynterTick; +const uint16_t kWhynterMinGapTicks = + kWhynterMinCommandLengthTicks - + (2 * (kWhynterBitMarkTicks + kWhynterZeroSpaceTicks) + + kWhynterBits * (kWhynterBitMarkTicks + kWhynterOneSpaceTicks)); +const uint16_t kWhynterMinGap = kWhynterMinGapTicks * kWhynterTick; + +#if SEND_WHYNTER +// Send a Whynter message. +// +// Args: +// data: message to be sent. +// nbits: Nr. of bits of the message to be sent. +// repeat: Nr. of additional times the message is to be sent. +// +// Status: STABLE +// +// Ref: +// https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Whynter.cpp +void IRsend::sendWhynter(uint64_t data, uint16_t nbits, uint16_t repeat) { + // Set IR carrier frequency + enableIROut(38); + + for (uint16_t i = 0; i <= repeat; i++) { + // (Pre-)Header + mark(kWhynterBitMark); + space(kWhynterZeroSpace); + sendGeneric( + kWhynterHdrMark, kWhynterHdrSpace, kWhynterBitMark, kWhynterOneSpace, + kWhynterBitMark, kWhynterZeroSpace, kWhynterBitMark, kWhynterMinGap, + kWhynterMinCommandLength - (kWhynterBitMark + kWhynterZeroSpace), data, + nbits, 38, true, 0, // Repeats are already handled. + 50); + } +} +#endif + +#if DECODE_WHYNTER +// Decode the supplied Whynter message. +// +// Args: +// results: Ptr to the data to decode and where to store the decode result. +// nbits: Nr. of data bits to expect. +// strict: Flag indicating if we should perform strict matching. +// Returns: +// boolean: True if it can decode it, false if it can't. +// +// Status: BETA Strict mode is ALPHA. +// +// Ref: +// https://github.com/z3t0/Arduino-IRremote/blob/master/ir_Whynter.cpp +bool IRrecv::decodeWhynter(decode_results *results, uint16_t nbits, + bool strict) { + if (results->rawlen < 2 * nbits + 2 * kHeader + kFooter - 1) + return false; // We don't have enough entries to possibly match. + + // Compliance + if (strict && nbits != kWhynterBits) + return false; // Incorrect nr. of bits per spec. + + uint16_t offset = kStartOffset; + + // Header + // Sequence begins with a bit mark and a zero space. + // These are typically small, so we'll prefer to do the calibration + // on the much larger header mark & space that are next. + if (!matchMark(results->rawbuf[offset++], kWhynterBitMark)) return false; + if (!matchSpace(results->rawbuf[offset++], kWhynterZeroSpace)) return false; + // Main header mark and space + if (!matchMark(results->rawbuf[offset], kWhynterHdrMark)) return false; + // Calculate how long the common tick time is based on the header mark. + uint32_t m_tick = results->rawbuf[offset++] * kRawTick / kWhynterHdrMarkTicks; + if (!matchSpace(results->rawbuf[offset], kWhynterHdrSpace)) return false; + // Calculate how long the common tick time is based on the header space. + uint32_t s_tick = + results->rawbuf[offset++] * kRawTick / kWhynterHdrSpaceTicks; + + // Data + uint64_t data = 0; + match_result_t data_result = + matchData(&(results->rawbuf[offset]), nbits, + kWhynterBitMarkTicks * m_tick, kWhynterOneSpaceTicks * s_tick, + kWhynterBitMarkTicks * m_tick, kWhynterZeroSpaceTicks * s_tick); + if (data_result.success == false) return false; + data = data_result.data; + offset += data_result.used; + + // Footer + if (!matchMark(results->rawbuf[offset++], kWhynterBitMarkTicks * m_tick)) + return false; + if (offset < results->rawlen && + !matchAtLeast(results->rawbuf[offset], kWhynterMinGapTicks * s_tick)) + return false; + + // Success + results->decode_type = WHYNTER; + results->bits = nbits; + results->value = data; + results->address = 0; + results->command = 0; + return true; +} +#endif diff --git a/lib/IRremoteESP8266-2.2.1.02/test/IRrecv_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/IRrecv_test.cpp similarity index 68% rename from lib/IRremoteESP8266-2.2.1.02/test/IRrecv_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/IRrecv_test.cpp index 4b22656f6..85b6685f0 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/IRrecv_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/IRrecv_test.cpp @@ -1,7 +1,8 @@ // Copyright 2017 David Conran -#include "IRremoteESP8266.h" +#include "IRrecv_test.h" #include "IRrecv.h" +#include "IRremoteESP8266.h" #include "IRsend.h" #include "IRsend_test.h" #include "gtest/gtest.h" @@ -9,7 +10,7 @@ // Tests for the IRrecv object. TEST(TestIRrecv, DefaultBufferSize) { IRrecv irrecv_default(1); - EXPECT_EQ(RAWBUF, irrecv_default.getBufSize()); + EXPECT_EQ(kRawBuf, irrecv_default.getBufSize()); } TEST(TestIRrecv, LargeBufferSize) { @@ -29,7 +30,7 @@ TEST(TestIRrecv, MediumBufferSize) { TEST(TestIRrecv, IRrecvDestructor) { IRrecv *irrecv_ptr = new IRrecv(1); - EXPECT_EQ(RAWBUF, irrecv_ptr->getBufSize()); + EXPECT_EQ(kRawBuf, irrecv_ptr->getBufSize()); delete irrecv_ptr; irrecv_ptr = new IRrecv(1, 1234); @@ -119,7 +120,7 @@ TEST(TestDecode, DecodeNEC) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0x807F40BF, irsend.capture.value); } @@ -133,7 +134,7 @@ TEST(TestDecode, DecodeJVC) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(JVC, irsend.capture.decode_type); - EXPECT_EQ(JVC_BITS, irsend.capture.bits); + EXPECT_EQ(kJvcBits, irsend.capture.bits); EXPECT_EQ(0xC2B8, irsend.capture.value); } @@ -147,15 +148,15 @@ TEST(TestDecode, DecodeLG) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(LG, irsend.capture.decode_type); - EXPECT_EQ(LG_BITS, irsend.capture.bits); + EXPECT_EQ(kLgBits, irsend.capture.bits); EXPECT_EQ(0x4B4AE51, irsend.capture.value); irsend.reset(); - irsend.sendLG(0xB4B4AE51, LG32_BITS); + irsend.sendLG(0xB4B4AE51, kLg32Bits); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(LG, irsend.capture.decode_type); - EXPECT_EQ(LG32_BITS, irsend.capture.bits); + EXPECT_EQ(kLg32Bits, irsend.capture.bits); EXPECT_EQ(0xB4B4AE51, irsend.capture.value); } @@ -167,9 +168,9 @@ TEST(TestDecode, DecodePanasonic) { irsend.reset(); irsend.sendPanasonic64(0x40040190ED7C); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, PANASONIC_BITS, true)); + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); EXPECT_EQ(0x40040190ED7C, irsend.capture.value); } @@ -183,7 +184,7 @@ TEST(TestDecode, DecodeSamsung) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); - EXPECT_EQ(SAMSUNG_BITS, irsend.capture.bits); + EXPECT_EQ(kSamsungBits, irsend.capture.bits); EXPECT_EQ(0xE0E09966, irsend.capture.value); } @@ -198,7 +199,7 @@ TEST(TestDecode, DecodeSherwood) { ASSERT_TRUE(irrecv.decode(&irsend.capture)); // Sherwood codes are really NEC codes. EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0x807F40BF, irsend.capture.value); } @@ -212,7 +213,7 @@ TEST(TestDecode, DecodeWhynter) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(WHYNTER, irsend.capture.decode_type); - EXPECT_EQ(WHYNTER_BITS, irsend.capture.bits); + EXPECT_EQ(kWhynterBits, irsend.capture.bits); EXPECT_EQ(0x87654321, irsend.capture.value); } @@ -224,30 +225,29 @@ TEST(TestDecode, DecodeSony) { // Synthesised Normal Sony 20-bit message. irsend.reset(); - irsend.sendSony(irsend.encodeSony(SONY_20_BITS, 0x1, 0x1, 0x1)); + irsend.sendSony(irsend.encodeSony(kSony20Bits, 0x1, 0x1, 0x1)); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_20_BITS, irsend.capture.bits); + EXPECT_EQ(kSony20Bits, irsend.capture.bits); EXPECT_EQ(0x81080, irsend.capture.value); // Synthesised Normal Sony 15-bit message. irsend.reset(); - irsend.sendSony(irsend.encodeSony(SONY_15_BITS, 21, 1), SONY_15_BITS); + irsend.sendSony(irsend.encodeSony(kSony15Bits, 21, 1), kSony15Bits); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_15_BITS, irsend.capture.bits); + EXPECT_EQ(kSony15Bits, irsend.capture.bits); EXPECT_EQ(0x5480, irsend.capture.value); - // Synthesised Normal Sony 12-bit message. irsend.reset(); - irsend.sendSony(irsend.encodeSony(SONY_12_BITS, 21, 1), SONY_12_BITS); + irsend.sendSony(irsend.encodeSony(kSony12Bits, 21, 1), kSony12Bits); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_12_BITS, irsend.capture.bits); + EXPECT_EQ(kSony12Bits, irsend.capture.bits); EXPECT_EQ(0xA90, irsend.capture.value); } @@ -261,7 +261,7 @@ TEST(TestDecode, DecodeSharp) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(SHARP, irsend.capture.decode_type); - EXPECT_EQ(SHARP_BITS, irsend.capture.bits); + EXPECT_EQ(kSharpBits, irsend.capture.bits); EXPECT_EQ(0x454A, irsend.capture.value); } @@ -275,7 +275,7 @@ TEST(TestDecode, DecodeSanyo) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(SANYO_LC7461, irsend.capture.decode_type); - EXPECT_EQ(SANYO_LC7461_BITS, irsend.capture.bits); + EXPECT_EQ(kSanyoLC7461Bits, irsend.capture.bits); EXPECT_EQ(0x2468DCB56A9, irsend.capture.value); } @@ -291,7 +291,7 @@ TEST(TestDecode, DecodeRCMM) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(RCMM, irsend.capture.decode_type); - EXPECT_EQ(RCMM_BITS, irsend.capture.bits); + EXPECT_EQ(kRCMMBits, irsend.capture.bits); EXPECT_EQ(0xe0a600, irsend.capture.value); // Normal RCMM 12-bit message. @@ -323,7 +323,7 @@ TEST(TestDecode, DecodeMitsubishi) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); - EXPECT_EQ(MITSUBISHI_BITS, irsend.capture.bits); + EXPECT_EQ(kMitsubishiBits, irsend.capture.bits); EXPECT_EQ(0xC2B8, irsend.capture.value); } @@ -338,15 +338,15 @@ TEST(TestDecode, DecodeRC5) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(RC5, irsend.capture.decode_type); - EXPECT_EQ(RC5_BITS, irsend.capture.bits); + EXPECT_EQ(kRC5Bits, irsend.capture.bits); EXPECT_EQ(0x175, irsend.capture.value); // Synthesised Normal RC-5X 13-bit message. irsend.reset(); - irsend.sendRC5(irsend.encodeRC5X(0x02, 0x41, true), RC5X_BITS); + irsend.sendRC5(irsend.encodeRC5X(0x02, 0x41, true), kRC5XBits); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(RC5X, irsend.capture.decode_type); - EXPECT_EQ(RC5X_BITS, irsend.capture.bits); + EXPECT_EQ(kRC5XBits, irsend.capture.bits); EXPECT_EQ(0x1881, irsend.capture.value); } @@ -361,16 +361,16 @@ TEST(TestDecode, DecodeRC6) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_MODE0_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6Mode0Bits, irsend.capture.bits); EXPECT_EQ(0x175, irsend.capture.value); // Normal RC-6 36-bit message. irsend.reset(); - irsend.sendRC6(0xC800F742A, RC6_36_BITS); + irsend.sendRC6(0xC800F742A, kRC6_36Bits); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_36_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6_36Bits, irsend.capture.bits); EXPECT_EQ(0xC800F742A, irsend.capture.value); } @@ -384,7 +384,7 @@ TEST(TestDecode, DecodeDish) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(DISH, irsend.capture.decode_type); - EXPECT_EQ(DISH_BITS, irsend.capture.bits); + EXPECT_EQ(kDishBits, irsend.capture.bits); EXPECT_EQ(0x9C00, irsend.capture.value); } @@ -403,7 +403,7 @@ TEST(TestDecode, DecodeDenon) { EXPECT_EQ(0x2278, irsend.capture.value); // Legacy Denon 14-bit message. irsend.reset(); - irsend.sendDenon(0x1278, DENON_LEGACY_BITS); + irsend.sendDenon(0x1278, kDenonLegacyBits); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(DENON, irsend.capture.decode_type); @@ -429,7 +429,7 @@ TEST(TestDecode, DecodeCoolix) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(COOLIX, irsend.capture.decode_type); - EXPECT_EQ(COOLIX_BITS, irsend.capture.bits); + EXPECT_EQ(kCoolixBits, irsend.capture.bits); EXPECT_EQ(0x123456, irsend.capture.value); } @@ -443,6 +443,119 @@ TEST(TestDecode, DecodeAiwa) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(AIWA_RC_T501, irsend.capture.decode_type); - EXPECT_EQ(AIWA_RC_T501_BITS, irsend.capture.bits); + EXPECT_EQ(kAiwaRcT501Bits, irsend.capture.bits); EXPECT_EQ(0x7F, irsend.capture.value); } + +// Test matchData() on space encoded data. +TEST(TestMatchData, SpaceEncoded) { + IRsendTest irsend(0); + IRrecv irrecv(1); + irsend.begin(); + + uint16_t space_encoded_raw[11] = {500, 500, 500, 1500, 499, 499, + 501, 1501, 499, 1490, 500}; + match_result_t result; + + irsend.reset(); + irsend.sendRaw(space_encoded_raw, 11, 38000); + irsend.makeDecodeResult(); + result = irrecv.matchData(irsend.capture.rawbuf + 1, 5, 500, 1500, 500, 500); + ASSERT_TRUE(result.success); + EXPECT_EQ(0b01011, result.data); + EXPECT_EQ(10, result.used); + + irsend.reset(); + irsend.sendRaw(space_encoded_raw, 11, 38000); + irsend.makeDecodeResult(); + result = irrecv.matchData(irsend.capture.rawbuf + 1, 5, 500, 1000, 500, 500); + ASSERT_FALSE(result.success); +} + +// Test matchData() on mark encoded data. +TEST(TestMatchData, MarkEncoded) { + IRsendTest irsend(0); + IRrecv irrecv(1); + irsend.begin(); + + uint16_t mark_encoded_raw[11] = {500, 500, 1500, 500, 499, 499, + 1501, 501, 1499, 490, 500}; + match_result_t result; + + irsend.reset(); + irsend.sendRaw(mark_encoded_raw, 11, 38000); + irsend.makeDecodeResult(); + // MSBF order. + result = irrecv.matchData(irsend.capture.rawbuf + 1, 5, 1500, 500, 500, 500); + ASSERT_TRUE(result.success); + EXPECT_EQ(0b01011, result.data); + EXPECT_EQ(10, result.used); + // LSBF order. + result = irrecv.matchData(irsend.capture.rawbuf + 1, 5, 1500, 500, 500, 500, + kTolerance, kMarkExcess, false); + ASSERT_TRUE(result.success); + EXPECT_EQ(0b11010, result.data); // Bits reversed of the previous test. + EXPECT_EQ(10, result.used); + + irsend.reset(); + irsend.sendRaw(mark_encoded_raw, 11, 38000); + irsend.makeDecodeResult(); + // MSBF order. + result = irrecv.matchData(irsend.capture.rawbuf + 1, 5, 1000, 500, 500, 500); + ASSERT_FALSE(result.success); + // LSBF order. + result = irrecv.matchData(irsend.capture.rawbuf + 1, 5, 1000, 500, 500, 500, + kTolerance, kMarkExcess, false); + ASSERT_FALSE(result.success); +} + +// Test matchData() on "equal total bit time" encoded data. +TEST(TestMatchData, EqualTotalBitTimeEncoded) { + IRsendTest irsend(0); + IRrecv irrecv(1); + irsend.begin(); + + uint16_t equal_encoded_raw[11] = {500, 1500, 1500, 500, 499, 1499, + 1501, 501, 1499, 490, 500}; + match_result_t result; + + irsend.reset(); + irsend.sendRaw(equal_encoded_raw, 11, 38000); + irsend.makeDecodeResult(); + result = irrecv.matchData(irsend.capture.rawbuf + 1, 5, 1500, 500, 500, 1500); + ASSERT_TRUE(result.success); + EXPECT_EQ(0b01011, result.data); + EXPECT_EQ(10, result.used); + + irsend.reset(); + irsend.sendRaw(equal_encoded_raw, 11, 38000); + irsend.makeDecodeResult(); + result = irrecv.matchData(irsend.capture.rawbuf + 1, 5, 1000, 500, 500, 1000); + ASSERT_FALSE(result.success); +} + +// Test matchData() on arbitrary encoded data. +TEST(TestMatchData, ArbitraryEncoded) { + IRsendTest irsend(0); + IRrecv irrecv(1); + irsend.begin(); + + uint16_t arbitrary_encoded_raw[11] = {500, 1500, 3000, 1000, 499, 1499, + 3001, 1001, 2999, 990, 500}; + match_result_t result; + + irsend.reset(); + irsend.sendRaw(arbitrary_encoded_raw, 11, 38000); + irsend.makeDecodeResult(); + result = + irrecv.matchData(irsend.capture.rawbuf + 1, 5, 3000, 1000, 500, 1500); + ASSERT_TRUE(result.success); + EXPECT_EQ(0b01011, result.data); + EXPECT_EQ(10, result.used); + + irsend.reset(); + irsend.sendRaw(arbitrary_encoded_raw, 11, 38000); + irsend.makeDecodeResult(); + result = irrecv.matchData(irsend.capture.rawbuf + 1, 5, 1000, 500, 500, 1000); + ASSERT_FALSE(result.success); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/IRrecv_test.h b/lib/IRremoteESP8266-2.5.2.03/test/IRrecv_test.h new file mode 100644 index 000000000..bb366c1ee --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/IRrecv_test.h @@ -0,0 +1,17 @@ +// Copyright 2017 David Conran + +#ifndef TEST_IRRECV_TEST_H_ +#define TEST_IRRECV_TEST_H_ + +#include +#include +#include +#include "IRutils.h" + +#define EXPECT_STATE_EQ(a, b, c) \ + for (uint8_t i = 0; i < c / 8; ++i) { \ + EXPECT_EQ(a[i], b[i]) << "Expected state " \ + "differs at i = " \ + << uint64ToString(i); \ + } +#endif // TEST_IRRECV_TEST_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/test/IRsend_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/IRsend_test.cpp new file mode 100644 index 000000000..353639918 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/IRsend_test.cpp @@ -0,0 +1,290 @@ +// Copyright 2017 David Conran + +#include "IRsend_test.h" +#include "IRsend.h" +#include "gtest/gtest.h" + +// Tests sendData(). + +// Test sending zero bits. +TEST(TestSendData, SendZeroBits) { + IRsendTest irsend(4); + irsend.begin(); + irsend.sendData(1, 2, 3, 4, 0b1, 0, true); + EXPECT_EQ("", irsend.outputStr()); +} + +// Test sending zero and one. +TEST(TestSendData, SendSingleBit) { + IRsendTest irsend(4); + irsend.begin(); + irsend.sendData(1, 2, 3, 4, 0b1, 1, true); + EXPECT_EQ("m1s2", irsend.outputStr()); + irsend.sendData(1, 2, 3, 4, 0b0, 1, true); + EXPECT_EQ("m3s4", irsend.outputStr()); +} + +// Test sending bit order. +TEST(TestSendData, TestingBitSendOrder) { + IRsendTest irsend(4); + irsend.begin(); + irsend.sendData(1, 2, 3, 4, 0b10, 2, true); + EXPECT_EQ("m1s2m3s4", irsend.outputStr()); + irsend.sendData(1, 2, 3, 4, 0b10, 2, false); + EXPECT_EQ("m3s4m1s2", irsend.outputStr()); + irsend.sendData(1, 2, 3, 4, 0b0001, 4, false); + EXPECT_EQ("m1s2m3s4m3s4m3s4", irsend.outputStr()); +} + +// Test sending typical data. +TEST(TestSendData, SendTypicalData) { + IRsendTest irsend(4); + irsend.begin(); + irsend.sendData(1, 2, 3, 4, 0b1010110011110000, 16, true); + EXPECT_EQ("m1s2m3s4m1s2m3s4m1s2m1s2m3s4m3s4m1s2m1s2m1s2m1s2m3s4m3s4m3s4m3s4", + irsend.outputStr()); + irsend.sendData(1, 2, 3, 4, 0x1234567890ABCDEF, 64, true); + EXPECT_EQ( + "m3s4m3s4m3s4m1s2m3s4m3s4m1s2m3s4m3s4m3s4m1s2m1s2m3s4m1s2m3s4m3s4" + "m3s4m1s2m3s4m1s2m3s4m1s2m1s2m3s4m3s4m1s2m1s2m1s2m1s2m3s4m3s4m3s4" + "m1s2m3s4m3s4m1s2m3s4m3s4m3s4m3s4m1s2m3s4m1s2m3s4m1s2m3s4m1s2m1s2" + "m1s2m1s2m3s4m3s4m1s2m1s2m3s4m1s2m1s2m1s2m1s2m3s4m1s2m1s2m1s2m1s2", + irsend.outputStr()); +} + +// Test sending more than expected bits. +TEST(TestSendData, SendOverLargeData) { + IRsendTest irsend(4); + irsend.begin(); + irsend.sendData(1, 2, 3, 4, 0xFFFFFFFFFFFFFFFF, 70, true); + EXPECT_EQ( + "m3s4m3s4m3s4m3s4m3s4m3s4" + "m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2" + "m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2" + "m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2" + "m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2m1s2", + irsend.outputStr()); +} + +// Test inverting the output. +TEST(TestIRSend, InvertedOutput) { + IRsendTest irsend(4, true); + irsend.begin(); + irsend.sendData(1, 2, 3, 4, 0b1, 1, true); + EXPECT_EQ("s1m2", irsend.outputStr()); + irsend.sendData(1, 2, 3, 4, 0b0, 1, true); + EXPECT_EQ("s3m4", irsend.outputStr()); +} + +// Test typical use of sendRaw(). +TEST(TestSendRaw, GeneralUse) { + IRsendTest irsend(4); + IRrecv irrecv(0); + + irsend.begin(); + // NEC C3E0E0E8 as measured in #204 + uint16_t rawData[67] = { + 8950, 4500, 550, 1650, 600, 1650, 550, 550, 600, 500, 600, 550, + 550, 550, 600, 1650, 550, 1650, 600, 1650, 600, 1650, 550, 1700, + 550, 550, 600, 550, 550, 550, 600, 500, 600, 550, 550, 1650, + 600, 1650, 600, 1650, 550, 550, 600, 500, 600, 500, 600, 550, + 550, 550, 600, 1650, 550, 1650, 600, 1650, 600, 500, 650, 1600, + 600, 500, 600, 550, 550, 550, 600}; + + irsend.sendRaw(rawData, 67, 38); + EXPECT_EQ( + "m8950s4500" + "m550s1650m600s1650m550s550m600s500m600s550m550s550m600s1650m550s1650" + "m600s1650m600s1650m550s1700m550s550m600s550m550s550m600s500m600s550" + "m550s1650m600s1650m600s1650m550s550m600s500m600s500m600s550m550s550" + "m600s1650m550s1650m600s1650m600s500m650s1600m600s500m600s550m550s550" + "m600", + irsend.outputStr()); + + irsend.reset(); + irsend.sendRaw(rawData, 67, 38); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeNEC(&irsend.capture, kNECBits, false)); + EXPECT_EQ(NEC, irsend.capture.decode_type); + EXPECT_EQ(32, irsend.capture.bits); + EXPECT_EQ(0xC3E0E0E8, irsend.capture.value); + EXPECT_EQ( + "m8950s4500" + "m550s1650m600s1650m550s550m600s500m600s550m550s550m600s1650m550s1650" + "m600s1650m600s1650m550s1700m550s550m600s550m550s550m600s500m600s550" + "m550s1650m600s1650m600s1650m550s550m600s500m600s500m600s550m550s550" + "m600s1650m550s1650m600s1650m600s500m650s1600m600s500m600s550m550s550" + "m600", + irsend.outputStr()); +} + +// Incorrect handling of decodes from Raw. i.e. There is no gap recorded at +// the end of a command when using the interrupt code. sendRaw() best emulates +// this for unit testing purposes. sendGC() and sendXXX() will add the trailing +// gap. Users won't see this in normal use. +TEST(TestSendRaw, NoTrailingGap) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + uint16_t rawData[67] = { + 9000, 4500, 650, 550, 650, 1650, 600, 550, 650, 550, 600, 1650, + 650, 550, 600, 1650, 650, 1650, 650, 1650, 600, 550, 650, 1650, + 650, 1650, 650, 550, 600, 1650, 650, 1650, 650, 550, 650, 550, + 650, 1650, 650, 550, 650, 550, 650, 550, 600, 550, 650, 550, + 650, 550, 650, 1650, 600, 550, 650, 1650, 650, 1650, 650, 1650, + 650, 1650, 650, 1650, 650, 1650, 600}; + irsend.sendRaw(rawData, 67, 38); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); + EXPECT_EQ(NEC, irsend.capture.decode_type); + EXPECT_EQ(kNECBits, irsend.capture.bits); +} + +TEST(TestLowLevelSend, MarkFrequencyModulationAt38kHz) { + IRsendLowLevelTest irsend(0); + + irsend.begin(); + + irsend.reset(); + irsend.enableIROut(38000, 50); + EXPECT_EQ(5, irsend.mark(100)); + EXPECT_EQ( + "[On]10usecs[Off]11usecs[On]10usecs[Off]11usecs[On]10usecs[Off]11usecs" + "[On]10usecs[Off]11usecs[On]10usecs[Off]6usecs", + irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(38000, 33); + EXPECT_EQ(5, irsend.mark(100)); + EXPECT_EQ( + "[On]6usecs[Off]15usecs[On]6usecs[Off]15usecs[On]6usecs[Off]15usecs" + "[On]6usecs[Off]15usecs[On]6usecs[Off]10usecs", + irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(38000, 100); + EXPECT_EQ(1, irsend.mark(1000)); + EXPECT_EQ("[On]1000usecs[Off]", irsend.low_level_sequence); +} + +TEST(TestLowLevelSend, MarkFrequencyModulationAt36_7kHz) { + IRsendLowLevelTest irsend(0); + + irsend.begin(); + + irsend.reset(); + irsend.enableIROut(36700, 50); + EXPECT_EQ(5, irsend.mark(100)); + EXPECT_EQ( + "[On]11usecs[Off]11usecs[On]11usecs[Off]11usecs[On]11usecs[Off]11usecs" + "[On]11usecs[Off]11usecs[On]11usecs[Off]1usecs", + irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(36700, 33); + EXPECT_EQ(5, irsend.mark(100)); + EXPECT_EQ( + "[On]7usecs[Off]15usecs[On]7usecs[Off]15usecs[On]7usecs[Off]15usecs" + "[On]7usecs[Off]15usecs[On]7usecs[Off]5usecs", + irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(36700, 100); + EXPECT_EQ(1, irsend.mark(1000)); + EXPECT_EQ("[On]1000usecs[Off]", irsend.low_level_sequence); +} + +TEST(TestLowLevelSend, MarkFrequencyModulationAt40kHz) { + IRsendLowLevelTest irsend(0); + + irsend.begin(); + + irsend.reset(); + irsend.enableIROut(40000, 50); + EXPECT_EQ(5, irsend.mark(100)); + EXPECT_EQ( + "[On]10usecs[Off]10usecs[On]10usecs[Off]10usecs[On]10usecs[Off]10usecs" + "[On]10usecs[Off]10usecs[On]10usecs[Off]10usecs", + irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(40000, 33); + EXPECT_EQ(5, irsend.mark(100)); + EXPECT_EQ( + "[On]6usecs[Off]14usecs[On]6usecs[Off]14usecs[On]6usecs[Off]14usecs" + "[On]6usecs[Off]14usecs[On]6usecs[Off]14usecs", + irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(40000, 100); + EXPECT_EQ(1, irsend.mark(1000)); + EXPECT_EQ("[On]1000usecs[Off]", irsend.low_level_sequence); +} + +TEST(TestLowLevelSend, MarkNoModulation) { + IRsendLowLevelTest irsend(0, false, false); + + irsend.begin(); + + irsend.reset(); + irsend.enableIROut(38000, 50); + EXPECT_EQ(1, irsend.mark(1000)); + EXPECT_EQ("[On]1000usecs[Off]", irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(36700, 25); + EXPECT_EQ(1, irsend.mark(1000)); + EXPECT_EQ("[On]1000usecs[Off]", irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(40000, 75); + EXPECT_EQ(1, irsend.mark(1000)); + EXPECT_EQ("[On]1000usecs[Off]", irsend.low_level_sequence); +} + +TEST(TestLowLevelSend, SpaceFrequencyModulation) { + IRsendLowLevelTest irsend(0); + + irsend.reset(); + irsend.enableIROut(38000); + irsend.space(1000); + EXPECT_EQ("[Off]1000usecs", irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(40000, 75); + irsend.space(1000); + EXPECT_EQ("[Off]1000usecs", irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(38000, 100); + irsend.space(1000); + EXPECT_EQ("[Off]1000usecs", irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(38000, 33); + irsend.space(1000); + EXPECT_EQ("[Off]1000usecs", irsend.low_level_sequence); +} + +TEST(TestLowLevelSend, SpaceNoModulation) { + IRsendLowLevelTest irsend(0, false, false); + + irsend.begin(); + + irsend.reset(); + irsend.enableIROut(38000, 50); + irsend.space(1000); + EXPECT_EQ("[Off]1000usecs", irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(36700, 25); + irsend.space(1000); + EXPECT_EQ("[Off]1000usecs", irsend.low_level_sequence); + + irsend.reset(); + irsend.enableIROut(40000, 75); + irsend.space(1000); + EXPECT_EQ("[Off]1000usecs", irsend.low_level_sequence); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/IRsend_test.h b/lib/IRremoteESP8266-2.5.2.03/test/IRsend_test.h new file mode 100644 index 000000000..6d9fe51b8 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/IRsend_test.h @@ -0,0 +1,135 @@ +// Copyright 2017 David Conran + +#ifndef TEST_IRSEND_TEST_H_ +#define TEST_IRSEND_TEST_H_ + +#define __STDC_LIMIT_MACROS +#include +#include +#include +#include +#include "IRrecv.h" +#include "IRsend.h" +#include "IRtimer.h" + +#define OUTPUT_BUF 10000U +#define RAW_BUF 10000U + +#ifdef UNIT_TEST +// Used to help simulate elapsed time in unit tests. +uint32_t _IRtimer_unittest_now = 0; +#endif // UNIT_TEST + +class IRsendTest : public IRsend { + public: + uint32_t output[OUTPUT_BUF]; + uint16_t last; + uint16_t rawbuf[RAW_BUF]; + decode_results capture; + + explicit IRsendTest(uint16_t x, bool i = false, bool j = true) + : IRsend(x, i, j) { + reset(); + } + + void reset() { + last = 0; + for (uint16_t i = 0; i < OUTPUT_BUF; i++) output[i] = 0; + for (uint16_t i = 0; i < RAW_BUF; i++) rawbuf[i] = 0; + } + + std::string outputStr() { + std::stringstream result; + if (last == 0 && output[0] == 0) return ""; + for (uint16_t i = 0; i <= last; i++) { + if ((i & 1) != outputOff) // Odd XOR outputOff + result << "s"; + else + result << "m"; + result << output[i]; + } + reset(); + return result.str(); + } + + void makeDecodeResult(uint16_t offset = 0) { + capture.decode_type = UNKNOWN; + capture.bits = 0; + capture.rawlen = last + 2 - offset; + capture.overflow = (last - offset >= (int16_t)RAW_BUF); + capture.repeat = false; + capture.address = 0; + capture.command = 0; + capture.value = 0; + capture.rawbuf = rawbuf; + for (uint16_t i = 0; (i < RAW_BUF - 1) && (offset < OUTPUT_BUF); + i++, offset++) + if (output[offset] / kRawTick > UINT16_MAX) + rawbuf[i + 1] = UINT16_MAX; + else + rawbuf[i + 1] = output[offset] / kRawTick; + } + + void dumpRawResult() { + std::cout << std::dec; + if (capture.rawlen == 0) return; + std::cout << "uint16_t rawbuf[" << capture.rawlen - 1 << "] = {"; + for (uint16_t i = 1; i < capture.rawlen; i++) { + if (i % 8 == 1) std::cout << std::endl << " "; + std::cout << (capture.rawbuf[i] * kRawTick); + // std::cout << "(" << capture.rawbuf[i] << ")"; + if (i < capture.rawlen - 1) std::cout << ", "; + } + std::cout << "};" << std::endl; + } + + void addGap(uint32_t usecs) { space(usecs); } + + uint16_t mark(uint16_t usec) { + IRtimer::add(usec); + if (last >= OUTPUT_BUF) return 0; + if (last & 1) // Is odd? (i.e. last call was a space()) + output[++last] = usec; + else + output[last] += usec; + return 0; + } + + void space(uint32_t time) { + IRtimer::add(time); + if (last >= OUTPUT_BUF) return; + if (last & 1) { // Is odd? (i.e. last call was a space()) + output[last] += time; + } else { + output[++last] = time; + } + } +}; + +#ifdef UNIT_TEST +class IRsendLowLevelTest : public IRsend { + public: + std::string low_level_sequence; + + explicit IRsendLowLevelTest(uint16_t x, bool i = false, bool j = true) + : IRsend(x, i, j) { + reset(); + } + + void reset() { low_level_sequence = ""; } + + protected: + void _delayMicroseconds(uint32_t usec) { + _IRtimer_unittest_now += usec; + std::ostringstream Convert; + Convert << usec; + low_level_sequence += Convert.str() + "usecs"; + } + + void ledOff() { low_level_sequence += "[Off]"; } + + void ledOn() { low_level_sequence += "[On]"; } +}; +#endif // UNIT_TEST + +#endif // TEST_IRSEND_TEST_H_ diff --git a/lib/IRremoteESP8266-2.5.2.03/test/IRutils_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/IRutils_test.cpp new file mode 100644 index 000000000..91cf4725c --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/IRutils_test.cpp @@ -0,0 +1,352 @@ +// Copyright 2017 David Conran + +#include "IRutils.h" +#include +#include "IRrecv.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests reverseBits(). + +// Tests reverseBits for typical use. +TEST(ReverseBitsTest, TypicalUse) { + EXPECT_EQ(0xF, reverseBits(0xF0, 8)); + EXPECT_EQ(0xFFFF, reverseBits(0xFFFF0000, 32)); + EXPECT_EQ(0x555500005555FFFF, reverseBits(0xFFFFAAAA0000AAAA, 64)); + EXPECT_EQ(0, reverseBits(0, 64)); + EXPECT_EQ(0xFFFFFFFFFFFFFFFF, reverseBits(0xFFFFFFFFFFFFFFFF, 64)); +} + +// Tests reverseBits for bit size values <= 1 +TEST(ReverseBitsTest, LessThanTwoBitsReversed) { + EXPECT_EQ(0x12345678, reverseBits(0x12345678, 1)); + EXPECT_EQ(1234, reverseBits(1234, 0)); +} + +// Tests reverseBits for bit size larger than a uint64_t. +TEST(ReverseBitsTest, LargerThan64BitsReversed) { + EXPECT_EQ(0, reverseBits(0, 65)); + EXPECT_EQ(0xFFFFFFFFFFFFFFFF, reverseBits(0xFFFFFFFFFFFFFFFF, 100)); + EXPECT_EQ(0x555500005555FFFF, reverseBits(0xFFFFAAAA0000AAAA, 3000)); +} + +// Tests reverseBits for bit sizes less than all the data stored. +TEST(ReverseBitsTest, LessBitsReversedThanInputHasSet) { + EXPECT_EQ(0xF8, reverseBits(0xF1, 4)); + EXPECT_EQ(0xF5, reverseBits(0xFA, 4)); + EXPECT_EQ(0x12345678FFFF0000, reverseBits(0x123456780000FFFF, 32)); +} + +// Tests for uint64ToString() + +TEST(TestUint64ToString, TrivialCases) { + EXPECT_EQ("0", uint64ToString(0)); // Default base (10) + EXPECT_EQ("0", uint64ToString(0, 2)); // Base-2 + EXPECT_EQ("0", uint64ToString(0, 8)); // Base-8 + EXPECT_EQ("0", uint64ToString(0, 10)); // Base-10 + EXPECT_EQ("0", uint64ToString(0, 16)); // Base-16 + + EXPECT_EQ("1", uint64ToString(1, 2)); // Base-2 + EXPECT_EQ("2", uint64ToString(2, 8)); // Base-8 + EXPECT_EQ("3", uint64ToString(3, 10)); // Base-10 + EXPECT_EQ("4", uint64ToString(4, 16)); // Base-16 +} + +TEST(TestUint64ToString, NormalUse) { + EXPECT_EQ("12345", uint64ToString(12345)); + EXPECT_EQ("100", uint64ToString(4, 2)); + EXPECT_EQ("3039", uint64ToString(12345, 16)); + EXPECT_EQ("123456", uint64ToString(123456)); + EXPECT_EQ("1E240", uint64ToString(123456, 16)); + EXPECT_EQ("FEEDDEADBEEF", uint64ToString(0xfeeddeadbeef, 16)); +} + +TEST(TestUint64ToString, Max64Bit) { + EXPECT_EQ("18446744073709551615", uint64ToString(UINT64_MAX)); // Default + EXPECT_EQ("1111111111111111111111111111111111111111111111111111111111111111", + uint64ToString(UINT64_MAX, 2)); // Base-2 + EXPECT_EQ("1777777777777777777777", uint64ToString(UINT64_MAX, 8)); // Base-8 + EXPECT_EQ("18446744073709551615", uint64ToString(UINT64_MAX, 10)); // Base-10 + EXPECT_EQ("FFFFFFFFFFFFFFFF", uint64ToString(UINT64_MAX, 16)); // Base-16 +} + +TEST(TestUint64ToString, Max32Bit) { + EXPECT_EQ("4294967295", uint64ToString(UINT32_MAX)); // Default + EXPECT_EQ("37777777777", uint64ToString(UINT32_MAX, 8)); // Base-8 + EXPECT_EQ("4294967295", uint64ToString(UINT32_MAX, 10)); // Base-10 + EXPECT_EQ("FFFFFFFF", uint64ToString(UINT32_MAX, 16)); // Base-16 +} + +TEST(TestUint64ToString, InterestingCases) { + // Previous hacky-code didn't handle leading zeros in the lower 32 bits. + EXPECT_EQ("100000000", uint64ToString(0x100000000, 16)); + EXPECT_EQ("100000001", uint64ToString(0x100000001, 16)); +} + +TEST(TestUint64ToString, SillyBases) { + // If we are given a silly base, we should defer to Base-10. + EXPECT_EQ("12345", uint64ToString(12345, 0)); // Super silly, makes no sense. + EXPECT_EQ("12345", uint64ToString(12345, 1)); // We don't do unary. + EXPECT_EQ("12345", uint64ToString(12345, 100)); // We can't print base-100. + EXPECT_EQ("12345", uint64ToString(12345, 37)); // Base-37 is one to far. + EXPECT_EQ("9IX", uint64ToString(12345, 36)); // But we *can* do base-36. +} + +TEST(TestGetCorrectedRawLength, NoLargeValues) { + IRsendTest irsend(0); + IRrecv irrecv(1); + uint16_t test_data[7] = {1, 2, 3, 4, 5, 6, 7}; + irsend.begin(); + irsend.reset(); + irsend.sendRaw(test_data, 7, 38000); + irsend.makeDecodeResult(); + irrecv.decode(&irsend.capture); + EXPECT_EQ(7, getCorrectedRawLength(&irsend.capture)); +} + +TEST(TestGetCorrectedRawLength, WithLargeValues) { + IRsendTest irsend(0); + IRrecv irrecv(1); + uint16_t test_data[7] = {10, 20, 30, 40, 50, 60, 70}; + irsend.begin(); + irsend.reset(); + irsend.sendRaw(test_data, 7, 38000); + irsend.makeDecodeResult(); + irrecv.decode(&irsend.capture); + irsend.capture.rawbuf[3] = 60000; + ASSERT_EQ(2, kRawTick); // The following values rely on kRawTick being 2. + EXPECT_EQ(7 + 2, getCorrectedRawLength(&irsend.capture)); + irsend.capture.rawbuf[4] = UINT16_MAX - 1; + EXPECT_EQ(7 + 2 * 2, getCorrectedRawLength(&irsend.capture)); + irsend.capture.rawbuf[4] = UINT16_MAX; + EXPECT_EQ(7 + 2 * 2, getCorrectedRawLength(&irsend.capture)); +} + +TEST(TestResultToSourceCode, SimpleTests) { + IRsendTest irsend(0); + IRrecv irrecv(1); + uint16_t test_data[7] = {10, 20, 30, 40, 50, 60, 70}; + irsend.begin(); + irsend.reset(); + irsend.sendRaw(test_data, 7, 38000); + irsend.makeDecodeResult(); + irrecv.decode(&irsend.capture); + EXPECT_EQ( + "uint16_t rawData[7] = {10, 20, 30, 40, 50, 60, 70};" + " // UNKNOWN A5E5F35D\n", + resultToSourceCode(&irsend.capture)); + + // Stick in some large values. + irsend.capture.rawbuf[3] = 60000; + EXPECT_EQ( + "uint16_t rawData[9] = {10, 20, 65535, 0, 54465, 40," + " 50, 60, 70}; // UNKNOWN A5E5F35D\n", + resultToSourceCode(&irsend.capture)); + irsend.capture.rawbuf[5] = UINT16_MAX; + EXPECT_EQ( + "uint16_t rawData[11] = {10, 20, 65535, 0, 54465, 40," + " 65535, 0, 65535, 60, 70}; // UNKNOWN A5E5F35D\n", + resultToSourceCode(&irsend.capture)); + + // Reset and put the large value in a space location. + irsend.reset(); + irsend.sendRaw(test_data, 7, 38000); + irsend.makeDecodeResult(); + irrecv.decode(&irsend.capture); + irsend.capture.rawbuf[4] = UINT16_MAX - 1; + EXPECT_EQ( + "uint16_t rawData[9] = {10, 20, 30, 65535, 0, 65533," + " 50, 60, 70}; // UNKNOWN A5E5F35D\n", + resultToSourceCode(&irsend.capture)); +} + +TEST(TestResultToSourceCode, SimpleProtocols) { + IRsendTest irsend(0); + IRrecv irrecv(1); + irsend.begin(); + + // Generate a code which has address & command values. + irsend.reset(); + irsend.sendNEC(irsend.encodeNEC(0x10, 0x20)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(NEC, irsend.capture.decode_type); + ASSERT_EQ(kNECBits, irsend.capture.bits); + EXPECT_EQ( + "uint16_t rawData[68] = {8960, 4480, 560, 560, 560, 560, 560, 560, " + "560, 560, 560, 1680, 560, 560, 560, 560, 560, 560, 560, 1680, " + "560, 1680, 560, 1680, 560, 1680, 560, 560, 560, 1680, 560, 1680, " + "560, 1680, 560, 560, 560, 560, 560, 560, 560, 560, 560, 560, " + "560, 1680, 560, 560, 560, 560, 560, 1680, 560, 1680, 560, 1680, " + "560, 1680, 560, 1680, 560, 560, 560, 1680, 560, 1680, 560, 40320 " + "}; // NEC 8F704FB\n" + "uint32_t address = 0x10;\n" + "uint32_t command = 0x20;\n" + "uint64_t data = 0x8F704FB;\n", + resultToSourceCode(&irsend.capture)); + + // Generate a code which DOESN'T have address & command values. + irsend.reset(); + irsend.sendNikai(0xD0F2F); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(NIKAI, irsend.capture.decode_type); + ASSERT_EQ(kNikaiBits, irsend.capture.bits); + EXPECT_EQ( + "uint16_t rawData[52] = {4000, 4000, 500, 2000, 500, 2000, " + "500, 2000, 500, 2000, 500, 1000, 500, 1000, 500, 2000, 500, 1000, " + "500, 2000, 500, 2000, 500, 2000, 500, 2000, 500, 1000, 500, 1000, " + "500, 1000, 500, 1000, 500, 2000, 500, 2000, 500, 1000, 500, 2000, " + "500, 1000, 500, 1000, 500, 1000, 500, 1000, 500, 8500 };" + " // NIKAI D0F2F\n" + "uint64_t data = 0xD0F2F;\n", + resultToSourceCode(&irsend.capture)); +} + +TEST(TestResultToSourceCode, ComplexProtocols) { + IRsendTest irsend(0); + IRrecv irrecv(1); + irsend.begin(); + + uint8_t state[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0x00, 0x00, 0x01}; + + irsend.reset(); + irsend.sendToshibaAC(state); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(TOSHIBA_AC, irsend.capture.decode_type); + ASSERT_EQ(kToshibaACBits, irsend.capture.bits); + EXPECT_EQ( + "uint16_t rawData[296] = {4400, 4300, 542, 1622, 542, 1622, " + "542, 1622, 542, 1622, 542, 472, 542, 472, 542, 1622, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 1622, 542, 1622, " + "542, 472, 542, 1622, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 1622, 542, 1622, 542, 1622, 542, 1622, " + "542, 1622, 542, 1622, 542, 1622, 542, 1622, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 1622, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 1622, 542, 7048, 4400, 4300, " + "542, 1622, 542, 1622, 542, 1622, 542, 1622, 542, 472, 542, 472, " + "542, 1622, 542, 472, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 1622, 542, 1622, 542, 472, 542, 1622, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 1622, 542, 1622, " + "542, 1622, 542, 1622, 542, 1622, 542, 1622, 542, 1622, 542, 1622, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 1622, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 472, 542, 472, " + "542, 472, 542, 472, 542, 472, 542, 472, 542, 472, 542, 1622, " + "542, 7048 }; // TOSHIBA_AC\n" + "uint8_t state[9] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, 0x00, 0x00, 0x00, " + "0x01};\n", + resultToSourceCode(&irsend.capture)); +} + +TEST(TestResultToTimingInfo, General) { + IRsendTest irsend(0); + IRrecv irrecv(1); + irsend.begin(); + + irsend.reset(); + irsend.sendNEC(irsend.encodeNEC(0x10, 0x20)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(NEC, irsend.capture.decode_type); + ASSERT_EQ(kNECBits, irsend.capture.bits); + EXPECT_EQ( + "Raw Timing[68]:\n" + " + 8960, - 4480, + 560, - 560, + 560, - 560," + " + 560, - 560, \n" + " + 560, - 560, + 560, - 1680, + 560, - 560," + " + 560, - 560, \n" + " + 560, - 560, + 560, - 1680, + 560, - 1680," + " + 560, - 1680, \n" + " + 560, - 1680, + 560, - 560, + 560, - 1680," + " + 560, - 1680, \n" + " + 560, - 1680, + 560, - 560, + 560, - 560," + " + 560, - 560, \n" + " + 560, - 560, + 560, - 560, + 560, - 1680," + " + 560, - 560, \n" + " + 560, - 560, + 560, - 1680, + 560, - 1680," + " + 560, - 1680, \n" + " + 560, - 1680, + 560, - 1680, + 560, - 560," + " + 560, - 1680, \n" + " + 560, - 1680, + 560, - 40320\n", + resultToTimingInfo(&irsend.capture)); + + irsend.reset(); + uint16_t rawData[9] = {10, 20, 30, 40, 50, 60, 70, 80, 90}; + irsend.sendRaw(rawData, 9, 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ( + "Raw Timing[9]:\n" + " + 10, - 20, + 30, - 40, + 50, - 60," + " + 70, - 80, \n" + " + 90\n", + resultToTimingInfo(&irsend.capture)); +} + +TEST(TestResultToHumanReadableBasic, SimpleCodes) { + IRsendTest irsend(0); + IRrecv irrecv(1); + irsend.begin(); + + irsend.reset(); + irsend.sendNEC(irsend.encodeNEC(0x10, 0x20)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(NEC, irsend.capture.decode_type); + ASSERT_EQ(kNECBits, irsend.capture.bits); + EXPECT_EQ( + "Encoding : NEC\n" + "Code : 8F704FB (32 bits)\n", + resultToHumanReadableBasic(&irsend.capture)); +} + +TEST(TestResultToHumanReadableBasic, ComplexCodes) { + IRsendTest irsend(0); + IRrecv irrecv(1); + irsend.begin(); + + uint8_t state[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0x00, 0x00, 0x01}; + + irsend.reset(); + irsend.sendToshibaAC(state); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(TOSHIBA_AC, irsend.capture.decode_type); + ASSERT_EQ(kToshibaACBits, irsend.capture.bits); + EXPECT_EQ( + "Encoding : TOSHIBA_AC\n" + "Code : F20D03FC0100000001 (72 bits)\n", + resultToHumanReadableBasic(&irsend.capture)); +} + +TEST(TestInvertBits, Normal) { + ASSERT_EQ(0xAAAA5555AAAA5555, invertBits(0x5555AAAA5555AAAA, 64)); + ASSERT_EQ(0xAAAA5555, invertBits(0x5555AAAA, 32)); + ASSERT_EQ(0xFFFFFFFFFFFFFFFF, invertBits(0x0, 64)); + ASSERT_EQ(0x0, invertBits(invertBits(0x0, 64), 64)); + ASSERT_EQ(0x2, invertBits(0x1, 2)); +} + +TEST(TestInvertBits, ZeroBits) { + ASSERT_EQ(0xAAAA5555AAAA5555, invertBits(0xAAAA5555AAAA5555, 0)); + ASSERT_EQ(0x0, invertBits(0x0, 0)); + ASSERT_EQ(0x1, invertBits(0x1, 0)); +} + +TEST(TestInvertBits, MoreThan64Bits) { + ASSERT_EQ(0xAAAA5555AAAA5555, invertBits(0x5555AAAA5555AAAA, 70)); + ASSERT_EQ(0xFFFFFFFFFFFFFFFF, invertBits(0x0, 128)); +} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/Makefile b/lib/IRremoteESP8266-2.5.2.03/test/Makefile similarity index 63% rename from lib/IRremoteESP8266-2.2.1.02/test/Makefile rename to lib/IRremoteESP8266-2.5.2.03/test/Makefile index 7ffd00053..d53014183 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/Makefile +++ b/lib/IRremoteESP8266-2.5.2.03/test/Makefile @@ -1,8 +1,10 @@ # SYNOPSIS: # -# make [all] - makes everything. -# make TARGET - makes the given target. -# make clean - removes all files generated by make. +# make [all] - makes everything. +# make TARGET - makes the given target. +# make run - makes everything and runs all the tests. +# make clean - removes all files generated by make. +# make install-googletest - install the googletest code suite # Please tweak the following variable definitions as needed by your # project, except GTEST_HEADERS, which you can use in your own targets @@ -30,7 +32,11 @@ TESTS = IRutils_test IRsend_test ir_NEC_test ir_GlobalCache_test \ ir_JVC_test ir_RCMM_test ir_LG_test ir_Mitsubishi_test ir_Sharp_test \ ir_RC5_RC6_test ir_Panasonic_test ir_Dish_test ir_Whynter_test \ ir_Aiwa_test ir_Denon_test ir_Sanyo_test ir_Daikin_test ir_Coolix_test \ - ir_Gree_test IRrecv_test ir_Pronto_test ir_Fujitsu_test ir_Nikai_test + ir_Gree_test IRrecv_test ir_Pronto_test ir_Fujitsu_test ir_Nikai_test \ + ir_Toshiba_test ir_Midea_test ir_Magiquest_test ir_Lasertag_test \ + ir_Carrier_test ir_Haier_test ir_Hitachi_test ir_GICable_test \ + ir_Whirlpool_test ir_Lutron_test ir_Electra_test ir_Pioneer_test \ + ir_MWM_test # All Google Test headers. Usually you shouldn't change this # definition. @@ -56,8 +62,10 @@ run : all echo "PASS: \o/ \o/ All unit tests passed. \o/ \o/"; \ fi +run_tests : run + install-googletest : - git clone https://github.com/google/googletest.git ../lib/googletest + git clone -b v1.8.x https://github.com/google/googletest.git ../lib/googletest # Builds gtest.a and gtest_main.a. @@ -67,17 +75,40 @@ GTEST_SRCS_ = $(GTEST_DIR)/src/*.cc $(GTEST_DIR)/src/*.h $(GTEST_HEADERS) # All the IR protocol object files. PROTOCOLS = ir_NEC.o ir_Sony.o ir_Samsung.o ir_JVC.o ir_RCMM.o ir_RC5_RC6.o \ - ir_LG.o ir_Mitsubishi.o ir_Fujitsu.o ir_Sharp.o ir_Sanyo.o ir_Denon.o ir_Dish.o \ - ir_Panasonic.o ir_Whynter.o ir_Coolix.o ir_Aiwa.o ir_Sherwood.o \ - ir_Kelvinator.o ir_Daikin.o ir_Gree.o ir_Pronto.o ir_Nikai.o + ir_LG.o ir_Mitsubishi.o ir_Fujitsu.o ir_Sharp.o ir_Sanyo.o ir_Denon.o ir_Dish.o \ + ir_Panasonic.o ir_Whynter.o ir_Coolix.o ir_Aiwa.o ir_Sherwood.o \ + ir_Kelvinator.o ir_Daikin.o ir_Gree.o ir_Pronto.o ir_Nikai.o ir_Toshiba.o \ + ir_Midea.o ir_Magiquest.o ir_Lasertag.o ir_Carrier.o ir_Haier.o \ + ir_Hitachi.o ir_GICable.o ir_Whirlpool.o ir_Lutron.o ir_Electra.o \ + ir_Pioneer.o ir_MWM.o + +# All the IR Protocol header files. +PROTOCOLS_H = $(USER_DIR)/ir_Argo.h \ + $(USER_DIR)/ir_Gree.h \ + $(USER_DIR)/ir_Magiquest.h \ + $(USER_DIR)/ir_Coolix.h \ + $(USER_DIR)/ir_Haier.h \ + $(USER_DIR)/ir_Midea.h \ + $(USER_DIR)/ir_Toshiba.h \ + $(USER_DIR)/ir_Daikin.h \ + $(USER_DIR)/ir_Kelvinator.h \ + $(USER_DIR)/ir_Mitsubishi.h \ + $(USER_DIR)/ir_NEC.h \ + $(USER_DIR)/ir_Samsung.h \ + $(USER_DIR)/ir_Trotec.h \ + $(USER_DIR)/ir_Fujitsu.h \ + $(USER_DIR)/ir_LG.h \ + $(USER_DIR)/ir_Panasonic.h # Common object files COMMON_OBJ = IRutils.o IRtimer.o IRsend.o IRrecv.o ir_GlobalCache.o \ $(PROTOCOLS) gtest_main.a # Common dependencies COMMON_DEPS = $(USER_DIR)/IRrecv.h $(USER_DIR)/IRsend.h $(USER_DIR)/IRtimer.h \ - $(USER_DIR)/IRutils.h $(USER_DIR)/IRremoteESP8266.h + $(USER_DIR)/IRutils.h $(USER_DIR)/IRremoteESP8266.h \ + $(PROTOCOLS_H) + # Common test dependencies -COMMON_TEST_DEPS = $(COMMON_DEPS) IRsend_test.h +COMMON_TEST_DEPS = $(COMMON_DEPS) IRrecv_test.h IRsend_test.h # For simplicity and to avoid depending on Google Test's # implementation details, the dependencies specified below are @@ -97,17 +128,17 @@ gtest.a : gtest-all.o gtest_main.a : gtest-all.o gtest_main.o $(AR) $(ARFLAGS) $@ $^ -# Builds a our test. A test should link with either gtest.a or +# Builds our test. A test should link with either gtest.a or # gtest_main.a, depending on whether it defines its own main() # function. -IRutils.o : $(USER_DIR)/IRutils.cpp $(USER_DIR)/IRutils.h +IRutils.o : $(USER_DIR)/IRutils.cpp $(USER_DIR)/IRutils.h $(USER_DIR)/IRremoteESP8266.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/IRutils.cpp -IRutils_test.o : IRutils_test.cpp $(USER_DIR)/IRutils.h $(GTEST_HEADERS) +IRutils_test.o : IRutils_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c IRutils_test.cpp -IRutils_test : IRutils.o IRutils_test.o gtest_main.a +IRutils_test : IRutils_test.o ir_NEC.o ir_Nikai.o ir_Toshiba.o $(COMMON_OBJ) gtest_main.a $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ IRtimer.o : $(USER_DIR)/IRtimer.cpp $(USER_DIR)/IRtimer.h @@ -131,7 +162,7 @@ IRrecv_test.o : IRrecv_test.cpp $(USER_DIR)/IRsend.h $(USER_DIR)/IRrecv.h IRsend IRrecv_test : IRrecv_test.o $(COMMON_OBJ) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ -ir_NEC.o : $(USER_DIR)/ir_NEC.cpp $(COMMON_DEPS) +ir_NEC.o : $(USER_DIR)/ir_NEC.cpp $(USER_DIR)/ir_NEC.h $(COMMON_DEPS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_NEC.cpp ir_NEC_test.o : ir_NEC_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) @@ -167,10 +198,10 @@ ir_Sony_test.o : ir_Sony_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) ir_Sony_test : $(COMMON_OBJ) ir_Sony_test.o $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ -ir_Samsung.o : $(USER_DIR)/ir_Samsung.cpp $(COMMON_DEPS) +ir_Samsung.o : $(USER_DIR)/ir_Samsung.cpp $(USER_DIR)/ir_Samsung.h $(COMMON_DEPS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Samsung.cpp -ir_Samsung_test.o : ir_Samsung_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) +ir_Samsung_test.o : ir_Samsung_test.cpp $(USER_DIR)/ir_Samsung.h $(COMMON_TEST_DEPS) $(GTEST_HEADERS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Samsung_test.cpp ir_Samsung_test : $(COMMON_OBJ) ir_Samsung_test.o @@ -278,7 +309,7 @@ ir_Whynter_test : $(COMMON_OBJ) ir_Whynter_test.o ir_Coolix.o : $(USER_DIR)/ir_Coolix.cpp $(COMMON_DEPS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Coolix.cpp -ir_Coolix_test.o : ir_Coolix_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) +ir_Coolix_test.o : ir_Coolix_test.cpp $(USER_DIR)/ir_Coolix.h $(COMMON_TEST_DEPS) $(GTEST_HEADERS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Coolix_test.cpp ir_Coolix_test : $(COMMON_OBJ) ir_Coolix_test.o @@ -326,7 +357,7 @@ ir_Gree.o : $(USER_DIR)/ir_Gree.cpp $(GTEST_HEADERS) ir_Gree_test.o : ir_Gree_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Gree_test.cpp -ir_Gree_test : $(COMMON_OBJ) ir_Gree_test.o +ir_Gree_test : $(COMMON_OBJ) ir_Gree_test.o ir_Kelvinator.o $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ ir_Pronto.o : $(USER_DIR)/ir_Pronto.cpp $(GTEST_HEADERS) @@ -346,3 +377,120 @@ ir_Nikai_test.o : ir_Nikai_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) ir_Nikai_test : $(COMMON_OBJ) ir_Nikai_test.o $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_Toshiba.o : $(USER_DIR)/ir_Toshiba.cpp $(USER_DIR)/ir_Toshiba.h $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Toshiba.cpp + +ir_Toshiba_test.o : ir_Toshiba_test.cpp $(USER_DIR)/ir_Toshiba.h $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Toshiba_test.cpp + +ir_Toshiba_test : $(COMMON_OBJ) ir_Toshiba_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_Midea.o : $(USER_DIR)/ir_Midea.cpp $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Midea.cpp + +ir_Midea_test.o : ir_Midea_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Midea_test.cpp + +ir_Midea_test : $(COMMON_OBJ) ir_Midea_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_Magiquest.o : $(USER_DIR)/ir_Magiquest.cpp $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Magiquest.cpp + +ir_Magiquest_test.o : ir_Magiquest_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Magiquest_test.cpp + +ir_Magiquest_test : $(COMMON_OBJ) ir_Magiquest_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_Lasertag.o : $(USER_DIR)/ir_Lasertag.cpp $(USER_DIR)/ir_RC5_RC6.cpp $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Lasertag.cpp + +ir_Lasertag_test.o : ir_Lasertag_test.cpp $(USER_DIR)/ir_RC5_RC6.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Lasertag_test.cpp + +ir_Lasertag_test : $(COMMON_OBJ) ir_Lasertag_test.o ir_RC5_RC6.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_Carrier.o : $(USER_DIR)/ir_Carrier.cpp $(COMMON_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Carrier.cpp + +ir_Carrier_test.o : ir_Carrier_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Carrier_test.cpp + +ir_Carrier_test : $(COMMON_OBJ) ir_Carrier_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_Haier.o : $(USER_DIR)/ir_Haier.cpp $(USER_DIR)/ir_Haier.h $(COMMON_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Haier.cpp + +ir_Haier_test.o : ir_Haier_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Haier_test.cpp + +ir_Haier_test : $(COMMON_OBJ) ir_Haier_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_Hitachi.o : $(USER_DIR)/ir_Hitachi.cpp $(COMMON_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Hitachi.cpp + +ir_Hitachi_test.o : ir_Hitachi_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Hitachi_test.cpp + +ir_Hitachi_test : $(COMMON_OBJ) ir_Hitachi_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_GICable.o : $(USER_DIR)/ir_GICable.cpp $(COMMON_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_GICable.cpp + +ir_GICable_test.o : ir_GICable_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_GICable_test.cpp + +ir_GICable_test : $(COMMON_OBJ) ir_GICable_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_Whirlpool.o : $(USER_DIR)/ir_Whirlpool.cpp $(COMMON_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Whirlpool.cpp + +ir_Whirlpool_test.o : ir_Whirlpool_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Whirlpool_test.cpp + +ir_Whirlpool_test : $(COMMON_OBJ) ir_Whirlpool_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_Lutron.o : $(USER_DIR)/ir_Lutron.cpp $(COMMON_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Lutron.cpp + +ir_Lutron_test.o : ir_Lutron_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Lutron_test.cpp + +ir_Lutron_test : $(COMMON_OBJ) ir_Lutron_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_Electra.o : $(USER_DIR)/ir_Electra.cpp $(COMMON_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Electra.cpp + +ir_Electra_test.o : ir_Electra_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Electra_test.cpp + +ir_Electra_test : $(COMMON_OBJ) ir_Electra_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_Pioneer.o : $(USER_DIR)/ir_Pioneer.cpp $(COMMON_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Pioneer.cpp + +ir_Pioneer_test.o : ir_Pioneer_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_Pioneer_test.cpp + +ir_Pioneer_test : $(COMMON_OBJ) ir_Pioneer_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +ir_MWM.o : $(USER_DIR)/ir_MWM.cpp $(COMMON_DEPS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_MWM.cpp + +ir_MWM_test.o : ir_MWM_test.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -c ir_MWM_test.cpp + +ir_MWM_test : $(COMMON_OBJ) ir_MWM_test.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Aiwa_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Aiwa_test.cpp similarity index 70% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_Aiwa_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_Aiwa_test.cpp index a0bb12f86..c5469d4a5 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Aiwa_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Aiwa_test.cpp @@ -20,8 +20,9 @@ TEST(TestSendAiwa, SendDataOnly) { "m560s560m560s1680m560s560m560s560m560s1680m560s1680m560s1680m560s1680" "m560s1680m560s1680m560s560m560s560m560s560m560s560m560s560m560s560" "m560s560m560s560m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" - "m560s1680m560s1680m560s108080" - "m8960s2240m560s108080", irsend.outputStr()); + "m560s1680m560s1680m560s23520" + "m8960s2240m560s96320", + irsend.outputStr()); } // Test sending oversized data. @@ -40,7 +41,7 @@ TEST(TestSendAiwa, SendWithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendAiwaRCT501(0x7F, AIWA_RC_T501_BITS, 0); // No repeats. + irsend.sendAiwaRCT501(0x7F, kAiwaRcT501Bits, 0); // No repeats. EXPECT_EQ( "m8960s4480" "m560s560m560s1680m560s1680m560s1680m560s560m560s1680m560s1680m560s560" @@ -48,9 +49,10 @@ TEST(TestSendAiwa, SendWithRepeats) { "m560s560m560s1680m560s560m560s560m560s1680m560s1680m560s1680m560s1680" "m560s1680m560s1680m560s560m560s560m560s560m560s560m560s560m560s560" "m560s560m560s560m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" - "m560s1680m560s1680m560s108080", irsend.outputStr()); + "m560s1680m560s1680m560s23520", + irsend.outputStr()); irsend.reset(); - irsend.sendAiwaRCT501(0x7F, AIWA_RC_T501_BITS, 1); // 1 repeat. + irsend.sendAiwaRCT501(0x7F, kAiwaRcT501Bits, 1); // 1 repeat. EXPECT_EQ( "m8960s4480" "m560s560m560s1680m560s1680m560s1680m560s560m560s1680m560s1680m560s560" @@ -58,10 +60,11 @@ TEST(TestSendAiwa, SendWithRepeats) { "m560s560m560s1680m560s560m560s560m560s1680m560s1680m560s1680m560s1680" "m560s1680m560s1680m560s560m560s560m560s560m560s560m560s560m560s560" "m560s560m560s560m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" - "m560s1680m560s1680m560s108080" - "m8960s2240m560s108080", irsend.outputStr()); + "m560s1680m560s1680m560s23520" + "m8960s2240m560s96320", + irsend.outputStr()); irsend.reset(); - irsend.sendAiwaRCT501(0x7F, AIWA_RC_T501_BITS, 2); // 2 repeats. + irsend.sendAiwaRCT501(0x7F, kAiwaRcT501Bits, 2); // 2 repeats. EXPECT_EQ( "m8960s4480" "m560s560m560s1680m560s1680m560s1680m560s560m560s1680m560s1680m560s560" @@ -69,13 +72,14 @@ TEST(TestSendAiwa, SendWithRepeats) { "m560s560m560s1680m560s560m560s560m560s1680m560s1680m560s1680m560s1680" "m560s1680m560s1680m560s560m560s560m560s560m560s560m560s560m560s560" "m560s560m560s560m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" - "m560s1680m560s1680m560s108080" - "m8960s2240m560s108080" - "m8960s2240m560s108080", irsend.outputStr()); + "m560s1680m560s1680m560s23520" + "m8960s2240m560s96320" + "m8960s2240m560s96320", + irsend.outputStr()); } // Test sending an atypical data size. -TEST(TestSendAiwa, SendUsualSize) { +TEST(TestSendAiwa, SendUnusualSize) { IRsendTest irsend(4); irsend.begin(); @@ -87,8 +91,9 @@ TEST(TestSendAiwa, SendUsualSize) { "m560s560m560s560m560s560m560s560m560s560m560s1680m560s560m560s560" "m560s560m560s1680m560s560m560s560m560s1680m560s1680m560s1680m560s1680" "m560s1680m560s1680m560s560m560s560m560s560m560s1680m560s560m560s560" - "m560s1680m560s560m560s1680m560s108080" - "m8960s2240m560s108080", irsend.outputStr()); + "m560s1680m560s560m560s1680m560s36960" + "m8960s2240m560s96320", + irsend.outputStr()); irsend.reset(); irsend.sendAiwaRCT501(0x1234567890, 37); @@ -102,8 +107,9 @@ TEST(TestSendAiwa, SendUsualSize) { "m560s1680m560s560m560s1680m560s560m560s1680m560s1680m560s560m560s560" "m560s1680m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s1680" "m560s560m560s560m560s1680m560s560m560s560m560s560m560s560m560s1680" - "m560s108080" - "m8960s2240m560s108080", irsend.outputStr()); + "m560s22400" + "m8960s2240m560s96320", + irsend.outputStr()); } // Tests for decodeAiwaRCT501(). @@ -118,10 +124,9 @@ TEST(TestDecodeAiwa, NormalDecodeWithStrict) { irsend.reset(); irsend.sendAiwaRCT501(0x7F); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - true)); + ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, true)); EXPECT_EQ(AIWA_RC_T501, irsend.capture.decode_type); - EXPECT_EQ(AIWA_RC_T501_BITS, irsend.capture.bits); + EXPECT_EQ(kAiwaRcT501Bits, irsend.capture.bits); EXPECT_EQ(0x7F, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -131,10 +136,9 @@ TEST(TestDecodeAiwa, NormalDecodeWithStrict) { irsend.reset(); irsend.sendAiwaRCT501(0x0); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - true)); + ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, true)); EXPECT_EQ(AIWA_RC_T501, irsend.capture.decode_type); - EXPECT_EQ(AIWA_RC_T501_BITS, irsend.capture.bits); + EXPECT_EQ(kAiwaRcT501Bits, irsend.capture.bits); EXPECT_EQ(0x0, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -144,10 +148,9 @@ TEST(TestDecodeAiwa, NormalDecodeWithStrict) { irsend.reset(); irsend.sendAiwaRCT501(0x7FFF); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - true)); + ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, true)); EXPECT_EQ(AIWA_RC_T501, irsend.capture.decode_type); - EXPECT_EQ(AIWA_RC_T501_BITS, irsend.capture.bits); + EXPECT_EQ(kAiwaRcT501Bits, irsend.capture.bits); EXPECT_EQ(0x7FFF, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -162,12 +165,11 @@ TEST(TestDecodeAiwa, NormalDecodeWithRepeatAndStrict) { // Normal Aiwa 15-bit(42bit) message with 2 repeats. irsend.reset(); - irsend.sendAiwaRCT501(0x7F, AIWA_RC_T501_BITS, 2); + irsend.sendAiwaRCT501(0x7F, kAiwaRcT501Bits, 2); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - true)); + ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, true)); EXPECT_EQ(AIWA_RC_T501, irsend.capture.decode_type); - EXPECT_EQ(AIWA_RC_T501_BITS, irsend.capture.bits); + EXPECT_EQ(kAiwaRcT501Bits, irsend.capture.bits); EXPECT_EQ(0x7F, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -182,48 +184,44 @@ TEST(TestDecodeAiwa, DecodeWithNonStrictValues) { irsend.reset(); // Confirm using sendNEC(data, 42, 1) can make a legal Aiwa message. - irsend.sendNEC(0x1D8113F00FF, 42, AIWA_RC_T501_MIN_REPEAT); + irsend.sendNEC(0x1D8113F00FF, 42, kAiwaRcT501MinRepeats); irsend.makeDecodeResult(); // MUST pass with strict on. - ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - true)); + ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, true)); ASSERT_EQ(0x7F, irsend.capture.value); irsend.reset(); // Use sendNEC(data, 42) to make/send an illegal value Aiwa message. // Value is illegal due to bad pre & post data. - irsend.sendNEC(0x1234567890A, 42, AIWA_RC_T501_MIN_REPEAT); + irsend.sendNEC(0x1234567890A, 42, kAiwaRcT501MinRepeats); irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - true)); + ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, true)); // Should fail if strict off too. - ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - false)); + ASSERT_FALSE( + irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, false)); irsend.reset(); // Use sendNEC(data, 42) to make/send an illegal value Aiwa message. // Value is illegal due to bad post data only. - irsend.sendNEC(0x1D8113F00FE, 42, AIWA_RC_T501_MIN_REPEAT); + irsend.sendNEC(0x1D8113F00FE, 42, kAiwaRcT501MinRepeats); irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - true)); + ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, true)); // Should fail if strict off too. - ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - false)); + ASSERT_FALSE( + irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, false)); irsend.reset(); // Use sendNEC(data, 42) to make/send an illegal value Aiwa message. // Value is illegal due to bad pre data only. - irsend.sendNEC(0x0D8113F00FF, 42, AIWA_RC_T501_MIN_REPEAT); + irsend.sendNEC(0x0D8113F00FF, 42, kAiwaRcT501MinRepeats); irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - true)); + ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, true)); // Should fail if strict off too. - ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - false)); + ASSERT_FALSE( + irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, false)); } // Decode unsupported Aiwa messages. @@ -236,8 +234,7 @@ TEST(TestDecodeAiwa, DecodeWithNonStrictSizes) { irsend.sendAiwaRCT501(0x0, 8); // Illegal size Aiwa 8-bit message. irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - true)); + ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, true)); // Should pass if strict off. ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, 8, false)); EXPECT_EQ(AIWA_RC_T501, irsend.capture.decode_type); @@ -248,8 +245,7 @@ TEST(TestDecodeAiwa, DecodeWithNonStrictSizes) { irsend.sendAiwaRCT501(0x12345678, 32); // Illegal size Aiwa 32-bit message. irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - true)); + ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, true)); // Should fail with strict when we ask for the wrong bit size. ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, 32, true)); @@ -278,7 +274,7 @@ TEST(TestDecodeAiwa, Decode64BitMessages) { // Reconfirm it by sending a true 64bit NEC message with the Aiwa prefix. irsend.reset(); - irsend.sendNEC(0x76044FFFFFFFFFFF, 64, AIWA_RC_T501_MIN_REPEAT); + irsend.sendNEC(0x76044FFFFFFFFFFF, 64, kAiwaRcT501MinRepeats); irsend.makeDecodeResult(); // Should work with a 'normal' match (not strict) ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture, 37, false)); @@ -295,20 +291,19 @@ TEST(TestDecodeAiwa, DecodeGlobalCacheExample) { irsend.reset(); // Aiwa Power Toggle from Global Cache. - uint16_t gc_test[95] = {38000, 1, 89, 342, 171, 21, 21, 21, 64, 21, 64, - 21, 64, 21, 21, 21, 64, 21, 64, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 64, 21, 21, - 21, 21, 21, 21, 21, 64, 21, 21, 21, 21, 21, 64, - 21, 64, 21, 64, 21, 64, 21, 64, 21, 64, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 64, 21, 64, 21, 64, 21, 64, 21, 64, - 21, 64, 21, 64, 21, 64, 21, 875, 342, 171, 21, 3565}; + uint16_t gc_test[95] = { + 38000, 1, 89, 342, 171, 21, 21, 21, 64, 21, 64, 21, 64, 21, 21, 21, + 64, 21, 64, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 64, 21, 21, 21, 21, 21, 21, 21, 64, 21, 21, 21, 21, 21, 64, 21, + 64, 21, 64, 21, 64, 21, 64, 21, 64, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 64, 21, 64, 21, 64, 21, + 64, 21, 64, 21, 64, 21, 64, 21, 64, 21, 875, 342, 171, 21, 3565}; irsend.sendGC(gc_test, 95); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decodeAiwaRCT501(&irsend.capture)); EXPECT_EQ(AIWA_RC_T501, irsend.capture.decode_type); - EXPECT_EQ(AIWA_RC_T501_BITS, irsend.capture.bits); + EXPECT_EQ(kAiwaRcT501Bits, irsend.capture.bits); EXPECT_EQ(0x7F, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -326,13 +321,14 @@ TEST(TestDecodeAiwa, FailToDecodeNonAiwaExample) { irsend.begin(); irsend.reset(); - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeAiwaRCT501(&irsend.capture, AIWA_RC_T501_BITS, - false)); + ASSERT_FALSE( + irrecv.decodeAiwaRCT501(&irsend.capture, kAiwaRcT501Bits, false)); } diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Carrier_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Carrier_test.cpp new file mode 100644 index 000000000..24bdc232a --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Carrier_test.cpp @@ -0,0 +1,225 @@ +// Copyright 2018 David Conran + +#include "IRrecv.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendCarrierAC() + +// Test sending typical data only. +TEST(TestSendCarrierAC, SendDataOnly) { + IRsendTest irsend(0); + irsend.begin(); + + irsend.reset(); + irsend.sendCarrierAC(0x0); + EXPECT_EQ( + "m8532s4228" + "m628s532m628s532m628s532m628s532m628s532m628s532m628s532m628s532" + "m628s532m628s532m628s532m628s532m628s532m628s532m628s532m628s532" + "m628s532m628s532m628s532m628s532m628s532m628s532m628s532m628s532" + "m628s532m628s532m628s532m628s532m628s532m628s532m628s532m628s532" + "m628s20000" + "m8532s4228" + "m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320" + "m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320" + "m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320" + "m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320m628s1320" + "m628s20000" + "m8532s4228" + "m628s532m628s532m628s532m628s532m628s532m628s532m628s532m628s532" + "m628s532m628s532m628s532m628s532m628s532m628s532m628s532m628s532" + "m628s532m628s532m628s532m628s532m628s532m628s532m628s532m628s532" + "m628s532m628s532m628s532m628s532m628s532m628s532m628s532m628s532" + "m628s20000", + irsend.outputStr()); + irsend.reset(); + irsend.sendCarrierAC(0x12345678); + EXPECT_EQ( + "m8532s4228" + "m628s532m628s532m628s532m628s1320m628s532m628s532m628s1320m628s532" + "m628s532m628s532m628s1320m628s1320m628s532m628s1320m628s532m628s532" + "m628s532m628s1320m628s532m628s1320m628s532m628s1320m628s1320m628s532" + "m628s532m628s1320m628s1320m628s1320m628s1320m628s532m628s532m628s532" + "m628s20000" + "m8532s4228" + "m628s1320m628s1320m628s1320m628s532m628s1320m628s1320m628s532m628s1320" + "m628s1320m628s1320m628s532m628s532m628s1320m628s532m628s1320m628s1320" + "m628s1320m628s532m628s1320m628s532m628s1320m628s532m628s532m628s1320" + "m628s1320m628s532m628s532m628s532m628s532m628s1320m628s1320m628s1320" + "m628s20000" + "m8532s4228" + "m628s532m628s532m628s532m628s1320m628s532m628s532m628s1320m628s532" + "m628s532m628s532m628s1320m628s1320m628s532m628s1320m628s532m628s532" + "m628s532m628s1320m628s532m628s1320m628s532m628s1320m628s1320m628s532" + "m628s532m628s1320m628s1320m628s1320m628s1320m628s532m628s532m628s532" + "m628s20000", + irsend.outputStr()); + + irsend.reset(); + irsend.sendCarrierAC(0x4CCA541D); + EXPECT_EQ( + "m8532s4228" + "m628s532m628s1320m628s532m628s532m628s1320m628s1320m628s532m628s532" + "m628s1320m628s1320m628s532m628s532m628s1320m628s532m628s1320m628s532" + "m628s532m628s1320m628s532m628s1320m628s532m628s1320m628s532m628s532" + "m628s532m628s532m628s532m628s1320m628s1320m628s1320m628s532m628s1320" + "m628s20000" + "m8532s4228" + "m628s1320m628s532m628s1320m628s1320m628s532m628s532m628s1320m628s1320" + "m628s532m628s532m628s1320m628s1320m628s532m628s1320m628s532m628s1320" + "m628s1320m628s532m628s1320m628s532m628s1320m628s532m628s1320m628s1320" + "m628s1320m628s1320m628s1320m628s532m628s532m628s532m628s1320m628s532" + "m628s20000" + "m8532s4228" + "m628s532m628s1320m628s532m628s532m628s1320m628s1320m628s532m628s532" + "m628s1320m628s1320m628s532m628s532m628s1320m628s532m628s1320m628s532" + "m628s532m628s1320m628s532m628s1320m628s532m628s1320m628s532m628s532" + "m628s532m628s532m628s532m628s1320m628s1320m628s1320m628s532m628s1320" + "m628s20000", + irsend.outputStr()); +} + +// Test sending typical data only. +TEST(TestSendCarrierAC, SendWithRepeats) { + IRsendTest irsend(0); + irsend.begin(); + + irsend.reset(); + irsend.sendCarrierAC(0x12345678, kCarrierAcBits, 2); // two repeats. + EXPECT_EQ( + "m8532s4228" + "m628s532m628s532m628s532m628s1320m628s532m628s532m628s1320m628s532" + "m628s532m628s532m628s1320m628s1320m628s532m628s1320m628s532m628s532" + "m628s532m628s1320m628s532m628s1320m628s532m628s1320m628s1320m628s532" + "m628s532m628s1320m628s1320m628s1320m628s1320m628s532m628s532m628s532" + "m628s20000" + "m8532s4228" + "m628s1320m628s1320m628s1320m628s532m628s1320m628s1320m628s532m628s1320" + "m628s1320m628s1320m628s532m628s532m628s1320m628s532m628s1320m628s1320" + "m628s1320m628s532m628s1320m628s532m628s1320m628s532m628s532m628s1320" + "m628s1320m628s532m628s532m628s532m628s532m628s1320m628s1320m628s1320" + "m628s20000" + "m8532s4228" + "m628s532m628s532m628s532m628s1320m628s532m628s532m628s1320m628s532" + "m628s532m628s532m628s1320m628s1320m628s532m628s1320m628s532m628s532" + "m628s532m628s1320m628s532m628s1320m628s532m628s1320m628s1320m628s532" + "m628s532m628s1320m628s1320m628s1320m628s1320m628s532m628s532m628s532" + "m628s20000" + "m8532s4228" + "m628s532m628s532m628s532m628s1320m628s532m628s532m628s1320m628s532" + "m628s532m628s532m628s1320m628s1320m628s532m628s1320m628s532m628s532" + "m628s532m628s1320m628s532m628s1320m628s532m628s1320m628s1320m628s532" + "m628s532m628s1320m628s1320m628s1320m628s1320m628s532m628s532m628s532" + "m628s20000" + "m8532s4228" + "m628s1320m628s1320m628s1320m628s532m628s1320m628s1320m628s532m628s1320" + "m628s1320m628s1320m628s532m628s532m628s1320m628s532m628s1320m628s1320" + "m628s1320m628s532m628s1320m628s532m628s1320m628s532m628s532m628s1320" + "m628s1320m628s532m628s532m628s532m628s532m628s1320m628s1320m628s1320" + "m628s20000" + "m8532s4228" + "m628s532m628s532m628s532m628s1320m628s532m628s532m628s1320m628s532" + "m628s532m628s532m628s1320m628s1320m628s532m628s1320m628s532m628s532" + "m628s532m628s1320m628s532m628s1320m628s532m628s1320m628s1320m628s532" + "m628s532m628s1320m628s1320m628s1320m628s1320m628s532m628s532m628s532" + "m628s20000" + "m8532s4228" + "m628s532m628s532m628s532m628s1320m628s532m628s532m628s1320m628s532" + "m628s532m628s532m628s1320m628s1320m628s532m628s1320m628s532m628s532" + "m628s532m628s1320m628s532m628s1320m628s532m628s1320m628s1320m628s532" + "m628s532m628s1320m628s1320m628s1320m628s1320m628s532m628s532m628s532" + "m628s20000" + "m8532s4228" + "m628s1320m628s1320m628s1320m628s532m628s1320m628s1320m628s532m628s1320" + "m628s1320m628s1320m628s532m628s532m628s1320m628s532m628s1320m628s1320" + "m628s1320m628s532m628s1320m628s532m628s1320m628s532m628s532m628s1320" + "m628s1320m628s532m628s532m628s532m628s532m628s1320m628s1320m628s1320" + "m628s20000" + "m8532s4228" + "m628s532m628s532m628s532m628s1320m628s532m628s532m628s1320m628s532" + "m628s532m628s532m628s1320m628s1320m628s532m628s1320m628s532m628s532" + "m628s532m628s1320m628s532m628s1320m628s532m628s1320m628s1320m628s532" + "m628s532m628s1320m628s1320m628s1320m628s1320m628s532m628s532m628s532" + "m628s20000", + irsend.outputStr()); +} + +// Tests for decodeCarrierAC(). + +// Decode normal "synthetic" messages. +TEST(TestDecodeCarrierAC, NormalDecodeWithStrict) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + irsend.sendCarrierAC(0x0); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeCarrierAC(&irsend.capture, kCarrierAcBits, true)); + EXPECT_EQ(CARRIER_AC, irsend.capture.decode_type); + EXPECT_EQ(kCarrierAcBits, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + irsend.reset(); + irsend.sendCarrierAC(0xB335ABE2); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeCarrierAC(&irsend.capture, kCarrierAcBits, true)); + EXPECT_EQ(CARRIER_AC, irsend.capture.decode_type); + EXPECT_EQ(kCarrierAcBits, irsend.capture.bits); + EXPECT_EQ(0xB335ABE2, irsend.capture.value); + EXPECT_EQ(0xB335, irsend.capture.address); + EXPECT_EQ(0xABE2, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + // Do the last one again, & use the full decoder, not just protocol specific. + irsend.reset(); + irsend.sendCarrierAC(0xB335ABE2); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(CARRIER_AC, irsend.capture.decode_type); + EXPECT_EQ(kCarrierAcBits, irsend.capture.bits); + EXPECT_EQ(0xB335ABE2, irsend.capture.value); +} + +// Decode a "real" example message. +TEST(TestDecodeCarrierAC, RealExamples) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + // Data from Issue #385 captured by gnkarn + uint16_t rawData[203] = { + 8532, 4216, 628, 1312, 628, 528, 628, 1312, 628, 1312, 628, 528, + 628, 524, 628, 1316, 624, 1316, 628, 524, 628, 528, 628, 1312, + 628, 1316, 624, 528, 628, 1312, 628, 528, 628, 1312, 628, 1312, + 628, 528, 628, 1316, 624, 528, 628, 1312, 628, 528, 628, 1312, + 628, 1316, 624, 1316, 628, 1312, 628, 1316, 628, 524, 628, 528, + 628, 528, 624, 1316, 628, 528, 628, 20064, 8504, 4228, 628, 528, + 628, 1312, 628, 528, 628, 528, 628, 1312, 628, 1316, 624, 532, + 624, 528, 628, 1316, 628, 1312, 628, 528, 628, 528, 628, 1312, + 628, 528, 628, 1316, 628, 528, 624, 528, 628, 1316, 628, 528, + 628, 1316, 624, 528, 628, 1316, 628, 528, 624, 532, 624, 528, + 628, 528, 628, 528, 628, 1316, 624, 1316, 628, 1316, 628, 528, + 624, 1316, 628, 20076, 8528, 4212, 624, 1316, 628, 528, 628, 1316, + 628, 1316, 624, 528, 628, 528, 628, 1316, 628, 1316, 628, 528, + 624, 532, 624, 1316, 628, 1316, 628, 528, 628, 1316, 624, 528, + 628, 1316, 628, 1316, 628, 528, 628, 1316, 624, 532, 624, 1316, + 628, 532, 624, 1316, 628, 1316, 624, 1320, 624, 1316, 628, 1316, + 628, 528, 628, 528, 628, 528, 628, 1316, 624, 532, 624}; + + irsend.sendRaw(rawData, 203, 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(CARRIER_AC, irsend.capture.decode_type); + EXPECT_EQ(kCarrierAcBits, irsend.capture.bits); + EXPECT_EQ(0xB335ABE2, irsend.capture.value); + EXPECT_EQ(0xB335, irsend.capture.address); + EXPECT_EQ(0xABE2, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); +} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Coolix_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Coolix_test.cpp similarity index 60% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_Coolix_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_Coolix_test.cpp index 14eb8d661..8b096ffca 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Coolix_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Coolix_test.cpp @@ -1,5 +1,6 @@ -// Copyright 2017 David Conran +// Copyright 2017-2018 David Conran +#include "ir_Coolix.h" #include "IRsend.h" #include "IRsend_test.h" #include "gtest/gtest.h" @@ -21,7 +22,8 @@ TEST(TestSendCoolix, SendDataOnly) { "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" - "m560s5040", irsend.outputStr()); + "m560s5040", + irsend.outputStr()); irsend.reset(); irsend.sendCOOLIX(0xAA55AA); @@ -33,7 +35,8 @@ TEST(TestSendCoolix, SendDataOnly) { "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" - "m560s5040", irsend.outputStr()); + "m560s5040", + irsend.outputStr()); irsend.reset(); irsend.sendCOOLIX(0xFFFFFF); @@ -45,7 +48,8 @@ TEST(TestSendCoolix, SendDataOnly) { "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" - "m560s5040", irsend.outputStr()); + "m560s5040", + irsend.outputStr()); } // Test sending with different repeats. @@ -54,7 +58,7 @@ TEST(TestSendCoolix, SendWithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendCOOLIX(0xAA55AA, COOLIX_BITS, 1); // 1 repeat. + irsend.sendCOOLIX(0xAA55AA, kCoolixBits, 1); // 1 repeat. EXPECT_EQ( "m4480s4480" "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" @@ -71,8 +75,9 @@ TEST(TestSendCoolix, SendWithRepeats) { "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" - "m560s5040", irsend.outputStr()); - irsend.sendCOOLIX(0xAA55AA, COOLIX_BITS, 2); // 2 repeats. + "m560s5040", + irsend.outputStr()); + irsend.sendCOOLIX(0xAA55AA, kCoolixBits, 2); // 2 repeats. EXPECT_EQ( "m4480s4480" "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" @@ -97,11 +102,12 @@ TEST(TestSendCoolix, SendWithRepeats) { "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" - "m560s5040", irsend.outputStr()); + "m560s5040", + irsend.outputStr()); } // Test sending an atypical data size. -TEST(TestSendCoolix, SendUsualSize) { +TEST(TestSendCoolix, SendUnusualSize) { IRsendTest irsend(4); irsend.begin(); @@ -111,7 +117,8 @@ TEST(TestSendCoolix, SendUsualSize) { "m4480s4480" "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" - "m560s5040", irsend.outputStr()); + "m560s5040", + irsend.outputStr()); irsend.reset(); irsend.sendCOOLIX(0x1234567890ABCDEF, 64); @@ -133,12 +140,13 @@ TEST(TestSendCoolix, SendUsualSize) { "m560s560m560s560m560s1680m560s1680m560s560m560s560m560s1680m560s560" "m560s1680m560s1680m560s1680m560s560m560s1680m560s1680m560s1680m560s1680" "m560s560m560s560m560s560m560s1680m560s560m560s560m560s560m560s560" - "m560s5040", irsend.outputStr()); + "m560s5040", + irsend.outputStr()); // Bit sizes must be a multiple of 8. irsend.reset(); irsend.sendCOOLIX(0x0, 17); - EXPECT_EQ("" , irsend.outputStr()); + EXPECT_EQ("", irsend.outputStr()); } // Tests for decodeCOOLIX(). @@ -153,9 +161,9 @@ TEST(TestDecodeCoolix, NormalDecodeWithStrict) { irsend.reset(); irsend.sendCOOLIX(0x123456); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, COOLIX_BITS, true)); + ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, kCoolixBits, true)); EXPECT_EQ(COOLIX, irsend.capture.decode_type); - EXPECT_EQ(COOLIX_BITS, irsend.capture.bits); + EXPECT_EQ(kCoolixBits, irsend.capture.bits); EXPECT_EQ(0x123456, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -165,9 +173,9 @@ TEST(TestDecodeCoolix, NormalDecodeWithStrict) { irsend.reset(); irsend.sendCOOLIX(0x0); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, COOLIX_BITS, true)); + ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, kCoolixBits, true)); EXPECT_EQ(COOLIX, irsend.capture.decode_type); - EXPECT_EQ(COOLIX_BITS, irsend.capture.bits); + EXPECT_EQ(kCoolixBits, irsend.capture.bits); EXPECT_EQ(0x0, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -177,9 +185,9 @@ TEST(TestDecodeCoolix, NormalDecodeWithStrict) { irsend.reset(); irsend.sendCOOLIX(0xFFFFFF); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, COOLIX_BITS, true)); + ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, kCoolixBits, true)); EXPECT_EQ(COOLIX, irsend.capture.decode_type); - EXPECT_EQ(COOLIX_BITS, irsend.capture.bits); + EXPECT_EQ(kCoolixBits, irsend.capture.bits); EXPECT_EQ(0xFFFFFF, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -194,24 +202,24 @@ TEST(TestDecodeCoolix, NormalDecodeWithRepeatAndStrict) { // Normal Coolix 16-bit message with 2 repeats. irsend.reset(); - irsend.sendCOOLIX(0x123456, COOLIX_BITS, 2); + irsend.sendCOOLIX(0x123456, kCoolixBits, 2); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, COOLIX_BITS, true)); + ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, kCoolixBits, true)); EXPECT_EQ(COOLIX, irsend.capture.decode_type); - EXPECT_EQ(COOLIX_BITS, irsend.capture.bits); + EXPECT_EQ(kCoolixBits, irsend.capture.bits); EXPECT_EQ(0x123456, irsend.capture.value); EXPECT_FALSE(irsend.capture.repeat); - irsend.makeDecodeResult(4 * COOLIX_BITS + 4); - ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, COOLIX_BITS, true)); + irsend.makeDecodeResult(4 * kCoolixBits + 4); + ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, kCoolixBits, true)); EXPECT_EQ(COOLIX, irsend.capture.decode_type); - EXPECT_EQ(COOLIX_BITS, irsend.capture.bits); + EXPECT_EQ(kCoolixBits, irsend.capture.bits); EXPECT_EQ(0x123456, irsend.capture.value); - irsend.makeDecodeResult(2 * (4 * COOLIX_BITS + 4)); - ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, COOLIX_BITS, true)); + irsend.makeDecodeResult(2 * (4 * kCoolixBits + 4)); + ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, kCoolixBits, true)); EXPECT_EQ(COOLIX, irsend.capture.decode_type); - EXPECT_EQ(COOLIX_BITS, irsend.capture.bits); + EXPECT_EQ(kCoolixBits, irsend.capture.bits); EXPECT_EQ(0x123456, irsend.capture.value); } @@ -225,7 +233,7 @@ TEST(TestDecodeCoolix, DecodeWithNonStrictSizes) { irsend.sendCOOLIX(0x12, 8); // Illegal value Coolix 8-bit message. irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeCOOLIX(&irsend.capture, COOLIX_BITS, true)); + ASSERT_FALSE(irrecv.decodeCOOLIX(&irsend.capture, kCoolixBits, true)); // Should pass if strict off. ASSERT_TRUE(irrecv.decodeCOOLIX(&irsend.capture, 8, false)); EXPECT_EQ(COOLIX, irsend.capture.decode_type); @@ -236,7 +244,7 @@ TEST(TestDecodeCoolix, DecodeWithNonStrictSizes) { irsend.sendCOOLIX(0x12345678, 32); // Illegal value Coolix 32-bit message. irsend.makeDecodeResult(); // Shouldn't pass with strict when we ask for less bits than we got. - ASSERT_FALSE(irrecv.decodeCOOLIX(&irsend.capture, COOLIX_BITS, true)); + ASSERT_FALSE(irrecv.decodeCOOLIX(&irsend.capture, kCoolixBits, true)); irsend.makeDecodeResult(); // Should fail with strict when we ask for the wrong bit size. @@ -249,7 +257,7 @@ TEST(TestDecodeCoolix, DecodeWithNonStrictSizes) { // Decode should fail if asked to decode non-multiples of 8 bits. irsend.reset(); - irsend.sendCOOLIX(0x123456, COOLIX_BITS, 2); + irsend.sendCOOLIX(0x123456, kCoolixBits, 2); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeCOOLIX(&irsend.capture, 9, false)); } @@ -279,12 +287,159 @@ TEST(TestDecodeCoolix, FailToDecodeNonCoolixExample) { irsend.reset(); // Modified a few entries to unexpected values, based on previous test case. - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeCOOLIX(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeCOOLIX(&irsend.capture, COOLIX_BITS, false)); + ASSERT_FALSE(irrecv.decodeCOOLIX(&irsend.capture, kCoolixBits, false)); +} + +// Tests for the IRCoolixAC class. + +TEST(TestCoolixACClass, SetAndGetRaw) { + IRCoolixAC ircoolix(0); + + ircoolix.setRaw(kCoolixOff); + EXPECT_EQ(kCoolixOff, ircoolix.getRaw()); + ircoolix.setRaw(kCoolixDefaultState); + EXPECT_EQ(kCoolixDefaultState, ircoolix.getRaw()); +} + +TEST(TestCoolixACClass, SetAndGetTemp) { + IRCoolixAC ircoolix(0); + + ircoolix.setTemp(25); + EXPECT_EQ(25, ircoolix.getTemp()); + ircoolix.setTemp(kCoolixTempMin); + EXPECT_EQ(kCoolixTempMin, ircoolix.getTemp()); + ircoolix.setTemp(kCoolixTempMax); + EXPECT_EQ(kCoolixTempMax, ircoolix.getTemp()); + ircoolix.setTemp(kCoolixTempMin - 1); + EXPECT_EQ(kCoolixTempMin, ircoolix.getTemp()); + ircoolix.setTemp(kCoolixTempMax + 1); + EXPECT_EQ(kCoolixTempMax, ircoolix.getTemp()); +} + +TEST(TestCoolixACClass, SetAndGetMode) { + IRCoolixAC ircoolix(0); + + ircoolix.setMode(kCoolixHeat); + EXPECT_EQ(kCoolixHeat, ircoolix.getMode()); + ircoolix.setMode(kCoolixCool); + EXPECT_EQ(kCoolixCool, ircoolix.getMode()); + ircoolix.setMode(kCoolixDry); + EXPECT_EQ(kCoolixDry, ircoolix.getMode()); + ircoolix.setMode(kCoolixAuto); + EXPECT_EQ(kCoolixAuto, ircoolix.getMode()); + ircoolix.setMode(kCoolixFan); + EXPECT_EQ(kCoolixFan, ircoolix.getMode()); +} + +TEST(TestCoolixACClass, SetAndGetFan) { + IRCoolixAC ircoolix(0); + + ircoolix.setFan(kCoolixFanMax); + EXPECT_EQ(kCoolixFanMax, ircoolix.getFan()); + ircoolix.setFan(kCoolixFanMin); + EXPECT_EQ(kCoolixFanMin, ircoolix.getFan()); + ircoolix.setFan(kCoolixFanZoneFollow); + EXPECT_EQ(kCoolixFanZoneFollow, ircoolix.getFan()); + ircoolix.setFan(kCoolixFanAuto); + EXPECT_EQ(kCoolixFanAuto, ircoolix.getFan()); + ircoolix.setFan(kCoolixFanMax); + EXPECT_EQ(kCoolixFanMax, ircoolix.getFan()); + ASSERT_NE(3, kCoolixFanAuto); + // Now try some unexpected value. + ircoolix.setFan(3); + EXPECT_EQ(kCoolixFanAuto, ircoolix.getFan()); +} + +TEST(TestCoolixACClass, SetGetClearSensorTempAndZoneFollow) { + IRCoolixAC ircoolix(0); + + ircoolix.setRaw(kCoolixDefaultState); + EXPECT_FALSE(ircoolix.getZoneFollow()); + EXPECT_LT(kCoolixSensorTempMax, ircoolix.getSensorTemp()); + + ircoolix.setSensorTemp(25); + EXPECT_TRUE(ircoolix.getZoneFollow()); + EXPECT_EQ(25, ircoolix.getSensorTemp()); + + // Lower bounds + ircoolix.setSensorTemp(kCoolixSensorTempMin); + EXPECT_TRUE(ircoolix.getZoneFollow()); + EXPECT_EQ(kCoolixSensorTempMin, ircoolix.getSensorTemp()); + ircoolix.setSensorTemp(kCoolixSensorTempMin - 1); + EXPECT_TRUE(ircoolix.getZoneFollow()); + EXPECT_EQ(kCoolixSensorTempMin, ircoolix.getSensorTemp()); + // Upper bounds + ircoolix.setSensorTemp(kCoolixSensorTempMax); + EXPECT_TRUE(ircoolix.getZoneFollow()); + EXPECT_EQ(kCoolixSensorTempMax, ircoolix.getSensorTemp()); + ircoolix.setSensorTemp(kCoolixSensorTempMax + 1); + EXPECT_TRUE(ircoolix.getZoneFollow()); + EXPECT_EQ(kCoolixSensorTempMax, ircoolix.getSensorTemp()); + // Clearing + ircoolix.clearSensorTemp(); + EXPECT_FALSE(ircoolix.getZoneFollow()); + EXPECT_LT(kCoolixSensorTempMax, ircoolix.getSensorTemp()); +} + +TEST(TestCoolixACClass, SpecialModesAndReset) { + IRCoolixAC ircoolix(0); + ASSERT_NE(kCoolixSwing, ircoolix.getRaw()); + ircoolix.setSwing(); + ASSERT_EQ(kCoolixSwing, ircoolix.getRaw()); + ircoolix.setTurbo(); + ASSERT_EQ(kCoolixTurbo, ircoolix.getRaw()); + ircoolix.setSleep(); + ASSERT_EQ(kCoolixSleep, ircoolix.getRaw()); + ircoolix.setLed(); + ASSERT_EQ(kCoolixLed, ircoolix.getRaw()); + ircoolix.setClean(); + ASSERT_EQ(kCoolixClean, ircoolix.getRaw()); + ircoolix.stateReset(); + ASSERT_NE(kCoolixClean, ircoolix.getRaw()); +} + +TEST(TestCoolixACClass, HumanReadable) { + IRCoolixAC ircoolix(0); + + // Initial starting point. + EXPECT_EQ( + "Power: On, Fan: 5 (AUTO), Mode: 2 (AUTO), Temp: 25C, " + "Zone Follow: Off, Sensor Temp: Ignored", + ircoolix.toString()); + + ircoolix.setSensorTemp(24); + ircoolix.setTemp(22); + ircoolix.setMode(kCoolixCool); + ircoolix.setFan(kCoolixFanMin); + EXPECT_EQ( + "Power: On, Fan: 4 (MIN), Mode: 0 (COOL), Temp: 22C, " + "Zone Follow: On, Sensor Temp: 24C", + ircoolix.toString()); + ircoolix.setSwing(); + EXPECT_EQ("Power: On, Fan: 3 (UNKNOWN), Swing: Toggle", ircoolix.toString()); + ircoolix.setPower(false); + EXPECT_EQ("Power: Off", ircoolix.toString()); +} + +TEST(TestCoolixACClass, KnownExamples) { + IRCoolixAC ircoolix(0); + + ircoolix.setRaw(0b101100101011111111100100); + EXPECT_EQ( + "Power: On, Fan: 5 (AUTO), Mode: 4 (FAN), Zone Follow: Off, " + "Sensor Temp: Ignored", + ircoolix.toString()); + ircoolix.setRaw(0b101100101001111100000000); + EXPECT_EQ( + "Power: On, Fan: 4 (MIN), Mode: 0 (COOL), Temp: 17C, " + "Zone Follow: Off, Sensor Temp: Ignored", + ircoolix.toString()); } diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Daikin_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Daikin_test.cpp new file mode 100644 index 000000000..c8192fc82 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Daikin_test.cpp @@ -0,0 +1,838 @@ +// Copyright 2017 David Conran +#include "ir_Daikin.h" +#include "IRrecv.h" +#include "IRrecv_test.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendDaikin(). + +// Test sending typical data only. +TEST(TestSendDaikin, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + uint8_t daikin_code[kDaikinStateLength] = { + 0x11, 0xDA, 0x27, 0xF0, 0x00, 0x00, 0x00, 0x20, 0x11, + 0xDA, 0x27, 0x00, 0x00, 0x41, 0x1E, 0x00, 0xB0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xE3}; + + irsend.reset(); + irsend.sendDaikin(daikin_code); + EXPECT_EQ( + "m428s428m428s428m428s428m428s428m428s428" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s428m428s1280m428s428m428s428m428s428m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s1280m428s1280m428s428m428s1280m428s428m428s1280m428s1280" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s1280m428s428m428s428" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s428m428s428m428s428m428s428m428s428m428s1280m428s428" + "m428s428m428s1280m428s1280m428s1280m428s1280m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s428m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s1280m428s428m428s428m428s428m428s1280m428s1280m428s1280" + "m428s29428", + irsend.outputStr()); +} + +// Test sending with repeats. +TEST(TestSendDaikin, SendWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + uint8_t daikin_code[kDaikinStateLength] = { + 0x11, 0xDA, 0x27, 0xF0, 0x00, 0x00, 0x00, 0x20, 0x11, + 0xDA, 0x27, 0x00, 0x00, 0x41, 0x1E, 0x00, 0xB0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xE3}; + irsend.reset(); + + irsend.sendDaikin(daikin_code, kDaikinStateLength, 1); + EXPECT_EQ( + "m428s428m428s428m428s428m428s428m428s428" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s428m428s1280m428s428m428s428m428s428m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s1280m428s1280m428s428m428s1280m428s428m428s1280m428s1280" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s1280m428s428m428s428" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s428m428s428m428s428m428s428m428s428m428s1280m428s428" + "m428s428m428s1280m428s1280m428s1280m428s1280m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s428m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s1280m428s428m428s428m428s428m428s1280m428s1280m428s1280" + "m428s29428" + "m428s428m428s428m428s428m428s428m428s428" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s428m428s1280m428s428m428s428m428s428m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s1280m428s1280m428s428m428s1280m428s428m428s1280m428s1280" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s1280m428s428m428s428" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s428m428s428m428s428m428s428m428s428m428s1280m428s428" + "m428s428m428s1280m428s1280m428s1280m428s1280m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s428m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s1280m428s428m428s428m428s428m428s1280m428s1280m428s1280" + "m428s29428", + irsend.outputStr()); +} + +// Test sending atypical sizes. +TEST(TestSendDaikin, SendUnexpectedSizes) { + IRsendTest irsend(4); + irsend.begin(); + + uint8_t daikin_short_code[kDaikinStateLength - 1] = { + 0x11, 0xDA, 0x27, 0xF0, 0x00, 0x00, 0x00, 0x20, 0x11, + 0xDA, 0x27, 0x00, 0x00, 0x41, 0x1E, 0x00, 0xB0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00}; + + irsend.reset(); + irsend.sendDaikin(daikin_short_code, kDaikinStateLength - 1); + ASSERT_EQ("", irsend.outputStr()); + + uint8_t daikin_long_code[kDaikinStateLength + 1] = { + 0x11, 0xDA, 0x27, 0xF0, 0x00, 0x00, 0x00, 0x20, 0x11, 0xDA, + 0x27, 0x00, 0x00, 0x41, 0x1E, 0x00, 0xB0, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xE3, 0x11}; + irsend.reset(); + irsend.sendDaikin(daikin_long_code, kDaikinStateLength + 1); + ASSERT_EQ( + "m428s428m428s428m428s428m428s428m428s428" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s428m428s1280m428s428m428s428m428s428m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s1280m428s1280m428s428m428s1280m428s428m428s1280m428s1280" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s1280m428s428m428s428" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s428m428s428m428s428m428s428m428s428m428s1280m428s428" + "m428s428m428s1280m428s1280m428s1280m428s1280m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s428m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s1280m428s428m428s428m428s428m428s1280m428s1280m428s1280" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s29428", + irsend.outputStr()); +} + +// Tests for IRDaikinESP class. + +TEST(TestDaikinClass, Power) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + irdaikin.on(); + EXPECT_TRUE(irdaikin.getPower()); + + irdaikin.off(); + EXPECT_FALSE(irdaikin.getPower()); + + irdaikin.setPower(true); + EXPECT_TRUE(irdaikin.getPower()); + + irdaikin.setPower(false); + EXPECT_FALSE(irdaikin.getPower()); +} + +TEST(TestDaikinClass, Temperature) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + irdaikin.setTemp(0); + EXPECT_EQ(kDaikinMinTemp, irdaikin.getTemp()); + + irdaikin.setTemp(255); + EXPECT_EQ(kDaikinMaxTemp, irdaikin.getTemp()); + + irdaikin.setTemp(kDaikinMinTemp); + EXPECT_EQ(kDaikinMinTemp, irdaikin.getTemp()); + + irdaikin.setTemp(kDaikinMaxTemp); + EXPECT_EQ(kDaikinMaxTemp, irdaikin.getTemp()); + + irdaikin.setTemp(kDaikinMinTemp - 1); + EXPECT_EQ(kDaikinMinTemp, irdaikin.getTemp()); + + irdaikin.setTemp(kDaikinMaxTemp + 1); + EXPECT_EQ(kDaikinMaxTemp, irdaikin.getTemp()); + + irdaikin.setTemp(kDaikinMinTemp + 1); + EXPECT_EQ(kDaikinMinTemp + 1, irdaikin.getTemp()); + + irdaikin.setTemp(21); + EXPECT_EQ(21, irdaikin.getTemp()); + + irdaikin.setTemp(25); + EXPECT_EQ(25, irdaikin.getTemp()); + + irdaikin.setTemp(29); + EXPECT_EQ(29, irdaikin.getTemp()); +} + +TEST(TestDaikinClass, OperatingMode) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + irdaikin.setMode(kDaikinAuto); + EXPECT_EQ(kDaikinAuto, irdaikin.getMode()); + + irdaikin.setMode(kDaikinCool); + EXPECT_EQ(kDaikinCool, irdaikin.getMode()); + + irdaikin.setMode(kDaikinHeat); + EXPECT_EQ(kDaikinHeat, irdaikin.getMode()); + + irdaikin.setMode(kDaikinDry); + EXPECT_EQ(kDaikinDry, irdaikin.getMode()); + + irdaikin.setMode(kDaikinFan); + EXPECT_EQ(kDaikinFan, irdaikin.getMode()); + + irdaikin.setMode(kDaikinFan + 1); + EXPECT_EQ(kDaikinAuto, irdaikin.getMode()); + + irdaikin.setMode(kDaikinAuto + 1); + EXPECT_EQ(kDaikinAuto, irdaikin.getMode()); + + irdaikin.setMode(255); + EXPECT_EQ(kDaikinAuto, irdaikin.getMode()); +} + +TEST(TestDaikinClass, VaneSwing) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + irdaikin.setSwingHorizontal(true); + irdaikin.setSwingVertical(false); + + irdaikin.setSwingHorizontal(true); + EXPECT_TRUE(irdaikin.getSwingHorizontal()); + EXPECT_FALSE(irdaikin.getSwingVertical()); + + irdaikin.setSwingVertical(true); + EXPECT_TRUE(irdaikin.getSwingHorizontal()); + EXPECT_TRUE(irdaikin.getSwingVertical()); + + irdaikin.setSwingHorizontal(false); + EXPECT_FALSE(irdaikin.getSwingHorizontal()); + EXPECT_TRUE(irdaikin.getSwingVertical()); + + irdaikin.setSwingVertical(false); + EXPECT_FALSE(irdaikin.getSwingHorizontal()); + EXPECT_FALSE(irdaikin.getSwingVertical()); +} + +TEST(TestDaikinClass, QuietMode) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + irdaikin.setQuiet(true); + EXPECT_TRUE(irdaikin.getQuiet()); + + irdaikin.setQuiet(false); + EXPECT_FALSE(irdaikin.getQuiet()); + + irdaikin.setQuiet(true); + EXPECT_TRUE(irdaikin.getQuiet()); + + // Setting Econo mode should NOT change out of quiet mode. + irdaikin.setEcono(true); + EXPECT_TRUE(irdaikin.getQuiet()); + irdaikin.setEcono(false); + EXPECT_TRUE(irdaikin.getQuiet()); + + // But setting Powerful mode should exit out of quiet mode. + irdaikin.setPowerful(true); + EXPECT_FALSE(irdaikin.getQuiet()); +} + +TEST(TestDaikinClass, PowerfulMode) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + irdaikin.setPowerful(true); + EXPECT_TRUE(irdaikin.getPowerful()); + + irdaikin.setPowerful(false); + EXPECT_FALSE(irdaikin.getPowerful()); + + irdaikin.setPowerful(true); + EXPECT_TRUE(irdaikin.getPowerful()); + + irdaikin.setQuiet(true); + EXPECT_FALSE(irdaikin.getPowerful()); + + irdaikin.setPowerful(true); + irdaikin.setEcono(true); + EXPECT_FALSE(irdaikin.getPowerful()); +} + +TEST(TestDaikinClass, EconoMode) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + irdaikin.setEcono(true); + EXPECT_TRUE(irdaikin.getEcono()); + + irdaikin.setEcono(false); + EXPECT_FALSE(irdaikin.getEcono()); + + irdaikin.setEcono(true); + EXPECT_TRUE(irdaikin.getEcono()); + + // Setting Quiet mode should NOT change out of Econo mode. + irdaikin.setQuiet(true); + EXPECT_TRUE(irdaikin.getEcono()); + irdaikin.setQuiet(false); + EXPECT_TRUE(irdaikin.getEcono()); + + // But setting Powerful mode should exit out of Econo mode. + irdaikin.setPowerful(true); + EXPECT_FALSE(irdaikin.getEcono()); +} + +TEST(TestDaikinClass, FanSpeed) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + // Unexpected value should default to Auto. + irdaikin.setFan(0); + EXPECT_EQ(kDaikinFanAuto, irdaikin.getFan()); + + // Unexpected value should default to Auto. + irdaikin.setFan(255); + EXPECT_EQ(kDaikinFanAuto, irdaikin.getFan()); + + irdaikin.setFan(kDaikinFanMax); + EXPECT_EQ(kDaikinFanMax, irdaikin.getFan()); + + // Beyond Max should default to Auto. + irdaikin.setFan(kDaikinFanMax + 1); + EXPECT_EQ(kDaikinFanAuto, irdaikin.getFan()); + + irdaikin.setFan(kDaikinFanMax - 1); + EXPECT_EQ(kDaikinFanMax - 1, irdaikin.getFan()); + + irdaikin.setFan(kDaikinFanMin); + EXPECT_EQ(kDaikinFanMin, irdaikin.getFan()); + + irdaikin.setFan(kDaikinFanMin + 1); + EXPECT_EQ(kDaikinFanMin + 1, irdaikin.getFan()); + + // Beyond Min should default to Auto. + irdaikin.setFan(kDaikinFanMin - 1); + EXPECT_EQ(kDaikinFanAuto, irdaikin.getFan()); + + irdaikin.setFan(3); + EXPECT_EQ(3, irdaikin.getFan()); + + irdaikin.setFan(kDaikinFanAuto); + EXPECT_EQ(kDaikinFanAuto, irdaikin.getFan()); + + irdaikin.setFan(kDaikinFanQuiet); + EXPECT_EQ(kDaikinFanQuiet, irdaikin.getFan()); +} + +TEST(TestDaikinClass, CurrentTime) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + irdaikin.setCurrentTime(0); // 00:00 + EXPECT_EQ(0, irdaikin.getCurrentTime()); + + irdaikin.setCurrentTime(754); // 12:34 + EXPECT_EQ(754, irdaikin.getCurrentTime()); + + irdaikin.setCurrentTime(1439); // 23:59 + EXPECT_EQ(1439, irdaikin.getCurrentTime()); +} + +TEST(TestDaikinClass, OnOffTimers) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + // Both timers turned off. + irdaikin.disableOnTimer(); + irdaikin.disableOffTimer(); + EXPECT_FALSE(irdaikin.getOnTimerEnabled()); + EXPECT_EQ(0x600, irdaikin.getOnTime()); + EXPECT_FALSE(irdaikin.getOffTimerEnabled()); + EXPECT_EQ(0x600, irdaikin.getOffTime()); + + // Turn on just the On Timer. + irdaikin.enableOnTimer(123); + EXPECT_TRUE(irdaikin.getOnTimerEnabled()); + EXPECT_EQ(123, irdaikin.getOnTime()); + EXPECT_FALSE(irdaikin.getOffTimerEnabled()); + EXPECT_EQ(0x600, irdaikin.getOffTime()); + + // Now turn on the Off Timer. + irdaikin.enableOffTimer(754); + EXPECT_TRUE(irdaikin.getOffTimerEnabled()); + EXPECT_EQ(754, irdaikin.getOffTime()); + EXPECT_TRUE(irdaikin.getOnTimerEnabled()); + EXPECT_EQ(123, irdaikin.getOnTime()); + + // Turn off the just the On Timer. + irdaikin.disableOnTimer(); + EXPECT_FALSE(irdaikin.getOnTimerEnabled()); + EXPECT_EQ(0x600, irdaikin.getOnTime()); + EXPECT_TRUE(irdaikin.getOffTimerEnabled()); + EXPECT_EQ(754, irdaikin.getOffTime()); + + // Now turn off the Off Timer. + irdaikin.disableOffTimer(); + EXPECT_FALSE(irdaikin.getOffTimerEnabled()); + EXPECT_EQ(0x600, irdaikin.getOffTime()); + EXPECT_FALSE(irdaikin.getOnTimerEnabled()); + EXPECT_EQ(0x600, irdaikin.getOnTime()); + + // Use some canary values around the timers to ensure no accidental + // bit flips happen. i.e. Neighbouring bytes in the state. + // (Found some during testing on systems with different endian-ness) + // Tests here to make sure it never happens again. + irdaikin.setSwingHorizontal(true); + irdaikin.setPowerful(true); + irdaikin.disableOffTimer(); + irdaikin.disableOnTimer(); + ASSERT_TRUE(irdaikin.getSwingHorizontal()); + ASSERT_TRUE(irdaikin.getPowerful()); + irdaikin.enableOnTimer(123); + irdaikin.enableOffTimer(456); + ASSERT_TRUE(irdaikin.getSwingHorizontal()); + ASSERT_TRUE(irdaikin.getPowerful()); + irdaikin.disableOffTimer(); + irdaikin.disableOnTimer(); + ASSERT_TRUE(irdaikin.getSwingHorizontal()); + ASSERT_TRUE(irdaikin.getPowerful()); + + irdaikin.setSwingHorizontal(false); + irdaikin.setPowerful(false); + irdaikin.disableOffTimer(); + irdaikin.disableOnTimer(); + ASSERT_FALSE(irdaikin.getSwingHorizontal()); + ASSERT_FALSE(irdaikin.getPowerful()); + irdaikin.enableOnTimer(123); + irdaikin.enableOffTimer(456); + ASSERT_FALSE(irdaikin.getSwingHorizontal()); + ASSERT_FALSE(irdaikin.getPowerful()); + irdaikin.disableOffTimer(); + irdaikin.disableOnTimer(); + ASSERT_FALSE(irdaikin.getSwingHorizontal()); + ASSERT_FALSE(irdaikin.getPowerful()); +} + +// Test Eye mode. +TEST(TestDaikinClass, EyeSetting) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + // The Eye setting is stored in the same byte as Econo mode. + // Econo mode tests are there to make sure it isn't harmed and vice-versa. + irdaikin.setEcono(false); + irdaikin.setEye(false); + ASSERT_FALSE(irdaikin.getEye()); + EXPECT_FALSE(irdaikin.getEcono()); + + irdaikin.setEye(true); + ASSERT_TRUE(irdaikin.getEye()); + EXPECT_FALSE(irdaikin.getEcono()); + + irdaikin.setEcono(false); + ASSERT_TRUE(irdaikin.getEye()); + EXPECT_FALSE(irdaikin.getEcono()); + + irdaikin.setEcono(true); + ASSERT_TRUE(irdaikin.getEye()); + EXPECT_TRUE(irdaikin.getEcono()); + + irdaikin.setEye(false); + ASSERT_FALSE(irdaikin.getEye()); + EXPECT_TRUE(irdaikin.getEcono()); +} + +// Test Mold mode. +TEST(TestDaikinClass, MoldSetting) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + irdaikin.setMold(false); + ASSERT_FALSE(irdaikin.getMold()); + + irdaikin.setMold(true); + ASSERT_TRUE(irdaikin.getMold()); + + irdaikin.setMold(false); + ASSERT_FALSE(irdaikin.getMold()); +} + +// Test Sensor mode. +TEST(TestDaikinClass, SensorSetting) { + IRDaikinESP irdaikin(0); + irdaikin.begin(); + + irdaikin.setSensor(false); + ASSERT_FALSE(irdaikin.getSensor()); + + irdaikin.setSensor(true); + ASSERT_TRUE(irdaikin.getSensor()); + + irdaikin.setSensor(false); + ASSERT_FALSE(irdaikin.getSensor()); +} + +TEST(TestDaikinClass, RenderTime) { + EXPECT_EQ("0:00", IRDaikinESP::renderTime(0)); + EXPECT_EQ("0:10", IRDaikinESP::renderTime(10)); + EXPECT_EQ("1:00", IRDaikinESP::renderTime(1 * 60 + 0)); + EXPECT_EQ("23:59", IRDaikinESP::renderTime(23 * 60 + 59)); +} + +TEST(TestDaikinClass, SetAndGetRaw) { + IRDaikinESP irdaikin(0); + uint8_t initialState[kDaikinStateLength] = { + 0x11, 0xDA, 0x27, 0x00, 0x42, 0x00, 0x00, 0x54, 0x11, + 0xDA, 0x27, 0x00, 0x00, 0x49, 0x1E, 0x00, 0xB0, 0x00, + 0x00, 0x06, 0x60, 0x00, 0x00, 0xC0, 0x00, 0x00, 0x4F}; + uint8_t expectedState[kDaikinStateLength] = { + 0x11, 0xDA, 0x27, 0x00, 0x42, 0x00, 0x00, 0x54, 0x11, + 0xDA, 0x27, 0x00, 0x00, 0x48, 0x2A, 0x00, 0xB0, 0x00, + 0x00, 0x06, 0x60, 0x00, 0x00, 0xC0, 0x00, 0x02, 0x5A}; + + EXPECT_STATE_EQ(initialState, irdaikin.getRaw(), kDaikinBits); + // toggle the power state. + irdaikin.setPower(!irdaikin.getPower()); + irdaikin.setTemp(21); + irdaikin.setMold(true); + EXPECT_STATE_EQ(expectedState, irdaikin.getRaw(), kDaikinBits); + irdaikin.setRaw(initialState); + EXPECT_STATE_EQ(initialState, irdaikin.getRaw(), kDaikinBits); +} + +TEST(TestDaikinClass, ChecksumValidation) { + uint8_t daikin_code[kDaikinStateLength] = { + 0x11, 0xDA, 0x27, 0xF0, 0x00, 0x00, 0x00, 0x02, 0x11, + 0xDA, 0x27, 0x00, 0x00, 0x41, 0x1E, 0x00, 0xB0, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0xC0, 0x00, 0x00, 0xE1}; + + EXPECT_TRUE(IRDaikinESP::validChecksum(daikin_code)); + // Change the array so the checksum is invalid. + daikin_code[0] ^= 0xFF; + EXPECT_FALSE(IRDaikinESP::validChecksum(daikin_code)); + // Restore the previous change, and change another byte. + daikin_code[0] ^= 0xFF; + daikin_code[4] ^= 0xFF; + EXPECT_FALSE(IRDaikinESP::validChecksum(daikin_code)); + daikin_code[4] ^= 0xFF; + // Change something in the 2nd block. + daikin_code[10] ^= 0xFF; + EXPECT_FALSE(IRDaikinESP::validChecksum(daikin_code)); + daikin_code[10] ^= 0xFF; + EXPECT_TRUE(IRDaikinESP::validChecksum(daikin_code)); +} + +// Test human readable output. +TEST(TestDaikinClass, HumanReadable) { + IRDaikinESP irdaikin(0); + + EXPECT_EQ( + "Power: On, Mode: 4 (HEAT), Temp: 15C, Fan: 11 (QUIET), " + "Powerful: Off, Quiet: Off, Sensor: Off, Eye: Off, Mold: Off, " + "Swing (Horizontal): Off, Swing (Vertical): Off, " + "Current Time: 0:00, On Time: Off, Off Time: Off", + irdaikin.toString()); + irdaikin.setMode(kDaikinAuto); + irdaikin.setTemp(25); + irdaikin.setFan(kDaikinFanAuto); + irdaikin.setQuiet(true); + irdaikin.setSensor(true); + irdaikin.setEye(true); + irdaikin.setMold(true); + irdaikin.setSwingVertical(true); + irdaikin.setSwingHorizontal(true); + irdaikin.setCurrentTime(9 * 60 + 15); + irdaikin.enableOnTimer(8 * 60 + 0); + irdaikin.enableOffTimer(17 * 60 + 30); + irdaikin.off(); + EXPECT_EQ( + "Power: Off, Mode: 0 (AUTO), Temp: 25C, Fan: 10 (AUTO), " + "Powerful: Off, Quiet: On, Sensor: On, Eye: On, Mold: On, " + "Swing (Horizontal): On, Swing (Vertical): On, " + "Current Time: 9:15, On Time: 8:00, Off Time: 17:30", + irdaikin.toString()); +} + +// Test general message construction after tweaking some settings. +TEST(TestDaikinClass, MessageConstuction) { + IRDaikinESP irdaikin(0); + IRsendTest irsend(4); + irdaikin.begin(); + irsend.begin(); + + irdaikin.setFan(kDaikinFanMin); + irdaikin.setMode(kDaikinCool); + irdaikin.setTemp(27); + irdaikin.setSwingVertical(false); + irdaikin.setSwingHorizontal(true); + irdaikin.setQuiet(false); + irdaikin.setPower(true); + + // Check everything for kicks. + EXPECT_EQ(kDaikinFanMin, irdaikin.getFan()); + EXPECT_EQ(kDaikinCool, irdaikin.getMode()); + EXPECT_EQ(27, irdaikin.getTemp()); + EXPECT_FALSE(irdaikin.getSwingVertical()); + EXPECT_TRUE(irdaikin.getSwingHorizontal()); + EXPECT_FALSE(irdaikin.getQuiet()); + EXPECT_TRUE(irdaikin.getPower()); + + irsend.reset(); + irsend.sendDaikin(irdaikin.getRaw()); + EXPECT_EQ( + "m428s428m428s428m428s428m428s428m428s428" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s428m428s1280m428s428m428s428m428s428m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s1280m428s1280m428s428m428s1280m428s428m428s1280m428s1280" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s428m428s428m428s428m428s1280m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s1280m428s428m428s1280m428s428m428s1280m428s428" + "m428s29428m3650s1623" + "m428s1280m428s428m428s428m428s428m428s1280m428s428m428s428m428s428" + "m428s428m428s1280m428s428m428s1280m428s1280m428s428m428s1280m428s1280" + "m428s1280m428s1280m428s1280m428s428m428s428m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s1280m428s428m428s428m428s1280m428s1280m428s1280m428s428m428s428" + "m428s428m428s1280m428s1280m428s428m428s1280m428s1280m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s1280m428s1280m428s428m428s428" + "m428s1280m428s1280m428s1280m428s1280m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s1280m428s1280m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s1280m428s1280m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s1280m428s1280" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s428m428s428m428s428m428s428m428s428m428s428m428s428" + "m428s428m428s1280m428s1280m428s428m428s428m428s1280m428s1280m428s1280" + "m428s29428", + irsend.outputStr()); +} + +// Tests for decodeDaikin(). + +// Test decoding a message captured from a real IR remote. +TEST(TestDecodeDaikin, RealExample) { + IRDaikinESP irdaikin(0); + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + uint8_t expectedState[kDaikinStateLength] = { + 0x11, 0xDA, 0x27, 0x00, 0x42, 0x3A, 0x05, 0x93, 0x11, + 0xDA, 0x27, 0x00, 0x00, 0x3F, 0x3A, 0x00, 0xA0, 0x00, + 0x0A, 0x25, 0x17, 0x01, 0x00, 0xC0, 0x00, 0x00, 0x32}; + uint16_t rawData[kDaikinRawBits] = { + 416, 446, 416, 446, 416, 446, 418, 446, 416, 446, 416, 25434, + 3436, 1768, 390, 1336, 390, 446, 416, 446, 416, 446, 416, 1336, + 390, 446, 416, 446, 416, 446, 416, 446, 416, 1336, 390, 448, + 416, 1336, 390, 1336, 390, 448, 416, 1336, 390, 1336, 390, 1338, + 388, 1338, 390, 1336, 390, 446, 416, 446, 416, 1336, 390, 446, + 416, 446, 416, 446, 416, 446, 416, 446, 416, 446, 416, 448, + 416, 446, 416, 446, 416, 446, 416, 1336, 390, 446, 416, 1336, + 390, 448, 416, 446, 416, 446, 416, 1336, 390, 1336, 390, 446, + 416, 446, 416, 446, 416, 446, 416, 446, 416, 446, 416, 446, + 416, 446, 416, 446, 416, 448, 416, 446, 416, 446, 416, 446, + 416, 448, 414, 448, 416, 448, 416, 1336, 390, 1336, 390, 1336, + 390, 446, 414, 1336, 390, 448, 414, 1336, 390, 1336, 390, 34878, + 3436, 1768, 390, 1336, 390, 446, 416, 448, 416, 446, 416, 1336, + 390, 446, 416, 448, 416, 446, 416, 446, 416, 1336, 390, 446, + 416, 1336, 390, 1336, 390, 446, 416, 1336, 390, 1336, 390, 1336, + 390, 1336, 390, 1336, 392, 446, 414, 448, 416, 1336, 390, 446, + 416, 446, 416, 446, 416, 446, 414, 448, 416, 446, 416, 448, + 414, 448, 416, 446, 416, 446, 416, 446, 414, 1336, 390, 448, + 416, 446, 416, 446, 416, 448, 416, 1336, 390, 446, 416, 446, + 416, 1336, 390, 446, 416, 1336, 390, 1336, 390, 1336, 390, 446, + 416, 446, 414, 1338, 390, 446, 416, 1336, 390, 446, 416, 446, + 416, 446, 416, 446, 416, 446, 416, 1336, 390, 1336, 390, 446, + 416, 446, 416, 1336, 390, 446, 416, 446, 416, 1336, 390, 34876, + 3436, 1768, 388, 1336, 390, 446, 416, 446, 416, 448, 416, 1336, + 390, 446, 416, 446, 416, 446, 416, 448, 416, 1336, 390, 448, + 414, 1336, 390, 1336, 390, 446, 416, 1336, 388, 1338, 388, 1336, + 390, 1336, 390, 1336, 390, 446, 416, 446, 416, 1336, 390, 446, + 420, 442, 416, 446, 416, 446, 416, 446, 416, 446, 416, 446, + 416, 446, 416, 446, 416, 446, 416, 446, 416, 446, 416, 448, + 416, 446, 416, 448, 416, 446, 416, 448, 416, 446, 416, 1336, + 390, 1336, 390, 1336, 388, 1338, 390, 1336, 390, 1336, 392, 446, + 416, 446, 416, 448, 416, 1334, 390, 446, 416, 1338, 388, 1336, + 390, 1336, 390, 446, 416, 446, 416, 448, 414, 446, 416, 446, + 416, 446, 416, 448, 416, 446, 416, 446, 416, 446, 416, 446, + 416, 446, 416, 446, 416, 446, 416, 446, 416, 1336, 390, 446, + 416, 1336, 390, 446, 414, 448, 416, 446, 416, 446, 416, 446, + 416, 448, 416, 446, 416, 446, 416, 446, 416, 1336, 390, 446, + 416, 1336, 390, 446, 416, 446, 416, 446, 416, 448, 416, 1338, + 390, 444, 418, 1336, 390, 448, 416, 446, 416, 1336, 390, 446, + 416, 446, 416, 1336, 390, 1336, 388, 1336, 390, 446, 416, 1336, + 390, 448, 414, 448, 414, 448, 416, 1334, 390, 446, 416, 446, + 416, 446, 416, 448, 416, 446, 416, 446, 416, 448, 416, 446, + 416, 446, 416, 446, 416, 446, 416, 446, 416, 446, 416, 446, + 416, 446, 416, 446, 416, 446, 416, 446, 416, 446, 416, 446, + 416, 448, 416, 1336, 390, 1336, 390, 446, 416, 446, 416, 446, + 416, 446, 414, 446, 416, 448, 416, 446, 416, 448, 414, 446, + 418, 446, 416, 446, 416, 448, 416, 446, 416, 448, 416, 446, + 416, 448, 416, 446, 416, 1336, 390, 446, 416, 446, 416, 1338, + 390, 1336, 390, 446, 416, 446, 416}; // Captured by @sillyfrog + + irsend.reset(); + irsend.sendRaw(rawData, kDaikinRawBits, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(DAIKIN, irsend.capture.decode_type); + ASSERT_EQ(kDaikinBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); +} + +// Decoding a message we entirely constructed based solely on a given state. +TEST(TestDecodeDaikin, SyntheticExample) { + IRDaikinESP irdaikin(0); + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + uint8_t expectedState[kDaikinStateLength] = { + 0x11, 0xDA, 0x27, 0x00, 0x42, 0x3A, 0x05, 0x93, 0x11, + 0xDA, 0x27, 0x00, 0x00, 0x3F, 0x3A, 0x00, 0xA0, 0x00, + 0x0A, 0x25, 0x17, 0x01, 0x00, 0xC0, 0x00, 0x00, 0x32}; + + irsend.reset(); + irsend.sendDaikin(expectedState); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(DAIKIN, irsend.capture.decode_type); + ASSERT_EQ(kDaikinBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); +} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Denon_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Denon_test.cpp similarity index 82% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_Denon_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_Denon_test.cpp index 32de11b46..911fd7528 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Denon_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Denon_test.cpp @@ -19,7 +19,8 @@ TEST(TestSendDenon, SendDataOnly) { "m260s43602" "m260s780m260s1820m260s780m260s780m260s780m260s780m260s1820m260s1820" "m260s780m260s780m260s780m260s780m260s1820m260s1820m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); irsend.reset(); // Denon Eco Mode On. (Panasonic/Kaseikyo) @@ -32,7 +33,8 @@ TEST(TestSendDenon, SendDataOnly) { "m432s1296m432s432m432s432m432s432m432s1296m432s1296m432s432m432s1296" "m432s432m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s432" "m432s1296m432s1296m432s1296m432s432m432s432m432s432m432s1296m432s1296" - "m432s129600", irsend.outputStr()); + "m432s98928", + irsend.outputStr()); } // Test sending with different repeats. @@ -54,7 +56,8 @@ TEST(TestSendDenon, SendNormalWithRepeats) { "m260s43602" "m260s780m260s1820m260s780m260s780m260s780m260s780m260s1820m260s1820" "m260s780m260s780m260s780m260s780m260s1820m260s1820m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); irsend.sendDenon(0x2278, DENON_BITS, 2); // 2 repeats. EXPECT_EQ( "m260s780m260s1820m260s780m260s780m260s780m260s1820m260s780m260s780" @@ -74,7 +77,8 @@ TEST(TestSendDenon, SendNormalWithRepeats) { "m260s43602" "m260s780m260s1820m260s780m260s780m260s780m260s780m260s1820m260s1820" "m260s780m260s780m260s780m260s780m260s1820m260s1820m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); } TEST(TestSendDenon, Send48BitWithRepeats) { @@ -91,7 +95,7 @@ TEST(TestSendDenon, Send48BitWithRepeats) { "m432s1296m432s432m432s432m432s432m432s1296m432s1296m432s432m432s1296" "m432s432m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s432" "m432s1296m432s1296m432s1296m432s432m432s432m432s432m432s1296m432s1296" - "m432s129600" + "m432s98928" "m3456s1728" "m432s432m432s432m432s1296m432s432m432s1296m432s432m432s1296m432s432" "m432s432m432s1296m432s432m432s432m432s1296m432s1296m432s432m432s432" @@ -99,7 +103,8 @@ TEST(TestSendDenon, Send48BitWithRepeats) { "m432s1296m432s432m432s432m432s432m432s1296m432s1296m432s432m432s1296" "m432s432m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s432" "m432s1296m432s1296m432s1296m432s432m432s432m432s432m432s1296m432s1296" - "m432s129600", irsend.outputStr()); + "m432s98928", + irsend.outputStr()); irsend.sendDenon(0x2A4C028D6CE3, DENON_48_BITS, 2); // 2 repeats. EXPECT_EQ( "m3456s1728" @@ -109,7 +114,7 @@ TEST(TestSendDenon, Send48BitWithRepeats) { "m432s1296m432s432m432s432m432s432m432s1296m432s1296m432s432m432s1296" "m432s432m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s432" "m432s1296m432s1296m432s1296m432s432m432s432m432s432m432s1296m432s1296" - "m432s129600" + "m432s98928" "m3456s1728" "m432s432m432s432m432s1296m432s432m432s1296m432s432m432s1296m432s432" "m432s432m432s1296m432s432m432s432m432s1296m432s1296m432s432m432s432" @@ -117,7 +122,7 @@ TEST(TestSendDenon, Send48BitWithRepeats) { "m432s1296m432s432m432s432m432s432m432s1296m432s1296m432s432m432s1296" "m432s432m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s432" "m432s1296m432s1296m432s1296m432s432m432s432m432s432m432s1296m432s1296" - "m432s129600" + "m432s98928" "m3456s1728" "m432s432m432s432m432s1296m432s432m432s1296m432s432m432s1296m432s432" "m432s432m432s1296m432s432m432s432m432s1296m432s1296m432s432m432s432" @@ -125,7 +130,8 @@ TEST(TestSendDenon, Send48BitWithRepeats) { "m432s1296m432s432m432s432m432s432m432s1296m432s1296m432s432m432s1296" "m432s432m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s432" "m432s1296m432s1296m432s1296m432s432m432s432m432s432m432s1296m432s1296" - "m432s129600", irsend.outputStr()); + "m432s98928", + irsend.outputStr()); } // Test sending an atypical data size. @@ -139,7 +145,8 @@ TEST(TestSendDenon, SendUnusualSize) { "m260s780m260s780m260s780m260s1820m260s780m260s780m260s1820m260s780" "m260s43602" "m260s1820m260s1820m260s1820m260s780m260s1820m260s1820m260s780m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); irsend.reset(); irsend.sendDenon(0x1234567890ABCDEF, 64); @@ -153,7 +160,8 @@ TEST(TestSendDenon, SendUnusualSize) { "m432s1296m432s432m432s1296m432s432m432s1296m432s432m432s1296m432s1296" "m432s1296m432s1296m432s432m432s432m432s1296m432s1296m432s432m432s1296" "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s1296m432s1296" - "m432s129600", irsend.outputStr()); + "m432s74736", + irsend.outputStr()); } // Tests for decodeDenon(). @@ -179,12 +187,12 @@ TEST(TestDecodeDenon, NormalDecodeWithStrict) { // Legacy Denon 14-bit message. irsend.reset(); - irsend.sendDenon(0x1278, DENON_LEGACY_BITS); + irsend.sendDenon(0x1278, kDenonLegacyBits); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeDenon(&irsend.capture, DENON_LEGACY_BITS, true)); + ASSERT_TRUE(irrecv.decodeDenon(&irsend.capture, kDenonLegacyBits, true)); EXPECT_EQ(DENON, irsend.capture.decode_type); - EXPECT_EQ(DENON_LEGACY_BITS, irsend.capture.bits); + EXPECT_EQ(kDenonLegacyBits, irsend.capture.bits); EXPECT_EQ(0x1278, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -211,13 +219,11 @@ TEST(TestDecodeDenon, DecodeGlobalCacheExample) { irsend.reset(); // Denon AVR series Power On code from Global Cache. (Sharp style) - uint16_t gc_test_power[67] = {38000, 1, 1, - 10, 30, 10, 70, 10, 30, 10, 30, 10, 30, 10, 70, - 10, 30, 10, 30, 10, 70, 10, 70, 10, 70, 10, 70, - 10, 30, 10, 30, 10, 30, 10, 1657, - 10, 30, 10, 70, 10, 30, 10, 30, 10, 30, 10, 30, - 10, 70, 10, 70, 10, 30, 10, 30, 10, 30, 10, 30, - 10, 70, 10, 70, 10, 70, 10, 1657}; + uint16_t gc_test_power[67] = { + 38000, 1, 1, 10, 30, 10, 70, 10, 30, 10, 30, 10, 30, 10, 70, 10, 30, + 10, 30, 10, 70, 10, 70, 10, 70, 10, 70, 10, 30, 10, 30, 10, 30, 10, + 1657, 10, 30, 10, 70, 10, 30, 10, 30, 10, 30, 10, 30, 10, 70, 10, 70, + 10, 30, 10, 30, 10, 30, 10, 30, 10, 70, 10, 70, 10, 70, 10, 1657}; irsend.sendGC(gc_test_power, 67); irsend.makeDecodeResult(); @@ -230,15 +236,14 @@ TEST(TestDecodeDenon, DecodeGlobalCacheExample) { EXPECT_FALSE(irsend.capture.repeat); // Denon "Eco Mode Auto" code from Global Cache. (Panasonic style) - uint16_t gc_test_eco[103] = {37000, 1, 1, 128, 64, 16, 16, 16, 16, 16, 48, - 16, 16, 16, 48, 16, 16, 16, 48, 16, 16, 16, 16, - 16, 48, 16, 16, 16, 16, 16, 48, 16, 48, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 48, 16, 16, 16, 48, 16, 16, 16, 16, - 16, 16, 16, 48, 16, 48, 16, 16, 16, 48, 16, 16, - 16, 48, 16, 48, 16, 16, 16, 48, 16, 48, 16, 16, - 16, 16, 16, 48, 16, 48, 16, 48, 16, 16, 16, 16, - 16, 16, 16, 48, 16, 48, 16, 2766}; + uint16_t gc_test_eco[103] = { + 37000, 1, 1, 128, 64, 16, 16, 16, 16, 16, 48, 16, 16, 16, 48, + 16, 16, 16, 48, 16, 16, 16, 16, 16, 48, 16, 16, 16, 16, 16, + 48, 16, 48, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 16, 16, 16, 16, 48, 16, 16, 16, 48, 16, 16, 16, 16, 16, + 16, 16, 48, 16, 48, 16, 16, 16, 48, 16, 16, 16, 48, 16, 48, + 16, 16, 16, 48, 16, 48, 16, 16, 16, 16, 16, 48, 16, 48, 16, + 48, 16, 16, 16, 16, 16, 16, 16, 48, 16, 48, 16, 2766}; irsend.reset(); irsend.sendGC(gc_test_eco, 103); irsend.makeDecodeResult(); @@ -259,14 +264,15 @@ TEST(TestDecodeDenon, FailToDecodeNonDenonExample) { irsend.begin(); irsend.reset(); - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeDenon(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeDenon(&irsend.capture, DENON_LEGACY_BITS, false)); + ASSERT_FALSE(irrecv.decodeDenon(&irsend.capture, kDenonLegacyBits, false)); ASSERT_FALSE(irrecv.decodeDenon(&irsend.capture, DENON_BITS, false)); ASSERT_FALSE(irrecv.decodeDenon(&irsend.capture, DENON_48_BITS, false)); } diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Dish_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Dish_test.cpp similarity index 76% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_Dish_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_Dish_test.cpp index afd76e8fd..0c58496ce 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Dish_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Dish_test.cpp @@ -26,7 +26,8 @@ TEST(TestSendDish, SendDataOnly) { "m400s6100" "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" - "m400s6100", irsend.outputStr()); + "m400s6100", + irsend.outputStr()); irsend.reset(); irsend.sendDISH(0x9C00); // Power on. @@ -43,7 +44,8 @@ TEST(TestSendDish, SendDataOnly) { "m400s6100" "m400s1700m400s2800m400s2800m400s1700m400s1700m400s1700m400s2800m400s2800" "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" - "m400s6100", irsend.outputStr()); + "m400s6100", + irsend.outputStr()); irsend.reset(); irsend.sendDISH(0xFFFF); @@ -60,7 +62,8 @@ TEST(TestSendDish, SendDataOnly) { "m400s6100" "m400s1700m400s1700m400s1700m400s1700m400s1700m400s1700m400s1700m400s1700" "m400s1700m400s1700m400s1700m400s1700m400s1700m400s1700m400s1700m400s1700" - "m400s6100", irsend.outputStr()); + "m400s6100", + irsend.outputStr()); } // Test sending with different repeats. @@ -69,15 +72,16 @@ TEST(TestSendDish, SendWithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendDISH(0x9C00, DISH_BITS, 0); // 0 repeats. + irsend.sendDISH(0x9C00, kDishBits, 0); // 0 repeats. EXPECT_EQ( "m400s6100" "m400s1700m400s2800m400s2800m400s1700m400s1700m400s1700m400s2800m400s2800" "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" - "m400s6100", irsend.outputStr()); + "m400s6100", + irsend.outputStr()); irsend.reset(); - irsend.sendDISH(0x9C00, DISH_BITS, 1); // 1 repeat. + irsend.sendDISH(0x9C00, kDishBits, 1); // 1 repeat. EXPECT_EQ( "m400s6100" "m400s1700m400s2800m400s2800m400s1700m400s1700m400s1700m400s2800m400s2800" @@ -85,9 +89,10 @@ TEST(TestSendDish, SendWithRepeats) { "m400s6100" "m400s1700m400s2800m400s2800m400s1700m400s1700m400s1700m400s2800m400s2800" "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" - "m400s6100", irsend.outputStr()); + "m400s6100", + irsend.outputStr()); - irsend.sendDISH(0x9C00, DISH_BITS, 2); // 2 repeats. + irsend.sendDISH(0x9C00, kDishBits, 2); // 2 repeats. EXPECT_EQ( "m400s6100" "m400s1700m400s2800m400s2800m400s1700m400s1700m400s1700m400s2800m400s2800" @@ -98,7 +103,8 @@ TEST(TestSendDish, SendWithRepeats) { "m400s6100" "m400s1700m400s2800m400s2800m400s1700m400s1700m400s1700m400s2800m400s2800" "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" - "m400s6100", irsend.outputStr()); + "m400s6100", + irsend.outputStr()); } // Test sending an atypical data size. @@ -109,15 +115,16 @@ TEST(TestSendDish, SendUnusualSize) { irsend.reset(); irsend.sendDISH(0x0, 8); EXPECT_EQ( - "m400s6100" - "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" - "m400s6100" - "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" - "m400s6100" - "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" - "m400s6100" - "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" - "m400s6100", irsend.outputStr()); + "m400s6100" + "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" + "m400s6100" + "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" + "m400s6100" + "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" + "m400s6100" + "m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800m400s2800" + "m400s6100", + irsend.outputStr()); irsend.reset(); irsend.sendDISH(0x1234567890ABCDEF, 64); @@ -158,7 +165,8 @@ TEST(TestSendDish, SendUnusualSize) { "m400s1700m400s2800m400s1700m400s2800m400s1700m400s2800m400s1700m400s1700" "m400s1700m400s1700m400s2800m400s2800m400s1700m400s1700m400s2800m400s1700" "m400s1700m400s1700m400s1700m400s2800m400s1700m400s1700m400s1700m400s1700" - "m400s6100", irsend.outputStr()); + "m400s6100", + irsend.outputStr()); } // Tests for decodeDISH(). @@ -173,9 +181,9 @@ TEST(TestDecodeDish, NormalDecodeWithStrict) { irsend.reset(); irsend.sendDISH(0x9C00); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeDISH(&irsend.capture, DISH_BITS, true)); + ASSERT_TRUE(irrecv.decodeDISH(&irsend.capture, kDishBits, true)); EXPECT_EQ(DISH, irsend.capture.decode_type); - EXPECT_EQ(DISH_BITS, irsend.capture.bits); + EXPECT_EQ(kDishBits, irsend.capture.bits); EXPECT_EQ(0x9C00, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -192,7 +200,7 @@ TEST(TestDecodeDish, DecodeWithNonStrictSize) { irsend.sendDISH(0x12, 8); // Illegal size Dish message. (smaller) irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeDISH(&irsend.capture, DISH_BITS, true)); + ASSERT_FALSE(irrecv.decodeDISH(&irsend.capture, kDishBits, true)); irsend.makeDecodeResult(); // Should fail with strict when we ask for the wrong bit size. @@ -209,7 +217,7 @@ TEST(TestDecodeDish, DecodeWithNonStrictSize) { irsend.sendDISH(0x12345678, 32); // Illegal size Dish message. (larger) irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeDISH(&irsend.capture, DISH_BITS, true)); + ASSERT_FALSE(irrecv.decodeDISH(&irsend.capture, kDishBits, true)); irsend.makeDecodeResult(); // Should fail with strict when we ask for the wrong bit size. @@ -247,47 +255,45 @@ TEST(TestDecodeDish, DecodeGlobalCacheExample) { IRrecv irrecv(4); irsend.begin(); -/* - irsend.reset(); - // Dish DTV Pal code from Global Cache. - uint16_t gc_test_dtv[27] = {58000, 1, 3, 22, 538, 22, 252, 22, 156, 22, 156, - 22, 156, 22, 156, 22, 252, 22, 252, 22, 252, 22, - 252, 22, 252, 22, 538}; - irsend.sendGC(gc_test_dtv, 27); - irsend.makeDecodeResult(); + /* + irsend.reset(); + // Dish DTV Pal code from Global Cache. + uint16_t gc_test_dtv[27] = {58000, 1, 3, 22, 538, 22, 252, 22, 156, 22, 156, + 22, 156, 22, 156, 22, 252, 22, 252, 22, 252, 22, + 252, 22, 252, 22, 538}; + irsend.sendGC(gc_test_dtv, 27); + irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeDISH(&irsend.capture, DISH_BITS, true)); - EXPECT_EQ(DISH, irsend.capture.decode_type); - EXPECT_EQ(DISH_BITS, irsend.capture.bits); - EXPECT_EQ(0x0, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); + ASSERT_TRUE(irrecv.decodeDISH(&irsend.capture, kDishBits, true)); + EXPECT_EQ(DISH, irsend.capture.decode_type); + EXPECT_EQ(kDishBits, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); - ASSERT_TRUE(irrecv.decodeDISH(&irsend.capture)); - EXPECT_EQ(DISH, irsend.capture.decode_type); - EXPECT_EQ(DISH_BITS, irsend.capture.bits); - EXPECT_EQ(0x0, irsend.capture.value); - EXPECT_EQ(0x0, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); - EXPECT_FALSE(irsend.capture.repeat); -*/ + ASSERT_TRUE(irrecv.decodeDISH(&irsend.capture)); + EXPECT_EQ(DISH, irsend.capture.decode_type); + EXPECT_EQ(kDishBits, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + */ // Dish Hopper 3 code from Global Cache. - uint16_t gc_test_hopper[73] = {58000, 1, 37, 23, 351, 23, 94, 23, 164, - 23, 164, 23, 94, 23, 94, 23, 94, 23, 164, - 23, 164, 23, 164, 23, 164, 23, 164, 23, 164, - 23, 164, 23, 164, 23, 164, 23, 164, 23, 351, - 23, 94, 23, 164, 23, 164, 23, 94, 23, 94, - 23, 94, 23, 164, 23, 164, 23, 164, 23, 164, - 23, 164, 23, 164, 23, 164, 23, 164, 23, 164, - 23, 164, 23, 351}; + uint16_t gc_test_hopper[73] = { + 58000, 1, 37, 23, 351, 23, 94, 23, 164, 23, 164, 23, 94, 23, 94, 23, + 94, 23, 164, 23, 164, 23, 164, 23, 164, 23, 164, 23, 164, 23, 164, 23, + 164, 23, 164, 23, 164, 23, 351, 23, 94, 23, 164, 23, 164, 23, 94, 23, + 94, 23, 94, 23, 164, 23, 164, 23, 164, 23, 164, 23, 164, 23, 164, 23, + 164, 23, 164, 23, 164, 23, 164, 23, 351}; irsend.reset(); irsend.sendGC(gc_test_hopper, 73); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeDISH(&irsend.capture, DISH_BITS, true)); + ASSERT_TRUE(irrecv.decodeDISH(&irsend.capture, kDishBits, true)); EXPECT_EQ(DISH, irsend.capture.decode_type); - EXPECT_EQ(DISH_BITS, irsend.capture.bits); + EXPECT_EQ(kDishBits, irsend.capture.bits); EXPECT_EQ(0x9C00, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -295,7 +301,7 @@ TEST(TestDecodeDish, DecodeGlobalCacheExample) { ASSERT_TRUE(irrecv.decodeDISH(&irsend.capture)); EXPECT_EQ(DISH, irsend.capture.decode_type); - EXPECT_EQ(DISH_BITS, irsend.capture.bits); + EXPECT_EQ(kDishBits, irsend.capture.bits); EXPECT_EQ(0x9C00, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -310,12 +316,13 @@ TEST(TestDecodeDish, FailToDecodeNonDishExample) { irsend.reset(); // Modified a few entries to unexpected values, based on previous test case. - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeDISH(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeDISH(&irsend.capture, DISH_BITS, false)); + ASSERT_FALSE(irrecv.decodeDISH(&irsend.capture, kDishBits, false)); } diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Electra_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Electra_test.cpp new file mode 100644 index 000000000..df5dd7a5c --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Electra_test.cpp @@ -0,0 +1,98 @@ +// Copyright 2018 David Conran + +#include "IRrecv.h" +#include "IRrecv_test.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendElectraAC(). + +// Test sending typical data only. +TEST(TestSendElectraAC, SendDataOnly) { + IRsendTest irsend(0); + irsend.begin(); + uint8_t data[kElectraAcStateLength] = {0xC3, 0xE1, 0x6F, 0x14, 0x06, + 0x00, 0x04, 0x00, 0x00, 0x04, + 0x00, 0xA0, 0xB0}; + + irsend.sendElectraAC(data); + EXPECT_EQ( + "m9166s4470" + "m646s1647m646s1647m646s547m646s547m646s547m646s547m646s1647m646s1647" + "m646s1647m646s1647m646s1647m646s547m646s547m646s547m646s547m646s1647" + "m646s547m646s1647m646s1647m646s547m646s1647m646s1647m646s1647m646s1647" + "m646s547m646s547m646s547m646s1647m646s547m646s1647m646s547m646s547" + "m646s547m646s547m646s547m646s547m646s547m646s1647m646s1647m646s547" + "m646s547m646s547m646s547m646s547m646s547m646s547m646s547m646s547" + "m646s547m646s547m646s547m646s547m646s547m646s1647m646s547m646s547" + "m646s547m646s547m646s547m646s547m646s547m646s547m646s547m646s547" + "m646s547m646s547m646s547m646s547m646s547m646s547m646s547m646s547" + "m646s547m646s547m646s547m646s547m646s547m646s1647m646s547m646s547" + "m646s547m646s547m646s547m646s547m646s547m646s547m646s547m646s547" + "m646s1647m646s547m646s1647m646s547m646s547m646s547m646s547m646s547" + "m646s1647m646s547m646s1647m646s1647m646s547m646s547m646s547m646s547" + "m646s100000", + irsend.outputStr()); +} + +// Tests for decodeElectraAC(). +// Decode normal ElectraAC messages. + +TEST(TestDecodeElectraAC, SyntheticDecode) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Synthesised Normal ElectraAC message. + irsend.reset(); + uint8_t expectedState[kElectraAcStateLength] = {0xC3, 0xE1, 0x6F, 0x14, 0x06, + 0x00, 0x04, 0x00, 0x00, 0x04, + 0x00, 0xA0, 0xB0}; + irsend.sendElectraAC(expectedState); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(ELECTRA_AC, irsend.capture.decode_type); + EXPECT_EQ(kElectraAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); +} + +// Decode a recorded example +TEST(TestDecodeElectraAC, RealExampleDecode) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Real ElectraAC message. + // Ref: https://github.com/markszabo/IRremoteESP8266/issues/527 + uint16_t rawData[211] = { + 9166, 4470, 642, 1632, 642, 1632, 668, 534, 666, 534, 668, 534, + 614, 536, 640, 1636, 640, 1646, 694, 1662, 612, 1628, 642, 1666, + 664, 532, 668, 534, 666, 534, 666, 532, 666, 1644, 642, 532, + 640, 1634, 668, 1632, 642, 538, 666, 1660, 610, 1666, 664, 1632, + 642, 1672, 610, 536, 666, 534, 694, 532, 666, 1636, 614, 538, + 666, 1632, 642, 536, 666, 544, 692, 534, 640, 558, 640, 534, + 640, 540, 666, 534, 638, 1666, 638, 1636, 640, 550, 666, 534, + 640, 540, 666, 534, 640, 540, 666, 536, 638, 540, 666, 536, + 638, 550, 664, 536, 638, 540, 664, 536, 638, 540, 666, 534, + 638, 1640, 664, 536, 692, 546, 664, 536, 664, 536, 664, 536, + 664, 546, 612, 532, 636, 538, 664, 536, 664, 546, 612, 538, + 638, 538, 638, 538, 664, 536, 690, 538, 662, 538, 664, 538, + 662, 548, 664, 536, 662, 538, 662, 562, 638, 564, 636, 564, + 636, 1668, 582, 556, 652, 572, 612, 568, 636, 564, 610, 570, + 636, 556, 616, 550, 656, 566, 610, 570, 632, 578, 608, 1640, + 662, 562, 642, 1686, 582, 570, 634, 566, 604, 576, 636, 566, + 610, 578, 634, 1664, 584, 590, 660, 1636, 610, 1642, 664, 590, + 610, 590, 636, 566, 634, 568, 686}; // UNKNOWN 9AD8CDB5 + uint8_t expectedState[kElectraAcStateLength] = {0xC3, 0xE1, 0x6F, 0x14, 0x06, + 0x00, 0x04, 0x00, 0x00, 0x04, + 0x00, 0xA0, 0xB0}; + + irsend.reset(); + irsend.sendRaw(rawData, 211, 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(ELECTRA_AC, irsend.capture.decode_type); + EXPECT_EQ(kElectraAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Fujitsu_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Fujitsu_test.cpp new file mode 100644 index 000000000..23fa3e7a7 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Fujitsu_test.cpp @@ -0,0 +1,555 @@ +// Copyright 2017 Jonny Graham, David Conran + +#include "IRrecv_test.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "ir_Fujitsu.h" +#include "gtest/gtest.h" + +template +::testing::AssertionResult ArraysMatch(const T (&expected)[size], + const T* actual) { + for (size_t i(0); i < size; ++i) { + if (expected[i] != actual[i]) { + int e = expected[i]; + int a = actual[i]; + return ::testing::AssertionFailure() << "array[" << i + << "] (" << std::hex << a << std::dec << ") != expected[" << i + << "] (" << std::hex << e << std::dec << ")"; + } + } + return ::testing::AssertionSuccess(); +} +// Tests for Fujitsu A/C methods. + +// Test sending typical data only. +TEST(TestIRFujitsuACClass, GetRawDefault) { + IRFujitsuAC fujitsu = IRFujitsuAC(4); // AR-RAH2E + fujitsu.setCmd(kFujitsuAcCmdTurnOn); + fujitsu.setSwing(kFujitsuAcSwingBoth); + fujitsu.setMode(kFujitsuAcModeCool); + fujitsu.setFanSpeed(kFujitsuAcFanHigh); + fujitsu.setTemp(24); + uint8_t expected_arrah2e[16] = { + 0x14, 0x63, 0x00, 0x10, 0x10, 0xFE, 0x09, 0x30, + 0x81, 0x01, 0x31, 0x00, 0x00, 0x00, 0x20, 0xFD}; + EXPECT_TRUE(ArraysMatch(expected_arrah2e, fujitsu.getRaw())); + EXPECT_EQ(kFujitsuAcStateLength, fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 24C, Fan: 1 (HIGH), " + "Swing: Vert + Horiz, Command: N/A", fujitsu.toString()); + + uint8_t expected_ardb1[15] = { + 0x14, 0x63, 0x00, 0x10, 0x10, 0xFC, 0x08, 0x30, + 0x81, 0x01, 0x31, 0x00, 0x00, 0x00, 0x1D}; + fujitsu.setModel(ARDB1); + EXPECT_TRUE(ArraysMatch(expected_ardb1, fujitsu.getRaw())); + EXPECT_EQ(kFujitsuAcStateLength - 1, fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 24C, Fan: 1 (HIGH), " + "Swing: Vert + Horiz, Command: N/A", fujitsu.toString()); +} + +TEST(TestIRFujitsuACClass, GetRawTurnOff) { + IRFujitsuAC fujitsu = IRFujitsuAC(4); + fujitsu.setModel(ARRAH2E); + fujitsu.off(); + uint8_t expected_arrah2e[7] = {0x14, 0x63, 0x0, 0x10, 0x10, 0x02, 0xFD}; + EXPECT_TRUE(ArraysMatch(expected_arrah2e, fujitsu.getRaw())); + EXPECT_EQ(kFujitsuAcStateLengthShort, fujitsu.getStateLength()); + EXPECT_EQ("Power: Off, Mode: 1 (COOL), Temp: 24C, Fan: 1 (HIGH), " + "Swing: Vert + Horiz, Command: N/A", fujitsu.toString()); + + fujitsu.setModel(ARDB1); + uint8_t expected_ardb1[6] = {0x14, 0x63, 0x0, 0x10, 0x10, 0x02}; + EXPECT_TRUE(ArraysMatch(expected_ardb1, fujitsu.getRaw())); + EXPECT_EQ(kFujitsuAcStateLengthShort - 1, fujitsu.getStateLength()); + EXPECT_EQ("Power: Off, Mode: 1 (COOL), Temp: 24C, Fan: 1 (HIGH), " + "Swing: Vert + Horiz, Command: N/A", fujitsu.toString()); +} + +TEST(TestIRFujitsuACClass, GetRawStepHoriz) { + IRFujitsuAC fujitsu = IRFujitsuAC(4); + fujitsu.stepHoriz(); + uint8_t expected[7] = {0x14, 0x63, 0x0, 0x10, 0x10, 0x79, 0x86}; + EXPECT_TRUE(ArraysMatch(expected, fujitsu.getRaw())); + EXPECT_EQ(kFujitsuAcStateLengthShort, fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 24C, Fan: 1 (HIGH), " + "Swing: Vert + Horiz, Command: Step vane horizontally", + fujitsu.toString()); +} + +TEST(TestIRFujitsuACClass, GetRawStepVert) { + IRFujitsuAC fujitsu = IRFujitsuAC(4); + fujitsu.setModel(ARRAH2E); + fujitsu.stepVert(); + uint8_t expected_arrah2e[7] = {0x14, 0x63, 0x0, 0x10, 0x10, 0x6C, 0x93}; + EXPECT_TRUE(ArraysMatch(expected_arrah2e, fujitsu.getRaw())); + EXPECT_EQ(kFujitsuAcStateLengthShort, fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 24C, Fan: 1 (HIGH), " + "Swing: Vert + Horiz, Command: Step vane vertically", + fujitsu.toString()); + + fujitsu.setModel(ARDB1); + fujitsu.stepVert(); + uint8_t expected_ardb1[6] = {0x14, 0x63, 0x0, 0x10, 0x10, 0x6C}; + EXPECT_TRUE(ArraysMatch(expected_ardb1, fujitsu.getRaw())); + EXPECT_EQ(kFujitsuAcStateLengthShort - 1, + fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 24C, Fan: 1 (HIGH), " + "Swing: Vert + Horiz, Command: Step vane vertically", + fujitsu.toString()); +} + +TEST(TestIRFujitsuACClass, GetRawWithSwingHoriz) { + IRFujitsuAC fujitsu = IRFujitsuAC(4); + fujitsu.setCmd(kFujitsuAcCmdStayOn); + fujitsu.setSwing(kFujitsuAcSwingHoriz); + fujitsu.setMode(kFujitsuAcModeCool); + fujitsu.setFanSpeed(kFujitsuAcFanQuiet); + fujitsu.setTemp(25); + uint8_t expected[16] = {0x14, 0x63, 0x0, 0x10, 0x10, 0xFE, 0x9, 0x30, + 0x90, 0x1, 0x24, 0x0, 0x0, 0x0, 0x20, 0xFB}; + EXPECT_TRUE(ArraysMatch(expected, fujitsu.getRaw())); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 25C, Fan: 4 (QUIET), " + "Swing: Horiz, Command: N/A", + fujitsu.toString()); +} + +TEST(TestIRFujitsuACClass, GetRawWithFan) { + IRFujitsuAC fujitsu = IRFujitsuAC(4); + fujitsu.setCmd(kFujitsuAcCmdStayOn); + fujitsu.setSwing(kFujitsuAcSwingHoriz); + fujitsu.setMode(kFujitsuAcModeFan); + fujitsu.setFanSpeed(kFujitsuAcFanMed); + fujitsu.setTemp(20); // temp doesn't matter for fan + // but it is sent by the RC anyway + fujitsu.setModel(ARRAH2E); + uint8_t expected_arrah2e[16] = { + 0x14, 0x63, 0x0, 0x10, 0x10, 0xFE, 0x9, 0x30, + 0x40, 0x3, 0x22, 0x0, 0x0, 0x0, 0x20, 0x4B}; + EXPECT_TRUE(ArraysMatch(expected_arrah2e, fujitsu.getRaw())); + EXPECT_EQ(kFujitsuAcStateLength, fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 3 (FAN), Temp: 20C, Fan: 2 (MED), Swing: Horiz, " + "Command: N/A", fujitsu.toString()); + + fujitsu.setModel(ARDB1); + uint8_t expected_ardb1[15] = { + 0x14, 0x63, 0x0, 0x10, 0x10, 0xFC, 0x8, 0x30, + 0x40, 0x3, 0x22, 0x0, 0x0, 0x0, 0x6B}; + EXPECT_TRUE(ArraysMatch(expected_ardb1, fujitsu.getRaw())); + EXPECT_EQ(kFujitsuAcStateLength - 1, fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 3 (FAN), Temp: 20C, Fan: 2 (MED), Swing: Horiz, " + "Command: N/A", fujitsu.toString()); +} + +TEST(TestIRFujitsuACClass, SetRaw) { + IRFujitsuAC fujitsu = IRFujitsuAC(0); + EXPECT_EQ(kFujitsuAcStateLength, fujitsu.getStateLength()); + uint8_t expected_default_arrah2e[kFujitsuAcStateLength] = { + 0x14, 0x63, 0x00, 0x10, 0x10, 0xFE, 0x09, 0x30, + 0x81, 0x01, 0x31, 0x00, 0x00, 0x00, 0x20, 0xFD}; + EXPECT_TRUE(ArraysMatch(expected_default_arrah2e, fujitsu.getRaw())); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 24C, Fan: 1 (HIGH), " + "Swing: Vert + Horiz, Command: N/A", fujitsu.toString()); + // Now set a new state via setRaw(); + // This state is a real state from an AR-DB1 remote. + uint8_t new_state1[kFujitsuAcStateLength - 1] = { + 0x14, 0x63, 0x00, 0x10, 0x10, 0xFC, 0x08, 0x30, + 0x30, 0x01, 0x00, 0x00, 0x00, 0x00, 0x9F}; + fujitsu.setRaw(new_state1, kFujitsuAcStateLength - 1); + EXPECT_EQ(kFujitsuAcStateLength - 1, fujitsu.getStateLength()); + EXPECT_TRUE(ArraysMatch(new_state1, fujitsu.getRaw())); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 19C, Fan: 0 (AUTO), " + "Swing: Off, Command: N/A", fujitsu.toString()); +} + +TEST(TestSendFujitsuAC, GenerateMessage) { + IRFujitsuAC fujitsu = IRFujitsuAC(4); + IRsendTest irsend(4); + fujitsu.begin(); + irsend.begin(); + + fujitsu.setCmd(kFujitsuAcCmdStayOn); + fujitsu.setSwing(kFujitsuAcSwingBoth); + fujitsu.setMode(kFujitsuAcModeCool); + fujitsu.setFanSpeed(kFujitsuAcFanHigh); + fujitsu.setTemp(24); + + EXPECT_EQ(kFujitsuAcFanHigh, fujitsu.getFanSpeed()); + EXPECT_EQ(kFujitsuAcModeCool, fujitsu.getMode()); + EXPECT_EQ(24, fujitsu.getTemp()); + EXPECT_EQ(kFujitsuAcSwingBoth, fujitsu.getSwing()); + EXPECT_EQ(kFujitsuAcCmdStayOn, fujitsu.getCmd()); + + irsend.reset(); + irsend.sendFujitsuAC(fujitsu.getRaw(), kFujitsuAcStateLength); + EXPECT_EQ( + "m3324s1574" + "m448s390m448s390m448s1182m448s390m448s1182m448s390m448s390m448s390" + "m448s1182m448s1182m448s390m448s390m448s390m448s1182m448s1182m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s1182m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s1182m448s390m448s390m448s390" + "m448s390m448s1182m448s1182m448s1182m448s1182m448s1182m448s1182m448s1182" + "m448s1182m448s390m448s390m448s1182m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s1182m448s1182m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s1182" + "m448s1182m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + "m448s1182m448s390m448s390m448s390m448s1182m448s1182m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s1182m448s390m448s390" + "m448s390m448s1182m448s1182m448s1182m448s1182m448s1182m448s1182m448s1182" + "m448s8100", + irsend.outputStr()); +} + +TEST(TestSendFujitsuAC, GenerateShortMessage) { + IRFujitsuAC fujitsu = IRFujitsuAC(4); + IRsendTest irsend(4); + fujitsu.begin(); + irsend.begin(); + + fujitsu.off(); + + EXPECT_EQ(kFujitsuAcCmdTurnOff, fujitsu.getCmd()); + + irsend.reset(); + irsend.sendFujitsuAC(fujitsu.getRaw(), kFujitsuAcStateLengthShort); + EXPECT_EQ( + "m3324s1574m448s390m448s390m448s1182m448s390m448s1182m448s390m448s390m448" + "s390m448s1182m448s1182m448s390m448s390m448s390m448s1182m448s1182m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s1182m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s1182m448s390m448s390m448s390m448s390m448s1182m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s1182m448s390m448s1182m448" + "s1182m448s1182m448s1182m448s1182m448s1182m448s8100", + irsend.outputStr()); +} + +// Issue #275 +TEST(TestSendFujitsuAC, Issue275) { + IRFujitsuAC fujitsu = IRFujitsuAC(4); + IRsendTest irsend(4); + fujitsu.begin(); + irsend.begin(); + irsend.reset(); + + fujitsu.setCmd(kFujitsuAcCmdTurnOff); + irsend.sendFujitsuAC(fujitsu.getRaw(), kFujitsuAcStateLengthShort); + EXPECT_EQ( + // Header + "m3324s1574" + // 0 0 1 0 1 0 0 0 (0x28) + "m448s390m448s390m448s1182m448s390m448s1182m448s390m448s390m448s390" + // 1 1 0 0 0 1 1 0 (0xC6) + "m448s1182m448s1182m448s390m448s390m448s390m448s1182m448s1182m448s390" + // 0 0 0 0 0 0 0 0 (0x00) + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + // 0 0 0 0 1 0 0 0 (0x08) + "m448s390m448s390m448s390m448s390m448s1182m448s390m448s390m448s390" + // 0 0 0 0 1 0 0 0 (0x08) + "m448s390m448s390m448s390m448s390m448s1182m448s390m448s390m448s390" + // 0 1 0 0 0 0 0 0 (0x40) + "m448s390m448s1182m448s390m448s390m448s390m448s390m448s390m448s390" + // 1 0 1 1 1 1 1 1 (0xBF) + "m448s1182m448s390m448s1182m448s1182m448s1182m448s1182m448s1182m448s1182" + // Footer + "m448s8100", irsend.outputStr()); + + irsend.reset(); + // Per report in Issue #275 + uint16_t off[115] = { + 3350, 1650, + 450, 400, 450, 450, 450, 1250, 450, 400, 450, 1250, 450, 400, 450, 400, + 450, 400, 450, 1250, 450, 1250, 450, 400, 450, 400, 450, 400, 450, 1250, + 450, 1250, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, + 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, + 450, 1250, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, + 450, 400, 450, 1250, 450, 400, 450, 400, 450, 400, 450, 400, 450, 1250, + 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 400, 450, 1250, + 450, 400, 450, 1250, 450, 1250, 450, 1250, 450, 1250, 450, 1250, + 450, 1250, 450}; + irsend.sendRaw(off, 115, 38); + EXPECT_EQ( + // Header + "m3350s1650" + // 0 0 1 0 1 0 0 0 (0x28) + "m450s400m450s450m450s1250m450s400m450s1250m450s400m450s400m450s400" + // 1 1 0 0 0 1 1 0 (0xC6) + "m450s1250m450s1250m450s400m450s400m450s400m450s1250m450s1250m450s400" + // 0 0 0 0 0 0 0 0 (0x00) + "m450s400m450s400m450s400m450s400m450s400m450s400m450s400m450s400" + // 0 0 0 0 1 0 0 0 (0x08) + "m450s400m450s400m450s400m450s400m450s1250m450s400m450s400m450s400" + // 0 0 0 0 1 0 0 0 (0x08) + "m450s400m450s400m450s400m450s400m450s1250m450s400m450s400m450s400" + // 0 1 0 0 0 0 0 0 (0x40) + "m450s400m450s1250m450s400m450s400m450s400m450s400m450s400m450s400" + // 1 0 1 1 1 1 1 1 (0xBF) + "m450s1250m450s400m450s1250m450s1250m450s1250m450s1250m450s1250m450s1250" + // Footer + "m450", + irsend.outputStr()); +} + +TEST(TestDecodeFujitsuAC, SyntheticShortMessages) { + IRsendTest irsend(0); + IRFujitsuAC fujitsu = IRFujitsuAC(0); + IRrecv irrecv(0); + + irsend.begin(); + irsend.reset(); + + fujitsu.setModel(ARRAH2E); + fujitsu.setCmd(kFujitsuAcCmdTurnOff); + irsend.sendFujitsuAC(fujitsu.getRaw(), fujitsu.getStateLength()); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(FUJITSU_AC, irsend.capture.decode_type); + ASSERT_EQ(kFujitsuAcMinBits + 8, irsend.capture.bits); + uint8_t expected_arrah2e[7] = {0x14, 0x63, 0x0, 0x10, 0x10, 0x02, 0xFD}; + EXPECT_TRUE(ArraysMatch(expected_arrah2e, irsend.capture.state)); + + irsend.reset(); + + fujitsu.setModel(ARDB1); + fujitsu.setCmd(kFujitsuAcCmdTurnOff); + irsend.sendFujitsuAC(fujitsu.getRaw(), fujitsu.getStateLength()); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(FUJITSU_AC, irsend.capture.decode_type); + ASSERT_EQ(kFujitsuAcMinBits, irsend.capture.bits); + uint8_t expected_ardb1[6] = {0x14, 0x63, 0x0, 0x10, 0x10, 0x02}; + EXPECT_TRUE(ArraysMatch(expected_ardb1, irsend.capture.state)); +} + +TEST(TestDecodeFujitsuAC, SyntheticLongMessages) { + IRsendTest irsend(0); + IRFujitsuAC fujitsu = IRFujitsuAC(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + + fujitsu.setModel(ARRAH2E); + fujitsu.setCmd(kFujitsuAcCmdStayOn); + fujitsu.setSwing(kFujitsuAcSwingVert); + fujitsu.setMode(kFujitsuAcModeCool); + fujitsu.setFanSpeed(kFujitsuAcFanQuiet); + fujitsu.setTemp(18); + irsend.sendFujitsuAC(fujitsu.getRaw(), fujitsu.getStateLength()); + ASSERT_EQ(kFujitsuAcStateLength, fujitsu.getStateLength()); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decodeFujitsuAC(&irsend.capture)); + ASSERT_EQ(FUJITSU_AC, irsend.capture.decode_type); + ASSERT_EQ(kFujitsuAcBits, irsend.capture.bits); + uint8_t expected_arrah2e[kFujitsuAcStateLength] = { + 0x14, 0x63, 0x00, 0x10, 0x10, 0xFE, 0x09, 0x30, + 0x20, 0x01, 0x14, 0x00, 0x00, 0x00, 0x20, 0x7B}; + EXPECT_TRUE(ArraysMatch(expected_arrah2e, irsend.capture.state)); + fujitsu.setRaw(irsend.capture.state, irsend.capture.bits / 8); + EXPECT_EQ(kFujitsuAcStateLength, fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 18C, Fan: 4 (QUIET), " + "Swing: Vert, Command: N/A", fujitsu.toString()); + + irsend.reset(); + + fujitsu.setModel(ARDB1); + irsend.sendFujitsuAC(fujitsu.getRaw(), fujitsu.getStateLength()); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(FUJITSU_AC, irsend.capture.decode_type); + ASSERT_EQ(kFujitsuAcBits - 8, irsend.capture.bits); + uint8_t expected_ardb1[kFujitsuAcStateLength - 1] = { + 0x14, 0x63, 0x00, 0x10, 0x10, 0xFC, 0x08, 0x30, + 0x20, 0x01, 0x14, 0x00, 0x00, 0x00, 0x9B}; + EXPECT_TRUE(ArraysMatch(expected_ardb1, irsend.capture.state)); + fujitsu.setRaw(irsend.capture.state, irsend.capture.bits / 8); + EXPECT_EQ(kFujitsuAcStateLength - 1, fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 18C, Fan: 4 (QUIET), " + "Swing: Vert, Command: N/A", fujitsu.toString()); +} + +TEST(TestDecodeFujitsuAC, RealShortARDB1OffExample) { + IRsendTest irsend(0); + IRrecv irrecv(0); + IRFujitsuAC fujitsu = IRFujitsuAC(0); + + irsend.begin(); + + irsend.reset(); + // "Off" Message recorded from an AR-DB1 remote. + uint16_t rawData[99] = { + 3310, 1636, 440, 386, 440, 394, 442, 1210, 442, 390, 414, 1220, + 444, 390, 446, 380, 446, 380, 436, 1216, 438, 1214, 438, 388, + 438, 386, 438, 396, 410, 1222, 440, 1220, 442, 384, 442, 384, + 442, 384, 442, 382, 444, 382, 442, 382, 444, 380, 446, 380, + 446, 380, 444, 380, 436, 390, 436, 388, 436, 388, 438, 1214, + 438, 386, 438, 388, 438, 386, 440, 386, 440, 384, 442, 384, + 442, 384, 442, 1210, 444, 382, 444, 382, 444, 382, 444, 380, + 446, 1206, 436, 390, 436, 388, 436, 388, 438, 388, 438, 396, + 420, 388, 436}; + irsend.sendRaw(rawData, 99, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(FUJITSU_AC, irsend.capture.decode_type); + ASSERT_EQ(kFujitsuAcMinBits, irsend.capture.bits); + uint8_t expected[6] = {0x14, 0x63, 0x0, 0x10, 0x10, 0x02}; + EXPECT_TRUE(ArraysMatch(expected, irsend.capture.state)); + fujitsu.setRaw(irsend.capture.state, irsend.capture.bits / 8); + EXPECT_EQ(kFujitsuAcStateLengthShort - 1, fujitsu.getStateLength()); + EXPECT_EQ("Power: Off, Mode: 0 (AUTO), Temp: 16C, Fan: 0 (AUTO), " + "Swing: Off, Command: N/A", fujitsu.toString()); +} + +TEST(TestDecodeFujitsuAC, RealLongARDB1Example) { + IRsendTest irsend(0); + IRrecv irrecv(0); + IRFujitsuAC fujitsu = IRFujitsuAC(0); + + irsend.begin(); + irsend.reset(); + uint16_t rawData1[243] = { + 3316, 1632, 444, 390, 438, 388, 436, 1216, 438, 388, 438, 1214, + 438, 388, 438, 386, 440, 386, 440, 1212, 440, 1210, 442, 392, + 412, 396, 442, 392, 444, 1208, 444, 1208, 444, 380, 444, 380, + 446, 380, 436, 390, 436, 390, 436, 390, 436, 388, 438, 388, + 438, 388, 438, 388, 438, 386, 438, 386, 440, 384, 440, 1210, + 442, 384, 442, 382, 442, 384, 442, 384, 442, 382, 442, 382, + 444, 382, 444, 1208, 444, 382, 444, 380, 446, 380, 436, 390, + 436, 390, 436, 1214, 438, 1214, 438, 1212, 440, 1212, 440, 1220, + 412, 1222, 440, 394, 442, 382, 442, 382, 444, 1208, 444, 382, + 444, 380, 446, 380, 446, 380, 434, 390, 436, 388, 438, 388, + 438, 388, 438, 1214, 438, 1212, 440, 386, 440, 394, 412, 1222, + 440, 394, 442, 384, 442, 384, 442, 382, 442, 1208, 444, 390, + 414, 394, 442, 1216, 446, 380, 436, 390, 436, 390, 436, 388, + 436, 390, 436, 388, 438, 386, 440, 386, 440, 386, 438, 1212, + 440, 386, 440, 384, 440, 384, 442, 392, 412, 396, 440, 394, + 442, 382, 444, 382, 444, 382, 444, 380, 444, 380, 444, 382, + 444, 380, 446, 380, 436, 388, 436, 390, 436, 388, 438, 388, + 438, 388, 438, 388, 438, 386, 440, 386, 440, 386, 442, 384, + 440, 386, 442, 384, 440, 384, 442, 384, 442, 382, 442, 382, + 444, 1208, 444, 382, 444, 1208, 444, 380, 446, 1206, 436, 390, + 436, 1216, 436}; + irsend.sendRaw(rawData1, 243, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(FUJITSU_AC, irsend.capture.decode_type); + ASSERT_EQ(kFujitsuAcBits - 8, irsend.capture.bits); + uint8_t expected1[kFujitsuAcStateLength - 1] = { + 0x14, 0x63, 0x00, 0x10, 0x10, 0xFC, 0x08, 0x30, + 0x21, 0x01, 0x04, 0x00, 0x00, 0x00, 0xAA}; + EXPECT_TRUE(ArraysMatch(expected1, irsend.capture.state)); + fujitsu.setRaw(irsend.capture.state, irsend.capture.bits / 8); + EXPECT_EQ(kFujitsuAcStateLength - 1, fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 18C, Fan: 4 (QUIET), " + "Swing: Off, Command: N/A", fujitsu.toString()); + + irsend.reset(); + uint16_t rawData2[243] = { + 3316, 1630, 436, 398, 438, 386, 438, 1212, 440, 384, 440, 1212, + 442, 384, 442, 392, 414, 394, 442, 1218, 446, 1206, 436, 390, + 436, 388, 438, 388, 438, 1214, 440, 1212, 440, 384, 442, 384, + 442, 384, 442, 382, 444, 382, 444, 382, 444, 380, 446, 380, + 444, 380, 436, 390, 436, 388, 438, 396, 418, 388, 438, 1232, + 410, 396, 440, 394, 442, 384, 442, 384, 442, 382, 442, 392, + 414, 392, 444, 1216, 446, 380, 436, 390, 436, 396, 418, 390, + 436, 398, 438, 1214, 440, 1212, 440, 1210, 442, 1208, 444, 1216, + 416, 1218, 444, 388, 436, 390, 436, 388, 438, 1214, 440, 386, + 438, 386, 440, 386, 440, 384, 442, 384, 442, 384, 442, 382, + 444, 382, 444, 1206, 446, 1206, 436, 390, 436, 388, 438, 388, + 438, 386, 440, 394, 410, 396, 440, 1220, 442, 1210, 442, 392, + 414, 394, 442, 1218, 446, 406, 410, 388, 436, 390, 436, 390, + 436, 388, 438, 386, 440, 386, 440, 386, 440, 386, 440, 384, + 442, 384, 442, 384, 442, 382, 444, 382, 444, 380, 446, 380, + 446, 380, 436, 390, 436, 390, 436, 388, 438, 386, 438, 388, + 438, 386, 440, 386, 440, 384, 442, 384, 442, 384, 442, 384, + 442, 382, 444, 382, 444, 380, 446, 380, 446, 380, 436, 390, + 436, 388, 436, 388, 438, 386, 438, 386, 440, 386, 440, 1212, + 440, 1210, 442, 1210, 442, 1208, 444, 1208, 436, 390, 436, 388, + 436, 1214, 440}; + irsend.sendRaw(rawData2, 243, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(FUJITSU_AC, irsend.capture.decode_type); + ASSERT_EQ(kFujitsuAcBits - 8, irsend.capture.bits); + uint8_t expected2[kFujitsuAcStateLength - 1] = { + 0x14, 0x63, 0x00, 0x10, 0x10, 0xFC, 0x08, 0x30, + 0x30, 0x01, 0x00, 0x00, 0x00, 0x00, 0x9F}; + EXPECT_TRUE(ArraysMatch(expected2, irsend.capture.state)); + fujitsu.setRaw(irsend.capture.state, irsend.capture.bits / 8); + EXPECT_EQ(kFujitsuAcStateLength - 1, fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 19C, Fan: 0 (AUTO), " + "Swing: Off, Command: N/A", fujitsu.toString()); +} + +TEST(TestDecodeFujitsuAC, Issue414) { + IRsendTest irsend(0); + IRrecv irrecv(0); + IRFujitsuAC fujitsu = IRFujitsuAC(0); + + // Capture as supplied by arpmota + uint16_t rawData[259] = {3352, 1574, 480, 350, 480, 346, 480, 1190, 458, 346, + 508, 1140, 480, 346, 506, 346, 458, 346, 480, 1168, 480, 1192, 452, 374, + 458, 346, 480, 346, 508, 1168, 480, 1140, 480, 346, 506, 346, 458, 346, + 480, 346, 480, 346, 480, 346, 484, 372, 454, 374, 456, 346, 508, 318, + 480, 374, 458, 374, 480, 318, 480, 1196, 452, 346, 480, 346, 484, 342, + 484, 346, 480, 374, 458, 346, 506, 318, 508, 1170, 452, 346, 480, 374, + 458, 346, 506, 318, 480, 1196, 452, 1190, 458, 1162, 480, 1196, 452, + 1170, 480, 1190, 458, 1164, 480, 1196, 480, 318, 508, 346, 456, 1192, + 480, 346, 456, 374, 452, 346, 480, 374, 458, 342, 484, 346, 508, 346, + 456, 342, 512, 1164, 458, 1164, 508, 346, 456, 346, 480, 1190, 456, 342, + 484, 346, 506, 346, 456, 374, 452, 346, 508, 346, 458, 1164, 508, 346, + 458, 374, 452, 1168, 480, 374, 480, 318, 480, 374, 456, 346, 508, 318, + 480, 346, 484, 374, 480, 318, 484, 342, 484, 374, 480, 318, 484, 342, + 484, 346, 508, 318, 508, 346, 458, 346, 506, 318, 480, 374, 458, 346, + 506, 318, 480, 346, 484, 374, 480, 318, 482, 372, 456, 346, 508, 318, + 506, 348, 456, 342, 484, 346, 508, 318, 484, 374, 480, 318, 508, 318, + 484, 346, 508, 318, 480, 374, 456, 346, 508, 346, 480, 318, 480, 346, + 484, 374, 480, 320, 484, 1164, 508, 346, 458, 342, 512, 1164, 458, 1190, + 454, 346, 484, 1164, 508, 346, 458, 1164, 480, 350, 480, 374, 480}; + uint8_t state[16] = { + 0x14, 0x63, 0x00, 0x10, 0x10, 0xFE, 0x09, 0x30, 0x81, 0x04, 0x00, 0x00, + 0x00, 0x00, 0x20, 0x2B}; + irsend.begin(); + irsend.reset(); + irsend.sendRaw(rawData, 259, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(FUJITSU_AC, irsend.capture.decode_type); + ASSERT_EQ(kFujitsuAcBits, irsend.capture.bits); + EXPECT_TRUE(ArraysMatch(state, irsend.capture.state)); + fujitsu.setRaw(irsend.capture.state, irsend.capture.bits / 8); + EXPECT_EQ(kFujitsuAcStateLength, fujitsu.getStateLength()); + EXPECT_EQ("Power: On, Mode: 4 (HEAT), Temp: 24C, Fan: 0 (AUTO), " + "Swing: Off, Command: N/A", fujitsu.toString()); + + // Resend it using the state this time. + irsend.reset(); + irsend.sendFujitsuAC(state, 16); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(FUJITSU_AC, irsend.capture.decode_type); + ASSERT_EQ(kFujitsuAcBits, irsend.capture.bits); + EXPECT_TRUE(ArraysMatch(state, irsend.capture.state)); + EXPECT_EQ( + "m3324s1574" + "m448s390m448s390m448s1182m448s390m448s1182m448s390m448s390m448s390" + "m448s1182m448s1182m448s390m448s390m448s390m448s1182m448s1182m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s1182m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s1182m448s390m448s390m448s390" + "m448s390m448s1182m448s1182m448s1182m448s1182m448s1182m448s1182m448s1182" + "m448s1182m448s390m448s390m448s1182m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s1182m448s1182m448s390m448s390" + "m448s1182m448s390m448s390m448s390m448s390m448s390m448s390m448s1182" + "m448s390m448s390m448s1182m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s390m448s390m448s390" + "m448s390m448s390m448s390m448s390m448s390m448s1182m448s390m448s390" + "m448s1182m448s1182m448s390m448s1182m448s390m448s1182m448s390m448s390" + "m448s8100", irsend.outputStr()); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_GICable_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_GICable_test.cpp new file mode 100644 index 000000000..b9bfce997 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_GICable_test.cpp @@ -0,0 +1,161 @@ +// Copyright 2018 David Conran + +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendGICable(). + +// Test sending typical data only. +TEST(TestSendGICable, SendDataOnly) { + IRsendTest irsend(0); + irsend.begin(); + irsend.sendGICable(0); + EXPECT_EQ( + "m9000s4400" + "m550s2200m550s2200m550s2200m550s2200m550s2200m550s2200m550s2200m550s2200" + "m550s2200m550s2200m550s2200m550s2200m550s2200m550s2200m550s2200m550s2200" + "m550s41650" + "m9000s2200m550s87850", + irsend.outputStr()); + irsend.sendGICable(0x8807); + EXPECT_EQ( + "m9000s4400" + "m550s4400m550s2200m550s2200m550s2200m550s4400m550s2200m550s2200m550s2200" + "m550s2200m550s2200m550s2200m550s2200m550s2200m550s4400m550s4400m550s4400" + "m550s30650" + "m9000s2200m550s87850", + irsend.outputStr()); + irsend.sendGICable(0xFFFF); + EXPECT_EQ( + "m9000s4400" + "m550s4400m550s4400m550s4400m550s4400m550s4400m550s4400m550s4400m550s4400" + "m550s4400m550s4400m550s4400m550s4400m550s4400m550s4400m550s4400m550s4400" + "m550s6450" + "m9000s2200m550s87850", + irsend.outputStr()); +} + +// Test sending with repeats. +TEST(TestSendGICable, SendWithRepeats) { + IRsendTest irsend(0); + irsend.begin(); + // Send a command with 0 repeats. + irsend.sendGICable(0x8807, kGicableBits, 0); + EXPECT_EQ( + "m9000s4400" + "m550s4400m550s2200m550s2200m550s2200m550s4400m550s2200m550s2200m550s2200" + "m550s2200m550s2200m550s2200m550s2200m550s2200m550s4400m550s4400m550s4400" + "m550s30650", + irsend.outputStr()); + // Send a command with 1 repeat. + irsend.sendGICable(0x8807, kGicableBits, 1); + EXPECT_EQ( + "m9000s4400" + "m550s4400m550s2200m550s2200m550s2200m550s4400m550s2200m550s2200m550s2200" + "m550s2200m550s2200m550s2200m550s2200m550s2200m550s4400m550s4400m550s4400" + "m550s30650" + "m9000s2200m550s87850", + irsend.outputStr()); + // Send a command with 3 repeats. + irsend.sendGICable(0x8807, kGicableBits, 3); + EXPECT_EQ( + "m9000s4400" + "m550s4400m550s2200m550s2200m550s2200m550s4400m550s2200m550s2200m550s2200" + "m550s2200m550s2200m550s2200m550s2200m550s2200m550s4400m550s4400m550s4400" + "m550s30650" + "m9000s2200m550s87850" + "m9000s2200m550s87850" + "m9000s2200m550s87850", + irsend.outputStr()); +} + +// Tests for decodeGICable(). +// Decode normal GICable messages. +TEST(TestDecodeGICable, SyntheticDecode) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Synthesised Normal GICable message. + irsend.reset(); + irsend.sendGICable(0x8807); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(GICABLE, irsend.capture.decode_type); + EXPECT_EQ(kGicableBits, irsend.capture.bits); + EXPECT_EQ(0x8807, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); +} + +// Decode a recorded example +TEST(TestDecodeGICable, RealExampleDecodeOK) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Real GICable "OK/Select" message. + // Ref: https://github.com/markszabo/IRremoteESP8266/issues/447 + uint16_t rawData[39] = {9064, 4408, 580, 4408, 580, 2152, 578, 2150, + 580, 2150, 580, 4408, 580, 2150, 580, 2150, + 580, 2150, 580, 2150, 580, 2150, 580, 2150, + 580, 2150, 580, 2150, 580, 4408, 580, 4408, + 580, 4408, 580, 30622, 9066, 2148, 580}; + irsend.reset(); + irsend.sendRaw(rawData, 39, 39); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(GICABLE, irsend.capture.decode_type); + EXPECT_EQ(kGicableBits, irsend.capture.bits); + EXPECT_EQ(0x8807, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); +} + +TEST(TestDecodeGICable, RealExampleDecodeLEFT) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Real GICable "LEFT" message. + // Ref: https://github.com/markszabo/IRremoteESP8266/issues/447 + uint16_t rawData[39] = {9040, 4434, 554, 2176, 580, 4408, 554, 4434, + 582, 2148, 554, 4434, 580, 4408, 556, 2174, + 580, 2150, 580, 2150, 582, 2148, 556, 2176, + 580, 2150, 580, 4408, 580, 4408, 580, 4408, + 582, 2150, 580, 26078, 9066, 2148, 580}; + irsend.reset(); + irsend.sendRaw(rawData, 39, 39); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(GICABLE, irsend.capture.decode_type); + EXPECT_EQ(kGicableBits, irsend.capture.bits); + EXPECT_EQ(0x6C0E, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); +} + +TEST(TestDecodeGICable, RealExampleDecodeZEROKey) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Real GICable "Zero Key" message. + // Note: Zero key looks similar to a JVC message, hence this test. + // Ref: https://github.com/markszabo/IRremoteESP8266/issues/447 + uint16_t rawData[39] = {9036, 4434, 552, 2178, 552, 2178, 552, 2180, + 550, 2178, 552, 2178, 550, 2180, 552, 2178, + 552, 2178, 550, 2180, 552, 2178, 526, 2204, + 552, 2178, 552, 2178, 526, 2204, 526, 2204, + 526, 2204, 526, 41932, 9036, 2176, 552}; + irsend.reset(); + irsend.sendRaw(rawData, 39, 39); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(GICABLE, irsend.capture.decode_type); + EXPECT_EQ(kGicableBits, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_GlobalCache_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_GlobalCache_test.cpp new file mode 100644 index 000000000..16a556b57 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_GlobalCache_test.cpp @@ -0,0 +1,71 @@ +// Copyright 2017 David Conran + +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendGlobalCache(). + +// Test sending a typical command wihtout a repeat. +TEST(TestSendGlobalCache, NonRepeatingCode) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + irsend.reset(); + + // Modified NEC TV "Power On" from Global Cache with no repeats + uint16_t gc_test[71] = {38000, 1, 1, 342, 172, 21, 22, 21, 21, 21, 65, 21, + 21, 21, 22, 21, 22, 21, 21, 21, 22, 21, 65, 21, + 65, 21, 22, 21, 65, 21, 65, 21, 65, 21, 65, 21, + 65, 21, 65, 21, 22, 21, 22, 21, 21, 21, 22, 21, + 22, 21, 65, 21, 22, 21, 21, 21, 65, 21, 65, 21, + 65, 21, 64, 22, 65, 21, 22, 21, 65, 21, 1519}; + irsend.sendGC(gc_test, 71); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); + EXPECT_EQ(NEC, irsend.capture.decode_type); + EXPECT_EQ(kNECBits, irsend.capture.bits); + EXPECT_EQ(0x20DF827D, irsend.capture.value); + EXPECT_EQ(0x4, irsend.capture.address); + EXPECT_EQ(0x41, irsend.capture.command); + EXPECT_EQ( + "m8892s4472m546s572m546s546m546s1690m546s546m546s572m546s572" + "m546s546m546s572m546s1690m546s1690m546s572m546s1690m546s1690" + "m546s1690m546s1690m546s1690m546s1690m546s572m546s572m546s546" + "m546s572m546s572m546s1690m546s572m546s546m546s1690m546s1690" + "m546s1690m546s1664m572s1690m546s572m546s1690m546s39494", + irsend.outputStr()); +} + +// Test sending typical command with repeats. +TEST(TestSendGlobalCache, RepeatCode) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + irsend.reset(); + + // Sherwood (NEC-like) "Power On" from Global Cache with 2 repeats + uint16_t gc_test[75] = { + 38000, 2, 69, 341, 171, 21, 64, 21, 64, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 64, 21, 64, 21, 21, 21, 64, 21, 21, 21, + 21, 21, 21, 21, 64, 21, 21, 21, 64, 21, 21, 21, 21, 21, 21, + 21, 64, 21, 21, 21, 21, 21, 21, 21, 21, 21, 64, 21, 64, 21, + 64, 21, 21, 21, 64, 21, 64, 21, 64, 21, 1600, 341, 85, 21, 3647}; + irsend.sendGC(gc_test, 75); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); + EXPECT_EQ(NEC, irsend.capture.decode_type); + EXPECT_EQ(kNECBits, irsend.capture.bits); + EXPECT_EQ(0xC1A28877, irsend.capture.value); + EXPECT_EQ(0x4583, irsend.capture.address); + EXPECT_EQ(0x11, irsend.capture.command); + EXPECT_EQ( + "m8866s4446m546s1664m546s1664m546s546m546s546m546s546m546s546" + "m546s546m546s1664m546s1664m546s546m546s1664m546s546m546s546" + "m546s546m546s1664m546s546m546s1664m546s546m546s546m546s546" + "m546s1664m546s546m546s546m546s546m546s546m546s1664m546s1664" + "m546s1664m546s546m546s1664m546s1664m546s1664m546s41600" + "m8866s2210m546s94822" + "m8866s2210m546s94822", + irsend.outputStr()); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Gree_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Gree_test.cpp new file mode 100644 index 000000000..6c7a1f637 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Gree_test.cpp @@ -0,0 +1,527 @@ +// Copyright 2017 David Conran + +#include "ir_Gree.h" +#include "IRrecv.h" +#include "IRrecv_test.h" +#include "IRremoteESP8266.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendGree(). + +// Test sending typical data only. +TEST(TestSendGreeChars, SendData) { + IRsendTest irsend(4); + irsend.begin(); + + uint8_t gree_code[kGreeStateLength] = {0x12, 0x34, 0x56, 0x78, + 0x90, 0xAB, 0xCD, 0xEF}; + irsend.reset(); + irsend.sendGree(gree_code); + EXPECT_EQ( + "m9000s4000" + "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" + "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" + "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" + "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" + "m620s540m620s1600m620s540" + "m620s19000" + "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" + "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" + "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" + "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" + "m620s19000", + irsend.outputStr()); +} + +TEST(TestSendGreeUint64, SendData) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendGree(0x1234567890ABCDEF); + EXPECT_EQ( + "m9000s4000" + "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" + "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" + "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" + "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" + "m620s540m620s1600m620s540" + "m620s19000" + "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" + "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" + "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" + "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" + "m620s19000", + irsend.outputStr()); +} + +// Test sending with repeats. +TEST(TestSendGreeChars, SendWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + uint8_t gree_code[kGreeStateLength] = {0x12, 0x34, 0x56, 0x78, + 0x90, 0xAB, 0xCD, 0xEF}; + irsend.reset(); + + irsend.sendGree(gree_code, kGreeStateLength, 1); + EXPECT_EQ( + "m9000s4000" + "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" + "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" + "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" + "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" + "m620s540m620s1600m620s540" + "m620s19000" + "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" + "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" + "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" + "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" + "m620s19000" + "m9000s4000" + "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" + "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" + "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" + "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" + "m620s540m620s1600m620s540" + "m620s19000" + "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" + "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" + "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" + "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" + "m620s19000", + irsend.outputStr()); +} + +TEST(TestSendGreeUint64, SendWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendGree(0x1234567890ABCDEF, kGreeBits, 1); + EXPECT_EQ( + "m9000s4000" + "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" + "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" + "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" + "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" + "m620s540m620s1600m620s540" + "m620s19000" + "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" + "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" + "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" + "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" + "m620s19000" + "m9000s4000" + "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" + "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" + "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" + "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" + "m620s540m620s1600m620s540" + "m620s19000" + "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" + "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" + "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" + "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" + "m620s19000", + irsend.outputStr()); +} + +// Test sending atypical sizes. +TEST(TestSendGreeChars, SendUnexpectedSizes) { + IRsendTest irsend(4); + irsend.begin(); + + uint8_t gree_short_code[kGreeStateLength - 1] = {0x12, 0x34, 0x56, 0x78, + 0x90, 0xAB, 0xCD}; + uint8_t gree_long_code[kGreeStateLength + 1] = {0x12, 0x34, 0x56, 0x78, 0x90, + 0xAB, 0xCD, 0xEF, 0x12}; + irsend.reset(); + irsend.sendGree(gree_short_code, kGreeStateLength - 1); + ASSERT_EQ("", irsend.outputStr()); + + irsend.reset(); + irsend.sendGree(gree_long_code, kGreeStateLength + 1); + ASSERT_EQ( + "m9000s4000" + "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" + "m620s540m620s540m620s1600m620s540m620s1600m620s1600m620s540m620s540" + "m620s540m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540" + "m620s540m620s540m620s540m620s1600m620s1600m620s1600m620s1600m620s540" + "m620s540m620s1600m620s540" + "m620s19000" + "m620s540m620s540m620s540m620s540m620s1600m620s540m620s540m620s1600" + "m620s1600m620s1600m620s540m620s1600m620s540m620s1600m620s540m620s1600" + "m620s1600m620s540m620s1600m620s1600m620s540m620s540m620s1600m620s1600" + "m620s1600m620s1600m620s1600m620s1600m620s540m620s1600m620s1600m620s1600" + "m620s540m620s1600m620s540m620s540m620s1600m620s540m620s540m620s540" + "m620s19000", + irsend.outputStr()); +} + +TEST(TestSendGreeUint64, SendUnexpectedSizes) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendGree(0x1234567890ABCDEF, kGreeBits - 1); + ASSERT_EQ("", irsend.outputStr()); + + irsend.reset(); + irsend.sendGree(0x1234567890ABCDEF, kGreeBits + 1); + ASSERT_EQ("", irsend.outputStr()); +} + +TEST(TestSendGree, CompareUint64ToCharResults) { + IRsendTest irsend_chars(4); + IRsendTest irsend_uint64(0); + + uint8_t gree_code[kGreeStateLength] = {0x12, 0x34, 0x56, 0x78, + 0x90, 0xAB, 0xCD, 0xEF}; + + irsend_chars.begin(); + irsend_uint64.begin(); + + irsend_chars.reset(); + irsend_uint64.reset(); + irsend_chars.sendGree(gree_code); + irsend_uint64.sendGree(0x1234567890ABCDEF); + ASSERT_EQ(irsend_chars.outputStr(), irsend_uint64.outputStr()); + + uint8_t gree_zero_code[kGreeStateLength] = {0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00}; + irsend_chars.reset(); + irsend_uint64.reset(); + irsend_chars.sendGree(gree_zero_code); + irsend_uint64.sendGree((uint64_t)0x0); + ASSERT_EQ(irsend_chars.outputStr(), irsend_uint64.outputStr()); +} + +// Tests for IRGreeAC class. + +TEST(TestGreeClass, Power) { + IRGreeAC irgree(0); + irgree.begin(); + + irgree.on(); + EXPECT_TRUE(irgree.getPower()); + + irgree.off(); + EXPECT_FALSE(irgree.getPower()); + + irgree.setPower(true); + EXPECT_TRUE(irgree.getPower()); + + irgree.setPower(false); + EXPECT_FALSE(irgree.getPower()); +} + +TEST(TestGreeClass, Temperature) { + IRGreeAC irgree(0); + irgree.begin(); + + irgree.setMode(kGreeCool); + + irgree.setTemp(0); + EXPECT_EQ(kGreeMinTemp, irgree.getTemp()); + + irgree.setTemp(255); + EXPECT_EQ(kGreeMaxTemp, irgree.getTemp()); + + irgree.setTemp(kGreeMinTemp); + EXPECT_EQ(kGreeMinTemp, irgree.getTemp()); + + irgree.setTemp(kGreeMaxTemp); + EXPECT_EQ(kGreeMaxTemp, irgree.getTemp()); + + irgree.setTemp(kGreeMinTemp - 1); + EXPECT_EQ(kGreeMinTemp, irgree.getTemp()); + + irgree.setTemp(kGreeMaxTemp + 1); + EXPECT_EQ(kGreeMaxTemp, irgree.getTemp()); + + irgree.setTemp(17); + EXPECT_EQ(17, irgree.getTemp()); + + irgree.setTemp(21); + EXPECT_EQ(21, irgree.getTemp()); + + irgree.setTemp(25); + EXPECT_EQ(25, irgree.getTemp()); + + irgree.setTemp(29); + EXPECT_EQ(29, irgree.getTemp()); +} + +TEST(TestGreeClass, OperatingMode) { + IRGreeAC irgree(0); + irgree.begin(); + + irgree.setTemp(17); + irgree.setMode(kGreeAuto); // Auto should lock the temp to 25C. + EXPECT_EQ(kGreeAuto, irgree.getMode()); + EXPECT_EQ(25, irgree.getTemp()); + irgree.setTemp(17); + EXPECT_EQ(25, irgree.getTemp()); + + irgree.setMode(kGreeCool); + EXPECT_EQ(kGreeCool, irgree.getMode()); + + irgree.setMode(kGreeHeat); + EXPECT_EQ(kGreeHeat, irgree.getMode()); + + ASSERT_NE(kGreeFanMax, 1); + irgree.setFan(kGreeFanMax); + irgree.setMode(kGreeDry); // Dry should lock the fan to speed 1. + EXPECT_EQ(kGreeDry, irgree.getMode()); + EXPECT_EQ(1, irgree.getFan()); + irgree.setFan(kGreeFanMax); + EXPECT_EQ(1, irgree.getFan()); + + irgree.setMode(kGreeFan); + EXPECT_EQ(kGreeFan, irgree.getMode()); + + irgree.setMode(kGreeHeat + 1); + EXPECT_EQ(kGreeAuto, irgree.getMode()); + + irgree.setMode(255); + EXPECT_EQ(kGreeAuto, irgree.getMode()); +} + +TEST(TestGreeClass, Light) { + IRGreeAC irgree(0); + irgree.begin(); + + irgree.setLight(true); + EXPECT_TRUE(irgree.getLight()); + + irgree.setLight(false); + EXPECT_FALSE(irgree.getLight()); + + irgree.setLight(true); + EXPECT_TRUE(irgree.getLight()); +} + +TEST(TestGreeClass, XFan) { + IRGreeAC irgree(0); + irgree.begin(); + + irgree.setXFan(true); + EXPECT_TRUE(irgree.getXFan()); + + irgree.setXFan(false); + EXPECT_FALSE(irgree.getXFan()); + + irgree.setXFan(true); + EXPECT_TRUE(irgree.getXFan()); +} + +TEST(TestGreeClass, Turbo) { + IRGreeAC irgree(0); + irgree.begin(); + + irgree.setTurbo(true); + EXPECT_TRUE(irgree.getTurbo()); + + irgree.setTurbo(false); + EXPECT_FALSE(irgree.getTurbo()); + + irgree.setTurbo(true); + EXPECT_TRUE(irgree.getTurbo()); +} + +TEST(TestGreeClass, Sleep) { + IRGreeAC irgree(0); + irgree.begin(); + + irgree.setSleep(true); + EXPECT_TRUE(irgree.getSleep()); + + irgree.setSleep(false); + EXPECT_FALSE(irgree.getSleep()); + + irgree.setSleep(true); + EXPECT_TRUE(irgree.getSleep()); +} + +TEST(TestGreeClass, FanSpeed) { + IRGreeAC irgree(0); + irgree.begin(); + + irgree.setFan(0); + EXPECT_EQ(0, irgree.getFan()); + + irgree.setFan(255); + EXPECT_EQ(kGreeFanMax, irgree.getFan()); + + irgree.setFan(kGreeFanMax); + EXPECT_EQ(kGreeFanMax, irgree.getFan()); + + irgree.setFan(kGreeFanMax + 1); + EXPECT_EQ(kGreeFanMax, irgree.getFan()); + + irgree.setFan(kGreeFanMax - 1); + EXPECT_EQ(kGreeFanMax - 1, irgree.getFan()); + + irgree.setFan(1); + EXPECT_EQ(1, irgree.getFan()); + + irgree.setFan(1); + EXPECT_EQ(1, irgree.getFan()); + + irgree.setFan(3); + EXPECT_EQ(3, irgree.getFan()); +} + +TEST(TestGreeClass, VerticalSwing) { + IRGreeAC irgree(0); + irgree.begin(); + EXPECT_FALSE(irgree.getSwingVerticalAuto()); + EXPECT_EQ(kGreeSwingLastPos, irgree.getSwingVerticalPosition()); + + irgree.setSwingVertical(true, kGreeSwingAuto); + EXPECT_TRUE(irgree.getSwingVerticalAuto()); + EXPECT_EQ(kGreeSwingAuto, irgree.getSwingVerticalPosition()); + + irgree.setSwingVertical(false, kGreeSwingMiddle); + EXPECT_FALSE(irgree.getSwingVerticalAuto()); + EXPECT_EQ(kGreeSwingMiddle, irgree.getSwingVerticalPosition()); + + irgree.setSwingVertical(true, kGreeSwingDownAuto); + EXPECT_TRUE(irgree.getSwingVerticalAuto()); + EXPECT_EQ(kGreeSwingDownAuto, irgree.getSwingVerticalPosition()); + + // Out of bounds. + irgree.setSwingVertical(false, 255); + EXPECT_FALSE(irgree.getSwingVerticalAuto()); + EXPECT_EQ(kGreeSwingLastPos, irgree.getSwingVerticalPosition()); + irgree.setSwingVertical(false, kGreeSwingAuto); + EXPECT_FALSE(irgree.getSwingVerticalAuto()); + EXPECT_EQ(kGreeSwingLastPos, irgree.getSwingVerticalPosition()); + + irgree.setSwingVertical(true, 255); + EXPECT_TRUE(irgree.getSwingVerticalAuto()); + EXPECT_EQ(kGreeSwingAuto, irgree.getSwingVerticalPosition()); + irgree.setSwingVertical(true, kGreeSwingDown); + EXPECT_TRUE(irgree.getSwingVerticalAuto()); + EXPECT_EQ(kGreeSwingAuto, irgree.getSwingVerticalPosition()); +} + +TEST(TestGreeClass, SetAndGetRaw) { + IRGreeAC irgree(0); + uint8_t initialState[kGreeStateLength] = {0x00, 0x09, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x50}; + uint8_t expectedState[kGreeStateLength] = {0xA9, 0x05, 0xD0, 0x50, + 0x00, 0x20, 0x00, 0xA0}; + + EXPECT_STATE_EQ(initialState, irgree.getRaw(), kGreeBits); + + // toggle the power state. + irgree.setPower(!irgree.getPower()); + irgree.setMode(kGreeCool); + irgree.setTemp(21); + irgree.setFan(2); + irgree.setLight(false); + irgree.setTurbo(true); + irgree.setSleep(true); + irgree.setXFan(true); + + EXPECT_EQ(kGreeCool, irgree.getMode()); + EXPECT_EQ(21, irgree.getTemp()); + EXPECT_EQ(2, irgree.getFan()); + EXPECT_FALSE(irgree.getLight()); + EXPECT_TRUE(irgree.getTurbo()); + EXPECT_TRUE(irgree.getSleep()); + EXPECT_TRUE(irgree.getXFan()); + + EXPECT_STATE_EQ(expectedState, irgree.getRaw(), kGreeBits); + irgree.setRaw(initialState); + EXPECT_STATE_EQ(initialState, irgree.getRaw(), kGreeBits); +} + +TEST(TestGreeClass, HumanReadable) { + IRGreeAC irgree(0); + + EXPECT_EQ( + "Power: Off, Mode: 0 (AUTO), Temp: 25C, Fan: 0 (AUTO), Turbo: Off, " + "XFan: Off, Light: On, Sleep: Off, Swing Vertical Mode: Manual, " + "Swing Vertical Pos: 0 (Last Pos)", + irgree.toString()); + irgree.on(); + irgree.setMode(kGreeCool); + irgree.setTemp(kGreeMinTemp); + irgree.setFan(kGreeFanMax); + irgree.setXFan(true); + irgree.setSleep(true); + irgree.setLight(false); + irgree.setTurbo(true); + irgree.setSwingVertical(true, kGreeSwingAuto); + EXPECT_EQ( + "Power: On, Mode: 1 (COOL), Temp: 16C, Fan: 3 (MAX), Turbo: On, " + "XFan: On, Light: Off, Sleep: On, Swing Vertical Mode: Auto, " + "Swing Vertical Pos: 1 (Auto)", + irgree.toString()); +} + +// Tests for decodeGree(). + +// Decode a synthetic Gree message. +TEST(TestDecodeGree, NormalSynthetic) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + uint8_t gree_code[kGreeStateLength] = {0x00, 0x09, 0x20, 0x50, + 0x00, 0x20, 0x00, 0x50}; + + irsend.reset(); + irsend.sendGree(gree_code); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(GREE, irsend.capture.decode_type); + ASSERT_EQ(kGreeBits, irsend.capture.bits); + EXPECT_STATE_EQ(gree_code, irsend.capture.state, kGreeBits); +} + +// Decode a synthetic Gree message. +TEST(TestDecodeGree, NormalRealExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + IRGreeAC irgree(4); + irsend.begin(); + + uint8_t gree_code[kGreeStateLength] = {0x19, 0x0A, 0x60, 0x50, + 0x02, 0x23, 0x00, 0xF0}; + + // Ref: https://github.com/markszabo/IRremoteESP8266/issues/386 + uint16_t rawData[139] = { + 9008, 4496, 644, 1660, 676, 530, 648, 558, 672, 1636, 646, 1660, + 644, 556, 650, 584, 626, 560, 644, 580, 628, 1680, 624, 560, + 648, 1662, 644, 582, 648, 536, 674, 530, 646, 580, 628, 560, + 670, 532, 646, 562, 644, 556, 672, 536, 648, 1662, 646, 1660, + 652, 554, 644, 558, 672, 538, 644, 560, 668, 560, 648, 1638, + 668, 536, 644, 1660, 668, 532, 648, 560, 648, 1660, 674, 554, + 622, 19990, 646, 580, 624, 1660, 648, 556, 648, 558, 674, 556, + 622, 560, 644, 564, 668, 536, 646, 1662, 646, 1658, 672, 534, + 648, 558, 644, 562, 648, 1662, 644, 584, 622, 558, 648, 562, + 668, 534, 670, 536, 670, 532, 672, 536, 646, 560, 646, 558, + 648, 558, 670, 534, 650, 558, 646, 560, 646, 560, 668, 1638, + 646, 1662, 646, 1660, 646, 1660, 648}; // Issue #386 + + irsend.reset(); + irsend.sendRaw(rawData, 139, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(GREE, irsend.capture.decode_type); + ASSERT_EQ(kGreeBits, irsend.capture.bits); + EXPECT_STATE_EQ(gree_code, irsend.capture.state, kGreeBits); + irgree.setRaw(irsend.capture.state); + EXPECT_EQ( + "Power: On, Mode: 1 (COOL), Temp: 26C, Fan: 1, Turbo: Off, " + "XFan: Off, Light: On, Sleep: Off, Swing Vertical Mode: Manual, " + "Swing Vertical Pos: 2", + irgree.toString()); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Haier_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Haier_test.cpp new file mode 100644 index 000000000..11848e00a --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Haier_test.cpp @@ -0,0 +1,989 @@ +// Copyright 2018 David Conran + +#include "ir_Haier.h" +#include "IRrecv.h" +#include "IRrecv_test.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendHaierAC() + +// Test sending typical data only. +TEST(TestSendHaierAC, SendDataOnly) { + IRsendTest irsend(0); + irsend.begin(); + uint8_t haier_zero[kHaierACStateLength] = {0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00}; + + irsend.reset(); + irsend.sendHaierAC(haier_zero); + EXPECT_EQ( + "m3000s3000m3000s4300" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s150000", + irsend.outputStr()); + + uint8_t haier_test[kHaierACStateLength] = {0xA5, 0x01, 0x20, 0x01, 0x00, + 0xC0, 0x20, 0x00, 0xA7}; + irsend.reset(); + irsend.sendHaierAC(haier_test); + EXPECT_EQ( + "m3000s3000m3000s4300" + "m520s1650m520s650m520s1650m520s650m520s650m520s1650m520s650m520s1650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s1650" + "m520s650m520s650m520s1650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s1650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s1650m520s1650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s1650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s1650m520s650m520s1650m520s650m520s650m520s1650m520s1650m520s1650" + "m520s150000", + irsend.outputStr()); +} + +// Test sending typical data with repeats. +TEST(TestSendHaierAC, SendWithRepeats) { + IRsendTest irsend(0); + irsend.begin(); + + irsend.reset(); + uint8_t haier_test[kHaierACStateLength] = {0xA5, 0x01, 0x20, 0x01, 0x00, + 0xC0, 0x20, 0x00, 0xA7}; + irsend.reset(); + irsend.sendHaierAC(haier_test, kHaierACStateLength, 2); // two repeats. + EXPECT_EQ( + "m3000s3000m3000s4300" + "m520s1650m520s650m520s1650m520s650m520s650m520s1650m520s650m520s1650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s1650" + "m520s650m520s650m520s1650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s1650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s1650m520s1650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s1650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s1650m520s650m520s1650m520s650m520s650m520s1650m520s1650m520s1650" + "m520s150000" + "m3000s3000m3000s4300" + "m520s1650m520s650m520s1650m520s650m520s650m520s1650m520s650m520s1650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s1650" + "m520s650m520s650m520s1650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s1650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s1650m520s1650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s1650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s1650m520s650m520s1650m520s650m520s650m520s1650m520s1650m520s1650" + "m520s150000" + "m3000s3000m3000s4300" + "m520s1650m520s650m520s1650m520s650m520s650m520s1650m520s650m520s1650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s1650" + "m520s650m520s650m520s1650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s1650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s1650m520s1650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s1650m520s650m520s650m520s650m520s650m520s650" + "m520s650m520s650m520s650m520s650m520s650m520s650m520s650m520s650" + "m520s1650m520s650m520s1650m520s650m520s650m520s1650m520s1650m520s1650" + "m520s150000", + irsend.outputStr()); +} + +// Tests for IRHaierAC class. + +TEST(TestHaierACClass, Command) { + IRHaierAC haier(0); + haier.begin(); + + haier.setCommand(kHaierAcCmdOff); + EXPECT_EQ(kHaierAcCmdOff, haier.getCommand()); + haier.setCommand(kHaierAcCmdOn); + EXPECT_EQ(kHaierAcCmdOn, haier.getCommand()); + haier.setCommand(kHaierAcCmdMode); + EXPECT_EQ(kHaierAcCmdMode, haier.getCommand()); + haier.setCommand(kHaierAcCmdFan); + EXPECT_EQ(kHaierAcCmdFan, haier.getCommand()); + haier.setCommand(kHaierAcCmdTempUp); + EXPECT_EQ(kHaierAcCmdTempUp, haier.getCommand()); + haier.setCommand(kHaierAcCmdTempDown); + EXPECT_EQ(kHaierAcCmdTempDown, haier.getCommand()); + haier.setCommand(kHaierAcCmdSleep); + EXPECT_EQ(kHaierAcCmdSleep, haier.getCommand()); + haier.setCommand(kHaierAcCmdTimerSet); + EXPECT_EQ(kHaierAcCmdTimerSet, haier.getCommand()); + haier.setCommand(kHaierAcCmdTimerCancel); + EXPECT_EQ(kHaierAcCmdTimerCancel, haier.getCommand()); + haier.setCommand(kHaierAcCmdHealth); + EXPECT_EQ(kHaierAcCmdHealth, haier.getCommand()); + haier.setCommand(kHaierAcCmdSwing); + EXPECT_EQ(kHaierAcCmdSwing, haier.getCommand()); + haier.setCommand(kHaierAcCmdOn); + EXPECT_EQ(kHaierAcCmdOn, haier.getCommand()); + + // Test unexpected values. + haier.setCommand(0b00001110); + EXPECT_EQ(kHaierAcCmdOff, haier.getCommand()); + haier.setCommand(0b00001111); + EXPECT_EQ(kHaierAcCmdOff, haier.getCommand()); + haier.setCommand(0b00000100); + EXPECT_EQ(kHaierAcCmdOff, haier.getCommand()); +} + +TEST(TestHaierACClass, OperatingMode) { + IRHaierAC haier(0); + haier.begin(); + + haier.setMode(kHaierAcAuto); + EXPECT_EQ(kHaierAcAuto, haier.getMode()); + + haier.setMode(kHaierAcCool); + EXPECT_EQ(kHaierAcCool, haier.getMode()); + + haier.setMode(kHaierAcHeat); + EXPECT_EQ(kHaierAcHeat, haier.getMode()); + + haier.setMode(kHaierAcFan); + EXPECT_EQ(kHaierAcFan, haier.getMode()); + + haier.setMode(kHaierAcDry); + EXPECT_EQ(kHaierAcDry, haier.getMode()); + + haier.setMode(kHaierAcAuto - 1); + EXPECT_EQ(kHaierAcAuto, haier.getMode()); + + haier.setMode(kHaierAcCool); + EXPECT_EQ(kHaierAcCool, haier.getMode()); + + haier.setMode(kHaierAcFan + 1); + EXPECT_EQ(kHaierAcAuto, haier.getMode()); + + haier.setMode(255); + EXPECT_EQ(kHaierAcAuto, haier.getMode()); +} + +TEST(TestHaierACClass, Temperature) { + IRHaierAC haier(0); + haier.begin(); + + haier.setTemp(kHaierAcMinTemp); + EXPECT_EQ(kHaierAcMinTemp, haier.getTemp()); + + haier.setCommand(kHaierAcCmdOn); + haier.setTemp(kHaierAcMinTemp + 1); + EXPECT_EQ(kHaierAcMinTemp + 1, haier.getTemp()); + EXPECT_EQ(kHaierAcCmdTempUp, haier.getCommand()); + + haier.setTemp(kHaierAcMaxTemp); + EXPECT_EQ(kHaierAcMaxTemp, haier.getTemp()); + EXPECT_EQ(kHaierAcCmdTempUp, haier.getCommand()); + + haier.setTemp(kHaierAcMinTemp - 1); + EXPECT_EQ(kHaierAcMinTemp, haier.getTemp()); + EXPECT_EQ(kHaierAcCmdTempDown, haier.getCommand()); + + haier.setTemp(kHaierAcMaxTemp + 1); + EXPECT_EQ(kHaierAcMaxTemp, haier.getTemp()); + EXPECT_EQ(kHaierAcCmdTempUp, haier.getCommand()); + + haier.setTemp(23); + EXPECT_EQ(23, haier.getTemp()); + EXPECT_EQ(kHaierAcCmdTempDown, haier.getCommand()); + haier.setCommand(kHaierAcCmdOn); + haier.setTemp(23); + EXPECT_EQ(23, haier.getTemp()); + EXPECT_EQ(kHaierAcCmdOn, haier.getCommand()); + + haier.setTemp(0); + EXPECT_EQ(kHaierAcMinTemp, haier.getTemp()); + EXPECT_EQ(kHaierAcCmdTempDown, haier.getCommand()); + + haier.setTemp(255); + EXPECT_EQ(kHaierAcMaxTemp, haier.getTemp()); + EXPECT_EQ(kHaierAcCmdTempUp, haier.getCommand()); +} + +TEST(TestHaierACClass, FanSpeed) { + IRHaierAC haier(0); + haier.begin(); + haier.setFan(kHaierAcFanLow); + haier.setCommand(kHaierAcCmdOn); + + haier.setFan(kHaierAcFanAuto); + EXPECT_EQ(kHaierAcFanAuto, haier.getFan()); + EXPECT_EQ(kHaierAcCmdFan, haier.getCommand()); + + haier.setFan(kHaierAcFanLow); + EXPECT_EQ(kHaierAcFanLow, haier.getFan()); + haier.setFan(kHaierAcFanMed); + EXPECT_EQ(kHaierAcFanMed, haier.getFan()); + haier.setFan(kHaierAcFanHigh); + EXPECT_EQ(kHaierAcFanHigh, haier.getFan()); + + haier.setCommand(kHaierAcCmdOn); + haier.setFan(kHaierAcFanHigh); + EXPECT_EQ(kHaierAcFanHigh, haier.getFan()); + EXPECT_EQ(kHaierAcCmdOn, haier.getCommand()); +} + +TEST(TestHaierACClass, Swing) { + IRHaierAC haier(0); + haier.begin(); + haier.setFan(kHaierAcFanLow); + haier.setCommand(kHaierAcCmdOn); + + haier.setSwing(kHaierAcSwingOff); + EXPECT_EQ(kHaierAcSwingOff, haier.getSwing()); + + haier.setSwing(kHaierAcSwingUp); + EXPECT_EQ(kHaierAcSwingUp, haier.getSwing()); + EXPECT_EQ(kHaierAcCmdSwing, haier.getCommand()); + + haier.setSwing(kHaierAcSwingDown); + EXPECT_EQ(kHaierAcSwingDown, haier.getSwing()); + EXPECT_EQ(kHaierAcCmdSwing, haier.getCommand()); + + haier.setSwing(kHaierAcSwingChg); + EXPECT_EQ(kHaierAcSwingChg, haier.getSwing()); + EXPECT_EQ(kHaierAcCmdSwing, haier.getCommand()); +} + +TEST(TestHaierACClass, CurrentTime) { + IRHaierAC haier(0); + haier.begin(); + EXPECT_EQ(0, haier.getCurrTime()); + + haier.setCurrTime(1); + EXPECT_EQ(1, haier.getCurrTime()); + + haier.setCurrTime(60); + EXPECT_EQ(60, haier.getCurrTime()); + + haier.setCurrTime(61); + EXPECT_EQ(61, haier.getCurrTime()); + + haier.setCurrTime(18 * 60 + 34); // 18:34 + EXPECT_EQ(1114, haier.getCurrTime()); + + haier.setCurrTime(23 * 60 + 59); // 23:59 + EXPECT_EQ(kHaierAcMaxTime, haier.getCurrTime()); // 23:59 + + haier.setCurrTime(23 * 60 + 59 + 1); // 24:00 + EXPECT_EQ(kHaierAcMaxTime, haier.getCurrTime()); // 23:59 + + haier.setCurrTime(UINT16_MAX); + EXPECT_EQ(kHaierAcMaxTime, haier.getCurrTime()); // 23:59 +} + +TEST(TestHaierACClass, Timers) { + IRHaierAC haier(0); + haier.begin(); + + haier.setCommand(kHaierAcCmdOn); + + // Off by default. + EXPECT_GT(0, haier.getOnTimer()); + EXPECT_GT(0, haier.getOffTimer()); + EXPECT_EQ(kHaierAcCmdOn, haier.getCommand()); + + // On Timer. + haier.setOnTimer(6 * 60); // 6am + EXPECT_EQ(6 * 60, haier.getOnTimer()); // 6am + EXPECT_GT(0, haier.getOffTimer()); + EXPECT_EQ(kHaierAcCmdTimerSet, haier.getCommand()); + + haier.setCommand(kHaierAcCmdOn); + EXPECT_EQ(6 * 60, haier.getOnTimer()); // 6am + EXPECT_GT(0, haier.getOffTimer()); + EXPECT_EQ(kHaierAcCmdOn, haier.getCommand()); + + haier.cancelTimers(); + EXPECT_GT(0, haier.getOnTimer()); + EXPECT_GT(0, haier.getOffTimer()); + EXPECT_EQ(kHaierAcCmdTimerCancel, haier.getCommand()); + + // Off Timer. + haier.setOffTimer(18 * 60 + 30); // 6:30pm + EXPECT_GT(0, haier.getOnTimer()); + EXPECT_EQ(18 * 60 + 30, haier.getOffTimer()); // 6:30pm + EXPECT_EQ(kHaierAcCmdTimerSet, haier.getCommand()); + + haier.setCommand(kHaierAcCmdOn); + EXPECT_GT(0, haier.getOnTimer()); + EXPECT_EQ(18 * 60 + 30, haier.getOffTimer()); // 6:30pm + EXPECT_EQ(kHaierAcCmdOn, haier.getCommand()); + + haier.cancelTimers(); + EXPECT_GT(0, haier.getOnTimer()); + EXPECT_GT(0, haier.getOffTimer()); + EXPECT_EQ(kHaierAcCmdTimerCancel, haier.getCommand()); + + // Both Timers. + haier.setOnTimer(6 * 60); // 6am + EXPECT_EQ(kHaierAcCmdTimerSet, haier.getCommand()); + haier.setOffTimer(18 * 60 + 30); // 6:30pm + EXPECT_EQ(kHaierAcCmdTimerSet, haier.getCommand()); + EXPECT_EQ(6 * 60, haier.getOnTimer()); // 6am + EXPECT_EQ(18 * 60 + 30, haier.getOffTimer()); // 6:30pm + + haier.cancelTimers(); + EXPECT_GT(0, haier.getOnTimer()); + EXPECT_GT(0, haier.getOffTimer()); + EXPECT_EQ(kHaierAcCmdTimerCancel, haier.getCommand()); +} + +TEST(TestHaierACClass, TimeToString) { + EXPECT_EQ("00:00", IRHaierAC::timeToString(0)); + EXPECT_EQ("00:01", IRHaierAC::timeToString(1)); + EXPECT_EQ("00:10", IRHaierAC::timeToString(10)); + EXPECT_EQ("00:59", IRHaierAC::timeToString(59)); + + EXPECT_EQ("01:00", IRHaierAC::timeToString(60)); + EXPECT_EQ("01:01", IRHaierAC::timeToString(61)); + EXPECT_EQ("01:59", IRHaierAC::timeToString(60 + 59)); + EXPECT_EQ("18:59", IRHaierAC::timeToString(18 * 60 + 59)); + EXPECT_EQ("23:59", IRHaierAC::timeToString(23 * 60 + 59)); +} + +TEST(TestHaierACClass, MessageConstuction) { + IRHaierAC haier(0); + + EXPECT_EQ( + "Command: 1 (On), Mode: 0 (AUTO), Temp: 25C, Fan: 0 (AUTO), " + "Swing: 0 (Off), Sleep: Off, Health: Off, " + "Current Time: 00:00, On Timer: Off, Off Timer: Off", + haier.toString()); + haier.setMode(kHaierAcCool); + haier.setTemp(21); + haier.setFan(kHaierAcFanHigh); + EXPECT_EQ( + "Command: 3 (Fan), Mode: 1 (COOL), Temp: 21C, Fan: 3 (MAX), " + "Swing: 0 (Off), Sleep: Off, Health: Off, " + "Current Time: 00:00, On Timer: Off, Off Timer: Off", + haier.toString()); + haier.setSwing(kHaierAcSwingChg); + haier.setHealth(true); + haier.setSleep(true); + haier.setCurrTime(615); // 10:15am + EXPECT_EQ( + "Command: 8 (Sleep), Mode: 3 (HEAT), Temp: 21C, Fan: 3 (MAX), " + "Swing: 3 (Chg), Sleep: On, Health: On, " + "Current Time: 10:15, On Timer: Off, Off Timer: Off", + haier.toString()); + haier.setOnTimer(800); // 1:20pm + haier.setOffTimer(1125); // 6:45pm + haier.setCommand(kHaierAcCmdOn); + + EXPECT_EQ( + "Command: 1 (On), Mode: 2 (DRY), Temp: 21C, Fan: 2, " + "Swing: 3 (Chg), Sleep: On, Health: On, " + "Current Time: 10:15, On Timer: 13:20, Off Timer: 18:45", + haier.toString()); + + // Now change a few already set things. + haier.setMode(kHaierAcHeat); + EXPECT_EQ( + "Command: 2 (Mode), Mode: 3 (HEAT), Temp: 21C, Fan: 2, " + "Swing: 3 (Chg), Sleep: On, Health: On, " + "Current Time: 10:15, On Timer: 13:52, Off Timer: 18:45", + haier.toString()); + + haier.setTemp(25); + EXPECT_EQ( + "Command: 6 (Temp Up), Mode: 3 (HEAT), Temp: 25C, Fan: 2, " + "Swing: 3 (Chg), Sleep: On, Health: On, " + "Current Time: 10:15, On Timer: 13:52, Off Timer: 18:45", + haier.toString()); + + uint8_t expectedState[kHaierACStateLength] = {0xA5, 0x96, 0xEA, 0xCF, 0x32, + 0x2D, 0x0D, 0x74, 0xD4}; + EXPECT_STATE_EQ(expectedState, haier.getRaw(), kHaierACBits); + + // Check that the checksum is valid. + EXPECT_TRUE(IRHaierAC::validChecksum(haier.getRaw())); + + // Now load up some random data. + uint8_t randomState[kHaierACStateLength] = {0x52, 0x49, 0x50, 0x20, 0x54, + 0x61, 0x6C, 0x69, 0x61}; + EXPECT_FALSE(IRHaierAC::validChecksum(randomState)); + haier.setRaw(randomState); + EXPECT_EQ( + "Command: 9 (Timer Set), Mode: 3 (HEAT), Temp: 20C, Fan: 2, " + "Swing: 1 (Up), Sleep: On, Health: Off, " + "Current Time: 16:32, On Timer: Off, Off Timer: Off", + haier.toString()); + // getRaw() should correct the checksum. + EXPECT_TRUE(IRHaierAC::validChecksum(haier.getRaw())); +} + +// Tests for the IRHaierACYRW02 class. + +TEST(TestHaierACYRW02Class, Button) { + IRHaierACYRW02 haier(0); + haier.begin(); + + haier.setButton(kHaierAcYrw02ButtonPower); + EXPECT_EQ(kHaierAcYrw02ButtonPower, haier.getButton()); + haier.setButton(kHaierAcYrw02ButtonMode); + EXPECT_EQ(kHaierAcYrw02ButtonMode, haier.getButton()); + haier.setButton(kHaierAcYrw02ButtonSleep); + EXPECT_EQ(kHaierAcYrw02ButtonSleep, haier.getButton()); + haier.setButton(kHaierAcYrw02ButtonFan); + + // Test unexpected values. + haier.setButton(0xFF); + EXPECT_EQ(kHaierAcYrw02ButtonFan, haier.getButton()); + haier.setButton(0x10); + EXPECT_EQ(kHaierAcYrw02ButtonFan, haier.getButton()); +} + +TEST(TestHaierACYRW02Class, OperatingMode) { + IRHaierACYRW02 haier(0); + haier.begin(); + + haier.setButton(kHaierAcYrw02ButtonPower); + haier.setMode(kHaierAcYrw02Auto); + EXPECT_EQ(kHaierAcYrw02Auto, haier.getMode()); + EXPECT_EQ(kHaierAcYrw02ButtonMode, haier.getButton()); + + haier.setMode(kHaierAcYrw02Cool); + EXPECT_EQ(kHaierAcYrw02Cool, haier.getMode()); + + haier.setMode(kHaierAcYrw02Heat); + EXPECT_EQ(kHaierAcYrw02Heat, haier.getMode()); + + haier.setMode(kHaierAcYrw02Fan); + EXPECT_EQ(kHaierAcYrw02Fan, haier.getMode()); + + haier.setMode(kHaierAcYrw02Dry); + EXPECT_EQ(kHaierAcYrw02Dry, haier.getMode()); + + haier.setMode(kHaierAcYrw02Auto - 1); + EXPECT_EQ(kHaierAcYrw02Auto, haier.getMode()); + + haier.setMode(kHaierAcYrw02Cool); + EXPECT_EQ(kHaierAcYrw02Cool, haier.getMode()); + + haier.setMode(kHaierAcYrw02Fan + 1); + EXPECT_EQ(kHaierAcYrw02Auto, haier.getMode()); + + haier.setMode(255); + EXPECT_EQ(kHaierAcYrw02Auto, haier.getMode()); +} + +TEST(TestHaierACYRW02Class, Temperature) { + IRHaierACYRW02 haier(0); + haier.begin(); + + haier.setTemp(kHaierAcMinTemp); + EXPECT_EQ(kHaierAcMinTemp, haier.getTemp()); + + haier.setButton(kHaierAcYrw02ButtonPower); + haier.setTemp(kHaierAcMinTemp + 1); + EXPECT_EQ(kHaierAcMinTemp + 1, haier.getTemp()); + EXPECT_EQ(kHaierAcYrw02ButtonTempUp, haier.getButton()); + + haier.setTemp(kHaierAcMaxTemp); + EXPECT_EQ(kHaierAcMaxTemp, haier.getTemp()); + EXPECT_EQ(kHaierAcYrw02ButtonTempUp, haier.getButton()); + + haier.setTemp(kHaierAcMinTemp - 1); + EXPECT_EQ(kHaierAcMinTemp, haier.getTemp()); + EXPECT_EQ(kHaierAcYrw02ButtonTempDown, haier.getButton()); + + haier.setTemp(kHaierAcMaxTemp + 1); + EXPECT_EQ(kHaierAcMaxTemp, haier.getTemp()); + EXPECT_EQ(kHaierAcYrw02ButtonTempUp, haier.getButton()); + + haier.setTemp(23); + EXPECT_EQ(23, haier.getTemp()); + EXPECT_EQ(kHaierAcYrw02ButtonTempDown, haier.getButton()); + haier.setButton(kHaierAcYrw02ButtonPower); + haier.setTemp(23); + EXPECT_EQ(23, haier.getTemp()); + EXPECT_EQ(kHaierAcYrw02ButtonPower, haier.getButton()); + + haier.setTemp(0); + EXPECT_EQ(kHaierAcMinTemp, haier.getTemp()); + EXPECT_EQ(kHaierAcYrw02ButtonTempDown, haier.getButton()); + + haier.setTemp(255); + EXPECT_EQ(kHaierAcMaxTemp, haier.getTemp()); + EXPECT_EQ(kHaierAcYrw02ButtonTempUp, haier.getButton()); +} + +TEST(TestHaierACYRW02Class, HealthMode) { + IRHaierACYRW02 haier(0); + haier.begin(); + + haier.setHealth(true); + EXPECT_TRUE(haier.getHealth()); + EXPECT_EQ(kHaierAcYrw02ButtonHealth, haier.getButton()); + + haier.setButton(kHaierAcYrw02ButtonTempUp); + haier.setHealth(false); + EXPECT_FALSE(haier.getHealth()); + EXPECT_EQ(kHaierAcYrw02ButtonHealth, haier.getButton()); + + haier.setHealth(true); + EXPECT_TRUE(haier.getHealth()); + EXPECT_EQ(kHaierAcYrw02ButtonHealth, haier.getButton()); +} + +TEST(TestHaierACYRW02Class, Power) { + IRHaierACYRW02 haier(0); + haier.begin(); + + haier.setPower(true); + EXPECT_TRUE(haier.getPower()); + EXPECT_EQ(kHaierAcYrw02ButtonPower, haier.getButton()); + + haier.setButton(kHaierAcYrw02ButtonTempUp); + haier.setPower(false); + EXPECT_FALSE(haier.getPower()); + EXPECT_EQ(kHaierAcYrw02ButtonPower, haier.getButton()); + + haier.setPower(true); + EXPECT_TRUE(haier.getPower()); + EXPECT_EQ(kHaierAcYrw02ButtonPower, haier.getButton()); + + haier.off(); + EXPECT_FALSE(haier.getPower()); + haier.on(); + EXPECT_TRUE(haier.getPower()); +} + +TEST(TestHaierACYRW02Class, SleepMode) { + IRHaierACYRW02 haier(0); + haier.begin(); + + haier.setSleep(true); + EXPECT_TRUE(haier.getSleep()); + EXPECT_EQ(kHaierAcYrw02ButtonSleep, haier.getButton()); + + haier.setButton(kHaierAcYrw02ButtonTempUp); + haier.setSleep(false); + EXPECT_FALSE(haier.getSleep()); + EXPECT_EQ(kHaierAcYrw02ButtonSleep, haier.getButton()); + + haier.setSleep(true); + EXPECT_TRUE(haier.getSleep()); + EXPECT_EQ(kHaierAcYrw02ButtonSleep, haier.getButton()); +} + +TEST(TestHaierACYRW02Class, TurboMode) { + IRHaierACYRW02 haier(0); + haier.begin(); + + haier.setTurbo(kHaierAcYrw02TurboOff); + EXPECT_EQ(kHaierAcYrw02TurboOff, haier.getTurbo()); + EXPECT_EQ(kHaierAcYrw02ButtonTurbo, haier.getButton()); + + haier.setButton(kHaierAcYrw02ButtonTempUp); + + haier.setTurbo(kHaierAcYrw02TurboLow); + EXPECT_EQ(kHaierAcYrw02TurboLow, haier.getTurbo()); + EXPECT_EQ(kHaierAcYrw02ButtonTurbo, haier.getButton()); + + haier.setTurbo(kHaierAcYrw02TurboHigh); + EXPECT_EQ(kHaierAcYrw02TurboHigh, haier.getTurbo()); + EXPECT_EQ(kHaierAcYrw02ButtonTurbo, haier.getButton()); + + haier.setTurbo(kHaierAcYrw02TurboOff); + EXPECT_EQ(kHaierAcYrw02TurboOff, haier.getTurbo()); + EXPECT_EQ(kHaierAcYrw02ButtonTurbo, haier.getButton()); +} + +TEST(TestHaierACYRW02Class, Fan) { + IRHaierACYRW02 haier(0); + haier.begin(); + + haier.setFan(kHaierAcYrw02FanAuto); + EXPECT_EQ(kHaierAcYrw02FanAuto, haier.getFan()); + EXPECT_EQ(kHaierAcYrw02ButtonFan, haier.getButton()); + + haier.setButton(kHaierAcYrw02ButtonTempUp); + + haier.setFan(kHaierAcYrw02FanLow); + EXPECT_EQ(kHaierAcYrw02FanLow, haier.getFan()); + EXPECT_EQ(kHaierAcYrw02ButtonFan, haier.getButton()); + + haier.setFan(kHaierAcYrw02FanHigh); + EXPECT_EQ(kHaierAcYrw02FanHigh, haier.getFan()); + EXPECT_EQ(kHaierAcYrw02ButtonFan, haier.getButton()); + + haier.setFan(kHaierAcYrw02FanMed); + EXPECT_EQ(kHaierAcYrw02FanMed, haier.getFan()); + EXPECT_EQ(kHaierAcYrw02ButtonFan, haier.getButton()); + + // Test unexpected values. + haier.setButton(kHaierAcYrw02ButtonTempUp); + haier.setFan(0x00); + EXPECT_EQ(kHaierAcYrw02FanMed, haier.getFan()); + EXPECT_EQ(kHaierAcYrw02ButtonTempUp, haier.getButton()); +} + +TEST(TestHaierACYRW02Class, Swing) { + IRHaierACYRW02 haier(0); + haier.begin(); + + haier.setSwing(kHaierAcYrw02SwingOff); + EXPECT_EQ(kHaierAcYrw02SwingOff, haier.getSwing()); + EXPECT_EQ(kHaierAcYrw02ButtonSwing, haier.getButton()); + + haier.setButton(kHaierAcYrw02ButtonTempUp); + + haier.setSwing(kHaierAcYrw02SwingAuto); + EXPECT_EQ(kHaierAcYrw02SwingAuto, haier.getSwing()); + EXPECT_EQ(kHaierAcYrw02ButtonSwing, haier.getButton()); + + haier.setSwing(kHaierAcYrw02SwingTop); + EXPECT_EQ(kHaierAcYrw02SwingTop, haier.getSwing()); + EXPECT_EQ(kHaierAcYrw02ButtonSwing, haier.getButton()); + + haier.setSwing(kHaierAcYrw02SwingDown); + EXPECT_EQ(kHaierAcYrw02SwingDown, haier.getSwing()); + EXPECT_EQ(kHaierAcYrw02ButtonSwing, haier.getButton()); + + // Test unexpected values. + haier.setButton(kHaierAcYrw02ButtonTempUp); + haier.setSwing(0xFF); + EXPECT_EQ(kHaierAcYrw02SwingDown, haier.getSwing()); + EXPECT_EQ(kHaierAcYrw02ButtonTempUp, haier.getButton()); + + // Test the mode-dependant positions. + haier.setMode(kHaierAcYrw02Auto); + haier.setSwing(kHaierAcYrw02SwingMiddle); + EXPECT_EQ(kHaierAcYrw02SwingMiddle, haier.getSwing()); + EXPECT_EQ(kHaierAcYrw02ButtonSwing, haier.getButton()); + haier.setMode(kHaierAcYrw02Heat); + haier.setSwing(kHaierAcYrw02SwingMiddle); + EXPECT_EQ(kHaierAcYrw02SwingBottom, haier.getSwing()); + haier.setSwing(kHaierAcYrw02SwingAuto); + EXPECT_EQ(kHaierAcYrw02SwingAuto, haier.getSwing()); + haier.setSwing(kHaierAcYrw02SwingBottom); + EXPECT_EQ(kHaierAcYrw02SwingBottom, haier.getSwing()); + haier.setMode(kHaierAcYrw02Cool); + haier.setSwing(kHaierAcYrw02SwingBottom); + EXPECT_EQ(kHaierAcYrw02SwingMiddle, haier.getSwing()); +} + +TEST(TestHaierACYRW02Class, MessageConstuction) { + IRHaierACYRW02 haier(0); + + EXPECT_EQ( + "Power: On, Button: 5 (Power), Mode: 0 (Auto), Temp: 25C," + " Fan: 10 (Auto), Turbo: 0 (Off), Swing: 0 (Off), Sleep: Off," + " Health: On", + haier.toString()); + haier.setMode(kHaierAcYrw02Cool); + haier.setTemp(21); + haier.setFan(kHaierAcYrw02FanHigh); + EXPECT_EQ( + "Power: On, Button: 4 (Fan), Mode: 2 (Cool), Temp: 21C," + " Fan: 2 (High), Turbo: 0 (Off), Swing: 0 (Off), Sleep: Off," + " Health: On", + haier.toString()); + + haier.setSwing(kHaierAcYrw02SwingMiddle); + haier.setHealth(false); + haier.setSleep(true); + haier.setTurbo(kHaierAcYrw02TurboHigh); + EXPECT_EQ( + "Power: On, Button: 8 (Turbo), Mode: 2 (Cool), Temp: 21C," + " Fan: 2 (High), Turbo: 1 (High), Swing: 2 (Middle)," + " Sleep: On, Health: Off", + haier.toString()); +} + +// Decode "real" state messages. +TEST(TestHaierACYRW02Class, RealStates) { + uint8_t expectedState1[kHaierACYRW02StateLength] = { + 0xA6, 0xE1, 0x00, 0x00, 0x40, 0x20, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x07, 0x6E}; + + IRHaierACYRW02 haier(0); + haier.setRaw(expectedState1); + EXPECT_EQ( + "Power: On, Button: 7 (Health), Mode: 8 (Heat), Temp: 30C," + " Fan: 2 (High), Turbo: 0 (Off), Swing: 1 (Top), Sleep: Off," + " Health: Off", + haier.toString()); + + uint8_t expectedState2[kHaierACYRW02StateLength] = { + 0xA6, 0xE0, 0x00, 0x00, 0x00, 0x20, 0x00, + 0x80, 0x00, 0x00, 0x00, 0x00, 0x05, 0x75}; + haier.setRaw(expectedState2); + EXPECT_EQ( + "Power: Off, Button: 5 (Power), Mode: 8 (Heat), Temp: 30C," + " Fan: 2 (High), Turbo: 0 (Off), Swing: 0 (Off), Sleep: Off," + " Health: Off", + haier.toString()); + + uint8_t expectedState3[kHaierACYRW02StateLength] = { + 0xA6, 0x02, 0x00, 0x02, 0x40, 0x20, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x01, 0x2B}; + haier.setRaw(expectedState3); + EXPECT_EQ( + "Power: On, Button: 1 (Temp Down), Mode: 2 (Cool), Temp: 16C," + " Fan: 2 (High), Turbo: 0 (Off), Swing: 2 (Middle), Sleep: Off," + " Health: On", + haier.toString()); + + // cool 25, health, fan auto, swing auto, sleep on + uint8_t expectedState4[kHaierACYRW02StateLength] = { + 0xA6, 0x9C, 0x00, 0x02, 0x40, 0xA8, 0x00, + 0x20, 0x80, 0x00, 0x00, 0x00, 0x0B, 0xD7}; + haier.setRaw(expectedState4); + EXPECT_EQ( + "Power: On, Button: 11 (Sleep), Mode: 2 (Cool), Temp: 25C," + " Fan: 10 (Auto), Turbo: 0 (Off), Swing: 12 (Auto), Sleep: On," + " Health: On", + haier.toString()); + + // cool 25, health, fan 3, swing auto, sleep on + uint8_t expectedState5[kHaierACYRW02StateLength] = { + 0xA6, 0x9C, 0x00, 0x02, 0x40, 0x27, 0x36, + 0x20, 0x80, 0x00, 0x00, 0x00, 0x04, 0x85}; + haier.setRaw(expectedState5); + EXPECT_EQ( + "Power: On, Button: 4 (Fan), Mode: 2 (Cool), Temp: 25C," + " Fan: 2 (High), Turbo: 0 (Off), Swing: 12 (Auto), Sleep: On," + " Health: On", + haier.toString()); +} + +// Tests for decodeHaierAC(). + +// Decode normal "synthetic" messages. +TEST(TestDecodeHaierAC, NormalDecodeWithStrict) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + uint8_t expectedState[kHaierACStateLength] = {0xA5, 0x01, 0x20, 0x01, 0x00, + 0xC0, 0x20, 0x00, 0xA7}; + + // With the specific decoder. + irsend.reset(); + irsend.sendHaierAC(expectedState); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeHaierAC(&irsend.capture, kHaierACBits, true)); + EXPECT_EQ(HAIER_AC, irsend.capture.decode_type); + EXPECT_EQ(kHaierACBits, irsend.capture.bits); + EXPECT_FALSE(irsend.capture.repeat); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + + // With the all the decoders. + irsend.reset(); + irsend.sendHaierAC(expectedState); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(HAIER_AC, irsend.capture.decode_type); + EXPECT_EQ(kHaierACBits, irsend.capture.bits); + EXPECT_FALSE(irsend.capture.repeat); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); +} + +// Decode a "real" example message. +TEST(TestDecodeHaierAC, RealExample1) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + // Data from Issue #404 captured by kuzin2006 + uint16_t rawData[149] = { + 3030, 3044, 3030, 4304, 576, 1694, 550, 582, 552, 1704, 552, 714, 550, + 582, 550, 1706, 552, 582, 550, 1836, 552, 582, 578, 568, 550, 582, + 550, 714, 550, 582, 550, 582, 552, 582, 550, 1836, 552, 582, 552, + 580, 580, 1692, 550, 712, 552, 582, 550, 582, 552, 580, 550, 714, + 552, 582, 550, 582, 552, 582, 578, 698, 552, 580, 552, 582, 552, + 582, 552, 1836, 552, 580, 552, 582, 552, 582, 550, 714, 578, 568, + 550, 582, 550, 582, 552, 714, 550, 1706, 550, 1706, 550, 582, 550, + 714, 552, 582, 580, 566, 552, 582, 550, 714, 552, 580, 552, 580, + 552, 1706, 550, 714, 550, 582, 552, 582, 578, 568, 552, 712, 552, + 582, 550, 582, 550, 582, 550, 712, 552, 582, 550, 582, 552, 582, + 578, 722, 552, 1704, 550, 582, 550, 1706, 550, 736, 550, 582, 550, + 1706, 550, 1704, 552, 1704, 578}; + uint8_t expectedState[kHaierACStateLength] = {0xA5, 0x01, 0x20, 0x01, 0x00, + 0xC0, 0x20, 0x00, 0xA7}; + + irsend.sendRaw(rawData, 149, 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(HAIER_AC, irsend.capture.decode_type); + EXPECT_EQ(kHaierACBits, irsend.capture.bits); + EXPECT_FALSE(irsend.capture.repeat); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + + IRHaierAC haier(0); + haier.setRaw(irsend.capture.state); + EXPECT_EQ( + "Command: 1 (On), Mode: 0 (AUTO), Temp: 16C, Fan: 0 (AUTO), " + "Swing: 0 (Off), Sleep: Off, Health: Off, " + "Current Time: 00:01, On Timer: Off, Off Timer: Off", + haier.toString()); +} + +// Decode a "real" example message. +TEST(TestDecodeHaierAC, RealExample2) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + // Data from Issue #404 captured by kuzin2006 + uint16_t rawData[149] = { + 3028, 3046, 3028, 4304, 576, 1694, 552, 582, 550, 1704, 552, 714, + 550, 582, 552, 1704, 550, 582, 550, 1836, 552, 582, 578, 1690, + 552, 1704, 552, 712, 550, 582, 550, 1706, 550, 1706, 552, 712, + 550, 582, 552, 582, 578, 1690, 552, 714, 552, 580, 552, 582, + 552, 582, 550, 712, 552, 582, 550, 582, 550, 582, 578, 698, + 552, 582, 550, 584, 550, 582, 552, 1836, 550, 582, 550, 582, + 550, 582, 550, 712, 578, 568, 550, 582, 550, 582, 550, 714, + 552, 1706, 550, 1706, 552, 580, 550, 714, 550, 582, 580, 568, + 550, 582, 550, 714, 550, 582, 550, 582, 550, 1706, 552, 712, + 550, 582, 550, 582, 580, 568, 552, 712, 550, 584, 550, 582, + 550, 584, 550, 712, 550, 582, 550, 582, 550, 582, 578, 722, + 550, 582, 552, 580, 552, 582, 550, 738, 550, 1706, 550, 1704, + 552, 582, 550, 582, 578}; + uint8_t expectedState[kHaierACStateLength] = {0xA5, 0x66, 0x20, 0x01, 0x00, + 0xC0, 0x20, 0x00, 0x0C}; + + irsend.sendRaw(rawData, 149, 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(HAIER_AC, irsend.capture.decode_type); + EXPECT_EQ(kHaierACBits, irsend.capture.bits); + EXPECT_FALSE(irsend.capture.repeat); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + + IRHaierAC haier(0); + haier.setRaw(irsend.capture.state); + EXPECT_EQ( + "Command: 6 (Temp Up), Mode: 0 (AUTO), Temp: 22C, Fan: 0 (AUTO), " + "Swing: 0 (Off), Sleep: Off, Health: Off, " + "Current Time: 00:01, On Timer: Off, Off Timer: Off", + haier.toString()); +} + +// Decode a "real" example message. +TEST(TestDecodeHaierAC, RealExample3) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + // Data from Issue #404 captured by kuzin2006 + uint16_t rawData[149] = { + 3030, 3044, 3030, 4302, 578, 1692, 550, 582, 550, 1706, 550, 714, + 550, 582, 552, 1706, 550, 582, 550, 1836, 552, 1706, 578, 1690, + 552, 1704, 552, 714, 550, 1706, 552, 1706, 550, 582, 550, 714, + 552, 582, 550, 582, 578, 1690, 550, 714, 552, 582, 552, 582, + 550, 582, 550, 714, 550, 584, 550, 582, 550, 582, 578, 700, + 552, 1706, 550, 582, 550, 582, 552, 1836, 550, 582, 550, 582, + 552, 1706, 550, 714, 578, 568, 552, 582, 552, 582, 550, 714, + 550, 1706, 550, 1706, 550, 582, 552, 712, 552, 582, 580, 568, + 550, 582, 550, 714, 550, 582, 550, 582, 550, 1706, 550, 714, + 550, 582, 550, 582, 578, 568, 552, 712, 552, 582, 550, 582, + 550, 582, 550, 712, 550, 584, 550, 582, 552, 582, 578, 722, + 552, 1704, 550, 582, 550, 1706, 550, 1862, 550, 1706, 550, 582, + 550, 1704, 552, 582, 578}; + uint8_t expectedState[kHaierACStateLength] = {0xA5, 0xEC, 0x20, 0x09, 0x20, + 0xC0, 0x20, 0x00, 0xBA}; + + irsend.sendRaw(rawData, 149, 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(HAIER_AC, irsend.capture.decode_type); + EXPECT_EQ(kHaierACBits, irsend.capture.bits); + EXPECT_FALSE(irsend.capture.repeat); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + + IRHaierAC haier(0); + haier.setRaw(irsend.capture.state); + EXPECT_EQ( + "Command: 12 (Health), Mode: 0 (AUTO), Temp: 30C, Fan: 0 (AUTO), " + "Swing: 0 (Off), Sleep: Off, Health: On, " + "Current Time: 00:09, On Timer: Off, Off Timer: Off", + haier.toString()); +} + +// Decode normal "synthetic" messages. +TEST(TestDecodeHaierAC_YRW02, NormalDecode) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + uint8_t expectedState[kHaierACYRW02StateLength] = { + 0xA6, 0x12, 0x00, 0x02, 0x40, 0x20, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3F}; + + irsend.reset(); + irsend.sendHaierACYRW02(expectedState); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(HAIER_AC_YRW02, irsend.capture.decode_type); + EXPECT_EQ(kHaierACYRW02Bits, irsend.capture.bits); + EXPECT_FALSE(irsend.capture.repeat); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); +} + +// Decode a "real" example message. +TEST(TestDecodeHaierAC_YRW02, RealExample) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + // Data from Issue #485 captured by non7top + uint16_t rawData[229] = { + 2998, 3086, 2998, 4460, 568, 1640, 596, 492, 514, 1690, 590, 496, + 566, 532, 592, 1596, 570, 1618, 518, 584, 590, 538, 524, 536, + 568, 532, 590, 1596, 516, 612, 568, 538, 522, 1638, 586, 500, + 512, 614, 568, 538, 520, 538, 586, 538, 566, 540, 520, 538, + 586, 538, 522, 538, 588, 538, 568, 538, 520, 538, 586, 538, + 566, 538, 520, 540, 588, 1596, 590, 536, 568, 538, 520, 1592, + 640, 538, 520, 540, 588, 538, 568, 538, 516, 562, 566, 538, + 518, 542, 586, 540, 566, 1596, 590, 538, 566, 538, 516, 544, + 586, 538, 516, 542, 588, 540, 564, 540, 468, 590, 588, 538, + 566, 540, 466, 590, 588, 538, 514, 544, 588, 538, 566, 538, + 468, 1692, 606, 526, 466, 592, 588, 538, 568, 490, 588, 538, + 566, 540, 466, 592, 588, 538, 566, 538, 466, 592, 588, 538, + 568, 492, 586, 540, 566, 540, 468, 590, 588, 538, 568, 516, + 488, 590, 588, 538, 568, 492, 588, 538, 566, 518, 488, 590, + 588, 540, 564, 518, 490, 590, 588, 538, 562, 496, 588, 538, + 566, 518, 488, 590, 588, 538, 562, 522, 488, 588, 590, 538, + 560, 498, 588, 540, 564, 522, 486, 590, 590, 538, 560, 524, + 488, 588, 588, 1598, 514, 608, 564, 1600, 548, 536, 586, 538, + 568, 1594, 590, 1618, 578, 1606, 606, 1582, 590, 1596, 590, 1616, + 580}; + uint8_t expectedState[kHaierACYRW02StateLength] = { + 0xA6, 0x12, 0x00, 0x02, 0x40, 0x20, 0x00, + 0x20, 0x00, 0x00, 0x00, 0x00, 0x05, 0x3F}; + + irsend.sendRaw(rawData, 229, 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(HAIER_AC_YRW02, irsend.capture.decode_type); + EXPECT_EQ(kHaierACYRW02Bits, irsend.capture.bits); + EXPECT_FALSE(irsend.capture.repeat); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + + IRHaierACYRW02 haier(0); + haier.setRaw(irsend.capture.state); + EXPECT_EQ( + "Power: On, Button: 5 (Power), Mode: 2 (Cool), Temp: 17C," + " Fan: 2 (High), Turbo: 0 (Off), Swing: 2 (Middle), Sleep: Off," + " Health: On", + haier.toString()); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Hitachi_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Hitachi_test.cpp new file mode 100644 index 000000000..de0a4a2a1 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Hitachi_test.cpp @@ -0,0 +1,765 @@ +// Copyright 2018 David Conran + +#include "ir_Hitachi.h" +#include "IRrecv.h" +#include "IRrecv_test.h" +#include "IRremoteESP8266.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendHitachiAC(). + +// Test sending typical data only. +TEST(TestSendHitachiAC, SendData) { + IRsendTest irsend(0); + irsend.begin(); + + uint8_t hitachi_code[kHitachiAcStateLength] = { + 0x80, 0x08, 0x0C, 0x02, 0xFD, 0x80, 0x7F, 0x88, 0x48, 0x80, + 0x20, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xAC}; + irsend.reset(); + irsend.sendHitachiAC(hitachi_code); + EXPECT_EQ( + "m3300s1700" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s1250m400s1250m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s1250m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s500m400s1250" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s1250m400s500m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s500m400s1250m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s1250m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s1250m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s1250m400s500m400s1250m400s1250m400s500m400s500" + "m400s100000", + irsend.outputStr()); +} + +// Test sending with repeats. +TEST(TestSendHitachiAC, SendWithRepeats) { + IRsendTest irsend(0); + irsend.begin(); + + uint8_t hitachi_code[kHitachiAcStateLength] = { + 0x80, 0x08, 0x0C, 0x02, 0xFD, 0x80, 0x7F, 0x88, 0x48, 0x80, + 0x20, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xAC}; + irsend.reset(); + + irsend.sendHitachiAC(hitachi_code, kHitachiAcStateLength, 1); + EXPECT_EQ( + "m3300s1700" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s1250m400s1250m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s1250m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s500m400s1250" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s1250m400s500m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s500m400s1250m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s1250m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s1250m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s1250m400s500m400s1250m400s1250m400s500m400s500" + "m400s100000" + "m3300s1700" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s1250m400s1250m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s1250m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s500m400s1250" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s1250m400s500m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s500m400s1250m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s1250m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s1250m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s1250m400s500m400s1250m400s1250m400s500m400s500" + "m400s100000", + irsend.outputStr()); +} + +// Test sending atypical sizes. +TEST(TestSendHitachiAC, SendUnexpectedSizes) { + IRsendTest irsend(0); + irsend.begin(); + + uint8_t hitachi_short_code[kHitachiAcStateLength - 1] = { + 0x80, 0x08, 0x0C, 0x02, 0xFD, 0x80, 0x7F, 0x88, 0x48, + 0x80, 0x20, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00}; + uint8_t hitachi_long_code[kHitachiAcStateLength + 1] = { + 0x80, 0x08, 0x0C, 0x02, 0xFD, 0x80, 0x7F, 0x88, 0x48, 0x80, + 0x20, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xAC, 0xFF}; + irsend.reset(); + irsend.sendHitachiAC(hitachi_short_code, kHitachiAcStateLength - 1); + ASSERT_EQ("", irsend.outputStr()); + + irsend.reset(); + irsend.sendHitachiAC(hitachi_long_code, kHitachiAcStateLength + 1); + ASSERT_EQ( + "m3300s1700" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s1250m400s1250m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s1250m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s500m400s1250" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s1250m400s500m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s500m400s1250m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s1250m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s1250m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s1250m400s500m400s1250m400s1250m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s100000", + irsend.outputStr()); +} + +// Tests for IRHitachiAc class. +TEST(TestIRHitachiAcClass, SetAndGetPower) { + IRHitachiAc ac(0); + ac.on(); + EXPECT_TRUE(ac.getPower()); + ac.off(); + EXPECT_FALSE(ac.getPower()); + ac.setPower(true); + EXPECT_TRUE(ac.getPower()); + ac.setPower(false); + EXPECT_FALSE(ac.getPower()); +} + +TEST(TestIRHitachiAcClass, SetAndGetSwing) { + IRHitachiAc ac(0); + ac.setSwingVertical(true); + ac.setSwingHorizontal(true); + EXPECT_TRUE(ac.getSwingVertical()); + EXPECT_TRUE(ac.getSwingHorizontal()); + ac.setSwingVertical(false); + EXPECT_FALSE(ac.getSwingVertical()); + EXPECT_TRUE(ac.getSwingHorizontal()); + ac.setSwingVertical(true); + EXPECT_TRUE(ac.getSwingVertical()); + EXPECT_TRUE(ac.getSwingHorizontal()); + ac.setSwingHorizontal(false); + EXPECT_TRUE(ac.getSwingVertical()); + EXPECT_FALSE(ac.getSwingHorizontal()); + ac.setSwingHorizontal(true); + EXPECT_TRUE(ac.getSwingHorizontal()); +} + +TEST(TestIRHitachiAcClass, SetAndGetTemp) { + IRHitachiAc ac(0); + ac.setTemp(25); + EXPECT_EQ(25, ac.getTemp()); + ac.setTemp(kHitachiAcMinTemp); + EXPECT_EQ(kHitachiAcMinTemp, ac.getTemp()); + ac.setTemp(kHitachiAcMinTemp - 1); + EXPECT_EQ(kHitachiAcMinTemp, ac.getTemp()); + ac.setTemp(kHitachiAcMaxTemp); + EXPECT_EQ(kHitachiAcMaxTemp, ac.getTemp()); + ac.setTemp(kHitachiAcMaxTemp + 1); + EXPECT_EQ(kHitachiAcMaxTemp, ac.getTemp()); + ac.setTemp(64); + EXPECT_EQ(64, ac.getTemp()); +} + +TEST(TestIRHitachiAcClass, SetAndGetMode) { + IRHitachiAc ac(0); + ac.setMode(kHitachiAcCool); + ac.setFan(kHitachiAcFanAuto); + EXPECT_EQ(kHitachiAcCool, ac.getMode()); + ac.setTemp(25); + EXPECT_EQ(25, ac.getTemp()); + EXPECT_EQ(kHitachiAcFanAuto, ac.getFan()); + ac.setMode(kHitachiAcFan); + EXPECT_EQ(kHitachiAcFan, ac.getMode()); + EXPECT_EQ(64, ac.getTemp()); + EXPECT_NE(kHitachiAcFanAuto, ac.getFan()); + ac.setMode(kHitachiAcHeat); + EXPECT_EQ(25, ac.getTemp()); + EXPECT_EQ(kHitachiAcHeat, ac.getMode()); + ac.setMode(kHitachiAcAuto); + ac.setFan(kHitachiAcFanAuto); + EXPECT_EQ(kHitachiAcAuto, ac.getMode()); + ac.setMode(kHitachiAcDry); + EXPECT_EQ(kHitachiAcDry, ac.getMode()); + EXPECT_NE(kHitachiAcFanAuto, ac.getFan()); +} + +TEST(TestIRHitachiAcClass, SetAndGetFan) { + IRHitachiAc ac(0); + ac.setMode(kHitachiAcCool); // All fan options are available in this mode. + ac.setFan(kHitachiAcFanAuto); + EXPECT_EQ(kHitachiAcFanAuto, ac.getFan()); + ac.setFan(kHitachiAcFanLow); + EXPECT_EQ(kHitachiAcFanLow, ac.getFan()); + ac.setFan(kHitachiAcFanHigh); + EXPECT_EQ(kHitachiAcFanHigh, ac.getFan()); + ac.setFan(kHitachiAcFanHigh + 1); + EXPECT_EQ(kHitachiAcFanHigh, ac.getFan()); + ac.setFan(0); + EXPECT_EQ(kHitachiAcFanAuto, ac.getFan()); + + ac.setMode(kHitachiAcFan); // No auto-fan in Fan mode. + EXPECT_EQ(kHitachiAcFanLow, ac.getFan()); + ac.setFan(kHitachiAcFanAuto); + EXPECT_EQ(kHitachiAcFanLow, ac.getFan()); + ac.setFan(kHitachiAcFanHigh); + EXPECT_EQ(kHitachiAcFanHigh, ac.getFan()); + + // Only Low and one higher fan settin in Dry mode. + ac.setMode(kHitachiAcDry); + EXPECT_EQ(kHitachiAcFanLow + 1, ac.getFan()); + ac.setFan(kHitachiAcFanHigh); + EXPECT_EQ(kHitachiAcFanLow + 1, ac.getFan()); + ac.setFan(kHitachiAcFanLow); + EXPECT_EQ(kHitachiAcFanLow, ac.getFan()); + ac.setFan(kHitachiAcFanAuto); + EXPECT_EQ(kHitachiAcFanLow, ac.getFan()); +} + +TEST(TestIRHitachiAcClass, HumanReadable) { + IRHitachiAc ac(0); + + ac.setMode(kHitachiAcHeat); + ac.setTemp(kHitachiAcMaxTemp); + ac.on(); + ac.setFan(kHitachiAcFanHigh); + ac.setSwingVertical(true); + EXPECT_EQ( + "Power: On, Mode: 3 (HEAT), Temp: 32C, Fan: 5 (HIGH), " + "Swing (Vertical): On, Swing (Horizontal): Off", + ac.toString()); + ac.setMode(kHitachiAcCool); + ac.setTemp(kHitachiAcMinTemp); + ac.setFan(kHitachiAcFanLow); + ac.setSwingVertical(false); + ac.setSwingHorizontal(true); + EXPECT_EQ( + "Power: On, Mode: 4 (COOL), Temp: 16C, Fan: 2 (LOW), " + "Swing (Vertical): Off, Swing (Horizontal): On", + ac.toString()); +} + +TEST(TestIRHitachiAcClass, ChecksumCalculation) { + IRHitachiAc ac(0); + + const uint8_t originalstate[kHitachiAcStateLength] = { + 0x80, 0x08, 0x0C, 0x02, 0xFD, 0x80, 0x7F, 0x88, 0x48, 0x80, + 0x20, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xAC}; + uint8_t examplestate[kHitachiAcStateLength] = { + 0x80, 0x08, 0x0C, 0x02, 0xFD, 0x80, 0x7F, 0x88, 0x48, 0x80, + 0x20, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xAC}; + + EXPECT_TRUE(IRHitachiAc::validChecksum(examplestate)); + EXPECT_EQ(0xAC, IRHitachiAc::calcChecksum(examplestate)); + + examplestate[kHitachiAcStateLength - 1] = + 0x12; // Make the existing checksum invalid + EXPECT_FALSE(IRHitachiAc::validChecksum(examplestate)); + EXPECT_EQ(0xAC, IRHitachiAc::calcChecksum(examplestate)); + ac.setRaw(examplestate); + // Extracting the state from the object should have a correct checksum. + EXPECT_TRUE(IRHitachiAc::validChecksum(ac.getRaw())); + EXPECT_STATE_EQ(originalstate, ac.getRaw(), kHitachiAcBits); + + examplestate[8] = 0x12; // Force a different checksum calc. + EXPECT_FALSE(IRHitachiAc::validChecksum(examplestate)); + EXPECT_EQ(0xFF, IRHitachiAc::calcChecksum(examplestate)); +} + +// Tests for decodeHitachiAC(). + +// Decode a synthetic HitachiAC message. +TEST(TestDecodeHitachiAC, NormalSynthetic) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + uint8_t hitachi_code[kHitachiAcStateLength] = { + 0x80, 0x08, 0x0C, 0x02, 0xFD, 0x80, 0x7F, 0x88, 0x48, 0x80, + 0x20, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xAC}; + + irsend.reset(); + irsend.sendHitachiAC(hitachi_code); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(HITACHI_AC, irsend.capture.decode_type); + ASSERT_EQ(kHitachiAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(hitachi_code, irsend.capture.state, kHitachiAcBits); +} + +// Decode a 'real' HitachiAC message. +TEST(TestDecodeHitachiAC, NormalRealExample1) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + uint8_t hitachi_code[kHitachiAcStateLength] = { + 0x80, 0x08, 0x0C, 0x02, 0xFD, 0x80, 0x7F, 0x88, 0x48, 0x80, + 0x20, 0x04, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xAC}; + + // Ref: https://github.com/markszabo/IRremoteESP8266/issues/417 + // 'On' '16c' 'auto fan' 'cooling mode' + uint16_t rawData[451] = { + 3318, 1720, 400, 1276, 400, 432, 398, 434, 398, 434, 400, 432, + 398, 432, 398, 432, 398, 434, 398, 432, 398, 434, 400, 432, + 398, 434, 398, 1278, 398, 434, 398, 434, 396, 434, 398, 434, + 398, 432, 398, 434, 398, 432, 398, 1276, 426, 1252, 424, 408, + 424, 406, 424, 408, 426, 406, 398, 432, 398, 434, 398, 432, + 400, 432, 398, 1276, 426, 408, 424, 1252, 426, 1252, 424, 1250, + 426, 1252, 428, 1250, 426, 1252, 424, 406, 426, 1248, 428, 1252, + 426, 406, 426, 406, 424, 408, 400, 432, 400, 430, 400, 432, + 400, 430, 400, 432, 400, 1276, 400, 1276, 402, 1276, 400, 1276, + 400, 1276, 400, 1278, 400, 1276, 402, 1276, 402, 428, 402, 430, + 400, 430, 402, 1276, 400, 430, 402, 430, 400, 432, 402, 428, + 402, 1278, 400, 430, 402, 430, 402, 1276, 402, 428, 402, 430, + 402, 430, 400, 1276, 402, 430, 402, 430, 402, 430, 402, 430, + 402, 428, 402, 430, 404, 430, 402, 428, 402, 430, 402, 1276, + 402, 430, 402, 428, 402, 430, 400, 428, 402, 430, 402, 430, + 402, 430, 402, 430, 402, 428, 402, 430, 402, 1274, 402, 428, + 402, 430, 402, 430, 402, 430, 402, 430, 402, 428, 402, 428, + 402, 428, 404, 428, 404, 428, 402, 1276, 400, 430, 402, 430, + 400, 432, 400, 456, 374, 432, 400, 456, 404, 428, 404, 426, + 404, 428, 402, 428, 402, 430, 402, 430, 400, 432, 398, 434, + 376, 454, 378, 454, 380, 452, 378, 452, 404, 428, 406, 424, + 432, 398, 406, 426, 430, 402, 404, 428, 428, 402, 400, 430, + 400, 432, 398, 434, 398, 432, 398, 434, 372, 460, 374, 434, + 398, 432, 398, 434, 396, 434, 376, 456, 376, 456, 376, 456, + 376, 1300, 378, 454, 378, 452, 378, 454, 378, 454, 378, 454, + 378, 452, 378, 454, 400, 432, 402, 430, 402, 430, 402, 430, + 402, 428, 402, 430, 402, 430, 400, 430, 402, 430, 400, 432, + 400, 430, 400, 432, 400, 430, 402, 430, 400, 432, 398, 432, + 400, 430, 400, 432, 398, 432, 398, 434, 398, 432, 398, 432, + 400, 434, 398, 432, 398, 432, 398, 434, 398, 434, 396, 434, + 398, 434, 398, 432, 398, 434, 398, 432, 398, 456, 376, 454, + 376, 436, 396, 454, 376, 454, 378, 454, 376, 454, 376, 456, + 374, 458, 374, 1302, 374, 456, 374, 458, 374, 458, 376, 456, + 374, 456, 374, 456, 374, 456, 376, 456, 376, 456, 374, 458, + 374, 458, 374, 458, 372, 458, 372, 460, 374, 458, 372, 460, + 372, 460, 372, 460, 370, 462, 372, 460, 372, 460, 370, 462, + 370, 462, 356, 1320, 368, 464, 346, 1332, 356, 476, 368, 1310, + 366, 1312, 366, 464, 366, 466, 366}; + + irsend.reset(); + irsend.sendRaw(rawData, 451, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decodeHitachiAC(&irsend.capture)); + EXPECT_EQ(HITACHI_AC, irsend.capture.decode_type); + ASSERT_EQ(kHitachiAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(hitachi_code, irsend.capture.state, kHitachiAcBits); + IRHitachiAc ac(0); + ac.setRaw(irsend.capture.state); + EXPECT_EQ( + "Power: On, Mode: 4 (COOL), Temp: 16C, Fan: 1 (AUTO), " + "Swing (Vertical): Off, Swing (Horizontal): Off", + ac.toString()); +} + +// Decode another 'real' HitachiAC message. +TEST(TestDecodeHitachiAC, NormalRealExample2) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + uint8_t hitachi_code[kHitachiAcStateLength] = { + 0x80, 0x08, 0x0C, 0x02, 0xFD, 0x80, 0x7F, 0x88, 0x48, 0x10, + 0xC0, 0x02, 0x00, 0xA0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0xD0}; + + // Ref: https://github.com/markszabo/IRremoteESP8266/issues/417 + // 'On' '32c' 'auto fan' 'heating mode' + uint16_t rawData[451] = { + 3322, 1718, 400, 1278, 398, 432, 402, 430, 400, 430, 402, 430, + 402, 430, 400, 432, 400, 432, 402, 430, 400, 430, 402, 430, + 400, 430, 402, 1276, 402, 430, 400, 430, 402, 430, 402, 430, + 402, 428, 402, 430, 400, 430, 402, 1278, 400, 1274, 402, 430, + 400, 432, 400, 430, 402, 430, 402, 430, 400, 430, 400, 432, + 402, 428, 402, 1276, 404, 428, 402, 1276, 402, 1274, 402, 1274, + 404, 1272, 402, 1274, 402, 1274, 404, 430, 402, 1274, 402, 1274, + 402, 430, 402, 430, 402, 430, 400, 430, 402, 430, 404, 428, + 402, 430, 400, 430, 402, 1274, 402, 1276, 402, 1276, 402, 1276, + 400, 1276, 402, 1272, 404, 1274, 402, 1272, 404, 430, 402, 430, + 402, 430, 402, 1274, 404, 428, 402, 428, 404, 430, 402, 430, + 402, 1274, 402, 430, 402, 430, 402, 1274, 402, 430, 402, 430, + 402, 428, 404, 428, 402, 430, 402, 430, 402, 1272, 406, 430, + 402, 428, 402, 430, 402, 430, 400, 1276, 400, 1276, 402, 430, + 402, 430, 402, 430, 402, 430, 402, 428, 402, 430, 402, 430, + 402, 430, 402, 430, 402, 430, 402, 430, 400, 430, 402, 1272, + 404, 430, 400, 430, 402, 430, 402, 428, 404, 430, 400, 430, + 402, 430, 402, 430, 402, 428, 402, 1276, 402, 428, 402, 1276, + 402, 430, 402, 428, 402, 430, 402, 430, 402, 430, 402, 428, + 402, 430, 402, 430, 402, 430, 402, 430, 402, 428, 402, 428, + 404, 430, 402, 428, 402, 430, 402, 428, 402, 430, 402, 432, + 402, 428, 402, 430, 402, 430, 402, 430, 400, 430, 400, 430, + 402, 430, 402, 430, 402, 426, 404, 430, 402, 430, 400, 428, + 404, 428, 404, 432, 398, 432, 400, 456, 376, 456, 376, 456, + 376, 1276, 402, 454, 378, 456, 376, 454, 378, 454, 402, 430, + 376, 454, 376, 456, 400, 430, 378, 454, 400, 432, 402, 430, + 376, 454, 376, 456, 376, 454, 400, 432, 374, 458, 400, 430, + 398, 434, 374, 456, 374, 456, 374, 458, 374, 458, 374, 456, + 352, 482, 372, 460, 374, 458, 364, 468, 352, 480, 372, 460, + 352, 480, 352, 480, 352, 480, 352, 480, 352, 454, 400, 432, + 376, 480, 374, 456, 374, 456, 378, 430, 404, 452, 376, 430, + 404, 428, 406, 426, 406, 426, 404, 426, 406, 428, 406, 426, + 430, 400, 430, 1244, 408, 424, 434, 398, 432, 400, 406, 424, + 432, 400, 406, 426, 430, 400, 432, 400, 432, 400, 430, 402, + 428, 402, 404, 428, 404, 426, 406, 426, 406, 426, 404, 428, + 428, 402, 404, 428, 404, 428, 402, 428, 404, 428, 402, 428, + 404, 428, 404, 1274, 402, 1274, 404, 428, 400, 1276, 402, 430, + 402, 430, 402, 430, 402, 430, 400}; + + irsend.reset(); + irsend.sendRaw(rawData, 451, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(HITACHI_AC, irsend.capture.decode_type); + ASSERT_EQ(kHitachiAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(hitachi_code, irsend.capture.state, kHitachiAcBits); + IRHitachiAc ac(0); + ac.setRaw(irsend.capture.state); + EXPECT_EQ( + "Power: On, Mode: 3 (HEAT), Temp: 32C, Fan: 5 (HIGH), " + "Swing (Vertical): Off, Swing (Horizontal): Off", + ac.toString()); +} + +// Tests for sendHitachiAC1(). + +// Test sending typical data only. +TEST(TestSendHitachiAC1, SendData) { + IRsendTest irsend(0); + irsend.begin(); + + uint8_t hitachi_code[kHitachiAc1StateLength] = {0xB2, 0xAE, 0x4D, 0x51, 0xF0, + 0x61, 0x84, 0x00, 0x00, 0x00, + 0x00, 0x30, 0xB8}; + irsend.reset(); + irsend.sendHitachiAC1(hitachi_code); + EXPECT_EQ( + "m3400s3400" + "m400s1250m400s500m400s1250m400s1250m400s500m400s500m400s1250m400s500" + "m400s1250m400s500m400s1250m400s500m400s1250m400s1250m400s1250m400s500" + "m400s500m400s1250m400s500m400s500m400s1250m400s1250m400s500m400s1250" + "m400s500m400s1250m400s500m400s1250m400s500m400s500m400s500m400s1250" + "m400s1250m400s1250m400s1250m400s1250m400s500m400s500m400s500m400s500" + "m400s500m400s1250m400s1250m400s500m400s500m400s500m400s500m400s1250" + "m400s1250m400s500m400s500m400s500m400s500m400s1250m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s1250m400s1250m400s500m400s500m400s500m400s500" + "m400s1250m400s500m400s1250m400s1250m400s1250m400s500m400s500m400s500" + "m400s100000", + irsend.outputStr()); +} + +// Decode a 'real' HitachiAC1 message. +TEST(TestDecodeHitachiAC1, NormalRealExample) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + uint8_t hitachi_code[kHitachiAc1StateLength] = {0xB2, 0xAE, 0x4D, 0x51, 0xF0, + 0x61, 0x84, 0x00, 0x00, 0x00, + 0x00, 0x10, 0x98}; + + // Ref: https://github.com/markszabo/IRremoteESP8266/issues/453 + uint16_t rawData[211] = { + 3400, 3350, 450, 1250, 450, 400, 400, 1300, 400, 1300, 400, 400, + 450, 400, 400, 1300, 400, 400, 400, 1300, 400, 400, 450, 1250, + 400, 450, 400, 1300, 400, 1250, 450, 1250, 450, 400, 400, 450, + 400, 1250, 450, 400, 400, 400, 400, 1300, 400, 1300, 400, 400, + 450, 1250, 450, 400, 400, 1300, 400, 400, 450, 1250, 400, 400, + 450, 400, 400, 400, 450, 1250, 400, 1300, 450, 1250, 450, 1250, + 400, 1300, 400, 400, 450, 400, 400, 450, 350, 450, 400, 400, + 400, 1300, 400, 1300, 400, 400, 450, 400, 400, 400, 450, 400, + 400, 1300, 400, 1250, 450, 400, 400, 400, 450, 400, 400, 400, + 450, 1250, 450, 400, 400, 400, 450, 400, 400, 400, 450, 400, + 400, 400, 450, 400, 400, 400, 450, 400, 400, 400, 400, 450, + 400, 400, 400, 400, 450, 400, 400, 400, 450, 400, 400, 450, + 400, 400, 400, 400, 450, 400, 400, 400, 450, 400, 400, 450, + 400, 400, 400, 400, 400, 450, 400, 400, 400, 400, 450, 400, + 400, 400, 450, 400, 400, 400, 450, 400, 400, 400, 450, 400, + 400, 400, 450, 400, 400, 1300, 400, 400, 450, 400, 400, 400, + 400, 400, 450, 1250, 450, 400, 400, 400, 450, 1250, 450, 1250, + 450, 400, 400, 400, 450, 400, 400}; // UNKNOWN 828A89E1 + + irsend.reset(); + irsend.sendRaw(rawData, 211, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(HITACHI_AC1, irsend.capture.decode_type); + ASSERT_EQ(kHitachiAc1Bits, irsend.capture.bits); + EXPECT_STATE_EQ(hitachi_code, irsend.capture.state, kHitachiAc1Bits); +} + +// Tests for sendHitachiAC2(). + +// Test sending typical data only. +TEST(TestSendHitachiAC2, SendData) { + IRsendTest irsend(0); + irsend.begin(); + + uint8_t hitachi_code[kHitachiAc2StateLength] = { + 0x80, 0x08, 0x00, 0x02, 0xFD, 0xFF, 0x00, 0x33, 0xCC, 0x49, 0xB6, + 0x22, 0xDD, 0x01, 0xFE, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, + 0xFF, 0x00, 0xFF, 0xCA, 0x35, 0x8F, 0x70, 0x00, 0xFF, 0x00, 0xFF, + 0x01, 0xFE, 0xC0, 0x3F, 0x80, 0x7F, 0x11, 0xEE, 0x00, 0xFF, 0x00, + 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00}; + irsend.reset(); + irsend.sendHitachiAC2(hitachi_code); + EXPECT_EQ( + "m3300s1700" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s1250m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s1250m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s500m400s1250" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s1250m400s1250m400s500m400s500m400s1250m400s1250" + "m400s1250m400s1250m400s500m400s500m400s1250m400s1250m400s500m400s500" + "m400s500m400s1250m400s500m400s500m400s1250m400s500m400s500m400s1250" + "m400s1250m400s500m400s1250m400s1250m400s500m400s1250m400s1250m400s500" + "m400s500m400s500m400s1250m400s500m400s500m400s500m400s1250m400s500" + "m400s1250m400s1250m400s500m400s1250m400s1250m400s1250m400s500m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s1250" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s1250m400s1250m400s500m400s500m400s1250m400s500m400s1250m400s500" + "m400s500m400s500m400s1250m400s1250m400s500m400s1250m400s500m400s1250" + "m400s1250m400s500m400s500m400s500m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s1250m400s1250m400s1250m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s1250" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s500" + "m400s1250m400s1250m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s500m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s1250m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s500m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s1250m400s500m400s500m400s500m400s1250" + "m400s1250m400s1250m400s1250m400s500m400s1250m400s1250m400s1250m400s500" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250m400s1250" + "m400s500m400s500m400s500m400s500m400s500m400s500m400s500m400s500" + "m400s100000", + irsend.outputStr()); +} + +// Decode a synthetic HitachiAC2 message. + +TEST(TestDecodeHitachiAC2, NormalSyntheticExample) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // ON - 32c cool (fan auto) + uint8_t hitachi_code[kHitachiAc2StateLength] = { + 0x80, 0x08, 0x00, 0x02, 0xFD, 0xFF, 0x00, 0x33, 0xCC, 0x49, 0xB6, + 0x22, 0xDD, 0x01, 0xFE, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, + 0xFF, 0x00, 0xFF, 0xCA, 0x35, 0x8F, 0x70, 0x00, 0xFF, 0x00, 0xFF, + 0x01, 0xFE, 0xC0, 0x3F, 0x80, 0x7F, 0x11, 0xEE, 0x00, 0xFF, 0x00, + 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00}; + + irsend.reset(); + irsend.sendHitachiAC2(hitachi_code); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(HITACHI_AC2, irsend.capture.decode_type); + ASSERT_EQ(kHitachiAc2Bits, irsend.capture.bits); + EXPECT_STATE_EQ(hitachi_code, irsend.capture.state, kHitachiAc2Bits); +} + +// Decode a 'real' HitachiAC2 message. +TEST(TestDecodeHitachiAC2, NormalRealExample) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + uint8_t hitachi_code[kHitachiAc2StateLength] = { + 0x80, 0x08, 0x00, 0x02, 0xFD, 0xFF, 0x00, 0x33, 0xCC, 0x49, 0xB6, + 0x22, 0xDD, 0x01, 0xFE, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, + 0xFF, 0x00, 0xFF, 0xCA, 0x35, 0x8F, 0x70, 0x00, 0xFF, 0x00, 0xFF, + 0x01, 0xFE, 0xC0, 0x3F, 0x80, 0x7F, 0x11, 0xEE, 0x00, 0xFF, 0x00, + 0xFF, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00}; + + // Ref: https://github.com/markszabo/IRremoteESP8266/issues/417 + uint16_t rawData[851] = { + // ON - 32c cool (fan auto) + 3432, 1654, 492, 1180, 488, 360, 486, 360, 486, 360, 486, 362, + 486, 362, 460, 360, 486, 362, 486, 362, 486, 360, 486, 362, + 486, 362, 486, 1184, 488, 362, 486, 360, 486, 362, 486, 362, + 486, 362, 460, 362, 486, 362, 486, 362, 484, 362, 486, 362, + 486, 362, 486, 362, 458, 362, 484, 362, 486, 362, 484, 364, + 484, 362, 486, 1184, 486, 362, 486, 1210, 488, 1210, 488, 1184, + 486, 1210, 488, 1210, 488, 1182, 488, 360, 488, 1208, 488, 1208, + 488, 1182, 488, 1208, 488, 1208, 488, 1208, 462, 1208, 490, 1208, + 488, 1208, 490, 332, 488, 360, 488, 360, 488, 360, 486, 360, + 486, 360, 486, 362, 460, 360, 486, 362, 486, 362, 486, 1210, + 488, 1210, 460, 362, 486, 362, 486, 1210, 488, 1210, 488, 1182, + 488, 1210, 488, 362, 486, 360, 488, 1182, 488, 1210, 488, 362, + 486, 362, 486, 360, 486, 1182, 488, 362, 486, 362, 486, 1210, + 488, 360, 486, 336, 486, 1210, 488, 1210, 488, 360, 486, 1182, + 488, 1210, 488, 360, 488, 1208, 488, 1182, 488, 362, 486, 362, + 486, 360, 486, 1210, 460, 362, 486, 360, 486, 362, 486, 1210, + 486, 362, 486, 1184, 488, 1208, 488, 360, 486, 1210, 488, 1184, + 488, 1208, 488, 362, 486, 1208, 462, 360, 486, 360, 486, 362, + 486, 360, 486, 362, 486, 360, 486, 334, 486, 1210, 488, 1208, + 488, 1210, 488, 1182, 488, 1208, 488, 1210, 488, 1182, 488, 1208, + 488, 360, 488, 360, 486, 360, 486, 334, 486, 362, 486, 362, + 486, 362, 486, 362, 486, 362, 486, 1182, 488, 1210, 486, 1210, + 488, 1210, 460, 1210, 488, 1210, 488, 1210, 488, 1184, 488, 360, + 486, 360, 486, 362, 486, 362, 486, 360, 460, 360, 486, 362, + 486, 362, 484, 1210, 488, 1182, 488, 1210, 488, 1210, 488, 1210, + 488, 1182, 488, 1208, 488, 1208, 488, 360, 460, 360, 486, 360, + 486, 360, 488, 360, 486, 362, 486, 362, 486, 334, 486, 1210, + 488, 1208, 488, 1210, 460, 1210, 488, 1208, 488, 1210, 488, 1182, + 488, 1208, 488, 360, 486, 362, 486, 360, 488, 334, 486, 360, + 486, 362, 486, 362, 486, 362, 486, 1210, 460, 1210, 488, 1210, + 488, 1210, 488, 1182, 488, 1210, 488, 1208, 488, 1182, 488, 360, + 486, 360, 486, 362, 486, 362, 486, 360, 486, 362, 460, 360, + 486, 362, 486, 1210, 486, 1212, 486, 1184, 488, 1210, 488, 1208, + 488, 1182, 488, 1208, 488, 1208, 488, 1208, 462, 1208, 488, 360, + 486, 362, 486, 1208, 488, 334, 486, 1208, 488, 360, 486, 360, + 486, 362, 486, 1182, 488, 1210, 488, 360, 486, 1210, 488, 334, + 486, 1208, 488, 1208, 488, 360, 486, 360, 486, 334, 486, 1210, + 488, 1210, 488, 1210, 460, 1210, 488, 360, 486, 1208, 488, 1182, + 490, 1208, 488, 360, 486, 360, 486, 360, 486, 360, 460, 360, + 486, 362, 486, 362, 486, 362, 486, 362, 486, 362, 486, 362, + 458, 362, 486, 1210, 488, 1210, 488, 1182, 488, 1210, 488, 1208, + 488, 1208, 462, 1208, 488, 1208, 488, 360, 486, 360, 486, 334, + 486, 360, 486, 362, 486, 362, 486, 362, 486, 362, 486, 1184, + 488, 1210, 488, 1210, 488, 1208, 462, 1210, 488, 1208, 488, 1208, + 488, 1182, 488, 360, 486, 360, 486, 360, 486, 362, 486, 360, + 460, 362, 486, 360, 488, 1208, 488, 1210, 488, 1184, 488, 1208, + 488, 1210, 488, 1182, 488, 1208, 488, 1208, 488, 360, 488, 1182, + 488, 1208, 488, 360, 488, 360, 488, 360, 486, 334, 486, 360, + 486, 362, 486, 362, 486, 360, 486, 1210, 488, 1182, 488, 1210, + 488, 1210, 488, 1182, 488, 1210, 488, 1210, 488, 360, 488, 334, + 486, 360, 488, 360, 486, 362, 486, 362, 486, 362, 486, 362, + 460, 1210, 488, 1210, 488, 1210, 488, 1184, 488, 1208, 488, 1208, + 490, 1182, 488, 360, 488, 360, 486, 362, 486, 1208, 488, 360, + 460, 362, 486, 362, 486, 1210, 488, 1210, 488, 1182, 488, 1208, + 488, 360, 488, 1208, 488, 1184, 486, 1210, 488, 360, 488, 360, + 486, 360, 460, 362, 486, 362, 486, 362, 486, 362, 484, 362, + 486, 362, 486, 1184, 488, 1210, 488, 1210, 488, 1182, 488, 1210, + 488, 1208, 488, 1208, 462, 1210, 488, 360, 486, 362, 486, 360, + 486, 362, 486, 334, 486, 362, 486, 360, 486, 362, 486, 1208, + 488, 1184, 488, 1208, 488, 1210, 488, 1182, 488, 1208, 488, 1208, + 488, 1208, 488, 1182, 488, 1208, 488, 1208, 488, 1182, 488, 1208, + 488, 1208, 488, 1182, 488, 1208, 488, 360, 488, 360, 486, 360, + 486, 362, 460, 362, 486, 362, 486, 362, 486, 360, 486, 1208, + 488, 1182, 488, 1208, 488, 1210, 488, 1182, 488, 1208, 490, 1208, + 488, 1208, 462, 360, 488, 360, 486, 360, 488, 360, 486, 360, + 486, 360, 486, 336, 486, 362, 486, 1210, 488, 1208, 488, 1182, + 488, 1208, 488, 1208, 488, 1208, 462, 1208, 490, 1206, 490, 360, + 488, 360, 488, 332, 486, 360, 488, 360, 486, 360, 488, 360, + 486, 360, 486, 1182, 488, 1208, 488, 1206, 492, 1208, 462, 1208, + 488, 1208, 488, 1208, 490, 1182, 490, 360, 486, 360, 486, 360, + 488, 360, 488, 360, 460, 360, 486, 362, 486, 360, 488}; + + irsend.reset(); + irsend.sendRaw(rawData, 851, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(HITACHI_AC2, irsend.capture.decode_type); + ASSERT_EQ(kHitachiAc2Bits, irsend.capture.bits); + EXPECT_STATE_EQ(hitachi_code, irsend.capture.state, kHitachiAc2Bits); +} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_JVC_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_JVC_test.cpp similarity index 76% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_JVC_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_JVC_test.cpp index 0826b2268..c899fa8c6 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_JVC_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_JVC_test.cpp @@ -17,7 +17,8 @@ TEST(TestSendJVC, SendDataOnly) { "m8400s4200" "m525s1725m525s1725m525s525m525s525m525s525m525s525m525s1725m525s525" "m525s1725m525s525m525s1725m525s1725m525s1725m525s525m525s525m525s525" - "m525s60000", irsend.outputStr()); + "m525s21675", + irsend.outputStr()); } // Test sending with different repeats. @@ -26,31 +27,33 @@ TEST(TestSendJVC, SendWithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendJVC(0xC2B8, JVC_BITS, 1); // 1 repeat. + irsend.sendJVC(0xC2B8, kJvcBits, 1); // 1 repeat. EXPECT_EQ( "m8400s4200" "m525s1725m525s1725m525s525m525s525m525s525m525s525m525s1725m525s525" "m525s1725m525s525m525s1725m525s1725m525s1725m525s525m525s525m525s525" - "m525s60000" + "m525s21675" "m525s1725m525s1725m525s525m525s525m525s525m525s525m525s1725m525s525" "m525s1725m525s525m525s1725m525s1725m525s1725m525s525m525s525m525s525" - "m525s60000", irsend.outputStr()); - irsend.sendJVC(0xC2B8, JVC_BITS, 2); // 2 repeats. + "m525s34275", + irsend.outputStr()); + irsend.sendJVC(0xC2B8, kJvcBits, 2); // 2 repeats. EXPECT_EQ( "m8400s4200" "m525s1725m525s1725m525s525m525s525m525s525m525s525m525s1725m525s525" "m525s1725m525s525m525s1725m525s1725m525s1725m525s525m525s525m525s525" - "m525s60000" + "m525s21675" "m525s1725m525s1725m525s525m525s525m525s525m525s525m525s1725m525s525" "m525s1725m525s525m525s1725m525s1725m525s1725m525s525m525s525m525s525" - "m525s60000" + "m525s34275" "m525s1725m525s1725m525s525m525s525m525s525m525s525m525s1725m525s525" "m525s1725m525s525m525s1725m525s1725m525s1725m525s525m525s525m525s525" - "m525s60000", irsend.outputStr()); + "m525s34275", + irsend.outputStr()); } // Test sending an atypical data size. -TEST(TestSendJVC, SendUsualSize) { +TEST(TestSendJVC, SendUnusualSize) { IRsendTest irsend(4); irsend.begin(); @@ -59,7 +62,8 @@ TEST(TestSendJVC, SendUsualSize) { EXPECT_EQ( "m8400s4200" "m525s525m525s525m525s525m525s525m525s525m525s525m525s525m525s525" - "m525s60000", irsend.outputStr()); + "m525s38475", + irsend.outputStr()); irsend.reset(); irsend.sendJVC(0x1234567890ABCDEF, 64); @@ -73,7 +77,8 @@ TEST(TestSendJVC, SendUsualSize) { "m525s1725m525s525m525s1725m525s525m525s1725m525s525m525s1725m525s1725" "m525s1725m525s1725m525s525m525s525m525s1725m525s1725m525s525m525s1725" "m525s1725m525s1725m525s1725m525s525m525s1725m525s1725m525s1725m525s1725" - "m525s60000", irsend.outputStr()); + "m525s10875", + irsend.outputStr()); } // Tests for encodeJVC(). @@ -100,9 +105,9 @@ TEST(TestDecodeJVC, NormalDecodeWithStrict) { irsend.reset(); irsend.sendJVC(0xC2B8); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, JVC_BITS, true)); + ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, kJvcBits, true)); EXPECT_EQ(JVC, irsend.capture.decode_type); - EXPECT_EQ(JVC_BITS, irsend.capture.bits); + EXPECT_EQ(kJvcBits, irsend.capture.bits); EXPECT_EQ(0xC2B8, irsend.capture.value); EXPECT_EQ(0x43, irsend.capture.address); EXPECT_EQ(0x1D, irsend.capture.command); @@ -112,9 +117,9 @@ TEST(TestDecodeJVC, NormalDecodeWithStrict) { irsend.reset(); irsend.sendJVC(irsend.encodeJVC(0x07, 0x99)); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, JVC_BITS, true)); + ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, kJvcBits, true)); EXPECT_EQ(JVC, irsend.capture.decode_type); - EXPECT_EQ(JVC_BITS, irsend.capture.bits); + EXPECT_EQ(kJvcBits, irsend.capture.bits); EXPECT_EQ(0xE099, irsend.capture.value); EXPECT_EQ(0x07, irsend.capture.address); EXPECT_EQ(0x99, irsend.capture.command); @@ -124,9 +129,9 @@ TEST(TestDecodeJVC, NormalDecodeWithStrict) { irsend.reset(); irsend.sendJVC(irsend.encodeJVC(0x1, 0x1)); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, JVC_BITS, true)); + ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, kJvcBits, true)); EXPECT_EQ(JVC, irsend.capture.decode_type); - EXPECT_EQ(JVC_BITS, irsend.capture.bits); + EXPECT_EQ(kJvcBits, irsend.capture.bits); EXPECT_EQ(0x8080, irsend.capture.value); EXPECT_EQ(0x1, irsend.capture.address); EXPECT_EQ(0x1, irsend.capture.command); @@ -141,42 +146,42 @@ TEST(TestDecodeJVC, NormalDecodeWithRepeatAndStrict) { // Normal JVC 16-bit message with 2 repeats. irsend.reset(); - irsend.sendJVC(0xC2B8, JVC_BITS, 2); + irsend.sendJVC(0xC2B8, kJvcBits, 2); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, JVC_BITS, true)); + ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, kJvcBits, true)); EXPECT_EQ(JVC, irsend.capture.decode_type); - EXPECT_EQ(JVC_BITS, irsend.capture.bits); + EXPECT_EQ(kJvcBits, irsend.capture.bits); EXPECT_EQ(0xC2B8, irsend.capture.value); EXPECT_EQ(0x43, irsend.capture.address); EXPECT_EQ(0x1D, irsend.capture.command); EXPECT_FALSE(irsend.capture.repeat); - irsend.makeDecodeResult(2 * JVC_BITS + 4); - ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, JVC_BITS, true)); + irsend.makeDecodeResult(2 * kJvcBits + 4); + ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, kJvcBits, true)); EXPECT_EQ(JVC, irsend.capture.decode_type); - EXPECT_EQ(JVC_BITS, irsend.capture.bits); + EXPECT_EQ(kJvcBits, irsend.capture.bits); EXPECT_EQ(0xC2B8, irsend.capture.value); EXPECT_TRUE(irsend.capture.repeat); - irsend.makeDecodeResult(2 * JVC_BITS + 4 + 2 * JVC_BITS + 2); - ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, JVC_BITS, true)); + irsend.makeDecodeResult(2 * kJvcBits + 4 + 2 * kJvcBits + 2); + ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, kJvcBits, true)); EXPECT_EQ(JVC, irsend.capture.decode_type); - EXPECT_EQ(JVC_BITS, irsend.capture.bits); + EXPECT_EQ(kJvcBits, irsend.capture.bits); EXPECT_EQ(0xC2B8, irsend.capture.value); EXPECT_TRUE(irsend.capture.repeat); // Simulate 'just' a JVC repeat command. // JVC VCR Power On from Global Cache, but modified to be a repeat message. - uint16_t gc_test[37] = {38000, 1, 1, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 61, 20, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[37] = {38000, 1, 1, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, + 20, 20, 20, 61, 20, 20, 20, 61, 20, 20, 20, 61, 20, + 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.reset(); irsend.sendGC(gc_test, 37); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture)); EXPECT_EQ(JVC, irsend.capture.decode_type); - EXPECT_EQ(JVC_BITS, irsend.capture.bits); + EXPECT_EQ(kJvcBits, irsend.capture.bits); EXPECT_EQ(0xC2B8, irsend.capture.value); EXPECT_EQ(0x43, irsend.capture.address); EXPECT_EQ(0x1D, irsend.capture.command); @@ -193,7 +198,7 @@ TEST(TestDecodeJVC, DecodeWithNonStrictValues) { irsend.sendJVC(0x0, 8); // Illegal value JVC 8-bit message. irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeJVC(&irsend.capture, JVC_BITS, true)); + ASSERT_FALSE(irrecv.decodeJVC(&irsend.capture, kJvcBits, true)); // Should pass if strict off. ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture, 8, false)); EXPECT_EQ(JVC, irsend.capture.decode_type); @@ -206,7 +211,7 @@ TEST(TestDecodeJVC, DecodeWithNonStrictValues) { irsend.sendJVC(0x12345678, 32); // Illegal value JVC 32-bit message. irsend.makeDecodeResult(); // Should not pass with strict when we ask for less bits than we got. - ASSERT_FALSE(irrecv.decodeJVC(&irsend.capture, JVC_BITS, true)); + ASSERT_FALSE(irrecv.decodeJVC(&irsend.capture, kJvcBits, true)); irsend.makeDecodeResult(); // Should fail with strict when we ask for the wrong bit size. @@ -225,7 +230,7 @@ TEST(TestDecodeJVC, DecodeWithNonStrictValues) { irsend.makeDecodeResult(); // Shouldn't pass if strict off and the wrong expected bits. - ASSERT_FALSE(irrecv.decodeJVC(&irsend.capture, JVC_BITS, false)); + ASSERT_FALSE(irrecv.decodeJVC(&irsend.capture, kJvcBits, false)); // Re-decode with correct bit size. ASSERT_FALSE(irrecv.decodeJVC(&irsend.capture, 36, true)); @@ -264,16 +269,17 @@ TEST(TestDecodeJVC, DecodeGlobalCacheExample) { irsend.reset(); // JVC VCR Power On from Global Cache. - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 20, 20, 61, 20, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; - // 38000,1,37,320,161,21,59,21,59,21,19,21,19,21,19,21,19,21,59,21,19,21,59,21,59,21,19,21,59,21,19,21,19,21,19,21,19,21,838,21,59,21,59,21,19,21,19,21,19,21,19,21,59,21,19,21,59,21,19,21,59,21,59,21,59,21,19,21,19,21,19,21,850}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 20, 20, 61, 20, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; + // 38000,1,37,320,161,21,59,21,59,21,19,21,19,21,19,21,19,21,59,21,19,21,59,21,59,21,19,21,59,21,19,21,19,21,19,21,19,21,838,21,59,21,59,21,19,21,19,21,19,21,19,21,59,21,19,21,59,21,19,21,59,21,59,21,59,21,19,21,19,21,19,21,850}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decodeJVC(&irsend.capture)); EXPECT_EQ(JVC, irsend.capture.decode_type); - EXPECT_EQ(JVC_BITS, irsend.capture.bits); + EXPECT_EQ(kJvcBits, irsend.capture.bits); EXPECT_EQ(0xC2B8, irsend.capture.value); EXPECT_EQ(0x43, irsend.capture.address); EXPECT_EQ(0x1D, irsend.capture.command); @@ -288,12 +294,13 @@ TEST(TestDecodeJVC, FailToDecodeNonJVCExample) { irsend.reset(); // Modified a few entries to unexpected values, based on previous test case. - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeJVC(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeJVC(&irsend.capture, JVC_BITS, false)); + ASSERT_FALSE(irrecv.decodeJVC(&irsend.capture, kJvcBits, false)); } diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Kelvinator_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Kelvinator_test.cpp new file mode 100644 index 000000000..001f8bcf2 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Kelvinator_test.cpp @@ -0,0 +1,518 @@ +// Copyright 2017 David Conran + +#include "ir_Kelvinator.h" +#include "IRrecv.h" +#include "IRrecv_test.h" +#include "IRremoteESP8266.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendKelvinator(). + +// Test sending typical data only. +TEST(TestSendKelvinator, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + uint8_t kelv_code[kKelvinatorStateLength] = { + 0x19, 0x0B, 0x80, 0x50, 0x00, 0x00, 0x00, 0xE0, + 0x19, 0x0B, 0x80, 0x70, 0x00, 0x00, 0x10, 0xf0}; + irsend.reset(); + irsend.sendKelvinator(kelv_code); + EXPECT_EQ( + "m9010s4505" + "m680s1530m680s510m680s510m680s1530m680s1530m680s510m680s510m680s510" + "m680s1530m680s1530m680s510m680s1530m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s1530" + "m680s510m680s510m680s510m680s510m680s1530m680s510m680s1530m680s510" + "m680s510m680s1530m680s510" + "m680s19975" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530" + "m680s39950" + "m9010s4505" + "m680s1530m680s510m680s510m680s1530m680s1530m680s510m680s510m680s510" + "m680s1530m680s1530m680s510m680s1530m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s1530" + "m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530m680s510" + "m680s510m680s1530m680s510" + "m680s19975" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s1530m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530m680s1530" + "m680s39950", + irsend.outputStr()); +} + +// Test sending with repeats. +TEST(TestSendKelvinator, SendWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + uint8_t kelv_code[kKelvinatorStateLength] = { + 0x19, 0x0B, 0x80, 0x50, 0x00, 0x00, 0x00, 0xE0, + 0x19, 0x0B, 0x80, 0x70, 0x00, 0x00, 0x10, 0xf0}; + irsend.reset(); + + irsend.sendKelvinator(kelv_code, kKelvinatorStateLength, 1); + EXPECT_EQ( + "m9010s4505" + "m680s1530m680s510m680s510m680s1530m680s1530m680s510m680s510m680s510" + "m680s1530m680s1530m680s510m680s1530m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s1530" + "m680s510m680s510m680s510m680s510m680s1530m680s510m680s1530m680s510" + "m680s510m680s1530m680s510" + "m680s19975" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530" + "m680s39950" + "m9010s4505" + "m680s1530m680s510m680s510m680s1530m680s1530m680s510m680s510m680s510" + "m680s1530m680s1530m680s510m680s1530m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s1530" + "m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530m680s510" + "m680s510m680s1530m680s510" + "m680s19975" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s1530m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530m680s1530" + "m680s39950" + "m9010s4505" + "m680s1530m680s510m680s510m680s1530m680s1530m680s510m680s510m680s510" + "m680s1530m680s1530m680s510m680s1530m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s1530" + "m680s510m680s510m680s510m680s510m680s1530m680s510m680s1530m680s510" + "m680s510m680s1530m680s510" + "m680s19975" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530" + "m680s39950" + "m9010s4505" + "m680s1530m680s510m680s510m680s1530m680s1530m680s510m680s510m680s510" + "m680s1530m680s1530m680s510m680s1530m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s1530" + "m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530m680s510" + "m680s510m680s1530m680s510" + "m680s19975" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s1530m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530m680s1530" + "m680s39950", + irsend.outputStr()); +} + +// Test sending atypical sizes. +TEST(TestSendKelvinator, SendUnexpectedSizes) { + IRsendTest irsend(4); + irsend.begin(); + + uint8_t kelv_short_code[15] = {0x19, 0x0B, 0x80, 0x50, 0x00, 0x00, 0x00, 0xE0, + 0x19, 0x0B, 0x80, 0x70, 0x00, 0x00, 0x10}; + uint8_t kelv_long_code[17] = {0x19, 0x0B, 0x80, 0x50, 0x00, 0x00, + 0x00, 0xE0, 0x19, 0x0B, 0x80, 0x70, + 0x00, 0x00, 0x10, 0xf0, 0x00}; + irsend.reset(); + irsend.sendKelvinator(kelv_short_code, 15); + ASSERT_EQ("", irsend.outputStr()); + + irsend.reset(); + // Shouldn't be different from the SendDataOnly. We just don't send the + // extra data. + irsend.sendKelvinator(kelv_long_code, 17); + ASSERT_EQ( + "m9010s4505" + "m680s1530m680s510m680s510m680s1530m680s1530m680s510m680s510m680s510" + "m680s1530m680s1530m680s510m680s1530m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s1530" + "m680s510m680s510m680s510m680s510m680s1530m680s510m680s1530m680s510" + "m680s510m680s1530m680s510" + "m680s19975" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530" + "m680s39950" + "m9010s4505" + "m680s1530m680s510m680s510m680s1530m680s1530m680s510m680s510m680s510" + "m680s1530m680s1530m680s510m680s1530m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s1530" + "m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530m680s510" + "m680s510m680s1530m680s510" + "m680s19975" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s1530m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530m680s1530" + "m680s39950", + irsend.outputStr()); +} + +// Tests for IRKelvinatorAC class. + +TEST(TestKelvinatorClass, Power) { + IRKelvinatorAC irkelv(0); + irkelv.begin(); + + irkelv.on(); + EXPECT_TRUE(irkelv.getPower()); + + irkelv.off(); + EXPECT_FALSE(irkelv.getPower()); + + irkelv.setPower(true); + EXPECT_TRUE(irkelv.getPower()); + + irkelv.setPower(false); + EXPECT_FALSE(irkelv.getPower()); +} + +TEST(TestKelvinatorClass, Temperature) { + IRKelvinatorAC irkelv(0); + irkelv.begin(); + + irkelv.setTemp(0); + EXPECT_EQ(kKelvinatorMinTemp, irkelv.getTemp()); + + irkelv.setTemp(255); + EXPECT_EQ(kKelvinatorMaxTemp, irkelv.getTemp()); + + irkelv.setTemp(kKelvinatorMinTemp); + EXPECT_EQ(kKelvinatorMinTemp, irkelv.getTemp()); + + irkelv.setTemp(kKelvinatorMaxTemp); + EXPECT_EQ(kKelvinatorMaxTemp, irkelv.getTemp()); + + irkelv.setTemp(kKelvinatorMinTemp - 1); + EXPECT_EQ(kKelvinatorMinTemp, irkelv.getTemp()); + + irkelv.setTemp(kKelvinatorMaxTemp + 1); + EXPECT_EQ(kKelvinatorMaxTemp, irkelv.getTemp()); + + irkelv.setTemp(17); + EXPECT_EQ(17, irkelv.getTemp()); + + irkelv.setTemp(21); + EXPECT_EQ(21, irkelv.getTemp()); + + irkelv.setTemp(25); + EXPECT_EQ(25, irkelv.getTemp()); + + irkelv.setTemp(29); + EXPECT_EQ(29, irkelv.getTemp()); +} + +TEST(TestKelvinatorClass, OperatingMode) { + IRKelvinatorAC irkelv(0); + irkelv.begin(); + + irkelv.setTemp(24); + irkelv.setMode(kKelvinatorAuto); + EXPECT_EQ(kKelvinatorAuto, irkelv.getMode()); + EXPECT_EQ(kKelvinatorAutoTemp, irkelv.getTemp()); + + irkelv.setMode(kKelvinatorCool); + EXPECT_EQ(kKelvinatorCool, irkelv.getMode()); + + irkelv.setMode(kKelvinatorHeat); + EXPECT_EQ(kKelvinatorHeat, irkelv.getMode()); + + irkelv.setTemp(24); + irkelv.setMode(kKelvinatorDry); + EXPECT_EQ(kKelvinatorDry, irkelv.getMode()); + EXPECT_EQ(kKelvinatorAutoTemp, irkelv.getTemp()); + + irkelv.setMode(kKelvinatorFan); + EXPECT_EQ(kKelvinatorFan, irkelv.getMode()); + + irkelv.setMode(kKelvinatorHeat + 1); + EXPECT_EQ(kKelvinatorAuto, irkelv.getMode()); + + irkelv.setMode(255); + EXPECT_EQ(kKelvinatorAuto, irkelv.getMode()); +} + +TEST(TestKelvinatorClass, VaneSwing) { + IRKelvinatorAC irkelv(0); + irkelv.begin(); + + irkelv.setSwingHorizontal(true); + irkelv.setSwingVertical(false); + + irkelv.setSwingHorizontal(true); + EXPECT_TRUE(irkelv.getSwingHorizontal()); + EXPECT_FALSE(irkelv.getSwingVertical()); + + irkelv.setSwingVertical(true); + EXPECT_TRUE(irkelv.getSwingHorizontal()); + EXPECT_TRUE(irkelv.getSwingVertical()); + + irkelv.setSwingHorizontal(false); + EXPECT_FALSE(irkelv.getSwingHorizontal()); + EXPECT_TRUE(irkelv.getSwingVertical()); + + irkelv.setSwingVertical(false); + EXPECT_FALSE(irkelv.getSwingHorizontal()); + EXPECT_FALSE(irkelv.getSwingVertical()); +} + +TEST(TestKelvinatorClass, QuietMode) { + IRKelvinatorAC irkelv(0); + irkelv.begin(); + + irkelv.setQuiet(true); + EXPECT_TRUE(irkelv.getQuiet()); + + irkelv.setQuiet(false); + EXPECT_FALSE(irkelv.getQuiet()); + + irkelv.setQuiet(true); + EXPECT_TRUE(irkelv.getQuiet()); +} + +TEST(TestKelvinatorClass, IonFilter) { + IRKelvinatorAC irkelv(0); + irkelv.begin(); + + irkelv.setIonFilter(true); + EXPECT_TRUE(irkelv.getIonFilter()); + + irkelv.setIonFilter(false); + EXPECT_FALSE(irkelv.getIonFilter()); + + irkelv.setIonFilter(true); + EXPECT_TRUE(irkelv.getIonFilter()); +} + +TEST(TestKelvinatorClass, Light) { + IRKelvinatorAC irkelv(0); + irkelv.begin(); + + irkelv.setLight(true); + EXPECT_TRUE(irkelv.getLight()); + + irkelv.setLight(false); + EXPECT_FALSE(irkelv.getLight()); + + irkelv.setLight(true); + EXPECT_TRUE(irkelv.getLight()); +} + +TEST(TestKelvinatorClass, XFan) { + IRKelvinatorAC irkelv(0); + irkelv.begin(); + + irkelv.setXFan(true); + EXPECT_TRUE(irkelv.getXFan()); + + irkelv.setXFan(false); + EXPECT_FALSE(irkelv.getXFan()); + + irkelv.setXFan(true); + EXPECT_TRUE(irkelv.getXFan()); +} + +TEST(TestKelvinatorClass, TurboFan) { + IRKelvinatorAC irkelv(0); + irkelv.begin(); + + irkelv.setTurbo(true); + EXPECT_TRUE(irkelv.getTurbo()); + + irkelv.setTurbo(false); + EXPECT_FALSE(irkelv.getTurbo()); + + irkelv.setFan(2); + irkelv.setTurbo(true); + EXPECT_TRUE(irkelv.getTurbo()); + + // Turbo mode is turned off if the temperature is changed. + irkelv.setFan(3); + EXPECT_FALSE(irkelv.getTurbo()); + + // But only when it is changed, not set to the same value again. + irkelv.setTurbo(true); + irkelv.setFan(3); + EXPECT_TRUE(irkelv.getTurbo()); +} + +TEST(TestKelvinatorClass, FanSpeed) { + IRKelvinatorAC irkelv(0); + irkelv.begin(); + + irkelv.setFan(0); + EXPECT_EQ(0, irkelv.getFan()); + + irkelv.setFan(255); + EXPECT_EQ(kKelvinatorFanMax, irkelv.getFan()); + + irkelv.setFan(kKelvinatorFanMax); + EXPECT_EQ(kKelvinatorFanMax, irkelv.getFan()); + + irkelv.setFan(kKelvinatorFanMax + 1); + EXPECT_EQ(kKelvinatorFanMax, irkelv.getFan()); + + irkelv.setFan(kKelvinatorFanMax - 1); + EXPECT_EQ(kKelvinatorFanMax - 1, irkelv.getFan()); + + irkelv.setFan(1); + EXPECT_EQ(1, irkelv.getFan()); + + irkelv.setFan(1); + EXPECT_EQ(1, irkelv.getFan()); + + irkelv.setFan(3); + EXPECT_EQ(3, irkelv.getFan()); +} + +TEST(TestKelvinatorClass, Checksums) { + uint8_t kelv_code[kKelvinatorStateLength] = { + 0x19, 0x0B, 0x80, 0x50, 0x00, 0x00, 0x00, 0xE0, + 0x19, 0x0B, 0x80, 0x70, 0x00, 0x00, 0x10, 0xf0}; + + EXPECT_TRUE(IRKelvinatorAC::validChecksum(kelv_code)); + // Change the array so the checksum is invalid. + kelv_code[0] ^= 0xFF; + EXPECT_FALSE(IRKelvinatorAC::validChecksum(kelv_code)); + // Restore the previous change, and change another byte. + kelv_code[0] ^= 0xFF; + kelv_code[4] ^= 0xFF; + EXPECT_FALSE(IRKelvinatorAC::validChecksum(kelv_code)); + kelv_code[4] ^= 0xFF; + // Change something in the 2nd block. + kelv_code[10] ^= 0xFF; + EXPECT_FALSE(IRKelvinatorAC::validChecksum(kelv_code)); + kelv_code[10] ^= 0xFF; + EXPECT_TRUE(IRKelvinatorAC::validChecksum(kelv_code)); +} + +TEST(TestKelvinatorClass, SetAndGetRaw) { + IRKelvinatorAC irkelv(0); + uint8_t initialState[kKelvinatorStateLength] = { + 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0xA0, + 0x00, 0x00, 0x00, 0x70, 0x00, 0x00, 0x00, 0xA0}; + uint8_t expectedState[kKelvinatorStateLength] = { + 0x08, 0x05, 0x20, 0x50, 0x00, 0x00, 0x00, 0x70, + 0x08, 0x05, 0x20, 0x70, 0x00, 0x00, 0x00, 0x70}; + + EXPECT_STATE_EQ(initialState, irkelv.getRaw(), kKelvinatorBits); + // toggle the power state. + irkelv.setPower(!irkelv.getPower()); + irkelv.setTemp(21); + irkelv.setLight(true); + EXPECT_STATE_EQ(expectedState, irkelv.getRaw(), kKelvinatorBits); + irkelv.setRaw(initialState); + EXPECT_STATE_EQ(initialState, irkelv.getRaw(), kKelvinatorBits); +} + +TEST(TestKelvinatorClass, HumanReadable) { + IRKelvinatorAC irkelv(0); + + EXPECT_EQ( + "Power: Off, Mode: 0 (AUTO), Temp: 16C, Fan: 0 (AUTO), Turbo: Off, " + "Quiet: Off, XFan: Off, IonFilter: Off, Light: Off, " + "Swing (Horizontal): Off, Swing (Vertical): Off", + irkelv.toString()); + irkelv.on(); + irkelv.setMode(kKelvinatorCool); + irkelv.setTemp(25); + irkelv.setFan(kKelvinatorFanMax); + irkelv.setXFan(true); + irkelv.setIonFilter(true); + irkelv.setLight(true); + irkelv.setSwingHorizontal(true); + EXPECT_EQ( + "Power: On, Mode: 1 (COOL), Temp: 25C, Fan: 5 (MAX), Turbo: Off, " + "Quiet: Off, XFan: On, IonFilter: On, Light: On, " + "Swing (Horizontal): On, Swing (Vertical): Off", + irkelv.toString()); +} + +TEST(TestKelvinatorClass, MessageConstuction) { + IRKelvinatorAC irkelv(0); + IRsendTest irsend(4); + irkelv.begin(); + irsend.begin(); + + irkelv.setFan(1); + irkelv.setMode(kKelvinatorCool); + irkelv.setTemp(27); + irkelv.setSwingVertical(false); + irkelv.setSwingHorizontal(true); + irkelv.setIonFilter(true); + irkelv.setQuiet(false); + irkelv.setLight(false); + irkelv.setPower(true); + irkelv.setTurbo(false); + irkelv.setXFan(true); + + // Check everything for kicks. + EXPECT_EQ(1, irkelv.getFan()); + EXPECT_EQ(kKelvinatorCool, irkelv.getMode()); + EXPECT_EQ(27, irkelv.getTemp()); + EXPECT_FALSE(irkelv.getSwingVertical()); + EXPECT_TRUE(irkelv.getSwingHorizontal()); + EXPECT_TRUE(irkelv.getIonFilter()); + EXPECT_FALSE(irkelv.getQuiet()); + EXPECT_FALSE(irkelv.getLight()); + EXPECT_TRUE(irkelv.getPower()); + EXPECT_FALSE(irkelv.getTurbo()); + EXPECT_TRUE(irkelv.getXFan()); + + irsend.reset(); + irsend.sendKelvinator(irkelv.getRaw()); + EXPECT_EQ( + "m9010s4505" + "m680s1530m680s510m680s510m680s1530m680s1530m680s510m680s1530m680s510" + "m680s1530m680s1530m680s510m680s1530m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s1530m680s1530" + "m680s510m680s510m680s510m680s510m680s1530m680s510m680s1530m680s510" + "m680s510m680s1530m680s510" + "m680s19975" + "m680s510m680s510m680s510m680s510m680s1530m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530m680s1530" + "m680s39950" + "m9010s4505" + "m680s1530m680s510m680s510m680s1530m680s1530m680s510m680s1530m680s510" + "m680s1530m680s1530m680s510m680s1530m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s1530m680s1530" + "m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530m680s510" + "m680s510m680s1530m680s510" + "m680s19975" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s510m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s1530m680s510m680s510m680s510" + "m680s510m680s510m680s510m680s510m680s1530m680s1530m680s1530m680s1530" + "m680s39950", + irsend.outputStr()); +} + +// Decode a synthetic Kelvinator message. +TEST(TestDecodeKelvinator, NormalSynthetic) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + uint8_t kelv_code[kKelvinatorStateLength] = { + 0x19, 0x0B, 0x80, 0x50, 0x00, 0x00, 0x00, 0xE0, + 0x19, 0x0B, 0x80, 0x70, 0x00, 0x00, 0x10, 0xf0}; + irsend.reset(); + irsend.sendKelvinator(kelv_code); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(KELVINATOR, irsend.capture.decode_type); + ASSERT_EQ(kKelvinatorBits, irsend.capture.bits); + EXPECT_STATE_EQ(kelv_code, irsend.capture.state, kKelvinatorBits); +} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_LG_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_LG_test.cpp similarity index 63% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_LG_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_LG_test.cpp index fbdaf7126..8ab24a731 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_LG_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_LG_test.cpp @@ -1,8 +1,8 @@ // Copyright 2017 David Conran +#include "ir_LG.h" #include "IRsend.h" #include "IRsend_test.h" -#include "ir_LG.h" #include "gtest/gtest.h" // Tests for calcLGChecksum() @@ -30,23 +30,25 @@ TEST(TestSendLG, SendDataOnly) { irsend.reset(); irsend.sendLG(0x4B4AE51); EXPECT_EQ( - "m8000s4000" + "m8500s4250" "m550s550m550s1600m550s550m550s550" "m550s1600m550s550m550s1600m550s1600m550s550m550s1600m550s550m550s550" "m550s1600m550s550m550s1600m550s550m550s1600m550s1600m550s1600m550s550" "m550s550m550s1600m550s550m550s1600m550s550m550s550m550s550m550s1600" - "m550s108050", irsend.outputStr()); + "m550s50300", + irsend.outputStr()); irsend.reset(); - irsend.sendLG(0xB4B4AE51, LG32_BITS); + irsend.sendLG(0xB4B4AE51, kLg32Bits); EXPECT_EQ( "m4480s4480" "m560s1680m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560" "m560s1680m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560" "m560s1680m560s560m560s1680m560s560m560s1680m560s1680m560s1680m560s560" "m560s560m560s1680m560s560m560s1680m560s560m560s560m560s560m560s1680" - "m560s108080" - "m8950s2250m550s108050", irsend.outputStr()); + "m560s44800" + "m8950s2250m550s96300", + irsend.outputStr()); } // Test sending with different repeats. @@ -55,43 +57,46 @@ TEST(TestSendLG, SendWithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendLG(0x4B4AE51, LG_BITS, 1); + irsend.sendLG(0x4B4AE51, kLgBits, 1); EXPECT_EQ( - "m8000s4000" + "m8500s4250" "m550s550m550s1600m550s550m550s550" "m550s1600m550s550m550s1600m550s1600m550s550m550s1600m550s550m550s550" "m550s1600m550s550m550s1600m550s550m550s1600m550s1600m550s1600m550s550" "m550s550m550s1600m550s550m550s1600m550s550m550s550m550s550m550s1600" - "m550s108050" - "m8000s2250m550s108050", irsend.outputStr()); + "m550s50300" + "m8500s2250m550s96750", + irsend.outputStr()); irsend.reset(); - irsend.sendLG(0xB4B4AE51, LG32_BITS, 1); + irsend.sendLG(0xB4B4AE51, kLg32Bits, 1); EXPECT_EQ( "m4480s4480" "m560s1680m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560" "m560s1680m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560" "m560s1680m560s560m560s1680m560s560m560s1680m560s1680m560s1680m560s560" "m560s560m560s1680m560s560m560s1680m560s560m560s560m560s560m560s1680" - "m560s108080" - "m8950s2250m550s108050" - "m8950s2250m550s108050", irsend.outputStr()); + "m560s44800" + "m8950s2250m550s96300" + "m8950s2250m550s96300", + irsend.outputStr()); } // Test sending an atypical data size. -TEST(TestSendLG, SendUsualSize) { +TEST(TestSendLG, SendUnusualSize) { IRsendTest irsend(4); irsend.begin(); irsend.reset(); irsend.sendLG(0x0, 31); EXPECT_EQ( - "m8000s4000" + "m8500s4250" "m550s550m550s550m550s550m550s550m550s550m550s550m550s550m550s550" "m550s550m550s550m550s550m550s550m550s550m550s550m550s550m550s550" "m550s550m550s550m550s550m550s550m550s550m550s550m550s550m550s550" "m550s550m550s550m550s550m550s550m550s550m550s550m550s550" - "m550s108050", irsend.outputStr()); + "m550s60650", + irsend.outputStr()); irsend.reset(); irsend.sendLG(0x0, 64); @@ -105,8 +110,9 @@ TEST(TestSendLG, SendUsualSize) { "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" - "m560s108080" - "m8950s2250m550s108050", irsend.outputStr()); + "m560s26880" + "m8950s2250m550s96300", + irsend.outputStr()); } // Tests for encodeLG(). @@ -132,11 +138,11 @@ TEST(TestDecodeLG, NormalDecodeWithStrict) { // Normal LG 28-bit message. irsend.reset(); - irsend.sendLG(0x4B4AE51, LG_BITS); + irsend.sendLG(0x4B4AE51, kLgBits); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, LG_BITS, true)); + ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, kLgBits, true)); EXPECT_EQ(LG, irsend.capture.decode_type); - EXPECT_EQ(LG_BITS, irsend.capture.bits); + EXPECT_EQ(kLgBits, irsend.capture.bits); EXPECT_EQ(0x4B4AE51, irsend.capture.value); EXPECT_EQ(0x4B, irsend.capture.address); EXPECT_EQ(0x4AE5, irsend.capture.command); @@ -144,11 +150,11 @@ TEST(TestDecodeLG, NormalDecodeWithStrict) { // Normal LG 32-bit message. irsend.reset(); - irsend.sendLG(0xB4B4AE51, LG32_BITS); + irsend.sendLG(0xB4B4AE51, kLg32Bits); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, LG32_BITS, false)); + ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, kLg32Bits, false)); EXPECT_EQ(LG, irsend.capture.decode_type); - EXPECT_EQ(LG32_BITS, irsend.capture.bits); + EXPECT_EQ(kLg32Bits, irsend.capture.bits); EXPECT_EQ(0xB4B4AE51, irsend.capture.value); EXPECT_EQ(0xB4B, irsend.capture.address); EXPECT_EQ(0x4AE5, irsend.capture.command); @@ -158,9 +164,9 @@ TEST(TestDecodeLG, NormalDecodeWithStrict) { irsend.reset(); irsend.sendLG(irsend.encodeLG(0x07, 0x99)); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, LG_BITS, true)); + ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, kLgBits, true)); EXPECT_EQ(LG, irsend.capture.decode_type); - EXPECT_EQ(LG_BITS, irsend.capture.bits); + EXPECT_EQ(kLgBits, irsend.capture.bits); EXPECT_EQ(0x700992, irsend.capture.value); EXPECT_EQ(0x07, irsend.capture.address); EXPECT_EQ(0x99, irsend.capture.command); @@ -168,11 +174,11 @@ TEST(TestDecodeLG, NormalDecodeWithStrict) { // Synthesised Normal LG 32-bit message. irsend.reset(); - irsend.sendLG(irsend.encodeLG(0x800, 0x8000), LG32_BITS); + irsend.sendLG(irsend.encodeLG(0x800, 0x8000), kLg32Bits); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, LG32_BITS, true)); + ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, kLg32Bits, true)); EXPECT_EQ(LG, irsend.capture.decode_type); - EXPECT_EQ(LG32_BITS, irsend.capture.bits); + EXPECT_EQ(kLg32Bits, irsend.capture.bits); EXPECT_EQ(0x80080008, irsend.capture.value); EXPECT_EQ(0x800, irsend.capture.address); EXPECT_EQ(0x8000, irsend.capture.command); @@ -187,11 +193,11 @@ TEST(TestDecodeLG, NormalDecodeWithRepeatAndStrict) { // Normal LG 28-bit message with 2 repeats. irsend.reset(); - irsend.sendLG(irsend.encodeLG(0x07, 0x99), LG_BITS, 2); + irsend.sendLG(irsend.encodeLG(0x07, 0x99), kLgBits, 2); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, LG_BITS, true)); + ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, kLgBits, true)); EXPECT_EQ(LG, irsend.capture.decode_type); - EXPECT_EQ(LG_BITS, irsend.capture.bits); + EXPECT_EQ(kLgBits, irsend.capture.bits); EXPECT_EQ(0x700992, irsend.capture.value); EXPECT_EQ(0x07, irsend.capture.address); EXPECT_EQ(0x99, irsend.capture.command); @@ -199,11 +205,11 @@ TEST(TestDecodeLG, NormalDecodeWithRepeatAndStrict) { // Normal LG 32-bit message with 2 repeats. irsend.reset(); - irsend.sendLG(irsend.encodeLG(0x07, 0x99), LG32_BITS, 2); + irsend.sendLG(irsend.encodeLG(0x07, 0x99), kLg32Bits, 2); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, LG32_BITS, true)); + ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, kLg32Bits, true)); EXPECT_EQ(LG, irsend.capture.decode_type); - EXPECT_EQ(LG32_BITS, irsend.capture.bits); + EXPECT_EQ(kLg32Bits, irsend.capture.bits); EXPECT_EQ(0x700992, irsend.capture.value); EXPECT_EQ(0x07, irsend.capture.address); EXPECT_EQ(0x99, irsend.capture.command); @@ -221,30 +227,30 @@ TEST(TestDecodeLG, DecodeWithNonStrictValues) { irsend.reset(); irsend.sendLG(0x1); irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG_BITS, true)); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG32_BITS, true)); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG32_BITS, false)); - ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, LG_BITS, false)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLgBits, true)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLg32Bits, true)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLg32Bits, false)); + ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, kLgBits, false)); // Illegal LG 32-bit message value. irsend.reset(); - irsend.sendLG(0x1111111, LG32_BITS); + irsend.sendLG(0x1111111, kLg32Bits); irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG32_BITS, true)); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG_BITS, true)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLg32Bits, true)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLgBits, true)); - ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, LG32_BITS, false)); + ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, kLg32Bits, false)); EXPECT_EQ(LG, irsend.capture.decode_type); - EXPECT_EQ(LG32_BITS, irsend.capture.bits); + EXPECT_EQ(kLg32Bits, irsend.capture.bits); EXPECT_EQ(0x1111111, irsend.capture.value); EXPECT_EQ(0x11, irsend.capture.address); EXPECT_EQ(0x1111, irsend.capture.command); EXPECT_FALSE(irsend.capture.repeat); irsend.reset(); - irsend.sendLG(0x1111111, LG32_BITS); + irsend.sendLG(0x1111111, kLg32Bits); irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG_BITS, false)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLgBits, false)); } // Decode unsupported LG message sizes. @@ -259,10 +265,10 @@ TEST(TestDecodeLG, DecodeWithNonStrictSizes) { irsend.sendLG(irsend.encodeLG(0x07, 0x99), 16); irsend.makeDecodeResult(); // Should fail when unexpected against different bit sizes. - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG_BITS, true)); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG32_BITS, true)); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG_BITS, false)); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG32_BITS, false)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLgBits, true)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLg32Bits, true)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLgBits, false)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLg32Bits, false)); // Should pass if strict off. ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, 16, false)); @@ -277,10 +283,10 @@ TEST(TestDecodeLG, DecodeWithNonStrictSizes) { irsend.sendLG(0x123456789, 36); // Illegal value LG 36-bit message. irsend.makeDecodeResult(); // Should fail when unexpected against different bit sizes. - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG_BITS, true)); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG_BITS, false)); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG32_BITS, true)); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG32_BITS, false)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLgBits, true)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLgBits, false)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLg32Bits, true)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLg32Bits, false)); ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, 36, false)); EXPECT_EQ(LG, irsend.capture.decode_type); @@ -317,22 +323,21 @@ TEST(TestDecodeLG, DecodeGlobalCacheExample) { IRrecv irrecv(4); irsend.begin(); -// TODO(anyone): Find a Global Cache example of the LG 28-bit message. + // TODO(anyone): Find a Global Cache example of the LG 28-bit message. irsend.reset(); // LG (32-bit) code from Global Cache. - uint16_t gc_test[75] = {38000, 1, 69, 341, 170, 21, 64, 21, 21, 21, 64, - 21, 64, 21, 21, 21, 64, 21, 21, 21, 21, 21, 64, - 21, 21, 21, 64, 21, 64, 21, 21, 21, 64, 21, 21, - 21, 21, 21, 64, 21, 21, 21, 64, 21, 21, 21, 64, - 21, 64, 21, 64, 21, 21, 21, 21, 21, 64, 21, 21, - 21, 64, 21, 21, 21, 21, 21, 21, 21, 64, 21, 1517, - 341, 85, 21, 3655}; + uint16_t gc_test[75] = { + 38000, 1, 69, 341, 170, 21, 64, 21, 21, 21, 64, 21, 64, 21, 21, + 21, 64, 21, 21, 21, 21, 21, 64, 21, 21, 21, 64, 21, 64, 21, + 21, 21, 64, 21, 21, 21, 21, 21, 64, 21, 21, 21, 64, 21, 21, + 21, 64, 21, 64, 21, 64, 21, 21, 21, 21, 21, 64, 21, 21, 21, + 64, 21, 21, 21, 21, 21, 21, 21, 64, 21, 1517, 341, 85, 21, 3655}; irsend.sendGC(gc_test, 75); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, LG32_BITS, true)); + ASSERT_TRUE(irrecv.decodeLG(&irsend.capture, kLg32Bits, true)); EXPECT_EQ(LG, irsend.capture.decode_type); - EXPECT_EQ(LG32_BITS, irsend.capture.bits); + EXPECT_EQ(kLg32Bits, irsend.capture.bits); EXPECT_EQ(0xB4B4AE51, irsend.capture.value); EXPECT_EQ(0xB4B, irsend.capture.address); EXPECT_EQ(0x4AE5, irsend.capture.command); @@ -347,12 +352,71 @@ TEST(TestDecodeLG, FailToDecodeNonLGExample) { irsend.reset(); // Modified a few entries to unexpected values, based on previous test case. - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeLG(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, LG_BITS, false)); + ASSERT_FALSE(irrecv.decodeLG(&irsend.capture, kLgBits, false)); +} + +// Tests for sendLG2(). + +// Test sending typical data only. +TEST(TestSendLG2, SendDataOnly) { + IRsendTest irsend(0); + irsend.begin(); + + irsend.reset(); + irsend.sendLG2(0x880094D); + EXPECT_EQ( + "m3200s9850" + "m550s1600m550s550m550s550m550s550m550s1600m550s550m550s550m550s550" + "m550s550m550s550m550s550m550s550m550s550m550s550m550s550m550s550" + "m550s1600m550s550m550s550m550s1600m550s550m550s1600m550s550m550s550" + "m550s1600m550s1600m550s550m550s1600" + "m550s55250", + irsend.outputStr()); +} + +TEST(TestDecodeLG2, SyntheticExample) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + irsend.sendLG2(0x880094D); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decodeLG(&irsend.capture)); + ASSERT_EQ(LG2, irsend.capture.decode_type); + EXPECT_EQ(kLgBits, irsend.capture.bits); + EXPECT_EQ(0x880094D, irsend.capture.value); +} + +// Verify decoding of LG variant 2 messages. +TEST(TestDecodeLG2, RealLG2Example) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + // From issue #548 + uint16_t rawData[59] = { + 3154, 9834, 520, 1634, 424, 606, 424, 568, 462, 570, 462, 1564, + 508, 568, 458, 544, 500, 546, 508, 530, 508, 532, 506, 566, + 464, 568, 460, 578, 464, 568, 464, 532, 506, 552, 474, 1592, + 506, 568, 460, 570, 462, 1564, 506, 606, 424, 1640, 424, 616, + 422, 570, 462, 1616, 460, 1584, 500, 544, 506, 1598, 490}; // UNKNOWN + // F6D13AE8 + irsend.sendRaw(rawData, 59, 38000); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decodeLG(&irsend.capture)); + ASSERT_EQ(LG2, irsend.capture.decode_type); + EXPECT_EQ(kLgBits, irsend.capture.bits); + EXPECT_EQ(0x880094D, irsend.capture.value); } diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Lasertag_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Lasertag_test.cpp new file mode 100644 index 000000000..041109fb8 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Lasertag_test.cpp @@ -0,0 +1,342 @@ +// Copyright 2017 David Conran + +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// LL AAA SSSSS EEEEEEE RRRRRR TTTTTTT AAA GGGG +// LL AAAAA SS EE RR RR TTT AAAAA GG GG +// LL AA AA SSSSS EEEEE RRRRRR TTT AA AA GG +// LL AAAAAAA SS EE RR RR TTT AAAAAAA GG GG +// LLLLLLL AA AA SSSSS EEEEEEE RR RR TTT AA AA GGGGGG + +// Tests for sendLasertag(). + +// Test sending simplest case data only. +TEST(TestSendLasertag, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendLasertag(0x1); // Red 1 + EXPECT_EQ( + "m333s333m333s333m333s333m333s333m333s333m333s333m333s333m333s333m333" + "s333m333s333m333s333m333s666m333s100000", + irsend.outputStr()); + + irsend.reset(); + irsend.sendLasertag(0x2); // Red 2 + EXPECT_EQ( + "m333s333m333s333m333s333m333s333m333s333m333s333m333s333" + "m333s333m333s333m333s333m333s666m666s100333", + irsend.outputStr()); + + irsend.reset(); + irsend.sendLasertag(0x51); // Green 1 + // Raw: (21) + // m364s364m332s336m384s276m332s364m332s304m416s584m692s724m640s360m304s332m392s612m380, + EXPECT_EQ( + // m364s364m332s336m384s276m332s364m332s304m416s584 + // m692s724m640s360m304s332m392s612m380 + "m333s333m333s333m333s333m333s333m333s333m333s666" + "m666s666m666s333m333s333m333s666m333s100000", + irsend.outputStr()); + + irsend.reset(); + // Raw: (19) + // m332s308m412s280m360s336m332s304m444s248m332s644m744s612m696s692m668s636m360 + irsend.sendLasertag(0x55); // Green 5 + EXPECT_EQ( + // m332s308m412s280m360s336m332s304m444s248m332s644 + // m744s612m696s692m668s636m360 + "m333s333m333s333m333s333m333s333m333s333m333s666" + "m666s666m666s666m666s666m333s100000", + irsend.outputStr()); +} + +TEST(TestSendLasertag, SendDataWithRepeat) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendLasertag(0x1, kLasertagBits, 1); // Red 1, one repeat. + EXPECT_EQ( + "m333s333m333s333m333s333m333s333m333s333m333s333m333s333m333s333" + "m333s333m333s333m333s333m333s666m333s100000" + "m333s333m333s333m333s333m333s333m333s333m333s333m333s333m333s333" + "m333s333m333s333m333s333m333s666m333s100000", + irsend.outputStr()); + + irsend.reset(); + irsend.sendLasertag(0x52, kLasertagBits, 2); // Green 2, two repeats. + EXPECT_EQ( + "m333s333m333s333m333s333m333s333m333s333m333s666m666s666m666s333" + "m333s666m666s100333" + "m333s333m333s333m333s333m333s333m333s333m333s666m666s666m666s333" + "m333s666m666s100333" + "m333s333m333s333m333s333m333s333m333s333m333s666m666s666m666s333" + "m333s666m666s100333", + irsend.outputStr()); +} + +TEST(TestSendLasertag, SmallestMessageSize) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendLasertag(0x1555); // Alternating bit pattern will be the smallest. + // i.e. 7 actual 'mark' pulses, which is a rawlen of 13. + EXPECT_EQ("m0s333m666s666m666s666m666s666m666s666m666s666m666s666m333s100000", + irsend.outputStr()); +} + +// Tests for decodeLasertag(). + +// Decode normal Lasertag messages. +TEST(TestDecodeLasertag, NormalSyntheticDecodeWithStrict) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Normal Lasertag 13-bit message. + irsend.reset(); + irsend.sendLasertag(0x01); // Red 1 + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x01, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); // Unit 1 + EXPECT_EQ(0x0, irsend.capture.command); // Team Red + EXPECT_FALSE(irsend.capture.repeat); + + irsend.reset(); + irsend.sendLasertag(0x02); // Red 2 + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x02, irsend.capture.value); + EXPECT_EQ(0x2, irsend.capture.address); // Unit 2 + EXPECT_EQ(0x0, irsend.capture.command); // Team Red + EXPECT_FALSE(irsend.capture.repeat); + + irsend.reset(); + irsend.sendLasertag(0x06); // Red 6 + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x06, irsend.capture.value); + EXPECT_EQ(0x6, irsend.capture.address); // Unit 6 + EXPECT_EQ(0x0, irsend.capture.command); // Team Red + EXPECT_FALSE(irsend.capture.repeat); + + irsend.reset(); + irsend.sendLasertag(0x51); // Green 1 + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x51, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); // Unit 1 + EXPECT_EQ(0x5, irsend.capture.command); // Team Green + EXPECT_FALSE(irsend.capture.repeat); + + irsend.reset(); + irsend.sendLasertag(0x56); // Green 6 + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x56, irsend.capture.value); + EXPECT_EQ(0x6, irsend.capture.address); // Unit + EXPECT_EQ(0x5, irsend.capture.command); // Team + EXPECT_FALSE(irsend.capture.repeat); +} + +// Example data taken from: https://github.com/z3t0/Arduino-IRremote/issues/532 +TEST(TestDecodeLasertag, RealExamples) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + uint16_t green3[21] = {360, 364, 272, 360, 420, 248, 360, 360, 332, 308, 388, + 612, 692, 696, 636, 360, 332, 700, 300, 308, 416}; + irsend.sendRaw(green3, 21, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x53, irsend.capture.value); + EXPECT_EQ(0x3, irsend.capture.address); // Unit + EXPECT_EQ(0x5, irsend.capture.command); // Team + + irsend.reset(); + uint16_t green1[21] = {364, 364, 332, 336, 384, 276, 332, 364, 332, 304, 416, + 584, 692, 724, 640, 360, 304, 332, 392, 612, 380}; + irsend.sendRaw(green1, 21, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x51, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); // Unit + EXPECT_EQ(0x5, irsend.capture.command); // Team + + irsend.reset(); + uint16_t green4[19] = {336, 304, 412, 280, 360, 360, 304, 308, 420, 276, + 332, 636, 744, 620, 688, 724, 640, 360, 304}; + irsend.sendRaw(green4, 19, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x54, irsend.capture.value); + EXPECT_EQ(0x4, irsend.capture.address); // Unit + EXPECT_EQ(0x5, irsend.capture.command); // Team + + irsend.reset(); + uint16_t unit15[25] = {280, 360, 360, 308, 332, 388, 308, 332, 360, + 308, 360, 360, 304, 304, 412, 284, 304, 692, + 364, 360, 276, 336, 416, 276, 328}; + irsend.sendRaw(unit15, 25, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x0F, irsend.capture.value); + EXPECT_EQ(0xF, irsend.capture.address); // Unit + EXPECT_EQ(0x0, irsend.capture.command); // Team + + irsend.reset(); + uint16_t red_unit2_1[23] = {406, 262, 384, 374, 256, 354, 306, 366, + 252, 442, 256, 374, 358, 336, 278, 438, + 246, 340, 380, 292, 304, 688, 746}; + irsend.sendRaw(red_unit2_1, 23, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x02, irsend.capture.value); + EXPECT_EQ(0x2, irsend.capture.address); // Unit + EXPECT_EQ(0x0, irsend.capture.command); // Team + + irsend.reset(); + uint16_t red_unit2_2[23] = {302, 306, 302, 392, 196, 476, 278, 352, + 304, 348, 278, 438, 226, 382, 328, 366, + 252, 458, 196, 392, 302, 688, 644}; + irsend.sendRaw(red_unit2_2, 23, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x02, irsend.capture.value); + EXPECT_EQ(0x2, irsend.capture.address); // Unit + EXPECT_EQ(0x0, irsend.capture.command); // Team + + irsend.reset(); + uint16_t red_unit2_3[23] = {196, 432, 304, 348, 328, 386, 304, 326, + 302, 370, 252, 442, 272, 356, 278, 374, + 276, 438, 274, 352, 302, 668, 622}; + irsend.sendRaw(red_unit2_3, 23, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x02, irsend.capture.value); + EXPECT_EQ(0x2, irsend.capture.address); // Unit + EXPECT_EQ(0x0, irsend.capture.command); // Team + + irsend.reset(); + uint16_t red_unit2_4[23] = {304, 390, 328, 324, 324, 346, 350, 364, + 300, 330, 320, 310, 324, 388, 242, 366, + 354, 318, 354, 340, 244, 726, 670}; + irsend.sendRaw(red_unit2_4, 23, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x02, irsend.capture.value); + EXPECT_EQ(0x2, irsend.capture.address); // Unit + EXPECT_EQ(0x0, irsend.capture.command); // Team + + irsend.reset(); + uint16_t red_unit1_1_issue532[25] = { + 368, 352, 336, 308, 388, 276, 364, 356, 280, 360, 332, 336, 360, + 360, 308, 300, 416, 280, 356, 360, 312, 328, 336, 636, 424}; + irsend.sendRaw(red_unit1_1_issue532, 25, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x01, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); // Unit + EXPECT_EQ(0x0, irsend.capture.command); // Team + + irsend.reset(); + uint16_t red_unit1_2_issue532[25] = { + 328, 400, 272, 360, 388, 280, 360, 364, 272, 364, 332, 336, 332, + 388, 304, 308, 388, 280, 356, 364, 272, 368, 384, 612, 408}; + irsend.sendRaw(red_unit1_2_issue532, 25, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x01, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); // Unit + EXPECT_EQ(0x0, irsend.capture.command); // Team + + irsend.reset(); + uint16_t red_unit1_3_issue532[25] = { + 416, 284, 356, 336, 328, 336, 384, 308, 328, 368, 304, 308, 412, + 280, 328, 368, 272, 368, 376, 312, 332, 392, 276, 700, 272}; + irsend.sendRaw(red_unit1_3_issue532, 25, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x01, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); // Unit + EXPECT_EQ(0x0, irsend.capture.command); // Team + + irsend.reset(); + uint16_t red_unit2_1_issue532[23] = {308, 340, 408, 284, 332, 388, 276, 336, + 356, 340, 332, 360, 300, 364, 360, 304, + 280, 444, 276, 336, 384, 640, 696}; + irsend.sendRaw(red_unit2_1_issue532, 23, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x02, irsend.capture.value); + EXPECT_EQ(0x2, irsend.capture.address); // Unit + EXPECT_EQ(0x0, irsend.capture.command); // Team + + irsend.reset(); + uint16_t red_unit2_2_issue532[23] = {332, 308, 388, 280, 328, 420, 308, 304, + 384, 308, 332, 364, 272, 368, 384, 276, + 364, 360, 308, 332, 384, 612, 696}; + irsend.sendRaw(red_unit2_2_issue532, 23, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x02, irsend.capture.value); + EXPECT_EQ(0x2, irsend.capture.address); // Unit + EXPECT_EQ(0x0, irsend.capture.command); // Team + + irsend.reset(); + uint16_t red_unit2_3_issue532[23] = {392, 332, 340, 272, 448, 276, 364, 328, + 340, 272, 396, 296, 340, 380, 312, 296, + 400, 272, 364, 352, 284, 720, 672}; + irsend.sendRaw(red_unit2_3_issue532, 23, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(LASERTAG, irsend.capture.decode_type); + EXPECT_EQ(kLasertagBits, irsend.capture.bits); + EXPECT_EQ(0x02, irsend.capture.value); + EXPECT_EQ(0x2, irsend.capture.address); // Unit + EXPECT_EQ(0x0, irsend.capture.command); // Team +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Lutron_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Lutron_test.cpp new file mode 100644 index 000000000..6c99b9904 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Lutron_test.cpp @@ -0,0 +1,143 @@ +// Copyright 2018 David Conran + +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendLutron(). + +// Test sending typical data only. +TEST(TestSendLutron, SendDataOnly) { + IRsendTest irsend(0); + irsend.begin(); + irsend.sendLutron(0); + EXPECT_EQ("m2288s230080", irsend.outputStr()); + irsend.sendLutron(0xAAAAAAAAA); // Longest possible sequence. (I think) + EXPECT_EQ( + "m2288s2288m2288s2288m2288s2288m2288s2288m2288s2288m2288s2288m2288s2288" + "m2288s2288m2288s2288m2288s2288m2288s2288m2288s2288m2288s2288m2288s2288" + "m2288s2288m2288s2288m2288s2288m2288s152288", + irsend.outputStr()); + irsend.sendLutron(0x7FFFFFFFF); + EXPECT_EQ("m82368s150000", irsend.outputStr()); + irsend.sendLutron(0x7F88BD120); + EXPECT_EQ( + "m20592s6864m2288s6864m2288s2288m9152s2288m2288s6864m2288s4576m2288" + "s161440", + irsend.outputStr()); +} + +// Test sending with repeats. +TEST(TestSendLutron, SendWithRepeats) { + IRsendTest irsend(0); + irsend.begin(); + // Send a command with 0 repeats. + irsend.sendLutron(0x7F88BD120, kLutronBits, 0); + EXPECT_EQ( + "m20592s6864m2288s6864m2288s2288m9152s2288m2288s6864m2288s4576m2288" + "s161440", + irsend.outputStr()); + // Send a command with 1 repeat. + irsend.sendLutron(0x7F88BD120, kLutronBits, 1); + EXPECT_EQ( + "m20592s6864m2288s6864m2288s2288m9152s2288m2288s6864m2288s4576m2288" + "s161440" + "m20592s6864m2288s6864m2288s2288m9152s2288m2288s6864m2288s4576m2288" + "s161440", + irsend.outputStr()); + // Send a command with 3 repeats. + irsend.sendLutron(0x7F88BD120, kLutronBits, 3); + EXPECT_EQ( + "m20592s6864m2288s6864m2288s2288m9152s2288m2288s6864m2288s4576m2288" + "s161440" + "m20592s6864m2288s6864m2288s2288m9152s2288m2288s6864m2288s4576m2288" + "s161440" + "m20592s6864m2288s6864m2288s2288m9152s2288m2288s6864m2288s4576m2288" + "s161440" + "m20592s6864m2288s6864m2288s2288m9152s2288m2288s6864m2288s4576m2288" + "s161440", + irsend.outputStr()); +} + +// Tests for decodeLutron(). +// Decode normal Lutron messages. +TEST(TestDecodeLutron, SyntheticDecode) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Synthesised Normal Lutron messages. + irsend.reset(); + irsend.sendLutron(0x7F88BD120); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LUTRON, irsend.capture.decode_type); + EXPECT_EQ(kLutronBits, irsend.capture.bits); + EXPECT_EQ(0x7F88BD120, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + + irsend.reset(); + irsend.sendLutron(0x0DEADBEEF); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LUTRON, irsend.capture.decode_type); + EXPECT_EQ(kLutronBits, irsend.capture.bits); + EXPECT_EQ(0x0DEADBEEF, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + + irsend.reset(); + irsend.sendLutron(0x0); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LUTRON, irsend.capture.decode_type); + EXPECT_EQ(kLutronBits, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + + irsend.reset(); + irsend.sendLutron(0x7FFFFFFFF); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LUTRON, irsend.capture.decode_type); + EXPECT_EQ(kLutronBits, irsend.capture.bits); + EXPECT_EQ(0x7FFFFFFFF, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); +} + +// Decode a documented example +TEST(TestDecodeLutron, DocumentedExampleFullOff) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Full Off code. + // Ref: https://github.com/markszabo/IRremoteESP8266/issues/515 + uint16_t rawData[14] = {20518, 6839, 2280, 6839, 2280, 2280, 9119, + 2280, 2280, 6839, 2280, 4560, 2280, 11399}; + irsend.reset(); + irsend.sendRaw(rawData, 14, 40); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LUTRON, irsend.capture.decode_type); + EXPECT_EQ(kLutronBits, irsend.capture.bits); + EXPECT_EQ(0x7F88BD120, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + + uint16_t pronto[18] = {0x0000, 0x0069, 0x0007, 0x0000, 0x032a, 0x010e, + 0x005a, 0x010e, 0x005a, 0x005a, 0x0168, 0x005a, + 0x005a, 0x010e, 0x005a, 0x00b4, 0x005a, 0x01c2}; + irsend.reset(); + irsend.sendPronto(pronto, 18); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(LUTRON, irsend.capture.decode_type); + EXPECT_EQ(kLutronBits, irsend.capture.bits); + EXPECT_EQ(0x7F88BD120, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_MWM_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_MWM_test.cpp new file mode 100644 index 000000000..9ecd0eac1 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_MWM_test.cpp @@ -0,0 +1,124 @@ +// Copyright 2017 David Conran +// Copyright 2018 Brett T. Warden + +#include "IRrecv.h" +#include "IRrecv_test.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// MM MM WW WW MM MM +// MMM MMM WW WW MMM MMM +// MM M MM WW W WW MM M MM +// MM MM WWW WWW MM MM +// MM MM WW WW MM MM + +// Tests for sendMWM(). + +// Test sending simplest case data only. +TEST(TestSendMWM, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + unsigned char test1[] = {0x96, 0x19, 0x10, 0x24, 0x0A, + 0x6B, 0x20, 0x03, 0x82}; + /* + ++--+-++-- + +-++--+++- + +++++-+++- + +++-++-++- + ++-+-++++- + +--+-+--+- + ++++++-++- + +--++++++- + ++-+++++-- + */ + irsend.sendMWM(test1, sizeof(test1), 0); + EXPECT_EQ( + "m834s834m417s417m834s834" + "m417s417m834s834m1251s417" + "m2085s417m1251s417" + "m1251s417m834s417m834s417" + "m834s417m417s417m1668s417" + "m417s834m417s417m417s834m417s417" + "m2502s417m834s417" + "m417s834m2502s417" + "m834s417m2085s30834", irsend.outputStr()); + + irsend.reset(); + unsigned char test2[] = { + 0x99, 0x26, 0x66, 0x6E, 0xD1, 0x42, 0x06, + 0x20, 0xD0, 0x32, 0xF0, 0x0B + // +-++--++-- + // ++--++-++- + // ++--++--+- + // ++---+--+- + // +-+++-+--- + // ++-++++-+- + // ++--+++++- + // ++++++-++- + // +++++-+--- + // ++-++--++- + // +++++----- + // +--+-++++- + }; + irsend.sendMWM(test2, sizeof(test2), 0); + EXPECT_EQ( + "m417s417m834s834m834s834" + "m834s834m834s417m834s417" + "m834s834m834s834m417s417" + "m834s1251m417s834m417s417" + "m417s417m1251s417m417s1251" + "m834s417m1668s417m417s417" + "m834s834m2085s417" + "m2502s417m834s417" + "m2085s417m417s1251" + "m834s417m834s834m834s417" + "m2085s2085" + "m417s834m417s417m1668s30417", irsend.outputStr()); +} + +// Tests for decodeMWM(). + +// Example data +TEST(TestDecodeMWM, RealExamples) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + uint16_t short_code[] = { + 915, 793, 488, 366, 915, 793, 427, 366, 915, 793, 1281, 427, + 2136, 366, 1281, 366, 915, 793, 427, 854, 854, 366, 1281, 854, + 1708, 366, 488, 793, 854, 427, 427, 427, 427, 366, 854, 427, + 2563, 366, 488, 793, 2563, 366, 488, 2075, 427, 34057}; + unsigned char short_expected[] = {0x96, 0x19, 0x10, 0x36, 0x0C, + 0x53, 0x02, 0x03, 0xDF}; + irsend.sendRaw(short_code, sizeof(short_code) / sizeof(short_code[0]), 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MWM, irsend.capture.decode_type); + EXPECT_EQ(8 * sizeof(short_expected) / sizeof(short_expected[0]), + irsend.capture.bits); + EXPECT_STATE_EQ(short_expected, irsend.capture.state, irsend.capture.bits); + + irsend.reset(); + uint16_t long_code[] = { + 427, 427, 854, 854, 854, 793, 915, 793, 854, 366, 915, 366, 854, + 854, 854, 793, 488, 366, 915, 1220, 427, 793, 488, 366, 488, 366, + 1281, 427, 427, 1220, 915, 366, 1708, 366, 488, 366, 854, 854, 2136, + 366, 2563, 366, 854, 427, 2136, 366, 488, 1220, 854, 427, 854, 793, + 915, 366, 2136, 2075, 427, 793, 488, 366, 1708, 30517}; + unsigned char long_expected[] = {0x99, 0x26, 0x66, 0x6E, 0xD1, 0x42, + 0x06, 0x20, 0xD0, 0x32, 0xF0, 0x0B}; + irsend.sendRaw(long_code, sizeof(long_code) / sizeof(long_code[0]), 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MWM, irsend.capture.decode_type); + EXPECT_EQ(8 * sizeof(long_expected) / sizeof(long_expected[0]), + irsend.capture.bits); + EXPECT_STATE_EQ(long_expected, irsend.capture.state, irsend.capture.bits); +} + +// vim: et:ts=2:sw=2 diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Magiquest_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Magiquest_test.cpp new file mode 100644 index 000000000..e1c3da83d --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Magiquest_test.cpp @@ -0,0 +1,162 @@ +// Copyright 2017 David Conran + +#include "ir_Magiquest.h" +#include "IRrecv.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for encodeMagiQuest() +TEST(TestEncodeMagiQuest, General) { + IRsendTest irsend(0); + EXPECT_EQ(0x0, irsend.encodeMagiQuest(0x0, 0x0)); + EXPECT_EQ(0x10001, irsend.encodeMagiQuest(0x1, 0x1)); + EXPECT_EQ(0x20003, irsend.encodeMagiQuest(0x2, 0x3)); + EXPECT_EQ(0x123456781234, irsend.encodeMagiQuest(0x12345678, 0x1234)); + EXPECT_EQ(0xFFFFFFFFFFFF, irsend.encodeMagiQuest(0xFFFFFFFF, 0xFFFF)); +} + +// Tests for sendMagiQuest() + +// Test sending typical data only. +TEST(TestSendMagiQuest, SendDataOnly) { + IRsendTest irsend(0); + irsend.begin(); + + irsend.reset(); + irsend.sendMagiQuest(0x0); + EXPECT_EQ( + "m280s850m280s850m280s850m280s850m280s850m280s850m280s850m280s850" + "m280s850m280s850m280s850m280s850m280s850m280s850m280s850m280s850" + "m280s850m280s850m280s850m280s850m280s850m280s850m280s850m280s850" + "m280s850m280s850m280s850m280s850m280s850m280s850m280s850m280s850" + "m280s850m280s850m280s850m280s850m280s850m280s850m280s850m280s850" + "m280s850m280s850m280s850m280s850m280s850m280s850m280s850m280s850" + "m280s850m280s850m280s850m280s850m280s850m280s850m280s850m280s100850", + irsend.outputStr()); + irsend.reset(); + irsend.sendMagiQuest(0x123456789ABC); + EXPECT_EQ( + "m280s850m280s850m280s850m280s850m280s850m280s850m280s850m280s850" + "m280s850m280s850m280s850m580s600m280s850m280s850m580s600m280s850" + "m280s850m280s850m580s600m580s600m280s850m580s600m280s850m280s850" + "m280s850m580s600m280s850m580s600m280s850m580s600m580s600m280s850" + "m280s850m580s600m580s600m580s600m580s600m280s850m280s850m280s850" + "m580s600m280s850m280s850m580s600m580s600m280s850m580s600m280s850" + "m580s600m280s850m580s600m580s600m580s600m580s600m280s850m280s100850", + irsend.outputStr()); +} + +// Test sending typical data only. +TEST(TestSendMagiQuest, SendWithRepeats) { + IRsendTest irsend(0); + irsend.begin(); + + irsend.reset(); + irsend.sendMagiQuest(0x12345678ABCD, kMagiquestBits, 2); // two repeats. + EXPECT_EQ( + "m280s850m280s850m280s850m280s850m280s850m280s850m280s850m280s850" + "m280s850m280s850m280s850m580s600m280s850m280s850m580s600m280s850" + "m280s850m280s850m580s600m580s600m280s850m580s600m280s850m280s850" + "m280s850m580s600m280s850m580s600m280s850m580s600m580s600m280s850" + "m280s850m580s600m580s600m580s600m580s600m280s850m280s850m280s850" + "m580s600m280s850m580s600m280s850m580s600m280s850m580s600m580s600" + "m580s600m580s600m280s850m280s850m580s600m580s600m280s850m580s100600" + "m280s850m280s850m280s850m280s850m280s850m280s850m280s850m280s850" + "m280s850m280s850m280s850m580s600m280s850m280s850m580s600m280s850" + "m280s850m280s850m580s600m580s600m280s850m580s600m280s850m280s850" + "m280s850m580s600m280s850m580s600m280s850m580s600m580s600m280s850" + "m280s850m580s600m580s600m580s600m580s600m280s850m280s850m280s850" + "m580s600m280s850m580s600m280s850m580s600m280s850m580s600m580s600" + "m580s600m580s600m280s850m280s850m580s600m580s600m280s850m580s100600" + "m280s850m280s850m280s850m280s850m280s850m280s850m280s850m280s850" + "m280s850m280s850m280s850m580s600m280s850m280s850m580s600m280s850" + "m280s850m280s850m580s600m580s600m280s850m580s600m280s850m280s850" + "m280s850m580s600m280s850m580s600m280s850m580s600m580s600m280s850" + "m280s850m580s600m580s600m580s600m580s600m280s850m280s850m280s850" + "m580s600m280s850m580s600m280s850m580s600m280s850m580s600m580s600" + "m580s600m580s600m280s850m280s850m580s600m580s600m280s850m580s100600", + irsend.outputStr()); +} + +// Tests for decodeMagiQuest(). + +// Decode normal "synthetic" messages. +TEST(TestDecodeMagiQuest, NormalDecodeWithStrict) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + irsend.sendMagiQuest(0x0); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMagiQuest(&irsend.capture, kMagiquestBits, true)); + EXPECT_EQ(MAGIQUEST, irsend.capture.decode_type); + EXPECT_EQ(kMagiquestBits, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + irsend.reset(); + irsend.sendMagiQuest(irsend.encodeMagiQuest(0x1, 0x1)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMagiQuest(&irsend.capture, kMagiquestBits, true)); + EXPECT_EQ(MAGIQUEST, irsend.capture.decode_type); + EXPECT_EQ(kMagiquestBits, irsend.capture.bits); + EXPECT_EQ(0x10001, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); + EXPECT_EQ(0x1, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + irsend.reset(); + irsend.sendMagiQuest(irsend.encodeMagiQuest(0x12345678, 0xABCD)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMagiQuest(&irsend.capture, kMagiquestBits, true)); + EXPECT_EQ(MAGIQUEST, irsend.capture.decode_type); + EXPECT_EQ(kMagiquestBits, irsend.capture.bits); + EXPECT_EQ(0x12345678ABCD, irsend.capture.value); + EXPECT_EQ(0x12345678, irsend.capture.address); + EXPECT_EQ(0xABCD, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + // Do the last one again, & use the full decoder, not just protocol specific. + irsend.reset(); + irsend.sendMagiQuest(irsend.encodeMagiQuest(0x12345678, 0xABCD)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MAGIQUEST, irsend.capture.decode_type); + EXPECT_EQ(kMagiquestBits, irsend.capture.bits); + EXPECT_EQ(0x12345678ABCD, irsend.capture.value); +} + +// Decode a "real" example message. +TEST(TestDecodeMagiQuest, RealExamples) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + uint16_t rawData[111] = {262, 842, 298, 858, 238, 866, 240, 890, 238, 866, + 240, 862, 244, 886, 242, 860, 246, 858, 554, 604, + 264, 840, 560, 622, 266, 836, 552, 604, 556, 626, + 262, 866, 240, 864, 264, 838, 268, 862, 244, 886, + 536, 620, 530, 628, 554, 628, 532, 624, 244, 858, + 552, 604, 264, 840, 268, 862, 266, 838, 268, 888, + 240, 864, 242, 860, 268, 862, 244, 860, 236, 868, + 272, 832, 264, 866, 240, 890, 532, 598, 268, 834, + 294, 836, 270, 834, 262, 866, 272, 858, 238, 866, + 534, 622, 268, 836, 270, 860, 268, 862, 526, 604, + 264, 892, 530, 600, 268, 836, 586, 598, 270, 834, + 556}; // Data from PR #365 captured by coolacid + + irsend.sendRaw(rawData, 111, 36000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MAGIQUEST, irsend.capture.decode_type); + EXPECT_EQ(kMagiquestBits, irsend.capture.bits); + EXPECT_EQ(0x560F40020455, irsend.capture.value); + EXPECT_EQ(0x560F4002, irsend.capture.address); // Wand ID + EXPECT_EQ(0x0455, irsend.capture.command); // Magnitude + EXPECT_FALSE(irsend.capture.repeat); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Midea_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Midea_test.cpp new file mode 100644 index 000000000..5d5f5e932 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Midea_test.cpp @@ -0,0 +1,651 @@ +// Copyright 2017 David Conran + +#include "ir_Midea.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendMidea(). + +// Test sending typical data only. +TEST(TestSendMidea, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendMidea(0x0); + EXPECT_EQ( + "m4480s4480" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s5600" + "m4480s4480" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s5600", + irsend.outputStr()); + + irsend.reset(); + irsend.sendMidea(0x55AA55AA55AA); + EXPECT_EQ( + "m4480s4480" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s5600" + "m4480s4480" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s5600", + irsend.outputStr()); + + irsend.reset(); + irsend.sendMidea(0xFFFFFFFFFFFF); + EXPECT_EQ( + "m4480s4480" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s5600" + "m4480s4480" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s5600", + irsend.outputStr()); +} + +// Test sending with different repeats. +TEST(TestSendMidea, SendWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendMidea(0x55AA55AA55AA, kMideaBits, 1); // 1 repeat. + EXPECT_EQ( + "m4480s4480" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s5600" + "m4480s4480" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s5600" + "m4480s4480" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s5600" + "m4480s4480" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s5600", + irsend.outputStr()); + irsend.sendMidea(0x55AA55AA55AA, kMideaBits, 2); // 2 repeats. + EXPECT_EQ( + "m4480s4480" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s5600" + "m4480s4480" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s5600" + "m4480s4480" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s5600" + "m4480s4480" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s5600" + "m4480s4480" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s5600" + "m4480s4480" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s5600", + irsend.outputStr()); +} + +// Test sending an atypical data size. +TEST(TestSendMidea, SendUnusualSize) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendMidea(0x0, 8); + EXPECT_EQ( + "m4480s4480" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s5600" + "m4480s4480" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s5600", + irsend.outputStr()); + + irsend.reset(); + irsend.sendMidea(0x1234567890ABCDEF, 64); + EXPECT_EQ( + "m4480s4480" + "m560s560m560s560m560s560m560s1680m560s560m560s560m560s1680m560s560" + "m560s560m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s1680m560s560" + "m560s560m560s1680m560s1680m560s1680m560s1680m560s560m560s560m560s560" + "m560s1680m560s560m560s560m560s1680m560s560m560s560m560s560m560s560" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s1680" + "m560s1680m560s1680m560s560m560s560m560s1680m560s1680m560s560m560s1680" + "m560s1680m560s1680m560s1680m560s560m560s1680m560s1680m560s1680m560s1680" + "m560s5600" + "m4480s4480" + "m560s1680m560s1680m560s1680m560s560m560s1680m560s1680m560s560m560s1680" + "m560s1680m560s1680m560s560m560s560m560s1680m560s560m560s1680m560s1680" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s560m560s1680" + "m560s1680m560s560m560s560m560s560m560s560m560s1680m560s1680m560s1680" + "m560s560m560s1680m560s1680m560s560m560s1680m560s1680m560s1680m560s1680" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s560" + "m560s560m560s560m560s1680m560s1680m560s560m560s560m560s1680m560s560" + "m560s560m560s560m560s560m560s1680m560s560m560s560m560s560m560s560" + "m560s5600", + irsend.outputStr()); + + // Bit sizes must be a multiple of 8. + irsend.reset(); + irsend.sendMidea(0x0, 17); + EXPECT_EQ("", irsend.outputStr()); +} + +// Tests for IRMideaAC class. + +// Tests for controlling the power state. +TEST(TestMideaACClass, Power) { + IRMideaAC midea(0); + midea.begin(); + + midea.setRaw(0xA1026FFFFFE2); // Power off. + + midea.on(); + EXPECT_TRUE(midea.getPower()); + + EXPECT_EQ(0xA1826FFFFF62, midea.getRaw()); + + midea.off(); + EXPECT_FALSE(midea.getPower()); + EXPECT_EQ(0xA1026FFFFFE2, midea.getRaw()); + + midea.setPower(true); + EXPECT_TRUE(midea.getPower()); + EXPECT_EQ(0xA1826FFFFF62, midea.getRaw()); + + midea.setPower(false); + EXPECT_FALSE(midea.getPower()); + EXPECT_EQ(0xA1026FFFFFE2, midea.getRaw()); +} + +// Tests for the various Checksum routines. +TEST(TestMideaACClass, Checksums) { + IRMideaAC midea(0); + midea.begin(); + + // Known good states + EXPECT_EQ(0x62, IRMideaAC::calcChecksum(0xA1826FFFFF62)); + EXPECT_EQ(0x70, IRMideaAC::calcChecksum(0xA18177FFFF70)); + // Now without the checksum part. + EXPECT_EQ(0x62, IRMideaAC::calcChecksum(0xA1826FFFFF00)); + EXPECT_EQ(0x70, IRMideaAC::calcChecksum(0xA18177FFFF00)); + // Made up values. + EXPECT_EQ(0x00, IRMideaAC::calcChecksum(0x000000000000)); + EXPECT_EQ(0xDF, IRMideaAC::calcChecksum(0x1234567890AB)); + EXPECT_EQ(0xA0, IRMideaAC::calcChecksum(0xFFFFFFFFFFFF)); + // Larger than expected value (full 64bit) + EXPECT_EQ(0xDF, IRMideaAC::calcChecksum(0xFF1234567890AB)); + EXPECT_EQ(0xDF, IRMideaAC::calcChecksum(0x551234567890AB)); + + // Validity tests. + EXPECT_TRUE(IRMideaAC::validChecksum(0xA1826FFFFF62)); + EXPECT_TRUE(IRMideaAC::validChecksum(0xA18177FFFF70)); + EXPECT_FALSE(IRMideaAC::validChecksum(0x1234567890AB)); + + // Doing a setRaw() with a bad state should make a valid checksum on getRaw(). + midea.setRaw(0xA1826FFFFF00); + EXPECT_EQ(0xA1826FFFFF62, midea.getRaw()); +} + +TEST(TestMideaACClass, OperatingMode) { + IRMideaAC midea(0); + midea.begin(); + + midea.setRaw(0xA1826FFFFF62); // Auto mode already set. + midea.setMode(kMideaACAuto); + EXPECT_EQ(kMideaACAuto, midea.getMode()); + EXPECT_EQ(0xA1826FFFFF62, midea.getRaw()); // State shouldn't have changed. + + midea.setMode(kMideaACCool); + EXPECT_EQ(kMideaACCool, midea.getMode()); + EXPECT_EQ(0xA1806FFFFF61, midea.getRaw()); + + midea.setMode(kMideaACAuto); + EXPECT_EQ(kMideaACAuto, midea.getMode()); + EXPECT_EQ(0xA1826FFFFF62, midea.getRaw()); + + midea.setMode(kMideaACHeat); + EXPECT_EQ(kMideaACHeat, midea.getMode()); + EXPECT_EQ(0xA1836FFFFF63, midea.getRaw()); + + midea.setMode(kMideaACDry); + EXPECT_EQ(kMideaACDry, midea.getMode()); + EXPECT_EQ(0xA1816FFFFF60, midea.getRaw()); + + midea.setMode(kMideaACFan); + EXPECT_EQ(kMideaACFan, midea.getMode()); + EXPECT_EQ(0xA1846FFFFF66, midea.getRaw()); + + midea.setMode(255); + EXPECT_EQ(kMideaACAuto, midea.getMode()); + EXPECT_EQ(0xA1826FFFFF62, midea.getRaw()); +} + +TEST(TestMideaACClass, FanSpeed) { + IRMideaAC midea(0); + midea.begin(); + + midea.setRaw(0xA1826FFFFF62); // Auto mode already set. + EXPECT_EQ(kMideaACFanAuto, midea.getFan()); + + midea.setFan(kMideaACFanLow); + EXPECT_EQ(kMideaACFanLow, midea.getFan()); + EXPECT_EQ(0xA18A6FFFFF6C, midea.getRaw()); + + midea.setFan(255); // Setting an unexpected value defaults to auto. + EXPECT_EQ(kMideaACFanAuto, midea.getFan()); + EXPECT_EQ(0xA1826FFFFF62, midea.getRaw()); + + midea.setFan(kMideaACFanMed); + EXPECT_EQ(kMideaACFanMed, midea.getFan()); + EXPECT_EQ(0xA1926FFFFF7C, midea.getRaw()); + + midea.setFan(kMideaACFanHigh); + EXPECT_EQ(kMideaACFanHigh, midea.getFan()); + EXPECT_EQ(0xA19A6FFFFF74, midea.getRaw()); + + midea.setFan(kMideaACFanAuto); + EXPECT_EQ(kMideaACFanAuto, midea.getFan()); + EXPECT_EQ(0xA1826FFFFF62, midea.getRaw()); +} + +TEST(TestMideaACClass, Temperature) { + IRMideaAC midea(0); + midea.begin(); + + midea.setRaw(0xA1826FFFFF62); // 77F / 25C + EXPECT_EQ(77, midea.getTemp()); // F + EXPECT_EQ(77, midea.getTemp(false)); // F + EXPECT_EQ(25, midea.getTemp(true)); // F + + midea.setTemp(0); + EXPECT_EQ(kMideaACMinTempF, midea.getTemp()); + EXPECT_EQ(0xA18260FFFF6C, midea.getRaw()); + + midea.setTemp(255); + EXPECT_EQ(kMideaACMaxTempF, midea.getTemp()); + EXPECT_EQ(0xA18278FFFF78, midea.getRaw()); + + midea.setTemp(0, true); + EXPECT_EQ(kMideaACMinTempF, midea.getTemp()); + EXPECT_EQ(0xA18260FFFF6C, midea.getRaw()); + + midea.setTemp(255, true); + EXPECT_EQ(kMideaACMaxTempF, midea.getTemp()); + EXPECT_EQ(0xA18278FFFF78, midea.getRaw()); + + // fahrenheit min/max etc. + midea.setTemp(kMideaACMinTempF); + EXPECT_EQ(kMideaACMinTempF, midea.getTemp()); + + midea.setTemp(kMideaACMaxTempF); + EXPECT_EQ(kMideaACMaxTempF, midea.getTemp()); + + midea.setTemp(kMideaACMinTempF - 1); + EXPECT_EQ(kMideaACMinTempF, midea.getTemp()); + + midea.setTemp(kMideaACMaxTempF + 1); + EXPECT_EQ(kMideaACMaxTempF, midea.getTemp()); + + // celsius min/max etc. + midea.setTemp(kMideaACMinTempC, true); + EXPECT_EQ(kMideaACMinTempC, midea.getTemp(true)); + EXPECT_EQ(kMideaACMinTempF, midea.getTemp(false)); + + midea.setTemp(kMideaACMaxTempC, true); + EXPECT_EQ(kMideaACMaxTempC, midea.getTemp(true)); + EXPECT_EQ(kMideaACMaxTempF, midea.getTemp(false)); + + midea.setTemp(kMideaACMinTempC - 1, true); + EXPECT_EQ(kMideaACMinTempC, midea.getTemp(true)); + + midea.setTemp(kMideaACMaxTempC + 1, true); + EXPECT_EQ(kMideaACMaxTempC, midea.getTemp(true)); + EXPECT_EQ(kMideaACMaxTempF, midea.getTemp(false)); + + // General changes. + midea.setTemp(17, true); // C + EXPECT_EQ(17, midea.getTemp(true)); // C + EXPECT_EQ(63, midea.getTemp(false)); // F + + midea.setTemp(21, true); // C + EXPECT_EQ(21, midea.getTemp(true)); // C + EXPECT_EQ(70, midea.getTemp(false)); // F + + midea.setTemp(25, true); // C + EXPECT_EQ(25, midea.getTemp(true)); // C + EXPECT_EQ(77, midea.getTemp(false)); // F + + midea.setTemp(30, true); // C + EXPECT_EQ(30, midea.getTemp(true)); // C + EXPECT_EQ(86, midea.getTemp(false)); // F + + midea.setTemp(80, false); // F + EXPECT_EQ(26, midea.getTemp(true)); // C + EXPECT_EQ(80, midea.getTemp(false)); // F + + midea.setTemp(70); // F + EXPECT_EQ(21, midea.getTemp(true)); // C + EXPECT_EQ(70, midea.getTemp(false)); // F + EXPECT_EQ(70, midea.getTemp()); // F +} + +// Tests for controlling the sleep state. +TEST(TestMideaACClass, Sleep) { + IRMideaAC midea(0); + midea.begin(); + + midea.setRaw(0xA1826FFFFF62); // Sleep off. + + EXPECT_FALSE(midea.getSleep()); + midea.setSleep(true); + EXPECT_TRUE(midea.getSleep()); + EXPECT_EQ(0xA1C26FFFFF22, midea.getRaw()); + midea.setSleep(false); + EXPECT_FALSE(midea.getSleep()); + EXPECT_EQ(0xA1826FFFFF62, midea.getRaw()); +} + +TEST(TestMideaACClass, HumanReadableOutput) { + IRMideaAC midea(0); + midea.begin(); + + midea.setRaw(0xA1826FFFFF62); + EXPECT_EQ( + "Power: On, Mode: 2 (AUTO), Temp: 25C/77F, Fan: 0 (AUTO), " + "Sleep: Off", + midea.toString()); + midea.off(); + midea.setTemp(25); + midea.setFan(kMideaACFanHigh); + midea.setMode(kMideaACDry); + midea.setSleep(true); + EXPECT_EQ("Power: Off, Mode: 1 (DRY), Temp: 16C/62F, Fan: 3 (HI), Sleep: On", + midea.toString()); + + midea.setRaw(0xA19867FFFF7E); + EXPECT_EQ("Power: On, Mode: 0 (COOL), Temp: 20C/69F, Fan: 3 (HI), Sleep: Off", + midea.toString()); +} + +// Tests for decodeMidea(). + +// Decode normal Midea messages with strict set. +TEST(TestDecodeMidea, NormalDecodeWithStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Normal Midea 48-bit message. + irsend.reset(); + irsend.sendMidea(0x1234567890DF); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMidea(&irsend.capture, kMideaBits, true)); + EXPECT_EQ(MIDEA, irsend.capture.decode_type); + EXPECT_EQ(kMideaBits, irsend.capture.bits); + EXPECT_EQ(0x1234567890DF, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + // Normal Midea 48-bit message. + irsend.reset(); + irsend.sendMidea(0x0); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMidea(&irsend.capture, kMideaBits, true)); + EXPECT_EQ(MIDEA, irsend.capture.decode_type); + EXPECT_EQ(kMideaBits, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + // Normal Midea 48-bit message. + irsend.reset(); + irsend.sendMidea(0xFFFFFFFFFFA0); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMidea(&irsend.capture, kMideaBits, true)); + EXPECT_EQ(MIDEA, irsend.capture.decode_type); + EXPECT_EQ(kMideaBits, irsend.capture.bits); + EXPECT_EQ(0xFFFFFFFFFFA0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + // Real Midea 48-bit message via just decode(). + // i.e. No conficts with other decoders. + irsend.reset(); + irsend.sendMidea(0xA18263FFFF6E); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MIDEA, irsend.capture.decode_type); + EXPECT_EQ(kMideaBits, irsend.capture.bits); + EXPECT_EQ(0xA18263FFFF6E, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); +} + +// Decode normal repeated Midea messages. +TEST(TestDecodeMidea, NormalDecodeWithRepeatAndStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Normal Midea 48-bit message with 2 repeats. + irsend.reset(); + irsend.sendMidea(0xA18263FFFF6E, kMideaBits, 2); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMidea(&irsend.capture, kMideaBits, true)); + EXPECT_EQ(MIDEA, irsend.capture.decode_type); + EXPECT_EQ(kMideaBits, irsend.capture.bits); + EXPECT_EQ(0xA18263FFFF6E, irsend.capture.value); + EXPECT_FALSE(irsend.capture.repeat); + + irsend.makeDecodeResult(2 * (2 * kMideaBits + 4)); + ASSERT_TRUE(irrecv.decodeMidea(&irsend.capture, kMideaBits, true)); + EXPECT_EQ(MIDEA, irsend.capture.decode_type); + EXPECT_EQ(kMideaBits, irsend.capture.bits); + EXPECT_EQ(0xA18263FFFF6E, irsend.capture.value); + + irsend.makeDecodeResult(4 * (2 * kMideaBits + 4)); + ASSERT_TRUE(irrecv.decodeMidea(&irsend.capture, kMideaBits, true)); + EXPECT_EQ(MIDEA, irsend.capture.decode_type); + EXPECT_EQ(kMideaBits, irsend.capture.bits); + EXPECT_EQ(0xA18263FFFF6E, irsend.capture.value); +} + +// Decode unsupported Midea messages. +TEST(TestDecodeMidea, DecodeWithNonStrictSizes) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + irsend.sendMidea(0x12, 8); // Illegal value Midea 8-bit message. + irsend.makeDecodeResult(); + // Should fail with strict on. + ASSERT_FALSE(irrecv.decodeMidea(&irsend.capture, kMideaBits, true)); + // Should pass if strict off. + ASSERT_TRUE(irrecv.decodeMidea(&irsend.capture, 8, false)); + EXPECT_EQ(MIDEA, irsend.capture.decode_type); + EXPECT_EQ(8, irsend.capture.bits); + EXPECT_EQ(0x12, irsend.capture.value); + + irsend.reset(); + irsend.sendMidea(0x12345678, 32); // Illegal value Midea 32-bit message. + irsend.makeDecodeResult(); + // Shouldn't pass with strict when we ask for less bits than we got. + ASSERT_FALSE(irrecv.decodeMidea(&irsend.capture, kMideaBits, true)); + + irsend.makeDecodeResult(); + // Should fail with strict when we ask for the wrong bit size. + ASSERT_FALSE(irrecv.decodeMidea(&irsend.capture, 32, true)); + // Should pass if strict off. + ASSERT_TRUE(irrecv.decodeMidea(&irsend.capture, 32, false)); + EXPECT_EQ(MIDEA, irsend.capture.decode_type); + EXPECT_EQ(32, irsend.capture.bits); + EXPECT_EQ(0x12345678, irsend.capture.value); + + // Decode should fail if asked to decode non-multiples of 8 bits. + irsend.reset(); + irsend.sendMidea(0x123456, kMideaBits, 2); + irsend.makeDecodeResult(); + ASSERT_FALSE(irrecv.decodeMidea(&irsend.capture, 9, false)); +} + +// Decode (non-standard) 64-bit messages. +TEST(TestDecodeMidea, Decode64BitMessages) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Illegal size Midea 64-bit message. + irsend.sendMidea(0xFFFFFFFFFFFFFFFF, 64); + irsend.makeDecodeResult(); + // Should work with a 'normal' match (not strict) + ASSERT_TRUE(irrecv.decodeMidea(&irsend.capture, 64, false)); + EXPECT_EQ(MIDEA, irsend.capture.decode_type); + EXPECT_EQ(64, irsend.capture.bits); + EXPECT_EQ(0xFFFFFFFFFFFFFFFF, irsend.capture.value); +} + +// Fail to decode a non-Midea example via GlobalCache +TEST(TestDecodeMidea, FailToDecodeNonMideaExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Modified a few entries to unexpected values, based on previous test case. + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; + irsend.sendGC(gc_test, 39); + irsend.makeDecodeResult(); + + ASSERT_FALSE(irrecv.decodeMidea(&irsend.capture)); + ASSERT_FALSE(irrecv.decodeMidea(&irsend.capture, kMideaBits, false)); +} + +// Decode against a real capture reported by a user. See issue #354 +TEST(TestDecodeMidea, DecodeRealExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + irsend.reset(); + + uint16_t rawData[199] = { + 4366, 4470, 498, 1658, 522, 554, 498, 1658, 496, 580, 498, 580, + 498, 578, 498, 580, 498, 1658, 498, 1658, 498, 578, 498, 578, + 498, 580, 496, 582, 496, 578, 498, 1658, 498, 580, 498, 580, + 498, 1656, 498, 1656, 500, 580, 498, 578, 502, 576, 500, 1656, + 498, 1656, 500, 1654, 500, 1656, 500, 1656, 498, 1658, 498, 1656, + 500, 1658, 498, 1656, 498, 1656, 500, 1656, 500, 1654, 500, 1578, + 578, 1658, 498, 1656, 500, 1658, 498, 1656, 498, 1656, 500, 578, + 498, 1638, 516, 1656, 500, 578, 500, 1656, 500, 1656, 498, 1658, + 522, 554, 500, 5258, 4366, 4472, 498, 580, 498, 1658, 498, 580, + 498, 1656, 500, 1600, 556, 1658, 500, 1656, 500, 578, 498, 578, + 522, 1634, 498, 1588, 568, 1658, 498, 1656, 500, 1654, 498, 580, + 498, 1658, 498, 1658, 498, 580, 496, 578, 500, 1654, 500, 1636, + 518, 1656, 500, 578, 520, 558, 498, 578, 498, 580, 498, 576, + 500, 578, 498, 580, 498, 578, 498, 578, 498, 580, 498, 578, + 498, 580, 498, 580, 520, 556, 498, 580, 496, 580, 498, 578, + 500, 578, 498, 1658, 498, 580, 498, 578, 498, 1656, 500, 578, + 498, 580, 498, 580, 498, 1656, 522}; + irsend.sendRaw(rawData, 199, 38000); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MIDEA, irsend.capture.decode_type); + EXPECT_EQ(kMideaBits, irsend.capture.bits); + EXPECT_EQ(0xA18263FFFF6E, irsend.capture.value); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Mitsubishi_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Mitsubishi_test.cpp new file mode 100644 index 000000000..7b8eb2192 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Mitsubishi_test.cpp @@ -0,0 +1,1118 @@ +// Copyright 2017 David Conran +// Copyright 2018 denxhun + +#include "ir_Mitsubishi.h" +#include "IRrecv_test.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendMitsubishi(). + +// Test sending typical data only. +TEST(TestSendMitsubishi, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendMitsubishi(0xE242); + EXPECT_EQ( + "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" + "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" + "m300s28080" + "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" + "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" + "m300s28080", + irsend.outputStr()); + + irsend.reset(); + irsend.sendMitsubishi(0x0); + EXPECT_EQ( + "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" + "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" + "m300s34080" + "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" + "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" + "m300s34080", + irsend.outputStr()); + + irsend.reset(); + irsend.sendMitsubishi(0x4321); + EXPECT_EQ( + "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s2100" + "m300s900m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100" + "m300s28080" + "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s2100" + "m300s900m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100" + "m300s28080", + irsend.outputStr()); +} + +// Test sending with different repeats. +TEST(TestSendMitsubishi, SendWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendMitsubishi(0xE242, kMitsubishiBits, 0); // 0 repeat. + EXPECT_EQ( + "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" + "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" + "m300s28080", + irsend.outputStr()); + + irsend.reset(); + irsend.sendMitsubishi(0xE242, kMitsubishiBits, 1); // 1 repeat. + EXPECT_EQ( + "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" + "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" + "m300s28080" + "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" + "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" + "m300s28080", + irsend.outputStr()); + irsend.sendMitsubishi(0xE242, kMitsubishiBits, 2); // 2 repeats. + EXPECT_EQ( + "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" + "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" + "m300s28080" + "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" + "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" + "m300s28080" + "m300s2100m300s2100m300s2100m300s900m300s900m300s900m300s2100m300s900" + "m300s900m300s2100m300s900m300s900m300s900m300s900m300s2100m300s900" + "m300s28080", + irsend.outputStr()); +} + +// Test sending an atypical data size. +TEST(TestSendMitsubishi, SendUnusualSize) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendMitsubishi(0x0, 8); + EXPECT_EQ( + "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" + "m300s43680" + "m300s900m300s900m300s900m300s900m300s900m300s900m300s900m300s900" + "m300s43680", + irsend.outputStr()); + + irsend.reset(); + irsend.sendMitsubishi(0x1234567890ABCDEF, 64); + EXPECT_EQ( + "m300s900m300s900m300s900m300s2100m300s900m300s900m300s2100m300s900" + "m300s900m300s900m300s2100m300s2100m300s900m300s2100m300s900m300s900" + "m300s900m300s2100m300s900m300s2100m300s900m300s2100m300s2100m300s900" + "m300s900m300s2100m300s2100m300s2100m300s2100m300s900m300s900m300s900" + "m300s2100m300s900m300s900m300s2100m300s900m300s900m300s900m300s900" + "m300s2100m300s900m300s2100m300s900m300s2100m300s900m300s2100m300s2100" + "m300s2100m300s2100m300s900m300s900m300s2100m300s2100m300s900m300s2100" + "m300s2100m300s2100m300s2100m300s900m300s2100m300s2100m300s2100m300s2100" + "m300s28080" + "m300s900m300s900m300s900m300s2100m300s900m300s900m300s2100m300s900" + "m300s900m300s900m300s2100m300s2100m300s900m300s2100m300s900m300s900" + "m300s900m300s2100m300s900m300s2100m300s900m300s2100m300s2100m300s900" + "m300s900m300s2100m300s2100m300s2100m300s2100m300s900m300s900m300s900" + "m300s2100m300s900m300s900m300s2100m300s900m300s900m300s900m300s900" + "m300s2100m300s900m300s2100m300s900m300s2100m300s900m300s2100m300s2100" + "m300s2100m300s2100m300s900m300s900m300s2100m300s2100m300s900m300s2100" + "m300s2100m300s2100m300s2100m300s900m300s2100m300s2100m300s2100m300s2100" + "m300s28080", + irsend.outputStr()); +} + +// Decode normal Mitsubishi messages. +TEST(TestDecodeMitsubishi, NormalDecodeWithStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Normal Mitsubishi 16-bit message. + irsend.reset(); + irsend.sendMitsubishi(0xC2B8); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, kMitsubishiBits, true)); + EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiBits, irsend.capture.bits); + EXPECT_EQ(0xC2B8, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + irsend.reset(); + irsend.sendMitsubishi(0x0); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, kMitsubishiBits, true)); + EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiBits, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + irsend.reset(); + irsend.sendMitsubishi(0xFFFF); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, kMitsubishiBits, true)); + EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiBits, irsend.capture.bits); + EXPECT_EQ(0xFFFF, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + // Non-standard Mitsubishi sizes should fail with strict. + irsend.reset(); + // 12 bits. + irsend.sendMitsubishi(0xFFF, 12); + irsend.makeDecodeResult(); + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, kMitsubishiBits, true)); + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 12, true)); + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 64, true)); + + // 32 bits. + irsend.sendMitsubishi(0xFFF, 32); + irsend.makeDecodeResult(); + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, kMitsubishiBits, true)); + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 12, true)); + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 32, true)); + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 64, true)); +} + +// Decode normal repeated Mitsubishi messages. +TEST(TestDecodeMitsubishi, NormalDecodeWithRepeatAndStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Normal Mitsubishi 16-bit message with 2 repeats. + irsend.reset(); + irsend.sendMitsubishi(0xC2B8, kMitsubishiBits, 2); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, kMitsubishiBits, true)); + EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiBits, irsend.capture.bits); + EXPECT_EQ(0xC2B8, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + // Normal Mitsubishi 16-bit message with 0 repeats. + irsend.reset(); + irsend.sendMitsubishi(0xC2B8, kMitsubishiBits, 0); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, kMitsubishiBits, true)); + EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiBits, irsend.capture.bits); + EXPECT_EQ(0xC2B8, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); +} + +// Decode unsupported Mitsubishi messages. +TEST(TestDecodeMitsubishi, DecodeWithNonStrictValues) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + irsend.sendMitsubishi(0x0, 8); // Illegal sized Mitsubishi 8-bit message. + irsend.makeDecodeResult(); + // Should fail with strict on. + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, kMitsubishiBits, true)); + // Should pass if strict off. + ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, 8, false)); + EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); + EXPECT_EQ(8, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 64, false)); + + irsend.reset(); + // Illegal sized Mitsubishi 64-bit message. + irsend.sendMitsubishi(0xFEDCBA9876543210, 64); + irsend.makeDecodeResult(); + // Should fail with strict on. + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, kMitsubishiBits, true)); + // Should pass if strict off. + ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture, 64, false)); + EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); + EXPECT_EQ(64, irsend.capture.bits); + EXPECT_EQ(0xFEDCBA9876543210, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + // Should fail when we are after a shorter message than we got. + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture, 8, false)); +} + +// Decode a 'real' example via GlobalCache +TEST(TestDecodeMitsubishi, DecodeGlobalCacheExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Mitsubishi "Power On" (16-bit) code from Global Cache. + uint16_t gc_test[37] = {33000, 1, 1, 10, 70, 10, 70, 10, 70, 10, 30, 10, 30, + 10, 30, 10, 70, 10, 30, 10, 30, 10, 70, 10, 30, 10, + 30, 10, 30, 10, 30, 10, 70, 10, 30, 10, 936}; + irsend.sendGC(gc_test, 37); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decodeMitsubishi(&irsend.capture)); + EXPECT_EQ(MITSUBISHI, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiBits, irsend.capture.bits); + EXPECT_EQ(0xE242, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); +} + +// Fail to decode a non-Mitsubishi example via GlobalCache +TEST(TestDecodeMitsubishi, FailToDecodeNonMitsubishiExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Modified a few entries to unexpected values, based on previous test case. + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; + irsend.sendGC(gc_test, 39); + irsend.makeDecodeResult(); + + ASSERT_FALSE(irrecv.decodeMitsubishi(&irsend.capture)); + ASSERT_FALSE( + irrecv.decodeMitsubishi(&irsend.capture, kMitsubishiBits, false)); +} + +// Tests for Mitsubishi A/C methods. + +// Test sending typical data only. +TEST(TestSendMitsubishiAC, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + uint8_t mitsub_code[kMitsubishiACStateLength] = { + 0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, 0x08, 0x06, 0x30, + 0x45, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F}; + irsend.reset(); + irsend.sendMitsubishiAC(mitsub_code); + EXPECT_EQ( + "m3400s1750" + "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" + "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" + "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" + "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" + "m440s17100" + "m3400s1750" + "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" + "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" + "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" + "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" + "m440s17100", + irsend.outputStr()); +} + +// Test sending with repeats. +TEST(TestSendMitsubishiAC, SendWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + uint8_t mitsub_code[kMitsubishiACStateLength] = { + 0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, 0x08, 0x06, 0x30, + 0x45, 0x67, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1F}; + + irsend.sendMitsubishiAC(mitsub_code, kMitsubishiACStateLength, 0); + EXPECT_EQ( + "m3400s1750" + "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" + "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" + "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" + "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" + "m440s17100", + irsend.outputStr()); + + irsend.reset(); + irsend.sendMitsubishiAC(mitsub_code, kMitsubishiACStateLength, 2); + EXPECT_EQ( + "m3400s1750" + "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" + "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" + "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" + "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" + "m440s17100" + "m3400s1750" + "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" + "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" + "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" + "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" + "m440s17100" + "m3400s1750" + "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" + "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" + "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" + "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" + "m440s17100", + irsend.outputStr()); +} + +// Test sending atypical sizes. +TEST(TestSendMitsubishiAC, SendUnexpectedSizes) { + IRsendTest irsend(4); + irsend.begin(); + + uint8_t mitsub_short_code[17] = {0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, + 0x08, 0x06, 0x30, 0x45, 0x67, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00}; + uint8_t mitsub_long_code[19] = {0x23, 0xCB, 0x26, 0x01, 0x00, 0x20, 0x08, + 0x06, 0x30, 0x45, 0x67, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x1F, 0x00}; + irsend.reset(); + irsend.sendMitsubishiAC(mitsub_short_code, 17); + ASSERT_EQ("", irsend.outputStr()); + + irsend.reset(); + irsend.sendMitsubishiAC(mitsub_long_code, 19); + ASSERT_EQ( + "m3400s1750" + "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" + "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" + "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" + "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m440s17100" + "m3400s1750" + "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" + "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s420m450s420m450s420m450s1300m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420" + "m450s1300m450s420m450s1300m450s420m450s420m450s420m450s1300m450s420" + "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s1300m450s1300m450s1300m450s1300m450s1300m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m440s17100", + irsend.outputStr()); +} + +// Tests for IRMitsubishiAC class. + +TEST(TestMitsubishiACClass, Power) { + IRMitsubishiAC mitsub(0); + mitsub.begin(); + + mitsub.on(); + EXPECT_TRUE(mitsub.getPower()); + + mitsub.off(); + EXPECT_FALSE(mitsub.getPower()); + + mitsub.setPower(true); + EXPECT_TRUE(mitsub.getPower()); + + mitsub.setPower(false); + EXPECT_FALSE(mitsub.getPower()); +} + +TEST(TestMitsubishiACClass, Temperature) { + IRMitsubishiAC mitsub(0); + mitsub.begin(); + + mitsub.setTemp(0); + EXPECT_EQ(kMitsubishiAcMinTemp, mitsub.getTemp()); + + mitsub.setTemp(255); + EXPECT_EQ(kMitsubishiAcMaxTemp, mitsub.getTemp()); + + mitsub.setTemp(kMitsubishiAcMinTemp); + EXPECT_EQ(kMitsubishiAcMinTemp, mitsub.getTemp()); + + mitsub.setTemp(kMitsubishiAcMaxTemp); + EXPECT_EQ(kMitsubishiAcMaxTemp, mitsub.getTemp()); + + mitsub.setTemp(kMitsubishiAcMinTemp - 1); + EXPECT_EQ(kMitsubishiAcMinTemp, mitsub.getTemp()); + + mitsub.setTemp(kMitsubishiAcMaxTemp + 1); + EXPECT_EQ(kMitsubishiAcMaxTemp, mitsub.getTemp()); + + mitsub.setTemp(17); + EXPECT_EQ(17, mitsub.getTemp()); + + mitsub.setTemp(21); + EXPECT_EQ(21, mitsub.getTemp()); + + mitsub.setTemp(25); + EXPECT_EQ(25, mitsub.getTemp()); + + mitsub.setTemp(30); + EXPECT_EQ(30, mitsub.getTemp()); +} + +TEST(TestMitsubishiACClass, OperatingMode) { + IRMitsubishiAC mitsub(0); + mitsub.begin(); + + mitsub.setMode(kMitsubishiAcAuto); + EXPECT_EQ(kMitsubishiAcAuto, mitsub.getMode()); + + mitsub.setMode(kMitsubishiAcCool); + EXPECT_EQ(kMitsubishiAcCool, mitsub.getMode()); + + mitsub.setMode(kMitsubishiAcHeat); + EXPECT_EQ(kMitsubishiAcHeat, mitsub.getMode()); + + mitsub.setMode(kMitsubishiAcDry); + EXPECT_EQ(kMitsubishiAcDry, mitsub.getMode()); + + mitsub.setMode(kMitsubishiAcAuto + 1); + EXPECT_EQ(kMitsubishiAcAuto, mitsub.getMode()); + + mitsub.setMode(255); + EXPECT_EQ(kMitsubishiAcAuto, mitsub.getMode()); +} + +TEST(TestMitsubishiACClass, VaneMode) { + IRMitsubishiAC mitsub(0); + mitsub.begin(); + + mitsub.setVane(kMitsubishiAcVaneAuto); + EXPECT_EQ(kMitsubishiAcVaneAuto, mitsub.getVane()); + + mitsub.setVane(kMitsubishiAcVaneAuto + 1); + EXPECT_EQ(kMitsubishiAcVaneAuto + 1, mitsub.getVane()); + + mitsub.setVane(kMitsubishiAcVaneAutoMove); + EXPECT_EQ(kMitsubishiAcVaneAutoMove, mitsub.getVane()); + + mitsub.setVane(kMitsubishiAcVaneAutoMove + 1); + EXPECT_EQ(kMitsubishiAcVaneAutoMove, mitsub.getVane()); + + mitsub.setVane(kMitsubishiAcVaneAutoMove - 1); + EXPECT_EQ(kMitsubishiAcVaneAutoMove - 1, mitsub.getVane()); +} + +TEST(TestMitsubishiACClass, FanSpeed) { + IRMitsubishiAC mitsub(0); + mitsub.begin(); + + mitsub.setFan(kMitsubishiAcFanAuto); + EXPECT_EQ(kMitsubishiAcFanAuto, mitsub.getFan()); + + mitsub.setFan(255); + EXPECT_EQ(kMitsubishiAcFanRealMax, mitsub.getFan()); + + mitsub.setFan(kMitsubishiAcFanMax); + EXPECT_EQ(kMitsubishiAcFanRealMax, mitsub.getFan()); + + mitsub.setFan(kMitsubishiAcFanMax - 1); + EXPECT_EQ(kMitsubishiAcFanMax - 1, mitsub.getFan()); + + mitsub.setFan(1); + EXPECT_EQ(1, mitsub.getFan()); + + mitsub.setFan(2); + EXPECT_EQ(2, mitsub.getFan()); + + mitsub.setFan(3); + EXPECT_EQ(3, mitsub.getFan()); + + mitsub.setFan(4); + EXPECT_EQ(4, mitsub.getFan()); + + mitsub.setFan(kMitsubishiAcFanSilent); + EXPECT_EQ(kMitsubishiAcFanSilent, mitsub.getFan()); + + mitsub.setFan(kMitsubishiAcFanSilent + 1); + EXPECT_EQ(kMitsubishiAcFanRealMax, mitsub.getFan()); +} + +TEST(TestMitsubishiACClass, MessageConstuction) { + IRMitsubishiAC mitsub(0); + IRsendTest irsend(4); + mitsub.begin(); + irsend.begin(); + + mitsub.setFan(1); + mitsub.setMode(kMitsubishiAcCool); + mitsub.setTemp(27); + mitsub.setVane(3); + mitsub.on(); + + // Check everything for kicks. + EXPECT_EQ(1, mitsub.getFan()); + EXPECT_EQ(kMitsubishiAcCool, mitsub.getMode()); + EXPECT_EQ(27, mitsub.getTemp()); + EXPECT_EQ(3, mitsub.getVane()); + EXPECT_TRUE(mitsub.getPower()); + + irsend.reset(); + irsend.sendMitsubishiAC(mitsub.getRaw()); + EXPECT_EQ( + "m3400s1750" + "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" + "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s420m450s1300m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s1300m450s1300m450s420m450s1300m450s420" + "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s420" + "m440s17100" + "m3400s1750" + "m450s1300m450s1300m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s1300m450s1300" + "m450s420m450s1300m450s1300m450s420m450s420m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s1300m450s420m450s420" + "m450s420m450s420m450s420m450s1300m450s1300m450s420m450s420m450s420" + "m450s1300m450s1300m450s420m450s1300m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s420m450s1300m450s1300m450s420m450s420" + "m450s1300m450s420m450s420m450s1300m450s1300m450s420m450s1300m450s420" + "m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s1300m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s420m450s420m450s420m450s420m450s420m450s420m450s420" + "m450s420m450s1300m450s1300m450s1300m450s420m450s420m450s1300m450s420" + "m440s17100", + irsend.outputStr()); +} + +// Tests for decodeMitsubishiAC() with real captured example. +TEST(TestDecodeMitsubishiAC, DecodeRealExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Mitsubishi AC "Power On, 16C, low fan, vane auto move". + uint16_t rawData[583] = { + 3476, 1708, 416, 1264, 420, 1260, 414, 400, 448, 390, 446, 392, + 444, 1236, 440, 400, 446, 392, 446, 1234, 440, 1266, 418, 396, + 442, 1264, 420, 394, 444, 394, 442, 1264, 422, 1260, 414, 398, + 440, 1266, 418, 1264, 420, 392, 446, 392, 444, 1264, 422, 392, + 446, 392, 446, 1260, 414, 400, 448, 390, 446, 392, 444, 394, + 442, 396, 442, 398, 440, 424, 412, 400, 448, 390, 446, 392, + 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, 438, 400, + 448, 390, 446, 392, 446, 392, 444, 396, 442, 396, 440, 398, + 440, 400, 438, 400, 448, 390, 446, 392, 444, 1236, 440, 1266, + 418, 394, 442, 396, 440, 398, 438, 402, 446, 1232, 444, 396, + 440, 1268, 418, 394, 442, 396, 440, 398, 440, 400, 448, 390, + 448, 1232, 442, 1266, 420, 394, 444, 1264, 422, 1260, 416, 396, + 440, 398, 450, 1230, 444, 396, 442, 398, 440, 1266, 418, 1264, + 422, 1258, 416, 1266, 418, 394, 442, 396, 440, 398, 440, 398, + 438, 400, 446, 392, 446, 392, 446, 392, 444, 396, 442, 396, + 440, 398, 438, 398, 438, 400, 448, 392, 446, 392, 444, 394, + 444, 396, 442, 396, 440, 398, 438, 400, 448, 390, 448, 392, + 444, 394, 444, 394, 442, 396, 442, 396, 440, 398, 438, 400, + 448, 390, 446, 392, 446, 392, 444, 394, 442, 396, 442, 396, + 440, 398, 438, 400, 448, 390, 446, 392, 444, 394, 444, 394, + 442, 396, 440, 398, 440, 398, 438, 400, 448, 390, 446, 392, + 444, 394, 444, 394, 442, 396, 440, 398, 438, 400, 438, 400, + 448, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, + 438, 1240, 444, 1264, 422, 390, 446, 392, 446, 1260, 414, 1268, + 418, 1264, 422, 12984, 3478, 1708, 418, 1264, 422, 1234, 442, 398, + 448, 390, 446, 392, 446, 1234, 440, 400, 448, 390, 446, 1234, + 442, 1266, 420, 392, 444, 1264, 420, 392, 446, 394, 444, 1236, + 448, 1260, 416, 398, 440, 1266, 418, 1262, 422, 390, 446, 392, + 444, 1234, 440, 400, 448, 392, 446, 1234, 440, 398, 450, 390, + 446, 392, 444, 394, 444, 394, 442, 396, 442, 398, 440, 400, + 438, 400, 448, 390, 446, 392, 444, 394, 442, 396, 442, 396, + 440, 398, 438, 400, 448, 390, 446, 392, 446, 392, 444, 394, + 442, 396, 442, 396, 440, 398, 438, 400, 448, 416, 420, 392, + 444, 1234, 440, 1240, 446, 394, 442, 396, 440, 398, 438, 400, + 448, 1232, 444, 396, 440, 1240, 446, 394, 442, 396, 440, 398, + 440, 400, 448, 390, 446, 1232, 444, 1238, 446, 394, 444, 1236, + 448, 1232, 442, 396, 440, 398, 448, 1232, 444, 396, 440, 398, + 438, 1242, 444, 1238, 448, 1234, 442, 1240, 444, 394, 442, 396, + 440, 398, 438, 400, 448, 390, 446, 394, 444, 420, 416, 394, + 444, 396, 440, 398, 440, 398, 438, 400, 448, 418, 420, 418, + 418, 394, 442, 396, 442, 396, 440, 424, 412, 400, 448, 390, + 446, 392, 446, 420, 418, 420, 416, 396, 440, 398, 440, 424, + 412, 426, 420, 418, 420, 392, 444, 394, 444, 422, 416, 422, + 414, 398, 440, 426, 422, 388, 448, 416, 420, 418, 418, 422, + 416, 422, 414, 424, 414, 398, 438, 426, 422, 418, 420, 390, + 446, 418, 418, 420, 416, 396, 440, 424, 412, 426, 412, 400, + 446, 418, 420, 420, 418, 420, 416, 422, 414, 422, 414, 424, + 412, 426, 422, 390, 446, 1232, 442, 1240, 446, 394, 444, 394, + 442, 1238, 446, 1234, 440, 1240, 444}; // UNKNOWN F6FDB82B + + irsend.sendRaw(rawData, 583, 33); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MITSUBISHI_AC, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiACBits, irsend.capture.bits); + uint8_t expected[kMitsubishiACStateLength] = { + 0x23, 0xCB, 0x26, 0x01, 0x00, 0x00, 0x18, 0x0A, 0x36, + 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6}; + EXPECT_STATE_EQ(expected, irsend.capture.state, kMitsubishiACBits); +} + +// Tests for decodeMitsubishiAC() when the first payload has an error. +TEST(TestDecodeMitsubishiAC, DecodeRealExampleRepeatNeeded) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Mitsubishi AC "Power On, 16C, low fan, vane auto move". + uint16_t rawData[583] = { + 3476, 1708, 416, 1264, 420, 1260, 414, 400, 448, 390, 446, 392, 444, 1236, + 440, 400, 446, 392, 446, 1234, 440, 1266, 418, 396, 442, 1264, 420, 394, + 444, 394, 442, 1264, 422, 1260, 414, 398, 440, 1266, 418, 1264, 420, 392, + 446, 392, 444, 1264, 422, 392, 446, 392, 446, 1260, 414, 400, 448, 390, + 446, 392, 444, 394, 442, 396, 442, 398, 440, 424, 412, 400, 448, 390, 446, + 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, 438, 400, 448, 390, + 446, 392, 446, 392, 444, 396, 442, 396, 440, 398, 440, 400, 438, 400, 448, + 390, 446, 392, 444, 1236, 440, 1266, 418, 394, 442, 396, 440, 398, 438, + 402, 446, 1232, 444, 396, 440, 1268, 418, 394, 442, 396, 440, 398, + // space 699 is not recognizable: + 440, 400, 448, 390, 448, 1232, 442, 1266, 420, 394, 444, 1264, 699, 1260, + 416, 396, 440, 398, 450, 1230, 444, 396, 442, 398, 440, 1266, 418, 1264, + 422, 1258, 416, 1266, 418, 394, 442, 396, 440, 398, 440, 398, 438, 400, + 446, 392, 446, 392, 446, 392, 444, 396, 442, 396, 440, 398, 438, 398, 438, + 400, 448, 392, 446, 392, 444, 394, 444, 396, 442, 396, 440, 398, 438, 400, + 448, 390, 448, 392, 444, 394, 444, 394, 442, 396, 442, 396, 440, 398, 438, + 400, 448, 390, 446, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, + 438, 400, 448, 390, 446, 392, 444, 394, 444, 394, 442, 396, 440, 398, 440, + 398, 438, 400, 448, 390, 446, 392, 444, 394, 444, 394, 442, 396, 440, 398, + 438, 400, 438, 400, 448, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, + 398, 438, 1240, 444, 1264, 422, 390, 446, 392, 446, 1260, 414, 1268, 418, + 1264, 422, 12984, 3478, 1708, 418, 1264, 422, 1234, 442, 398, 448, 390, + 446, 392, 446, 1234, 440, 400, 448, 390, 446, 1234, 442, 1266, 420, 392, + 444, 1264, 420, 392, 446, 394, 444, 1236, 448, 1260, 416, 398, 440, 1266, + 418, 1262, 422, 390, 446, 392, 444, 1234, 440, 400, 448, 392, 446, 1234, + 440, 398, 450, 390, 446, 392, 444, 394, 444, 394, 442, 396, 442, 398, 440, + 400, 438, 400, 448, 390, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, + 438, 400, 448, 390, 446, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, + 398, 438, 400, 448, 416, 420, 392, 444, 1234, 440, 1240, 446, 394, 442, + 396, 440, 398, 438, 400, 448, 1232, 444, 396, 440, 1240, 446, 394, 442, + 396, 440, 398, 440, 400, 448, 390, 446, 1232, 444, 1238, 446, 394, 444, + 1236, 448, 1232, 442, 396, 440, 398, 448, 1232, 444, 396, 440, 398, 438, + 1242, 444, 1238, 448, 1234, 442, 1240, 444, 394, 442, 396, 440, 398, 438, + 400, 448, 390, 446, 394, 444, 420, 416, 394, 444, 396, 440, 398, 440, 398, + 438, 400, 448, 418, 420, 418, 418, 394, 442, 396, 442, 396, 440, 424, 412, + 400, 448, 390, 446, 392, 446, 420, 418, 420, 416, 396, 440, 398, 440, 424, + 412, 426, 420, 418, 420, 392, 444, 394, 444, 422, 416, 422, 414, 398, 440, + 426, 422, 388, 448, 416, 420, 418, 418, 422, 416, 422, 414, 424, 414, 398, + 438, 426, 422, 418, 420, 390, 446, 418, 418, 420, 416, 396, 440, 424, 412, + 426, 412, 400, 446, 418, 420, 420, 418, 420, 416, 422, 414, 422, 414, 424, + 412, 426, 422, 390, 446, 1232, 442, 1240, 446, 394, 444, 394, 442, 1238, + 446, 1234, 440, 1240, 444}; // UNKNOWN F6FDB82B + + irsend.sendRaw(rawData, 583, 33); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MITSUBISHI_AC, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiACBits, irsend.capture.bits); + uint8_t expected[kMitsubishiACStateLength] = { + 0x23, 0xCB, 0x26, 0x01, 0x00, 0x00, 0x18, 0x0A, 0x36, + 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6}; + EXPECT_STATE_EQ(expected, irsend.capture.state, kMitsubishiACBits); +} + +// Tests for decodeMitsubishiAC() when the repeat mark is wrong. +TEST(TestDecodeMitsubishiAC, DecodeRealExampleRepeatMarkError) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Mitsubishi AC "Power On, 16C, low fan, vane auto move". + uint16_t rawData[583] = { + 3476, 1708, 416, 1264, 420, 1260, 414, 400, 448, 390, 446, 392, 444, 1236, + 440, 400, 446, 392, 446, 1234, 440, 1266, 418, 396, 442, 1264, 420, 394, + 444, 394, 442, 1264, 422, 1260, 414, 398, 440, 1266, 418, 1264, 420, 392, + 446, 392, 444, 1264, 422, 392, 446, 392, 446, 1260, 414, 400, 448, 390, + 446, 392, 444, 394, 442, 396, 442, 398, 440, 424, 412, 400, 448, 390, 446, + 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, 438, 400, 448, 390, + 446, 392, 446, 392, 444, 396, 442, 396, 440, 398, 440, 400, 438, 400, 448, + 390, 446, 392, 444, 1236, 440, 1266, 418, 394, 442, 396, 440, 398, 438, + 402, 446, 1232, 444, 396, 440, 1268, 418, 394, 442, 396, 440, 398, 440, + 400, 448, 390, 448, 1232, 442, 1266, 420, 394, 444, 1264, 422, 1260, 416, + 396, 440, 398, 450, 1230, 444, 396, 442, 398, 440, 1266, 418, 1264, 422, + 1258, 416, 1266, 418, 394, 442, 396, 440, 398, 440, 398, 438, 400, 446, + 392, 446, 392, 446, 392, 444, 396, 442, 396, 440, 398, 438, 398, 438, 400, + 448, 392, 446, 392, 444, 394, 444, 396, 442, 396, 440, 398, 438, 400, 448, + 390, 448, 392, 444, 394, 444, 394, 442, 396, 442, 396, 440, 398, 438, 400, + 448, 390, 446, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, 438, + 400, 448, 390, 446, 392, 444, 394, 444, 394, 442, 396, 440, 398, 440, 398, + 438, 400, 448, 390, 446, 392, 444, 394, 444, 394, 442, 396, 440, 398, 438, + 400, 438, 400, 448, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, + 438, 1240, 444, 1264, 422, 390, 446, 392, 446, + // Repeat mark (1111) wrong: + 1260, 414, 1268, 418, 1264, 422, 1111, 347, 1708, 418, 1264, 422, 1234, + 442, 398, 448, 390, 446, 392, 446, 1234, 440, 400, 448, 390, 446, 1234, + 442, 1266, 420, 392, 444, 1264, 420, 392, 446, 394, 444, 1236, 448, 1260, + 416, 398, 440, 1266, 418, 1262, 422, 390, 446, 392, 444, 1234, 440, 400, + 448, 392, 446, 1234, 440, 398, 450, 390, 446, 392, 444, 394, 444, 394, + 442, 396, 442, 398, 440, 400, 438, 400, 448, 390, 446, 392, 444, 394, 442, + 396, 442, 396, 440, 398, 438, 400, 448, 390, 446, 392, 446, 392, 444, 394, + 442, 396, 442, 396, 440, 398, 438, 400, 448, 416, 420, 392, 444, 1234, + 440, 1240, 446, 394, 442, 396, 440, 398, 438, 400, 448, 1232, 444, 396, + 440, 1240, 446, 394, 442, 396, 440, 398, 440, 400, 448, 390, 446, 1232, + 444, 1238, 446, 394, 444, 1236, 448, 1232, 442, 396, 440, 398, 448, 1232, + 444, 396, 440, 398, 438, 1242, 444, 1238, 448, 1234, 442, 1240, 444, 394, + 442, 396, 440, 398, 438, 400, 448, 390, 446, 394, 444, 420, 416, 394, 444, + 396, 440, 398, 440, 398, 438, 400, 448, 418, 420, 418, 418, 394, 442, 396, + 442, 396, 440, 424, 412, 400, 448, 390, 446, 392, 446, 420, 418, 420, 416, + 396, 440, 398, 440, 424, 412, 426, 420, 418, 420, 392, 444, 394, 444, 422, + 416, 422, 414, 398, 440, 426, 422, 388, 448, 416, 420, 418, 418, 422, 416, + 422, 414, 424, 414, 398, 438, 426, 422, 418, 420, 390, 446, 418, 418, 420, + 416, 396, 440, 424, 412, 426, 412, 400, 446, 418, 420, 420, 418, 420, 416, + 422, 414, 422, 414, 424, 412, 426, 422, 390, 446, 1232, 442, 1240, 446, + 394, 444, 394, 442, 1238, 446, 1234, 440, 1240, 444}; // UNKNOWN F6FDB82B + + irsend.sendRaw(rawData, 583, 33); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MITSUBISHI_AC, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiACBits, irsend.capture.bits); + uint8_t expected[kMitsubishiACStateLength] = { + 0x23, 0xCB, 0x26, 0x01, 0x00, 0x00, 0x18, 0x0A, 0x36, + 0x79, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xE6}; + EXPECT_STATE_EQ(expected, irsend.capture.state, kMitsubishiACBits); +} + +// Tests for decodeMitsubishiAC() when first payload has an error and the +// repeat mark is wrong. +TEST(TestDecodeMitsubishiAC, DecodeRealExampleRepeatNeededButError) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Mitsubishi AC "Power On, 16C, low fan, vane auto move". + uint16_t rawData[583] = { + 3476, 1708, 416, 1264, 420, 1260, 414, 400, 448, 390, 446, 392, 444, 1236, + 440, 400, 446, 392, 446, 1234, 440, 1266, 418, 396, 442, 1264, 420, 394, + 444, 394, 442, 1264, 422, 1260, 414, 398, 440, 1266, 418, 1264, 420, 392, + 446, 392, 444, 1264, 422, 392, 446, 392, 446, 1260, 414, 400, 448, 390, + 446, 392, 444, 394, 442, 396, 442, 398, 440, 424, 412, 400, 448, 390, 446, + 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, 438, 400, 448, 390, + 446, 392, 446, 392, 444, 396, 442, 396, 440, 398, 440, 400, 438, 400, 448, + 390, 446, 392, 444, 1236, 440, 1266, 418, 394, 442, 396, 440, 398, 438, + 402, 446, 1232, 444, 396, 440, 1268, 418, 394, 442, 396, 440, 398, + // space 699 is not recognizable: + 440, 400, 448, 390, 448, 1232, 442, 1266, 420, 394, 444, 1264, 699, 1260, + 416, 396, 440, 398, 450, 1230, 444, 396, 442, 398, 440, 1266, 418, 1264, + 422, 1258, 416, 1266, 418, 394, 442, 396, 440, 398, 440, 398, 438, 400, + 446, 392, 446, 392, 446, 392, 444, 396, 442, 396, 440, 398, 438, 398, 438, + 400, 448, 392, 446, 392, 444, 394, 444, 396, 442, 396, 440, 398, 438, 400, + 448, 390, 448, 392, 444, 394, 444, 394, 442, 396, 442, 396, 440, 398, 438, + 400, 448, 390, 446, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, 398, + 438, 400, 448, 390, 446, 392, 444, 394, 444, 394, 442, 396, 440, 398, 440, + 398, 438, 400, 448, 390, 446, 392, 444, 394, 444, 394, 442, 396, 440, 398, + 438, 400, 438, 400, 448, 392, 446, 392, 444, 394, 442, 396, 442, 396, 440, + 398, 438, 1240, 444, 1264, 422, 390, 446, 392, 446, + // 1111 is not a valid repeat mark: + 1260, 414, 1268, 418, 1264, 422, 1111, 3478, 1708, 418, 1264, 422, 1234, + 442, 398, 448, 390, 446, 392, 446, 1234, 440, 400, 448, 390, 446, 1234, + 442, 1266, 420, 392, 444, 1264, 420, 392, 446, 394, 444, 1236, 448, 1260, + 416, 398, 440, 1266, 418, 1262, 422, 390, 446, 392, 444, 1234, 440, 400, + 448, 392, 446, 1234, 440, 398, 450, 390, 446, 392, 444, 394, 444, 394, + 442, 396, 442, 398, 440, 400, 438, 400, 448, 390, 446, 392, 444, 394, 442, + 396, 442, 396, 440, 398, 438, 400, 448, 390, 446, 392, 446, 392, 444, 394, + 442, 396, 442, 396, 440, 398, 438, 400, 448, 416, 420, 392, 444, 1234, + 440, 1240, 446, 394, 442, 396, 440, 398, 438, 400, 448, 1232, 444, 396, + 440, 1240, 446, 394, 442, 396, 440, 398, 440, 400, 448, 390, 446, 1232, + 444, 1238, 446, 394, 444, 1236, 448, 1232, 442, 396, 440, 398, 448, 1232, + 444, 396, 440, 398, 438, 1242, 444, 1238, 448, 1234, 442, 1240, 444, 394, + 442, 396, 440, 398, 438, 400, 448, 390, 446, 394, 444, 420, 416, 394, 444, + 396, 440, 398, 440, 398, 438, 400, 448, 418, 420, 418, 418, 394, 442, 396, + 442, 396, 440, 424, 412, 400, 448, 390, 446, 392, 446, 420, 418, 420, 416, + 396, 440, 398, 440, 424, 412, 426, 420, 418, 420, 392, 444, 394, 444, 422, + 416, 422, 414, 398, 440, 426, 422, 388, 448, 416, 420, 418, 418, 422, 416, + 422, 414, 424, 414, 398, 438, 426, 422, 418, 420, 390, 446, 418, 418, 420, + 416, 396, 440, 424, 412, 426, 412, 400, 446, 418, 420, 420, 418, 420, 416, + 422, 414, 422, 414, 424, 412, 426, 422, 390, 446, 1232, 442, 1240, 446, + 394, 444, 394, 442, 1238, 446, 1234, 440, 1240, 444}; // UNKNOWN F6FDB82B + + irsend.sendRaw(rawData, 583, 33); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(UNKNOWN, irsend.capture.decode_type); +} + +TEST(TestMitsubishiACClass, HumanReadable) { + IRMitsubishiAC irMitsu(0); + EXPECT_EQ( + "Power: On (HEAT), Temp: 22C, FAN: SILENT, VANE: AUTO, " + "Time: 17:10, On timer: 00:00, Off timer: 00:00, Timer: -", + irMitsu.toString()); +} + +// Test sending typical data only. +TEST(TestSendMitsubishi2, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendMitsubishi2(0xF82); + EXPECT_EQ( + "m8400s4200" + "m560s520m560s520m560s520m560s520m560s1560m560s1560m560s1560m560s1560" + "m560s4200" + "m560s1560m560s520m560s520m560s520m560s520m560s520m560s1560m560s520" + "m560s28500" + "m8400s4200" + "m560s520m560s520m560s520m560s520m560s1560m560s1560m560s1560m560s1560" + "m560s4200" + "m560s1560m560s520m560s520m560s520m560s520m560s520m560s1560m560s520" + "m560s28500", + irsend.outputStr()); + + irsend.reset(); + irsend.sendMitsubishi2(0x0); + EXPECT_EQ( + "m8400s4200" + "m560s520m560s520m560s520m560s520m560s520m560s520m560s520m560s520" + "m560s4200" + "m560s520m560s520m560s520m560s520m560s520m560s520m560s520m560s520" + "m560s28500" + "m8400s4200" + "m560s520m560s520m560s520m560s520m560s520m560s520m560s520m560s520" + "m560s4200" + "m560s520m560s520m560s520m560s520m560s520m560s520m560s520m560s520" + "m560s28500", + irsend.outputStr()); +} + +// Test sending odd repeats. +TEST(TestSendMitsubishi2, Repeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendMitsubishi2(0xF82, kMitsubishiBits, 0); + EXPECT_EQ( + "m8400s4200" + "m560s520m560s520m560s520m560s520m560s1560m560s1560m560s1560m560s1560" + "m560s4200" + "m560s1560m560s520m560s520m560s520m560s520m560s520m560s1560m560s520" + "m560s28500", + irsend.outputStr()); + + irsend.reset(); + irsend.sendMitsubishi2(0xF82, kMitsubishiBits, 2); + EXPECT_EQ( + "m8400s4200" + "m560s520m560s520m560s520m560s520m560s1560m560s1560m560s1560m560s1560" + "m560s4200" + "m560s1560m560s520m560s520m560s520m560s520m560s520m560s1560m560s520" + "m560s28500" + "m8400s4200" + "m560s520m560s520m560s520m560s520m560s1560m560s1560m560s1560m560s1560" + "m560s4200" + "m560s1560m560s520m560s520m560s520m560s520m560s520m560s1560m560s520" + "m560s28500" + "m8400s4200" + "m560s520m560s520m560s520m560s520m560s1560m560s1560m560s1560m560s1560" + "m560s4200" + "m560s1560m560s520m560s520m560s520m560s520m560s520m560s1560m560s520" + "m560s28500", + irsend.outputStr()); +} + +// Tests for decodeMitsubishi2(). + +// Decode synthetic examples. +TEST(TestDecodeMitsubishi2, DecodeSyntheticExamples) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Mitsubishi Projector "Power On" (16-bit). + irsend.sendMitsubishi2(0xF82); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MITSUBISHI2, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiBits, irsend.capture.bits); + EXPECT_EQ(0xF82, irsend.capture.value); + EXPECT_EQ(0xF, irsend.capture.address); + EXPECT_EQ(0x82, irsend.capture.command); + + irsend.reset(); + irsend.sendMitsubishi2(0x0); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MITSUBISHI2, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiBits, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + + irsend.reset(); + irsend.sendMitsubishi2(0x1234); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MITSUBISHI2, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiBits, irsend.capture.bits); + EXPECT_EQ(0x1234, irsend.capture.value); + EXPECT_EQ(0x12, irsend.capture.address); + EXPECT_EQ(0x34, irsend.capture.command); +} + +// Decode a 'real' example from Issue #441 +TEST(TestDecodeMitsubishi2, DecodeRealExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Mitsubishi Projector "Power On" (16-bit). + uint16_t rawData[75] = { + 8402, 4172, 554, 490, 562, 484, 560, 514, 532, 512, 534, + 1566, 526, 1572, 526, 1542, 560, 1568, 532, 4192, 534, 1564, + 532, 484, 560, 512, 532, 512, 532, 514, 530, 514, 526, + 1570, 524, 520, 526, 28506, 8454, 4170, 560, 514, 528, 516, + 526, 520, 524, 490, 556, 1572, 534, 1534, 560, 1568, 530, + 1538, 558, 4166, 560, 1538, 558, 490, 560, 512, 530, 514, + 532, 484, 558, 514, 532, 1566, 530, 486, 554}; // UNKNOWN 96A1512F + + irsend.sendRaw(rawData, 75, 33); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(MITSUBISHI2, irsend.capture.decode_type); + EXPECT_EQ(kMitsubishiBits, irsend.capture.bits); + EXPECT_EQ(0xF82, irsend.capture.value); + EXPECT_EQ(0xF, irsend.capture.address); + EXPECT_EQ(0x82, irsend.capture.command); +} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_NEC_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_NEC_test.cpp similarity index 63% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_NEC_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_NEC_test.cpp index 781aa38d7..6b84b0ec9 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_NEC_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_NEC_test.cpp @@ -11,18 +11,21 @@ TEST(TestSendNEC, SendDataOnly) { IRsendTest irsend(4); irsend.begin(); irsend.sendNEC(0); - EXPECT_EQ("m8960s4480m560s560m560s560m560s560m560s560m560s560m560s560m560s560" - "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" - "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" - "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" - "m560s560m560s108080", irsend.outputStr()); + EXPECT_EQ( + "m8960s4480m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s58240", + irsend.outputStr()); irsend.sendNEC(0xAA00FF55); - EXPECT_EQ("m8960s4480m560s1680m560s560m560s1680m560s560m560s1680m560s560" - "m560s1680m560s560m560s560m560s560m560s560m560s560m560s560m560s560" - "m560s560m560s560m560s1680m560s1680m560s1680m560s1680m560s1680" - "m560s1680m560s1680m560s1680m560s560m560s1680m560s560m560s1680" - "m560s560m560s1680m560s560m560s1680m560s108080", - irsend.outputStr()); + EXPECT_EQ( + "m8960s4480m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s1680m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s1680m560s1680m560s1680m560s560m560s1680m560s560m560s1680" + "m560s560m560s1680m560s560m560s1680m560s40320", + irsend.outputStr()); } // Test sending different bit lengths. @@ -30,22 +33,26 @@ TEST(TestSendNEC, SendSmallData) { IRsendTest irsend(4); irsend.begin(); irsend.sendNEC(0xA, 4); // Send only 4 data bits. - EXPECT_EQ("m8960s4480m560s1680m560s560m560s1680m560s560m560s108080", + EXPECT_EQ("m8960s4480m560s1680m560s560m560s1680m560s560m560s87360", irsend.outputStr()); irsend.sendNEC(0, 8); // Send only 8 data bits. - EXPECT_EQ("m8960s4480m560s560m560s560m560s560m560s560m560s560m560s560m560s560" - "m560s560m560s108080", irsend.outputStr()); + EXPECT_EQ( + "m8960s4480m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s85120", + irsend.outputStr()); irsend.sendNEC(0x1234567890ABCDEF, 64); // Send 64 data bits. - EXPECT_EQ("m8960s4480m560s560m560s560m560s560m560s1680m560s560m560s560" - "m560s1680m560s560m560s560m560s560m560s1680m560s1680m560s560" - "m560s1680m560s560m560s560m560s560m560s1680m560s560m560s1680" - "m560s560m560s1680m560s1680m560s560m560s560m560s1680m560s1680" - "m560s1680m560s1680m560s560m560s560m560s560m560s1680m560s560" - "m560s560m560s1680m560s560m560s560m560s560m560s560m560s1680m560s560" - "m560s1680m560s560m560s1680m560s560m560s1680m560s1680m560s1680" - "m560s1680m560s560m560s560m560s1680m560s1680m560s560m560s1680" - "m560s1680m560s1680m560s1680m560s560m560s1680m560s1680m560s1680" - "m560s1680m560s108080", irsend.outputStr()); + EXPECT_EQ( + "m8960s4480m560s560m560s560m560s560m560s1680m560s560m560s560" + "m560s1680m560s560m560s560m560s560m560s1680m560s1680m560s560" + "m560s1680m560s560m560s560m560s560m560s1680m560s560m560s1680" + "m560s560m560s1680m560s1680m560s560m560s560m560s1680m560s1680" + "m560s1680m560s1680m560s560m560s560m560s560m560s1680m560s560" + "m560s560m560s1680m560s560m560s560m560s560m560s560m560s1680m560s560" + "m560s1680m560s560m560s1680m560s560m560s1680m560s1680m560s1680" + "m560s1680m560s560m560s560m560s1680m560s1680m560s560m560s1680" + "m560s1680m560s1680m560s1680m560s560m560s1680m560s1680m560s1680" + "m560s1680m560s22400", + irsend.outputStr()); } // Test sending with repeats. @@ -53,20 +60,24 @@ TEST(TestSendNEC, SendWithRepeats) { IRsendTest irsend(4); irsend.begin(); irsend.sendNEC(0, 8, 0); // Send a command with 0 repeats. - EXPECT_EQ("m8960s4480m560s560m560s560m560s560m560s560m560s560m560s560m560s560" - "m560s560m560s108080", irsend.outputStr()); + EXPECT_EQ( + "m8960s4480m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s85120", + irsend.outputStr()); irsend.sendNEC(0xAA, 8, 1); // Send a command with 1 repeat. - EXPECT_EQ("m8960s4480m560s1680m560s560m560s1680m560s560m560s1680m560s560" - "m560s1680m560s560m560s108080" - "m8960s2240m560s108080", - irsend.outputStr()); + EXPECT_EQ( + "m8960s4480m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s1680m560s560m560s80640" + "m8960s2240m560s96320", + irsend.outputStr()); irsend.sendNEC(0xAA, 8, 3); // Send a command with 3 repeats. - EXPECT_EQ("m8960s4480m560s1680m560s560m560s1680m560s560m560s1680m560s560" - "m560s1680m560s560m560s108080" - "m8960s2240m560s108080" - "m8960s2240m560s108080" - "m8960s2240m560s108080", - irsend.outputStr()); + EXPECT_EQ( + "m8960s4480m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s1680m560s560m560s80640" + "m8960s2240m560s96320" + "m8960s2240m560s96320" + "m8960s2240m560s96320", + irsend.outputStr()); } // Tests for encodeNEC(). @@ -101,7 +112,7 @@ TEST(TestDecodeNEC, NormalNECDecodeWithStrict) { irsend.makeDecodeResult(); EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0x807F40BF, irsend.capture.value); EXPECT_EQ(0x1, irsend.capture.address); EXPECT_EQ(0x2, irsend.capture.command); @@ -112,7 +123,7 @@ TEST(TestDecodeNEC, NormalNECDecodeWithStrict) { irsend.makeDecodeResult(); EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0xC1A28877, irsend.capture.value); EXPECT_EQ(0x4583, irsend.capture.address); EXPECT_EQ(0x11, irsend.capture.command); @@ -129,7 +140,7 @@ TEST(TestDecodeNEC, NormalNECDecodeWithStrict) { irsend.makeDecodeResult(); EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0x807F40BF, irsend.capture.value); EXPECT_EQ(0x1, irsend.capture.address); EXPECT_EQ(0x2, irsend.capture.command); @@ -146,7 +157,7 @@ TEST(TestDecodeNEC, NormalNECDecodeWithoutStrict) { irsend.makeDecodeResult(); EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture, 32, false)); EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0, irsend.capture.value); EXPECT_EQ(0, irsend.capture.address); EXPECT_EQ(0, irsend.capture.command); @@ -156,7 +167,7 @@ TEST(TestDecodeNEC, NormalNECDecodeWithoutStrict) { irsend.makeDecodeResult(); EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture, 32, false)); EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0x12345678, irsend.capture.value); EXPECT_EQ(0x2C48, irsend.capture.address); EXPECT_EQ(0, irsend.capture.command); @@ -225,18 +236,18 @@ TEST(TestDecodeNEC, NoTrailingGap_Issue243) { irsend.begin(); irsend.reset(); - uint16_t rawData[67] = {9000, 4500, 650, 550, 650, 1650, 600, 550, 650, 550, - 600, 1650, 650, 550, 600, 1650, 650, 1650, 650, 1650, - 600, 550, 650, 1650, 650, 1650, 650, 550, 600, 1650, - 650, 1650, 650, 550, 650, 550, 650, 1650, 650, 550, - 650, 550, 650, 550, 600, 550, 650, 550, 650, 550, - 650, 1650, 600, 550, 650, 1650, 650, 1650, 650, 1650, - 650, 1650, 650, 1650, 650, 1650, 600}; + uint16_t rawData[67] = { + 9000, 4500, 650, 550, 650, 1650, 600, 550, 650, 550, 600, 1650, + 650, 550, 600, 1650, 650, 1650, 650, 1650, 600, 550, 650, 1650, + 650, 1650, 650, 550, 600, 1650, 650, 1650, 650, 550, 650, 550, + 650, 1650, 650, 550, 650, 550, 650, 550, 600, 550, 650, 550, + 650, 550, 650, 1650, 600, 550, 650, 1650, 650, 1650, 650, 1650, + 650, 1650, 650, 1650, 650, 1650, 600}; irsend.sendRaw(rawData, 67, 38); irsend.makeDecodeResult(); EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0x4BB640BF, irsend.capture.value); EXPECT_EQ(0x6DD2, irsend.capture.address); EXPECT_EQ(0x2, irsend.capture.command); @@ -246,16 +257,16 @@ TEST(TestDecodeNEC, NoTrailingGap_Issue243) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0x4BB640BF, irsend.capture.value); // Add a zero length space to the message to test how it handles that as - // a end of command gap. + // an end of command gap. irsend.addGap(0); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0x4BB640BF, irsend.capture.value); } @@ -270,18 +281,18 @@ TEST(TestDecodeNEC, NonStrictNECDecode_Issue264) { irsend.reset(); // Slightly modified example than reported due to poor timings that are too // far out of spec. - uint16_t rawData[67] = {9150, 4650, 550, 600, 550, 1800, 600, 1750, 600, 1800, - 550, 600, 550, 1800, 550, 1750, 600, 1750, 600, 1750, - 600, 1750, 600, 1700, 600, 600, 600, 600, 550, 600, - 600, 600, 600, 1750, 600, 1750, 600, 600, 550, 1800, - 600, 600, 600, 600, 600, 600, 500, 600, 600, 600, - 600, 600, 600, 1750, 600, 600, 600, 550, 600, 600, - 600, 600, 600, 600, 600, 550, 600}; + uint16_t rawData[67] = { + 9150, 4650, 550, 600, 550, 1800, 600, 1750, 600, 1800, 550, 600, + 550, 1800, 550, 1750, 600, 1750, 600, 1750, 600, 1750, 600, 1700, + 600, 600, 600, 600, 550, 600, 600, 600, 600, 1750, 600, 1750, + 600, 600, 550, 1800, 600, 600, 600, 600, 600, 600, 500, 600, + 600, 600, 600, 600, 600, 1750, 600, 600, 600, 550, 600, 600, + 600, 600, 600, 600, 600, 550, 600}; irsend.sendRaw(rawData, 67, 38); irsend.makeDecodeResult(); EXPECT_FALSE(irrecv.decodeNEC(&irsend.capture)); // Not strictly NEC - EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture, NEC_BITS, false)); + EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture, kNECBits, false)); EXPECT_EQ(0x77E1A040, irsend.capture.value); // Do it all again, but with a normal decode. @@ -290,7 +301,7 @@ TEST(TestDecodeNEC, NonStrictNECDecode_Issue264) { irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decode(&irsend.capture)); EXPECT_EQ(NEC_LIKE, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0x77E1A040, irsend.capture.value); } @@ -303,18 +314,18 @@ TEST(TestDecodeNEC, AutoReceiveCalibration) { // Data from Issue #264, for a remote that is slightly off spec. // Should be matched as a NEC-like message however without self-calibrating // the timings of the short spaces is out. - uint16_t rawData[67] = {9150, 4600, 650, 600, 650, 1650, 650, 1700, 650, 1750, - 650, 600, 650, 1700, 650, 1750, 650, 1750, 650, 1700, - 650, 1700, 650, 1700, 650, 600, 650, 600, 650, 600, - 600, 600, 650, 1750, 650, 1750, 650, 600, 650, 1700, - 600, 600, 700, 550, 650, 550, 650, 600, 650, 600, - 650, 600, 650, 1750, 600, 600, 650, 600, 650, 550, - 650, 600, 650, 600, 650, 600, 600}; + uint16_t rawData[67] = { + 9150, 4600, 650, 600, 650, 1650, 650, 1700, 650, 1750, 650, 600, + 650, 1700, 650, 1750, 650, 1750, 650, 1700, 650, 1700, 650, 1700, + 650, 600, 650, 600, 650, 600, 600, 600, 650, 1750, 650, 1750, + 650, 600, 650, 1700, 600, 600, 700, 550, 650, 550, 650, 600, + 650, 600, 650, 600, 650, 1750, 600, 600, 650, 600, 650, 550, + 650, 600, 650, 600, 650, 600, 600}; irsend.sendRaw(rawData, 67, 38); irsend.makeDecodeResult(); - EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture, NEC_BITS, false)); + EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture, kNECBits, false)); EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); + EXPECT_EQ(kNECBits, irsend.capture.bits); EXPECT_EQ(0x77E1A040, irsend.capture.value); } diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Nikai_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Nikai_test.cpp new file mode 100644 index 000000000..4a4ea05bb --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Nikai_test.cpp @@ -0,0 +1,212 @@ +// Copyright 2017 David Conran + +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendNikai(). +// Test sending typical data only. +TEST(TestSendNikai, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendNikai(0xD5F2A); // Nikai TV Power Off. + EXPECT_EQ( + "m4000s4000" + "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" + "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" + "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" + "m500s2000m500s1000m500s2000m500s8500", + irsend.outputStr()); + + irsend.reset(); +} + +// Test sending with different repeats. +TEST(TestSendNikai, SendWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendNikai(0xD5F2A, kNikaiBits, 1); // 1 repeat. + EXPECT_EQ( + "m4000s4000" + "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" + "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" + "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" + "m500s2000m500s1000m500s2000m500s8500" + "m4000s4000" + "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" + "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" + "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" + "m500s2000m500s1000m500s2000m500s8500", + irsend.outputStr()); + irsend.sendNikai(0xD5F2A, kNikaiBits, 2); // 2 repeat. + EXPECT_EQ( + "m4000s4000" + "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" + "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" + "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" + "m500s2000m500s1000m500s2000m500s8500" + "m4000s4000" + "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" + "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" + "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" + "m500s2000m500s1000m500s2000m500s8500" + "m4000s4000" + "m500s2000m500s2000m500s2000m500s2000m500s1000m500s1000m500s2000" + "m500s1000m500s2000m500s1000m500s2000m500s1000m500s1000m500s1000" + "m500s1000m500s1000m500s2000m500s2000m500s1000m500s2000m500s1000" + "m500s2000m500s1000m500s2000m500s8500", + irsend.outputStr()); +} + +// Tests for decodeNikai(). + +// Decode normal Nikai messages. +TEST(TestDecodeNikai, NormalDecodeWithStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Normal Nikai 24-bit message. + irsend.reset(); + irsend.sendNikai(0x123456); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeNikai(&irsend.capture, kNikaiBits, true)); + EXPECT_EQ(NIKAI, irsend.capture.decode_type); + EXPECT_EQ(kNikaiBits, irsend.capture.bits); + EXPECT_EQ(0x123456, irsend.capture.value); + + irsend.reset(); + irsend.sendNikai(0x101); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeNikai(&irsend.capture, kNikaiBits, true)); + EXPECT_EQ(NIKAI, irsend.capture.decode_type); + EXPECT_EQ(kNikaiBits, irsend.capture.bits); + EXPECT_EQ(0x101, irsend.capture.value); +} + +// Decode normal repeated Nikai messages. +TEST(TestDecodeNikai, NormalDecodeWithRepeatAndStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Normal Nikai 24-bit message. + irsend.reset(); + irsend.sendNikai(0xD5F2A, kNikaiBits, 2); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeNikai(&irsend.capture, kNikaiBits, true)); + EXPECT_EQ(NIKAI, irsend.capture.decode_type); + EXPECT_EQ(kNikaiBits, irsend.capture.bits); + EXPECT_EQ(0xD5F2A, irsend.capture.value); +} + +TEST(TestDecodeNikai, NormalDecodeWithNonStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Illegal under length (16-bit) message + irsend.reset(); + irsend.sendNikai(0x0, 16); + irsend.makeDecodeResult(); + // Should fail with strict on. + ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture, kNikaiBits, true)); + // And it should fail when we expect more bits. + ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture, kNikaiBits, false)); + + // Should pass if strict off if we ask for correct nr. of bits sent. + ASSERT_TRUE(irrecv.decodeNikai(&irsend.capture, 16, false)); + EXPECT_EQ(NIKAI, irsend.capture.decode_type); + EXPECT_EQ(16, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + + // Should fail as we are expecting less bits than there are. + ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture, 12, false)); +} + +// Decode (non-standard) 64-bit messages. +// Decode unsupported Nikai messages. +TEST(TestDecodeNikai, Decode64BitMessages) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Illegal size Nikai 64-bit message. + irsend.sendNikai(0xFFFFFFFFFFFFFFFF, 64); + irsend.makeDecodeResult(); + ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture, kNikaiBits, true)); + // Should work with a 'normal' match (not strict) + ASSERT_TRUE(irrecv.decodeNikai(&irsend.capture, 64, false)); + EXPECT_EQ(NIKAI, irsend.capture.decode_type); + EXPECT_EQ(64, irsend.capture.bits); + EXPECT_EQ(0xFFFFFFFFFFFFFFFF, irsend.capture.value); +} + +// Decode real example via Issue #309 +TEST(TestDecodeNikai, DecodeExamples) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Nikai TV Power Off from Issue #309 + uint16_t rawdata_off[100] = { + 4060, 3918, 508, 2004, 508, 2002, 510, 2002, 508, 2004, 506, + 1050, 508, 1048, 510, 2004, 508, 1048, 508, 2002, 510, 1050, + 508, 2004, 510, 1048, 508, 1050, 508, 1048, 508, 1050, 508, + 1050, 508, 2004, 508, 2002, 510, 1048, 508, 2004, 508, 1050, + 506, 2004, 508, 1048, 510, 2002, 456, 8446, 3956, 3998, 508, + 2004, 508, 2002, 508, 2004, 508, 1978, 532, 1050, 508, 1050, + 508, 2002, 508, 1050, 508, 2004, 508, 1050, 508, 2002, 510, + 1050, 508, 1050, 508, 1048, 508, 1050, 508, 1050, 508, 2002, + 510, 2002, 508, 1050, 508, 2002, 510, 1050, 508, 2002, 508}; + irsend.sendRaw(rawdata_off, 100, 38); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(NIKAI, irsend.capture.decode_type); + EXPECT_EQ(kNikaiBits, irsend.capture.bits); + EXPECT_EQ(0xD5F2A, irsend.capture.value); + + // Nikai TV Volume Up from Issue #309 + uint16_t rawdata_volup[52] = { + 3972, 4002, 504, 1982, 526, 2010, 502, 2010, 502, 2010, 500, + 1056, 502, 1056, 502, 2010, 500, 1056, 502, 2010, 502, 2010, + 500, 2010, 502, 2010, 502, 1056, 502, 1056, 502, 1056, 500, + 1056, 502, 2010, 502, 2010, 500, 1056, 502, 2008, 502, 1054, + 504, 1054, 504, 1054, 500, 1056, 450}; + + irsend.reset(); + irsend.sendRaw(rawdata_volup, 52, 38); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(NIKAI, irsend.capture.decode_type); + EXPECT_EQ(kNikaiBits, irsend.capture.bits); + EXPECT_EQ(0xD0F2F, irsend.capture.value); +} + +// Fail to decode a non-Nikai example via GlobalCache +TEST(TestDecodeNikai, FailToDecodeNonNikaiExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + uint16_t gc_test[71] = {38000, 1, 1, 172, 172, 22, 64, 22, 64, 22, 64, 22, + 21, 22, 21, 22, 21, 22, 11, 22, 21, 22, 128, 22, + 64, 22, 64, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 64, 22, 21, 22, 21, 22, 64, 22, 64, 22, + 21, 22, 21, 22, 64, 22, 21, 22, 64, 22, 64, 22, + 21, 22, 21, 22, 64, 22, 64, 22, 21, 22, 1820}; + irsend.sendGC(gc_test, 71); + irsend.makeDecodeResult(); + + ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture)); + ASSERT_FALSE(irrecv.decodeNikai(&irsend.capture, kNikaiBits, false)); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Panasonic_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Panasonic_test.cpp new file mode 100644 index 000000000..a1d8a7979 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Panasonic_test.cpp @@ -0,0 +1,1135 @@ +// Copyright 2017, 2018 David Conran + +#include "ir_Panasonic.h" +#include "IRrecv.h" +#include "IRrecv_test.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "IRutils.h" +#include "gtest/gtest.h" + +// Tests for encodePanasonic(). + +TEST(TestEncodePanasonic, General) { + IRsendTest irsend(4); + EXPECT_EQ(0x0, irsend.encodePanasonic(0, 0, 0, 0)); + EXPECT_EQ(0x101010101, irsend.encodePanasonic(1, 1, 1, 1)); + EXPECT_EQ(0xFFFF, irsend.encodePanasonic(0, 0, 0, 0xFF)); + EXPECT_EQ(0xFF00FF, irsend.encodePanasonic(0, 0, 0xFF, 0)); + EXPECT_EQ(0xFF0000FF, irsend.encodePanasonic(0, 0xFF, 0, 0)); + EXPECT_EQ(0xFFFF00000000, irsend.encodePanasonic(0xFFFF, 0, 0, 0)); + EXPECT_EQ(0xFFFFFFFFFFFF, irsend.encodePanasonic(0xFFFF, 0xFF, 0xFF, 0xFF)); + EXPECT_EQ(0x40040190ED7C, irsend.encodePanasonic(0x4004, 0x01, 0x90, 0xED)); +} + +// Tests for sendPanasonic64(). + +// Test sending typical data only. +TEST(TestSendPanasonic64, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendPanasonic64(0x0); + EXPECT_EQ( + "m3456s1728" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s116208", + irsend.outputStr()); + + irsend.reset(); + irsend.sendPanasonic64(0x40040190ED7C); + EXPECT_EQ( + "m3456s1728" + "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" + "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" + "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" + "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" + "m432s102384", + irsend.outputStr()); + + irsend.reset(); + irsend.sendPanasonic64(0xFFFFFFFFFFFF); + EXPECT_EQ( + "m3456s1728" + "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" + "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" + "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" + "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" + "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" + "m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296m432s1296" + "m432s74736", + irsend.outputStr()); +} + +// Test sending with different repeats. +TEST(TestSendPanasonic64, SendWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendPanasonic64(0x40040190ED7C, kPanasonicBits, 0); // 0 repeats. + EXPECT_EQ( + "m3456s1728" + "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" + "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" + "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" + "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" + "m432s102384", + irsend.outputStr()); + + irsend.reset(); + irsend.sendPanasonic64(0x40040190ED7C, kPanasonicBits, 1); // 1 repeat. + EXPECT_EQ( + "m3456s1728" + "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" + "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" + "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" + "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" + "m432s102384" + "m3456s1728" + "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" + "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" + "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" + "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" + "m432s102384", + irsend.outputStr()); + + irsend.sendPanasonic64(0x40040190ED7C, kPanasonicBits, 2); // 2 repeats. + EXPECT_EQ( + "m3456s1728" + "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" + "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" + "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" + "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" + "m432s102384" + "m3456s1728" + "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" + "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" + "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" + "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" + "m432s102384" + "m3456s1728" + "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" + "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" + "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s432m432s1296" + "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" + "m432s102384", + irsend.outputStr()); +} + +// Test sending an atypical data size. +TEST(TestSendPanasonic64, SendUnusualSize) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendPanasonic64(0x0, 8); + EXPECT_EQ( + "m3456s1728" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s150768", + irsend.outputStr()); + + irsend.reset(); + irsend.sendPanasonic64(0x1234567890ABCDEF, 64); + EXPECT_EQ( + "m3456s1728" + "m432s432m432s432m432s432m432s1296m432s432m432s432m432s1296m432s432" + "m432s432m432s432m432s1296m432s1296m432s432m432s1296m432s432m432s432" + "m432s432m432s1296m432s432m432s1296m432s432m432s1296m432s1296m432s432" + "m432s432m432s1296m432s1296m432s1296m432s1296m432s432m432s432m432s432" + "m432s1296m432s432m432s432m432s1296m432s432m432s432m432s432m432s432" + "m432s1296m432s432m432s1296m432s432m432s1296m432s432m432s1296m432s1296" + "m432s1296m432s1296m432s432m432s432m432s1296m432s1296m432s432m432s1296" + "m432s1296m432s1296m432s1296m432s432m432s1296m432s1296m432s1296m432s1296" + "m432s74736", + irsend.outputStr()); +} + +// Tests for sendPanasonic(). + +TEST(TestSendPanasonic, CompareToSendPanasonic64) { + IRsendTest panasonic(4); + IRsendTest panasonic64(0); + + panasonic.begin(); + panasonic64.begin(); + + panasonic.reset(); + panasonic64.reset(); + + panasonic.sendPanasonic(0x4004, 0x0190ED7C); + panasonic64.sendPanasonic64(0x40040190ED7C); + EXPECT_EQ(panasonic64.outputStr(), panasonic.outputStr()); + + panasonic.sendPanasonic(0x0, 0x0); + panasonic64.sendPanasonic64(0x0); + EXPECT_EQ(panasonic64.outputStr(), panasonic.outputStr()); + + panasonic.sendPanasonic(0x0, 0x0, 8); + panasonic64.sendPanasonic64(0x0, 8); + EXPECT_EQ(panasonic64.outputStr(), panasonic.outputStr()); + + panasonic.sendPanasonic(0x1234, 0x567890AB, 64); + panasonic64.sendPanasonic64(0x1234567890AB, 64); + EXPECT_EQ(panasonic64.outputStr(), panasonic.outputStr()); + + panasonic.sendPanasonic(0x1234, 0x567890AB, kPanasonicBits, 2); + panasonic64.sendPanasonic64(0x1234567890AB, kPanasonicBits, 2); + EXPECT_EQ(panasonic64.outputStr(), panasonic.outputStr()); +} + +// Tests for decodePanasonic(). + +// Decode normal Panasonic messages. +TEST(TestDecodePanasonic, NormalDecodeWithStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Normal Panasonic 48-bit message. + irsend.reset(); + irsend.sendPanasonic64(0x40040190ED7C); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x40040190ED7C, irsend.capture.value); + EXPECT_EQ(0x4004, irsend.capture.address); + EXPECT_EQ(0x0190ED7C, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + // Synthesised Normal Panasonic 48-bit message. + irsend.reset(); + irsend.sendPanasonic64(irsend.encodePanasonic(0x4004, 0x12, 0x34, 0x56)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x400412345670, irsend.capture.value); + EXPECT_EQ(0x4004, irsend.capture.address); + EXPECT_EQ(0x12345670, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + // Synthesised Normal Panasonic 48-bit message. + irsend.reset(); + irsend.sendPanasonic64(irsend.encodePanasonic(0x4004, 0x1, 0x1, 0x1)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x400401010101, irsend.capture.value); + EXPECT_EQ(0x4004, irsend.capture.address); + EXPECT_EQ(0x1010101, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); +} + +// Decode normal repeated Panasonic messages. +TEST(TestDecodePanasonic, NormalDecodeWithRepeatAndStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Normal Panasonic 48-bit message with 2 repeats. + irsend.reset(); + irsend.sendPanasonic64(0x40040190ED7C, kPanasonicBits, 2); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x40040190ED7C, irsend.capture.value); + EXPECT_EQ(0x4004, irsend.capture.address); + EXPECT_EQ(0x190ED7C, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + irsend.makeDecodeResult(2 * kPanasonicBits + 4); + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x40040190ED7C, irsend.capture.value); + + irsend.makeDecodeResult(2 * (2 * kPanasonicBits + 4)); + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x40040190ED7C, irsend.capture.value); +} + +// Decode Panasonic messages with unsupported values. +TEST(TestDecodePanasonic, DecodeWithNonStrictValues) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + irsend.sendPanasonic64(0x0); // Illegal value Panasonic 48-bit message. + irsend.makeDecodeResult(); + // Should fail with strict on. + ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); + // Should pass if strict off. + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, false)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + + irsend.reset(); + // Illegal address/Manufacturer code. The rest is legal. + irsend.sendPanasonic64(irsend.encodePanasonic(0, 1, 2, 3)); + irsend.makeDecodeResult(); + // Should fail with strict on. + ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); + // Should pass if strict off. + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, false)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x1020300, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x1020300, irsend.capture.command); +} + +// Decode Panasonic messages with unsupported size/lengths. +TEST(TestDecodePanasonic, DecodeWithNonStrictSize) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + irsend.sendPanasonic64(0x12345678, 32); // Illegal size Panasonic message. + irsend.makeDecodeResult(); + + ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); + + irsend.makeDecodeResult(); + // Should fail with strict when we ask for the wrong bit size. + ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, 32, true)); + // Should pass if strict off. + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, 32, false)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(32, irsend.capture.bits); + EXPECT_EQ(0x12345678, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x12345678, irsend.capture.command); + + // Illegal over length (56-bit) message. + irsend.reset(); + irsend.sendPanasonic64(irsend.encodePanasonic(0x4004, 1, 2, 3), 56); + irsend.makeDecodeResult(); + + ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); + // Shouldn't pass if strict off and wrong bit size. + ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, false)); + // Re-decode with correct bit size. + ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, 56, true)); + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, 56, false)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(56, irsend.capture.bits); + EXPECT_EQ(0x400401020300, irsend.capture.value); + EXPECT_EQ(0x4004, irsend.capture.address); + EXPECT_EQ(0x01020300, irsend.capture.command); +} + +// Decode (non-standard) 64-bit messages. +TEST(TestDecodePanasonic, Decode64BitMessages) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Illegal value & size Panasonic 64-bit message. + irsend.sendPanasonic64(0xFFFFFFFFFFFFFFFF, 64); + irsend.makeDecodeResult(); + ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, 64, true)); + // Should work with a 'normal' match (not strict) + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, 64, false)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(64, irsend.capture.bits); + EXPECT_EQ(0xFFFFFFFFFFFFFFFF, irsend.capture.value); + EXPECT_EQ(0xFFFFFFFF, irsend.capture.address); + EXPECT_EQ(0xFFFFFFFF, irsend.capture.command); +} + +// Decode a 'real' example via GlobalCache +TEST(TestDecodePanasonic, DecodeGlobalCacheExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Panasonic code from Global Cache. + uint16_t gc_test[103] = { + 37000, 1, 1, 126, 64, 16, 17, 16, 49, 15, 16, 16, 16, 16, 16, + 16, 17, 15, 17, 15, 17, 15, 17, 15, 16, 16, 16, 16, 16, 16, + 17, 15, 49, 16, 16, 16, 16, 16, 17, 15, 17, 15, 17, 15, 17, + 15, 16, 16, 16, 16, 16, 16, 49, 15, 49, 16, 17, 15, 17, 15, + 49, 16, 16, 16, 17, 16, 17, 15, 17, 15, 49, 16, 49, 15, 49, + 16, 17, 16, 49, 15, 49, 16, 17, 15, 48, 16, 16, 16, 49, 15, + 48, 16, 49, 15, 49, 16, 49, 15, 17, 15, 16, 16, 2721}; + irsend.sendGC(gc_test, 103); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, true)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x40040190ED7C, irsend.capture.value); + EXPECT_EQ(0x4004, irsend.capture.address); + EXPECT_EQ(0x0190ED7C, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x40040190ED7C, irsend.capture.value); + EXPECT_EQ(0x4004, irsend.capture.address); + EXPECT_EQ(0x0190ED7C, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); +} + +// Fail to decode a non-Panasonic example via GlobalCache +TEST(TestDecodePanasonic, FailToDecodeNonPanasonicExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Modified a few entries to unexpected values, based on previous test case. + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; + irsend.sendGC(gc_test, 39); + irsend.makeDecodeResult(); + + ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture)); + ASSERT_FALSE(irrecv.decodePanasonic(&irsend.capture, kPanasonicBits, false)); +} + +// Failing to decode Panasonic in Issue #245 +TEST(TestDecodePanasonic, DecodeIssue245) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + + uint16_t rawData[100] = { + 3550, 1750, 500, 450, 500, 1300, 500, 450, 500, 450, 500, 450, + 500, 450, 500, 450, 500, 450, 500, 450, 500, 450, 500, 450, + 500, 450, 500, 450, 500, 1300, 500, 450, 500, 450, 500, 450, + 500, 450, 500, 450, 500, 450, 500, 450, 500, 450, 500, 450, + 500, 1300, 500, 450, 500, 450, 500, 450, 500, 450, 500, 450, + 500, 450, 500, 450, 500, 450, 500, 1300, 500, 450, 500, 1300, + 500, 1300, 500, 1300, 500, 1300, 500, 450, 500, 450, 500, 1300, + 500, 450, 500, 1300, 500, 1300, 500, 1300, 500, 1300, 500, 450, + 500, 1300, 500, 5000}; + + irsend.sendRaw(rawData, 100, 37); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decodePanasonic(&irsend.capture)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x40040100BCBD, irsend.capture.value); + EXPECT_EQ(0x4004, irsend.capture.address); + EXPECT_EQ(0x100BCBD, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); + + irsend.reset(); + irsend.sendRaw(rawData, 99, 37); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x40040100BCBD, irsend.capture.value); + EXPECT_EQ(0x4004, irsend.capture.address); + EXPECT_EQ(0x100BCBD, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); +} + +// Tests for sendPanasonicAC(). + +// Test sending typical data only. +TEST(TestSendPanasonicAC, SendDataOnly) { + IRsendTest irsend(0); + irsend.begin(); + + irsend.reset(); + + uint8_t state[kPanasonicAcStateLength] = { + 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x30, 0x32, 0x80, 0xAF, 0x00, + 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x83}; + irsend.sendPanasonicAC(state); + EXPECT_EQ( + "m3456s1728" + "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s1296m432s1296" + "m432s432m432s432m432s1296m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s1296m432s1296m432s432m432s432m432s432m432s432m432s432" + "m432s10000" + "m3456s1728" + "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s1296m432s1296" + "m432s432m432s432m432s1296m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s1296m432s1296m432s432m432s432" + "m432s432m432s1296m432s432m432s432m432s1296m432s1296m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" + "m432s1296m432s1296m432s1296m432s1296m432s432m432s1296m432s432m432s1296" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s1296m432s1296m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s1296m432s1296m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s1296" + "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" + "m432s432m432s1296m432s1296m432s432m432s432m432s432m432s432m432s432" + "m432s1296m432s1296m432s432m432s432m432s432m432s432m432s432m432s1296" + "m432s100000", + irsend.outputStr()); +} + +// Tests for the IRPanasonicAc class. + +TEST(TestIRPanasonicAcClass, ChecksumCalculation) { + IRPanasonicAc pana(0); + + const uint8_t originalstate[kPanasonicAcStateLength] = { + 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x30, 0x32, 0x80, 0xAF, 0x00, + 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x83}; + uint8_t examplestate[kPanasonicAcStateLength] = { + 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x30, 0x32, 0x80, 0xAF, 0x00, + 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x83}; + + EXPECT_TRUE(IRPanasonicAc::validChecksum(examplestate)); + EXPECT_EQ(0x83, IRPanasonicAc::calcChecksum(examplestate)); + + examplestate[kPanasonicAcStateLength - 1] = 0x0; // Set incoorect checksum. + EXPECT_FALSE(IRPanasonicAc::validChecksum(examplestate)); + EXPECT_EQ(0x83, IRPanasonicAc::calcChecksum(examplestate)); + pana.setRaw(examplestate); + // Extracting the state from the object should have a correct checksum. + EXPECT_TRUE(IRPanasonicAc::validChecksum(pana.getRaw())); + EXPECT_STATE_EQ(originalstate, pana.getRaw(), kPanasonicAcBits); + examplestate[kPanasonicAcStateLength - 1] = 0x83; // Restore old checksum. + + // Change the state to force a different checksum. + examplestate[6] = 0x01; // Should increase checksum by 1. + EXPECT_FALSE(IRPanasonicAc::validChecksum(examplestate)); + EXPECT_EQ(0x84, IRPanasonicAc::calcChecksum(examplestate)); +} + +TEST(TestIRPanasonicAcClass, SetAndGetPower) { + IRPanasonicAc pana(0); + pana.on(); + EXPECT_TRUE(pana.getPower()); + pana.off(); + EXPECT_FALSE(pana.getPower()); + pana.setPower(true); + EXPECT_TRUE(pana.getPower()); + pana.setPower(false); + EXPECT_FALSE(pana.getPower()); +} + +TEST(TestIRPanasonicAcClass, SetAndGetModel) { + IRPanasonicAc pana(0); + EXPECT_EQ(kPanasonicJke, pana.getModel()); + pana.setModel(kPanasonicDke); + EXPECT_EQ(kPanasonicDke, pana.getModel()); + pana.setModel(kPanasonicLke); + EXPECT_EQ(kPanasonicLke, pana.getModel()); + pana.setModel(kPanasonicNke); + EXPECT_EQ(kPanasonicNke, pana.getModel()); + pana.setModel(kPanasonicUnknown); // shouldn't change. + EXPECT_EQ(kPanasonicNke, pana.getModel()); + pana.setModel((panasonic_ac_remote_model_t)255); // shouldn't change. + EXPECT_EQ(kPanasonicNke, pana.getModel()); + pana.setModel(kPanasonicJke); + EXPECT_EQ(kPanasonicJke, pana.getModel()); + + // This state tickled a bug in getModel(). Should read as a JKE. + uint8_t jkeState[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x32, 0x2E, 0x80, 0xA2, 0x00, + 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x74}; + pana.setModel(kPanasonicDke); // Make sure it isn't somehow set to JKE + pana.setRaw(jkeState); + EXPECT_EQ(kPanasonicJke, pana.getModel()); + EXPECT_STATE_EQ(jkeState, pana.getRaw(), kPanasonicAcBits); + + // This state tickled a bug in getModel(). Should read as CKP. + uint8_t ckpState[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x67, 0x2E, 0x80, 0xAF, 0x00, + 0xC0, 0x6B, 0x98, 0x10, 0x00, 0x81, 0x64, 0x05, 0x87}; + pana.setModel(kPanasonicDke); // Make sure it isn't somehow set to CKP + pana.setRaw(ckpState); + EXPECT_EQ(kPanasonicCkp, pana.getModel()); + EXPECT_STATE_EQ(ckpState, pana.getRaw(), kPanasonicAcBits); +} + +TEST(TestIRPanasonicAcClass, SetAndGetMode) { + IRPanasonicAc pana(0); + pana.setMode(kPanasonicAcCool); + pana.setTemp(21); + EXPECT_EQ(kPanasonicAcCool, pana.getMode()); + pana.setMode(kPanasonicAcHeat); + EXPECT_EQ(kPanasonicAcHeat, pana.getMode()); + pana.setMode(kPanasonicAcAuto); + EXPECT_EQ(kPanasonicAcAuto, pana.getMode()); + pana.setMode(kPanasonicAcDry); + EXPECT_EQ(kPanasonicAcDry, pana.getMode()); + EXPECT_EQ(21, pana.getTemp()); // Temp should be unchanged. + pana.setMode(kPanasonicAcFan); + EXPECT_EQ(kPanasonicAcFan, pana.getMode()); + EXPECT_EQ(kPanasonicAcFanModeTemp, pana.getTemp()); // Temp should change. + pana.setMode(kPanasonicAcCool); + EXPECT_EQ(kPanasonicAcCool, pana.getMode()); + // Temp should be unchanged from the last manual change. + EXPECT_EQ(21, pana.getTemp()); +} + +TEST(TestIRPanasonicAcClass, SetAndGetTemp) { + IRPanasonicAc pana(0); + pana.setTemp(25); + EXPECT_EQ(25, pana.getTemp()); + pana.setTemp(kPanasonicAcMinTemp); + EXPECT_EQ(kPanasonicAcMinTemp, pana.getTemp()); + pana.setTemp(kPanasonicAcMinTemp - 1); + EXPECT_EQ(kPanasonicAcMinTemp, pana.getTemp()); + pana.setTemp(kPanasonicAcMaxTemp); + EXPECT_EQ(kPanasonicAcMaxTemp, pana.getTemp()); + pana.setTemp(kPanasonicAcMaxTemp + 1); + EXPECT_EQ(kPanasonicAcMaxTemp, pana.getTemp()); +} + +TEST(TestIRPanasonicAcClass, SetAndGetFan) { + IRPanasonicAc pana(0); + pana.setFan(kPanasonicAcFanAuto); + EXPECT_EQ(kPanasonicAcFanAuto, pana.getFan()); + pana.setFan(kPanasonicAcFanMin); + EXPECT_EQ(kPanasonicAcFanMin, pana.getFan()); + pana.setFan(kPanasonicAcFanMin - 1); + EXPECT_EQ(kPanasonicAcFanMin, pana.getFan()); + pana.setFan(kPanasonicAcFanMin + 1); + EXPECT_EQ(kPanasonicAcFanMin + 1, pana.getFan()); + pana.setFan(kPanasonicAcFanMax); + EXPECT_EQ(kPanasonicAcFanMax, pana.getFan()); + pana.setFan(kPanasonicAcFanMax + 1); + EXPECT_EQ(kPanasonicAcFanMax, pana.getFan()); + pana.setFan(kPanasonicAcFanMax - 1); + EXPECT_EQ(kPanasonicAcFanMax - 1, pana.getFan()); +} + +TEST(TestIRPanasonicAcClass, SetAndGetSwings) { + IRPanasonicAc pana(0); + + // Vertical + pana.setSwingVertical(kPanasonicAcSwingVAuto); + EXPECT_EQ(kPanasonicAcSwingVAuto, pana.getSwingVertical()); + + pana.setSwingVertical(kPanasonicAcSwingVUp); + EXPECT_EQ(kPanasonicAcSwingVUp, pana.getSwingVertical()); + pana.setSwingVertical(kPanasonicAcSwingVUp - 1); + EXPECT_EQ(kPanasonicAcSwingVUp, pana.getSwingVertical()); + pana.setSwingVertical(kPanasonicAcSwingVUp + 1); + EXPECT_EQ(kPanasonicAcSwingVUp + 1, pana.getSwingVertical()); + + pana.setSwingVertical(kPanasonicAcSwingVDown); + EXPECT_EQ(kPanasonicAcSwingVDown, pana.getSwingVertical()); + pana.setSwingVertical(kPanasonicAcSwingVDown + 1); + EXPECT_EQ(kPanasonicAcSwingVDown, pana.getSwingVertical()); + pana.setSwingVertical(kPanasonicAcSwingVDown - 1); + EXPECT_EQ(kPanasonicAcSwingVDown - 1, pana.getSwingVertical()); + + pana.setSwingVertical(kPanasonicAcSwingVAuto); + EXPECT_EQ(kPanasonicAcSwingVAuto, pana.getSwingVertical()); + + // Horizontal is model dependant. + pana.setModel(kPanasonicNke); // NKE is always fixed in the middle. + EXPECT_EQ(kPanasonicAcSwingHMiddle, pana.getSwingHorizontal()); + pana.setSwingHorizontal(kPanasonicAcSwingHAuto); + EXPECT_EQ(kPanasonicAcSwingHMiddle, pana.getSwingHorizontal()); + + pana.setModel(kPanasonicJke); // JKE has no H swing. + EXPECT_EQ(0, pana.getSwingHorizontal()); + pana.setSwingHorizontal(kPanasonicAcSwingHMiddle); + EXPECT_EQ(0, pana.getSwingHorizontal()); + + pana.setModel(kPanasonicLke); // LKE is always fixed in the middle. + EXPECT_EQ(kPanasonicAcSwingHMiddle, pana.getSwingHorizontal()); + pana.setSwingHorizontal(kPanasonicAcSwingHAuto); + EXPECT_EQ(kPanasonicAcSwingHMiddle, pana.getSwingHorizontal()); + + pana.setModel(kPanasonicDke); // DKE has full control. + ASSERT_EQ(kPanasonicDke, pana.getModel()); + // Auto was last requested. + EXPECT_EQ(kPanasonicAcSwingHAuto, pana.getSwingHorizontal()); + pana.setSwingHorizontal(kPanasonicAcSwingHLeft); + EXPECT_EQ(kPanasonicAcSwingHLeft, pana.getSwingHorizontal()); + // Changing models from DKE to something else, then back should not change + // the intended swing. + pana.setModel(kPanasonicLke); + EXPECT_EQ(kPanasonicAcSwingHMiddle, pana.getSwingHorizontal()); + pana.setModel(kPanasonicDke); + EXPECT_EQ(kPanasonicAcSwingHLeft, pana.getSwingHorizontal()); +} + +TEST(TestIRPanasonicAcClass, QuietAndPowerful) { + IRPanasonicAc pana(0); + pana.setQuiet(false); + EXPECT_FALSE(pana.getQuiet()); + pana.setQuiet(true); + EXPECT_TRUE(pana.getQuiet()); + EXPECT_FALSE(pana.getPowerful()); + pana.setPowerful(false); + EXPECT_FALSE(pana.getPowerful()); + EXPECT_TRUE(pana.getQuiet()); + pana.setPowerful(true); + EXPECT_TRUE(pana.getPowerful()); + EXPECT_FALSE(pana.getQuiet()); + pana.setPowerful(false); + EXPECT_FALSE(pana.getPowerful()); + EXPECT_FALSE(pana.getQuiet()); + pana.setPowerful(true); + pana.setQuiet(true); + EXPECT_TRUE(pana.getQuiet()); + EXPECT_FALSE(pana.getPowerful()); +} + +TEST(TestIRPanasonicAcClass, HumanReadable) { + IRPanasonicAc pana(0); + EXPECT_EQ( + "Model: 4 (JKE), Power: Off, Mode: 0 (AUTO), Temp: 0C, " + "Fan: 253 (UNKNOWN), Swing (Vertical): 0 (UNKNOWN), Quiet: Off, " + "Powerful: Off, Clock: 0:00, On Timer: Off, Off Timer: Off", + pana.toString()); + pana.setPower(true); + pana.setTemp(kPanasonicAcMaxTemp); + pana.setMode(kPanasonicAcHeat); + pana.setFan(kPanasonicAcFanMax); + pana.setSwingVertical(kPanasonicAcSwingVAuto); + pana.setPowerful(true); + EXPECT_EQ( + "Model: 4 (JKE), Power: On, Mode: 4 (HEAT), Temp: 30C, " + "Fan: 4 (MAX), Swing (Vertical): 15 (AUTO), Quiet: Off, " + "Powerful: On, Clock: 0:00, On Timer: Off, Off Timer: Off", + pana.toString()); + pana.setQuiet(true); + pana.setModel(kPanasonicLke); + EXPECT_EQ( + "Model: 1 (LKE), Power: Off, Mode: 4 (HEAT), Temp: 30C, " + "Fan: 4 (MAX), Swing (Vertical): 15 (AUTO), " + "Swing (Horizontal): 6 (Middle), Quiet: On, Powerful: Off, " + "Clock: 0:00, On Timer: 0:00, Off Timer: Off", + pana.toString()); + pana.setModel(kPanasonicDke); + pana.setSwingHorizontal(kPanasonicAcSwingHRight); + EXPECT_EQ( + "Model: 3 (DKE), Power: Off, Mode: 4 (HEAT), Temp: 30C, " + "Fan: 4 (MAX), Swing (Vertical): 15 (AUTO), " + "Swing (Horizontal): 11 (Right), Quiet: On, Powerful: Off, " + "Clock: 0:00, On Timer: Off, Off Timer: Off", + pana.toString()); +} + +// Tests for decodePanasonicAC(). + +// Decode normal Panasonic AC messages. +TEST(TestDecodePanasonicAC, RealExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Data from Issue #525 + uint16_t rawData[439] = { + 3582, 1686, 488, 378, 488, 1238, 488, 378, 488, 378, 488, 378, + 488, 378, 488, 378, 488, 384, 488, 378, 488, 378, 488, 378, + 488, 378, 488, 378, 488, 1242, 486, 378, 488, 384, 488, 378, + 488, 378, 488, 380, 486, 382, 484, 382, 484, 1264, 464, 1266, + 460, 1272, 462, 378, 488, 406, 460, 1266, 462, 380, 488, 382, + 484, 388, 478, 406, 462, 410, 462, 404, 462, 406, 462, 396, + 470, 406, 462, 404, 462, 406, 460, 404, 462, 410, 462, 404, + 462, 404, 462, 406, 464, 406, 462, 404, 462, 406, 462, 404, + 462, 410, 462, 404, 462, 406, 462, 404, 462, 404, 462, 404, + 462, 406, 460, 406, 462, 410, 462, 404, 462, 1264, 484, 1244, + 486, 382, 482, 382, 486, 382, 486, 378, 486, 382, 488, 9924, + 3554, 1686, 488, 378, 490, 1240, 486, 378, 488, 378, 488, 378, + 488, 378, 488, 382, 484, 386, 486, 378, 488, 382, 486, 378, + 488, 382, 486, 382, 484, 1242, 486, 380, 488, 386, 484, 382, + 486, 380, 486, 382, 486, 380, 486, 380, 486, 1242, 486, 1242, + 484, 1248, 484, 380, 488, 382, 484, 1242, 486, 382, 484, 382, + 484, 382, 484, 382, 486, 386, 484, 382, 486, 382, 484, 382, + 486, 382, 486, 380, 484, 382, 486, 382, 488, 380, 486, 382, + 484, 380, 462, 406, 488, 376, 484, 1246, 482, 1246, 460, 404, + 480, 392, 484, 386, 482, 1244, 484, 382, 484, 382, 484, 1242, + 482, 1244, 484, 382, 464, 410, 460, 404, 462, 406, 462, 404, + 462, 404, 470, 396, 462, 406, 462, 404, 462, 1286, 460, 1268, + 458, 1268, 460, 1266, 460, 1266, 460, 406, 460, 1266, 462, 406, + 460, 1272, 462, 406, 460, 406, 460, 406, 460, 406, 462, 404, + 462, 406, 460, 406, 462, 410, 462, 404, 462, 406, 460, 406, + 460, 406, 462, 404, 462, 406, 460, 406, 460, 410, 462, 406, + 460, 1268, 460, 1266, 460, 404, 460, 406, 462, 406, 460, 406, + 460, 412, 456, 410, 460, 410, 438, 428, 460, 410, 456, 410, + 456, 1272, 436, 1288, 438, 434, 438, 428, 438, 428, 438, 428, + 438, 428, 438, 428, 438, 428, 438, 428, 438, 434, 438, 428, + 438, 428, 438, 428, 438, 428, 438, 428, 440, 428, 438, 428, + 438, 432, 438, 428, 438, 428, 438, 428, 438, 428, 438, 428, + 438, 428, 438, 430, 438, 1294, 438, 428, 438, 428, 438, 428, + 438, 428, 438, 428, 438, 428, 438, 428, 438, 434, 438, 428, + 438, 1288, 438, 1290, 438, 428, 438, 428, 438, 428, 438, 428, + 438, 432, 438, 1288, 438, 1290, 438, 430, 438, 428, 438, 428, + 438, 428, 438, 428, 438, 1292, 438}; + uint8_t expectedState[kPanasonicAcStateLength] = { + 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x30, 0x32, 0x80, 0xAF, 0x00, + 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x83}; + + irsend.sendRaw(rawData, 439, kPanasonicFreq); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(PANASONIC_AC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + EXPECT_FALSE(irsend.capture.repeat); +} + +// Decode synthetic Panasonic AC message. +TEST(TestDecodePanasonicAC, SyntheticExample) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Data from Issue #525 + uint8_t expectedState[kPanasonicAcStateLength] = { + 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x30, 0x32, 0x80, 0xAF, 0x00, + 0x00, 0x06, 0x60, 0x00, 0x00, 0x80, 0x00, 0x06, 0x83}; + + irsend.sendPanasonicAC(expectedState); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(PANASONIC_AC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + EXPECT_FALSE(irsend.capture.repeat); + + IRPanasonicAc pana(0); + pana.setRaw(irsend.capture.state); + EXPECT_EQ( + "Model: 4 (JKE), Power: Off, Mode: 3 (COOL), Temp: 25C, " + "Fan: 7 (AUTO), Swing (Vertical): 15 (AUTO), Quiet: Off, " + "Powerful: Off, Clock: 0:00, On Timer: Off, Off Timer: Off", + pana.toString()); +} + +// Tests for general utility functions. +TEST(TestGeneralPanasonic, hasACState) { + EXPECT_TRUE(hasACState(PANASONIC_AC)); + ASSERT_FALSE(hasACState(PANASONIC)); +} + +TEST(TestGeneralPanasonic, typeToString) { + EXPECT_EQ("PANASONIC_AC", typeToString(PANASONIC_AC)); + EXPECT_EQ("PANASONIC", typeToString(PANASONIC)); +} + +// Decode a problematic Panasonic AC message +TEST(TestDecodePanasonicAC, Issue540) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Data from Issue #540 + uint16_t rawData[439] = { + 3512, 1714, 466, 408, 466, 1280, 470, 408, 466, 412, 466, 408, + 466, 412, 462, 412, 466, 414, 466, 408, 466, 412, 462, 412, + 466, 412, 466, 408, 466, 1280, 466, 412, 462, 416, 462, 412, + 466, 408, 466, 412, 462, 416, 462, 412, 462, 1282, 462, 1284, + 462, 1288, 466, 412, 462, 412, 462, 1284, 462, 416, 440, 438, + 462, 412, 462, 412, 462, 416, 466, 412, 462, 412, 462, 412, + 440, 442, 462, 412, 462, 412, 460, 418, 462, 416, 462, 412, + 462, 418, 462, 412, 462, 416, 462, 412, 436, 442, 462, 412, + 460, 418, 462, 416, 462, 412, 460, 412, 462, 420, 436, 438, + 462, 412, 462, 416, 432, 448, 436, 438, 436, 1310, 436, 1310, + 462, 420, 432, 442, 436, 438, 462, 416, 432, 444, 432, 10008, + 3480, 1744, 492, 382, 492, 1254, 492, 386, 488, 390, 492, 382, + 492, 386, 488, 386, 492, 386, 492, 386, 488, 386, 488, 386, + 492, 386, 492, 382, 492, 1258, 488, 386, 488, 390, 492, 386, + 488, 386, 488, 386, 492, 390, 488, 386, 488, 1256, 488, 1258, + 488, 1262, 488, 390, 488, 386, 488, 1258, 488, 390, 488, 392, + 488, 386, 488, 386, 488, 394, 488, 386, 488, 386, 488, 390, + 488, 390, 488, 386, 488, 390, 462, 412, 488, 390, 462, 1282, + 488, 390, 456, 416, 458, 1292, 456, 1288, 488, 1258, 488, 392, + 456, 422, 488, 390, 484, 392, 484, 1262, 458, 420, 484, 1262, + 482, 1262, 488, 392, 484, 394, 484, 416, 436, 442, 458, 416, + 458, 422, 430, 448, 432, 442, 458, 416, 458, 1296, 432, 1314, + 458, 1288, 432, 1312, 432, 1322, 428, 446, 428, 1318, 432, 442, + 432, 1318, 432, 1318, 428, 446, 428, 1318, 428, 1322, 430, 448, + 426, 448, 428, 452, 426, 452, 426, 448, 428, 472, 400, 478, + 402, 478, 402, 472, 402, 476, 402, 472, 402, 478, 402, 472, + 402, 1348, 398, 1348, 398, 1352, 398, 508, 370, 478, 398, 476, + 398, 512, 366, 508, 370, 502, 372, 508, 340, 538, 372, 504, + 344, 1400, 344, 1400, 346, 1434, 314, 560, 316, 588, 290, 560, + 314, 564, 396, 400, 474, 400, 480, 394, 480, 404, 474, 400, + 454, 446, 454, 426, 448, 430, 424, 450, 428, 452, 448, 426, + 426, 452, 424, 1322, 454, 426, 450, 424, 426, 452, 428, 452, + 450, 424, 428, 446, 426, 1322, 454, 426, 422, 450, 454, 426, + 448, 430, 454, 426, 448, 426, 428, 446, 454, 430, 454, 422, + 452, 424, 424, 452, 452, 430, 424, 452, 452, 426, 448, 426, + 426, 456, 448, 426, 448, 1296, 424, 1322, 426, 1326, 450, 1270, + 478, 422, 454, 424, 424, 450, 454}; + uint8_t expectedState[kPanasonicAcStateLength] = { + 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x39, 0x34, 0x80, 0xAF, 0x0D, + 0x00, 0x0E, 0xE0, 0x00, 0x00, 0x81, 0x00, 0x00, 0x1E}; + + irsend.sendRaw(rawData, 439, kPanasonicFreq); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(PANASONIC_AC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + EXPECT_FALSE(irsend.capture.repeat); + IRPanasonicAc pana(0); + pana.setRaw(irsend.capture.state); + // TODO(crankyoldgit): Try to figure out what model this should be. + EXPECT_EQ( + "Model: 0 (UNKNOWN), Power: On, Mode: 3 (COOL), Temp: 26C, " + "Fan: 7 (AUTO), Swing (Vertical): 15 (AUTO), " + "Swing (Horizontal): 13 (AUTO), Quiet: Off, Powerful: Off, " + "Clock: 0:00, On Timer: Off, Off Timer: Off", + pana.toString()); +} + +TEST(TestIRPanasonicAcClass, TimeBasics) { + EXPECT_EQ(0x186, IRPanasonicAc::encodeTime(6, 30)); + EXPECT_EQ(0x3CA, IRPanasonicAc::encodeTime(16, 10)); + EXPECT_EQ(0x448, IRPanasonicAc::encodeTime(18, 16)); + EXPECT_EQ(0, IRPanasonicAc::encodeTime(0, 0)); + EXPECT_EQ(kPanasonicAcTimeMax, IRPanasonicAc::encodeTime(23, 59)); + EXPECT_EQ("16:10", + IRPanasonicAc::timeToString(IRPanasonicAc::encodeTime(16, 10))); + EXPECT_EQ("6:30", + IRPanasonicAc::timeToString(IRPanasonicAc::encodeTime(6, 30))); + EXPECT_EQ("18:16", + IRPanasonicAc::timeToString(IRPanasonicAc::encodeTime(18, 16))); + EXPECT_EQ("1:01", + IRPanasonicAc::timeToString(IRPanasonicAc::encodeTime(1, 1))); + EXPECT_EQ(kPanasonicAcTimeMax, IRPanasonicAc::encodeTime(23, 59)); + EXPECT_EQ(kPanasonicAcTimeMax, IRPanasonicAc::encodeTime(25, 72)); + EXPECT_EQ(59, IRPanasonicAc::encodeTime(0, 72)); + EXPECT_EQ(23 * 60, IRPanasonicAc::encodeTime(27, 0)); + EXPECT_EQ("0:00", IRPanasonicAc::timeToString(0)); + EXPECT_EQ("23:59", IRPanasonicAc::timeToString(kPanasonicAcTimeMax)); +} + +TEST(TestIRPanasonicAcClass, TimersAndClock) { + IRPanasonicAc pana(0); + // Data from Issue #544 + uint8_t state[27] = {0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x4E, 0x2E, 0x80, 0xAF, 0x00, + 0xCA, 0x6B, 0x98, 0x10, 0x00, 0x01, 0x48, 0x04, 0xDB}; + pana.setRaw(state); + EXPECT_TRUE(pana.isOnTimerEnabled()); + EXPECT_EQ(0x3CA, pana.getOnTimer()); + EXPECT_TRUE(pana.isOffTimerEnabled()); + EXPECT_EQ(0x186, pana.getOffTimer()); + EXPECT_EQ(0x448, pana.getClock()); + + pana.cancelOnTimer(); + EXPECT_FALSE(pana.isOnTimerEnabled()); + EXPECT_EQ(0, pana.getOnTimer()); + EXPECT_TRUE(pana.isOffTimerEnabled()); + EXPECT_EQ(0x186, pana.getOffTimer()); + EXPECT_EQ(0x448, pana.getClock()); + + pana.cancelOffTimer(); + EXPECT_FALSE(pana.isOnTimerEnabled()); + EXPECT_EQ(0, pana.getOnTimer()); + EXPECT_FALSE(pana.isOffTimerEnabled()); + EXPECT_EQ(0, pana.getOffTimer()); + EXPECT_EQ(0x448, pana.getClock()); + + pana.setOnTimer(7 * 60 + 50); + EXPECT_TRUE(pana.isOnTimerEnabled()); + EXPECT_EQ(7 * 60 + 50, pana.getOnTimer()); + EXPECT_FALSE(pana.isOffTimerEnabled()); + EXPECT_EQ(0, pana.getOffTimer()); + EXPECT_EQ(0x448, pana.getClock()); + + pana.setOnTimer(7 * 60 + 57); // It should round down. + EXPECT_EQ(7 * 60 + 50, pana.getOnTimer()); + pana.setOnTimer(28 * 60); // It should round down. + EXPECT_EQ(kPanasonicAcTimeMax - 9, pana.getOnTimer()); + pana.setOnTimer(kPanasonicAcTimeSpecial); + EXPECT_EQ(0, pana.getOnTimer()); + + pana.setOnTimer(7 * 60 + 50); + pana.setOffTimer(19 * 60 + 30); + + EXPECT_TRUE(pana.isOnTimerEnabled()); + EXPECT_EQ(7 * 60 + 50, pana.getOnTimer()); + EXPECT_TRUE(pana.isOffTimerEnabled()); + EXPECT_EQ(19 * 60 + 30, pana.getOffTimer()); + EXPECT_EQ(0x448, pana.getClock()); + + pana.setOffTimer(19 * 60 + 57); // It should round down. + EXPECT_EQ(19 * 60 + 50, pana.getOffTimer()); + pana.setOffTimer(28 * 60); // It should round down. + EXPECT_EQ(kPanasonicAcTimeMax - 9, pana.getOffTimer()); + pana.setOffTimer(kPanasonicAcTimeSpecial); + EXPECT_EQ(0, pana.getOffTimer()); + + pana.setClock(0); + EXPECT_EQ(0, pana.getClock()); + pana.setClock(kPanasonicAcTimeMax); + EXPECT_EQ(kPanasonicAcTimeMax, pana.getClock()); + pana.setClock(kPanasonicAcTimeMax - 1); + EXPECT_EQ(kPanasonicAcTimeMax - 1, pana.getClock()); + pana.setClock(kPanasonicAcTimeMax + 1); + EXPECT_EQ(kPanasonicAcTimeMax, pana.getClock()); + pana.setClock(kPanasonicAcTimeSpecial); + EXPECT_EQ(0, pana.getClock()); +} + +// Decode a real short Panasonic AC message +TEST(TestDecodePanasonicAC, RealExampleOfShortMessage) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Data from Issue #544 (Odour Wash) + uint16_t rawData[263] = { + 3496, 1734, 506, 366, 448, 1294, 504, 368, 498, 374, 452, 418, + 448, 424, 444, 428, 450, 422, 446, 426, 450, 420, 448, 424, + 452, 418, 448, 422, 444, 1300, 498, 374, 504, 368, 448, 424, + 452, 418, 448, 424, 444, 428, 450, 422, 446, 1296, 500, 1242, + 502, 1242, 504, 368, 498, 374, 452, 1292, 504, 366, 450, 422, + 444, 426, 450, 420, 446, 424, 452, 418, 448, 424, 444, 428, + 450, 422, 444, 426, 450, 420, 446, 424, 452, 418, 448, 422, + 444, 428, 450, 422, 446, 426, 452, 420, 446, 426, 452, 418, + 448, 424, 442, 428, 448, 422, 444, 426, 450, 420, 446, 426, + 452, 418, 448, 424, 444, 428, 450, 422, 444, 1298, 500, 1244, + 500, 372, 444, 428, 450, 422, 446, 426, 452, 418, 448, 10020, + 3500, 1732, 498, 372, 452, 1290, 506, 366, 450, 422, 446, 426, + 452, 420, 448, 424, 452, 418, 448, 422, 444, 426, 450, 420, + 446, 426, 452, 420, 446, 1296, 500, 370, 444, 428, 450, 422, + 446, 426, 452, 420, 446, 424, 442, 428, 448, 1294, 502, 1240, + 504, 1238, 506, 366, 448, 422, 444, 1298, 498, 374, 452, 418, + 448, 424, 444, 428, 450, 422, 446, 426, 450, 420, 446, 424, + 452, 418, 448, 422, 444, 428, 450, 420, 446, 1298, 498, 1244, + 500, 1242, 502, 368, 446, 1298, 500, 1244, 500, 372, 444, 428, + 450, 1292, 504, 368, 446, 1296, 502, 370, 444, 426, 452, 1290, + 504, 1238, 506, 366, 450, 422, 446, 1298, 498, 1246, 500, 372, + 444, 428, 450, 1294, 452, 420, 446, 1296, 448, 422, 444}; // UNKNOWN + // 1FB51F79 + + uint8_t expectedState[kPanasonicAcStateShortLength] = { + 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, + 0x02, 0x20, 0xE0, 0x04, 0x80, 0x9B, 0x32, 0x53}; + + irsend.sendRaw(rawData, 263, kPanasonicFreq); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(PANASONIC_AC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicAcShortBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); +} + +// Create and decode a short Panasonic AC message +TEST(TestDecodePanasonicAC, SyntheticShortMessage) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + uint8_t odourWash[kPanasonicAcStateShortLength] = { + 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, + 0x02, 0x20, 0xE0, 0x04, 0x80, 0x9B, 0x32, 0x53}; + + irsend.sendPanasonicAC(odourWash, kPanasonicAcStateShortLength); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(PANASONIC_AC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicAcShortBits, irsend.capture.bits); + EXPECT_STATE_EQ(odourWash, irsend.capture.state, irsend.capture.bits); +} +// +// Test for CKP model / see issue #544 +TEST(TestDecodePanasonicAC, CkpModelSpecifics) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Data from Issue #544 + uint8_t ckpPowerfulOn[kPanasonicAcStateLength] = { + 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x4E, 0x2E, 0x80, 0xAF, 0x00, + 0x00, 0x0E, 0xE0, 0x11, 0x00, 0x01, 0x00, 0x06, 0xB7}; + uint8_t ckpQuietOn[kPanasonicAcStateLength] = { + 0x02, 0x20, 0xE0, 0x04, 0x00, 0x00, 0x00, 0x06, 0x02, + 0x20, 0xE0, 0x04, 0x00, 0x4E, 0x2E, 0x80, 0xAF, 0x00, + 0x00, 0x0E, 0xE0, 0x30, 0x00, 0x01, 0x00, 0x06, 0xD6}; + + irsend.sendPanasonicAC(ckpPowerfulOn); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(PANASONIC_AC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(ckpPowerfulOn, irsend.capture.state, irsend.capture.bits); + EXPECT_FALSE(irsend.capture.repeat); + + IRPanasonicAc pana(0); + pana.setRaw(irsend.capture.state); + EXPECT_EQ( + "Model: 5 (CKP), Power: Off, Mode: 4 (HEAT), Temp: 23C, " + "Fan: 7 (AUTO), Swing (Vertical): 15 (AUTO), Quiet: Off, " + "Powerful: On, Clock: 0:00, On Timer: 0:00, Off Timer: 0:00", + pana.toString()); + + pana.setQuiet(true); + EXPECT_FALSE(pana.getPowerful()); + EXPECT_TRUE(pana.getQuiet()); + EXPECT_EQ(kPanasonicCkp, pana.getModel()); + EXPECT_STATE_EQ(ckpQuietOn, pana.getRaw(), kPanasonicAcBits); + + pana.setPowerful(true); + EXPECT_TRUE(pana.getPowerful()); + EXPECT_FALSE(pana.getQuiet()); + EXPECT_EQ(kPanasonicCkp, pana.getModel()); + EXPECT_STATE_EQ(ckpPowerfulOn, pana.getRaw(), kPanasonicAcBits); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Pioneer_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Pioneer_test.cpp new file mode 100644 index 000000000..b78469add --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Pioneer_test.cpp @@ -0,0 +1,152 @@ +// Copyright 2018 David Conran + +#include "IRsend.h" +#include "IRsend_test.h" +#include "IRutils.h" +#include "gtest/gtest.h" + +// Tests for sendPioneer(). + +// Test sending typical data only. +TEST(TestSendPioneer, SendDataOnly) { + IRsendTest irsend(0); + irsend.begin(); + irsend.sendPioneer(0); + EXPECT_EQ( + "m8960s4480" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s58240" + "m8960s4480" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s58240", + irsend.outputStr()); + irsend.sendPioneer(0x55FF00AAAA00FF55); + EXPECT_EQ( + "m8960s4480" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s40320" + "m8960s4480" + "m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s560m560s560m560s560m560s560m560s560m560s560m560s560" + "m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" + "m560s560m560s1680m560s560m560s1680m560s560m560s1680m560s560m560s1680" + "m560s40320", + irsend.outputStr()); +} + +// Tests for IRutils. + +TEST(TestIRUtils, TypeToString) { EXPECT_EQ("PIONEER", typeToString(PIONEER)); } + +// Tests for encodePioneer(). + +TEST(TestEncodePioneer, SimpleEncoding) { + IRsendTest irsend(0); + IRrecv irrecv(0); + + // Spotify button (A556+AF20) + // via + // https://www.pioneerelectronics.com/StaticFiles/PUSA/Files/Home%20Custom%20Install/2015%20Pioneer%20&%20Elite%20AVR%20IR%20with%20Hex_1.xls + EXPECT_EQ(0xA55A6A95F50A04FB, irsend.encodePioneer(0xA556, 0xAF20)); + + // "Source" from + // https://github.com/markszabo/IRremoteESP8266/pull/547#issuecomment-429616582 + EXPECT_EQ(0x659A05FAF50AC53A, irsend.encodePioneer(0xA6A0, 0xAFA3)); +} + +// Tests for decodePioneer(). + +// Synthesised Normal Pioneer message. +TEST(TestDecodePioneer, SyntheticPioneerDecode) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + irsend.sendPioneer(0x659A05FAF50AC53A); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(PIONEER, irsend.capture.decode_type); + EXPECT_EQ(kPioneerBits, irsend.capture.bits); + EXPECT_EQ(0x659A05FAF50AC53A, irsend.capture.value); + EXPECT_EQ(0xA6A0, irsend.capture.address); + EXPECT_EQ(0xAFA3, irsend.capture.command); +} + +// Real long Pioneer message. +TEST(TestDecodePioneer, RealExampleLongDecodeSourceButton) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + // "Source" button. + // https://github.com/markszabo/IRremoteESP8266/pull/547#issuecomment-429616582 + uint16_t rawData[135] = { + 8552, 4184, 596, 472, 592, 1524, 594, 1524, 594, 472, 592, 472, + 598, 1520, 596, 472, 594, 1524, 592, 1524, 592, 472, 592, 472, + 596, 1520, 598, 1520, 596, 472, 592, 1524, 592, 472, 592, 476, + 592, 472, 592, 472, 592, 476, 592, 472, 592, 1524, 592, 472, + 598, 1518, 598, 1520, 596, 1520, 596, 1520, 596, 1520, 596, 1520, + 596, 472, 592, 1524, 592, 472, 598, 25282, 8552, 4182, 596, 1520, + 598, 1518, 598, 1520, 596, 1520, 596, 472, 592, 1524, 592, 472, + 598, 1520, 596, 472, 594, 472, 592, 472, 596, 472, 592, 1524, + 592, 472, 592, 1524, 596, 472, 594, 1520, 596, 1520, 598, 472, + 592, 472, 598, 472, 594, 1522, 594, 472, 592, 1524, 594, 472, + 596, 472, 594, 1524, 592, 1524, 592, 1524, 592, 472, 594, 1524, + 598, 472, 592}; + + irsend.sendRaw(rawData, 135, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(PIONEER, irsend.capture.decode_type); + EXPECT_EQ(kPioneerBits, irsend.capture.bits); + EXPECT_EQ(0x659A05FAF50AC53A, irsend.capture.value); + EXPECT_EQ(0xA6A0, irsend.capture.address); + EXPECT_EQ(0xAFA3, irsend.capture.command); +} + +// Synthetic Pioneer message. +// For: +// https://github.com/markszabo/IRremoteESP8266/pull/547#issuecomment-430800734 +TEST(TestDecodePioneer, SyntheticPioneerMessage) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + irsend.sendPioneer(0x659A857AF50A3DC2, 64, 0); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(PIONEER, irsend.capture.decode_type); + EXPECT_EQ(kPioneerBits, irsend.capture.bits); + EXPECT_EQ(0x659A857AF50A3DC2, irsend.capture.value); + EXPECT_EQ(0xA6A1, irsend.capture.address); + EXPECT_EQ(0xAFBC, irsend.capture.command); + + irsend.reset(); + irsend.sendPioneer(0x659A857AF50A3DC2, 64, 0); + EXPECT_EQ( + "m8960s4480" + "m560s560m560s1680m560s1680m560s560m560s560m560s1680m560s560m560s1680" + "m560s1680m560s560m560s560m560s1680m560s1680m560s560m560s1680m560s560" + "m560s1680m560s560m560s560m560s560m560s560m560s1680m560s560m560s1680" + "m560s560m560s1680m560s1680m560s1680m560s1680m560s560m560s1680m560s560" + "m560s40320" + "m8960s4480" + "m560s1680m560s1680m560s1680m560s1680m560s560m560s1680m560s560m560s1680" + "m560s560m560s560m560s560m560s560m560s1680m560s560m560s1680m560s560" + "m560s560m560s560m560s1680m560s1680m560s1680m560s1680m560s560m560s1680" + "m560s1680m560s1680m560s560m560s560m560s560m560s560m560s1680m560s560" + "m560s40320", + irsend.outputStr()); +} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Pronto_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Pronto_test.cpp similarity index 81% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_Pronto_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_Pronto_test.cpp index 7fbe39554..e52c6dd90 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Pronto_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Pronto_test.cpp @@ -79,8 +79,8 @@ TEST(TestSendPronto, MoreDataThanNeededInBoth) { irsend.reset(); // We should handle when we are given more data than needed. (repeat seq.) - uint16_t pronto_test[10] = {0x0000, 0x0067, 0x0001, 0x0001, - 0x0001, 0x0002, 0x0003, 0x0004, 0x5, 0x6}; + uint16_t pronto_test[10] = {0x0000, 0x0067, 0x0001, 0x0001, 0x0001, + 0x0002, 0x0003, 0x0004, 0x5, 0x6}; irsend.sendPronto(pronto_test, 10); EXPECT_EQ("m25s50", irsend.outputStr()); // Only send the data required. irsend.sendPronto(pronto_test, 10, 1); @@ -110,25 +110,29 @@ TEST(TestSendPronto, NonRepeatingCode) { // It was an example of a poor Pronto code. // It turned out to be a 4 copies of a Sony 12-bit code. Who knew!?! uint16_t pronto_test[108] = { - 0x0000, 0x0067, 0x0034, 0x0000, - 0x0060, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, - 0x0030, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0452, 0x0060, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0018, 0x0018, 0x0452, 0x0060, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0452, 0x0060, 0x0018, - 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, - 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018}; + 0x0000, 0x0067, 0x0034, 0x0000, 0x0060, 0x0018, 0x0018, 0x0018, 0x0018, + 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, + 0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, + 0x0018, 0x0018, 0x0452, 0x0060, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, + 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, + 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, + 0x0018, 0x0452, 0x0060, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, + 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, + 0x0030, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, + 0x0452, 0x0060, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, + 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0030, + 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018}; // Send the Pronto code without any repeats set. irsend.reset(); irsend.sendPronto(pronto_test, 108); irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(kSony12Bits, irsend.capture.bits); + EXPECT_EQ(0x10, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); EXPECT_EQ( "m2400s600" "m600s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" @@ -141,19 +145,20 @@ TEST(TestSendPronto, NonRepeatingCode) { "m600s600m600s600m600s600m600s27650" "m2400s600" "m600s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m600s600m600s600", irsend.outputStr()); - EXPECT_TRUE(irrecv.decode(&irsend.capture)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_12_BITS, irsend.capture.bits); - EXPECT_EQ(0x10, irsend.capture.value); - EXPECT_EQ(0x1, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); + "m600s600m600s600m600s600m600s600", + irsend.outputStr()); // Now try repeating it. // As it has no repeat sequence, we shouldn't repeat it. (I think) irsend.reset(); irsend.sendPronto(pronto_test, 108, 3); irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(kSony12Bits, irsend.capture.bits); + EXPECT_EQ(0x10, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); EXPECT_EQ( "m2400s600" "m600s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" @@ -166,13 +171,8 @@ TEST(TestSendPronto, NonRepeatingCode) { "m600s600m600s600m600s600m600s27650" "m2400s600" "m600s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" - "m600s600m600s600m600s600m600s600", irsend.outputStr()); - EXPECT_TRUE(irrecv.decode(&irsend.capture)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_12_BITS, irsend.capture.bits); - EXPECT_EQ(0x10, irsend.capture.value); - EXPECT_EQ(0x1, irsend.capture.address); - EXPECT_EQ(0x0, irsend.capture.command); + "m600s600m600s600m600s600m600s600", + irsend.outputStr()); } // Test sending a Pronto code that only has a repeat sequence (Sony). @@ -183,34 +183,40 @@ TEST(TestSendPronto, RepeatSequenceOnlyForSony) { // Sony 20-bit command. uint16_t pronto_test[46] = { - 0x0000, 0x0067, 0x0000, 0x0015, - 0x0060, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0030, 0x0018, - 0x0030, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, - 0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, - 0x0030, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, + 0x0000, 0x0067, 0x0000, 0x0015, 0x0060, 0x0018, 0x0018, 0x0018, + 0x0030, 0x0018, 0x0030, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, - 0x0018, 0x03f6}; + 0x0018, 0x0018, 0x0030, 0x0018, 0x0030, 0x0018, 0x0030, 0x0018, + 0x0018, 0x0018, 0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x0018, + 0x0018, 0x0018, 0x0030, 0x0018, 0x0018, 0x03f6}; // Send the Pronto code without any repeats set. irsend.reset(); irsend.sendPronto(pronto_test, 46); irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(kSony20Bits, irsend.capture.bits); + EXPECT_EQ(0x74B92, irsend.capture.value); + EXPECT_EQ(0x1A, irsend.capture.address); + EXPECT_EQ(0x24AE, irsend.capture.command); EXPECT_EQ( "m2400s600" "m600s600m1200s600m1200s600m1200s600m600s600m1200s600m600s600m600s600" "m1200s600m600s600m1200s600m1200s600m1200s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s25350", irsend.outputStr()); - EXPECT_TRUE(irrecv.decode(&irsend.capture)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_20_BITS, irsend.capture.bits); - EXPECT_EQ(0x74B92, irsend.capture.value); - EXPECT_EQ(0x1A, irsend.capture.address); - EXPECT_EQ(0x24AE, irsend.capture.command); + "m600s600m600s600m1200s600m600s25350", + irsend.outputStr()); // Send the Pronto code with 2 repeats. irsend.reset(); - irsend.sendPronto(pronto_test, 46, SONY_MIN_REPEAT); + irsend.sendPronto(pronto_test, 46, kSonyMinRepeat); irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(kSony20Bits, irsend.capture.bits); + EXPECT_EQ(0x74B92, irsend.capture.value); + EXPECT_EQ(0x1A, irsend.capture.address); + EXPECT_EQ(0x24AE, irsend.capture.command); EXPECT_EQ( "m2400s600" "m600s600m1200s600m1200s600m1200s600m600s600m1200s600m600s600m600s600" @@ -223,14 +229,8 @@ TEST(TestSendPronto, RepeatSequenceOnlyForSony) { "m2400s600" "m600s600m1200s600m1200s600m1200s600m600s600m1200s600m600s600m600s600" "m1200s600m600s600m1200s600m1200s600m1200s600m600s600m600s600m1200s600" - "m600s600m600s600m1200s600m600s25350", irsend.outputStr()); - - EXPECT_TRUE(irrecv.decode(&irsend.capture)); - EXPECT_EQ(SONY, irsend.capture.decode_type); - EXPECT_EQ(SONY_20_BITS, irsend.capture.bits); - EXPECT_EQ(0x74B92, irsend.capture.value); - EXPECT_EQ(0x1A, irsend.capture.address); - EXPECT_EQ(0x24AE, irsend.capture.command); + "m600s600m600s600m1200s600m600s25350", + irsend.outputStr()); } // Test sending a Pronto code that only has a repeat sequence (Panasonic). @@ -241,25 +241,29 @@ TEST(TestSendPronto, RepeatSequenceOnlyForPanasonic) { // Panasonic Plasma TV Descrete code (Power On). uint16_t pronto_test[104] = { - 0x0000, 0x0071, 0x0000, 0x0032, - 0x0080, 0x003F, 0x0010, 0x0010, 0x0010, 0x0030, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0030, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0030, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0030, 0x0010, 0x0030, - 0x0010, 0x0030, 0x0010, 0x0030, 0x0010, 0x0030, 0x0010, 0x0010, - 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0030, 0x0010, 0x0030, - 0x0010, 0x0030, 0x0010, 0x0030, 0x0010, 0x0030, 0x0010, 0x0010, - 0x0010, 0x0030, 0x0010, 0x0A98}; + 0x0000, 0x0071, 0x0000, 0x0032, 0x0080, 0x003F, 0x0010, 0x0010, 0x0010, + 0x0030, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, + 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, + 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0030, 0x0010, 0x0010, + 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, + 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0030, + 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, + 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, + 0x0010, 0x0030, 0x0010, 0x0030, 0x0010, 0x0030, 0x0010, 0x0030, 0x0010, + 0x0030, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0010, 0x0030, + 0x0010, 0x0030, 0x0010, 0x0030, 0x0010, 0x0030, 0x0010, 0x0030, 0x0010, + 0x0010, 0x0010, 0x0030, 0x0010, 0x0A98}; // Send the Pronto code without any repeats set. irsend.reset(); irsend.sendPronto(pronto_test, 104); irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(PANASONIC, irsend.capture.decode_type); + EXPECT_EQ(kPanasonicBits, irsend.capture.bits); + EXPECT_EQ(0x400401007C7D, irsend.capture.value); + EXPECT_EQ(0x4004, irsend.capture.address); + EXPECT_EQ(0x1007C7D, irsend.capture.command); EXPECT_EQ( "m3456s1701" "m432s432m432s1296m432s432m432s432m432s432m432s432m432s432m432s432" @@ -268,17 +272,10 @@ TEST(TestSendPronto, RepeatSequenceOnlyForPanasonic) { "m432s432m432s432m432s432m432s432m432s432m432s432m432s432m432s432" "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s432" "m432s432m432s1296m432s1296m432s1296m432s1296m432s1296m432s432m432s1296" - "m432s73224", irsend.outputStr()); - - EXPECT_TRUE(irrecv.decode(&irsend.capture)); - EXPECT_EQ(PANASONIC, irsend.capture.decode_type); - EXPECT_EQ(PANASONIC_BITS, irsend.capture.bits); - EXPECT_EQ(0x400401007C7D, irsend.capture.value); - EXPECT_EQ(0x4004, irsend.capture.address); - EXPECT_EQ(0x1007C7D, irsend.capture.command); + "m432s73224", + irsend.outputStr()); } - // Test sending a Pronto code that has a normal & arepeat sequence (NEC). TEST(TestSendPronto, NormalPlusRepeatSequence) { IRsendTest irsend(4); @@ -287,40 +284,45 @@ TEST(TestSendPronto, NormalPlusRepeatSequence) { // NEC 32 bit power on command. uint16_t pronto_test[76] = { - 0x0000, 0x006D, 0x0022, 0x0002, - 0x0156, 0x00AB, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, - 0x0015, 0x0040, 0x0015, 0x0040, 0x0015, 0x0015, 0x0015, 0x0015, - 0x0015, 0x0015, 0x0015, 0x0040, 0x0015, 0x0040, 0x0015, 0x0040, - 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0040, 0x0015, 0x0040, - 0x0015, 0x0040, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, - 0x0015, 0x0040, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, - 0x0015, 0x0015, 0x0015, 0x0040, 0x0015, 0x0040, 0x0015, 0x0040, - 0x0015, 0x0015, 0x0015, 0x0040, 0x0015, 0x0040, 0x0015, 0x0040, - 0x0015, 0x0040, 0x0015, 0x05FD, + 0x0000, 0x006D, 0x0022, 0x0002, 0x0156, 0x00AB, 0x0015, 0x0015, 0x0015, + 0x0015, 0x0015, 0x0015, 0x0015, 0x0040, 0x0015, 0x0040, 0x0015, 0x0015, + 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0040, 0x0015, 0x0040, 0x0015, + 0x0040, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0040, 0x0015, 0x0040, + 0x0015, 0x0040, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, + 0x0040, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, 0x0015, + 0x0015, 0x0040, 0x0015, 0x0040, 0x0015, 0x0040, 0x0015, 0x0015, 0x0015, + 0x0040, 0x0015, 0x0040, 0x0015, 0x0040, 0x0015, 0x0040, 0x0015, 0x05FD, 0x0156, 0x0055, 0x0015, 0x0E4E}; // Send the Pronto code without any repeats set. irsend.reset(); irsend.sendPronto(pronto_test, 76); irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(NEC, irsend.capture.decode_type); + EXPECT_EQ(kNECBits, irsend.capture.bits); + EXPECT_EQ(0x18E710EF, irsend.capture.value); + EXPECT_EQ(0x18, irsend.capture.address); + EXPECT_EQ(0x8, irsend.capture.command); EXPECT_EQ( "m8892s4446" "m546s546m546s546m546s546m546s1664m546s1664m546s546m546s546m546s546" "m546s1664m546s1664m546s1664m546s546m546s546m546s1664m546s1664m546s1664" "m546s546m546s546m546s546m546s1664m546s546m546s546m546s546m546s546" "m546s1664m546s1664m546s1664m546s546m546s1664m546s1664m546s1664m546s1664" - "m546s39858", irsend.outputStr()); - EXPECT_TRUE(irrecv.decode(&irsend.capture)); - EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); - EXPECT_EQ(0x18E710EF, irsend.capture.value); - EXPECT_EQ(0x18, irsend.capture.address); - EXPECT_EQ(0x8, irsend.capture.command); + "m546s39858", + irsend.outputStr()); // Send it again with a single repeat. irsend.reset(); irsend.sendPronto(pronto_test, 76, 1); irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(NEC, irsend.capture.decode_type); + EXPECT_EQ(kNECBits, irsend.capture.bits); + EXPECT_EQ(0x18E710EF, irsend.capture.value); + EXPECT_EQ(0x18, irsend.capture.address); + EXPECT_EQ(0x8, irsend.capture.command); EXPECT_EQ( "m8892s4446" "m546s546m546s546m546s546m546s1664m546s1664m546s546m546s546m546s546" @@ -328,18 +330,19 @@ TEST(TestSendPronto, NormalPlusRepeatSequence) { "m546s546m546s546m546s546m546s1664m546s546m546s546m546s546m546s546" "m546s1664m546s1664m546s1664m546s546m546s1664m546s1664m546s1664m546s1664" "m546s39858" - "m8892s2210m546s95212", irsend.outputStr()); - EXPECT_TRUE(irrecv.decode(&irsend.capture)); - EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); - EXPECT_EQ(0x18E710EF, irsend.capture.value); - EXPECT_EQ(0x18, irsend.capture.address); - EXPECT_EQ(0x8, irsend.capture.command); + "m8892s2210m546s95212", + irsend.outputStr()); // Send it again with a two repeats. irsend.reset(); irsend.sendPronto(pronto_test, 76, 2); irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(NEC, irsend.capture.decode_type); + EXPECT_EQ(kNECBits, irsend.capture.bits); + EXPECT_EQ(0x18E710EF, irsend.capture.value); + EXPECT_EQ(0x18, irsend.capture.address); + EXPECT_EQ(0x8, irsend.capture.command); EXPECT_EQ( "m8892s4446" "m546s546m546s546m546s546m546s1664m546s1664m546s546m546s546m546s546" @@ -348,11 +351,6 @@ TEST(TestSendPronto, NormalPlusRepeatSequence) { "m546s1664m546s1664m546s1664m546s546m546s1664m546s1664m546s1664m546s1664" "m546s39858" "m8892s2210m546s95212" - "m8892s2210m546s95212", irsend.outputStr()); - EXPECT_TRUE(irrecv.decode(&irsend.capture)); - EXPECT_EQ(NEC, irsend.capture.decode_type); - EXPECT_EQ(NEC_BITS, irsend.capture.bits); - EXPECT_EQ(0x18E710EF, irsend.capture.value); - EXPECT_EQ(0x18, irsend.capture.address); - EXPECT_EQ(0x8, irsend.capture.command); + "m8892s2210m546s95212", + irsend.outputStr()); } diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_RC5_RC6_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_RC5_RC6_test.cpp similarity index 70% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_RC5_RC6_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_RC5_RC6_test.cpp index ef508e40e..e8aa9bfc1 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_RC5_RC6_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_RC5_RC6_test.cpp @@ -77,55 +77,59 @@ TEST(TestSendRC5, SendDataOnly) { irsend.begin(); irsend.reset(); - irsend.sendRC5(0x0, RC5_BITS); + irsend.sendRC5(0x0, kRC5Bits); EXPECT_EQ( "m889s889m1778s889m889s889m889s889m889s889m889s889m889" - "s889m889s889m889s889m889s889m889s889m889s889m889s114667", + "s889m889s889m889s889m889s889m889s889m889s889m889s90664", irsend.outputStr()); irsend.reset(); - irsend.sendRC5(0x1AAA, RC5_BITS); + irsend.sendRC5(0x1AAA, kRC5Bits); EXPECT_EQ( "m889s889m889s889m1778s1778m1778s1778m1778s1778" - "m1778s1778m1778s1778m1778s114667", irsend.outputStr()); + "m1778s1778m1778s1778m1778s90664", + irsend.outputStr()); irsend.reset(); - irsend.sendRC5(0x175, RC5_BITS); + irsend.sendRC5(0x175, kRC5Bits); EXPECT_EQ( "m889s889m1778s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s113778", irsend.outputStr()); + "m889s889m889s889m1778s1778m1778s1778m889s89775", + irsend.outputStr()); irsend.reset(); - irsend.sendRC5(0x3FFF, RC5_BITS); + irsend.sendRC5(0x3FFF, kRC5Bits); EXPECT_EQ( "m889s889m889s889m889s889m889s889m889s889m889s889m889s889" - "m889s889m889s889m889s889m889s889m889s889m889s889m889s113778", + "m889s889m889s889m889s889m889s889m889s889m889s889m889s89775", irsend.outputStr()); irsend.reset(); - irsend.sendRC5(0x0, RC5X_BITS); + irsend.sendRC5(0x0, kRC5XBits); EXPECT_EQ( "m889s889m1778s889m889s889m889s889m889s889m889s889m889" - "s889m889s889m889s889m889s889m889s889m889s889m889s114667", + "s889m889s889m889s889m889s889m889s889m889s889m889s90664", irsend.outputStr()); irsend.reset(); - irsend.sendRC5(0x1AAA, RC5X_BITS); + irsend.sendRC5(0x1AAA, kRC5XBits); EXPECT_EQ( "m1778s1778m1778s1778m1778s1778m1778" - "s1778m1778s1778m1778s1778m1778s114667", irsend.outputStr()); + "s1778m1778s1778m1778s1778m1778s90664", + irsend.outputStr()); irsend.reset(); - irsend.sendRC5(0x175, RC5X_BITS); + irsend.sendRC5(0x175, kRC5XBits); EXPECT_EQ( "m889s889m1778s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s113778", irsend.outputStr()); + "m889s889m889s889m1778s1778m1778s1778m889s89775", + irsend.outputStr()); irsend.reset(); - irsend.sendRC5(0x3FFF, RC5X_BITS); + irsend.sendRC5(0x3FFF, kRC5XBits); EXPECT_EQ( "m1778s1778m889s889m889s889m889s889m889s889m889s889m889" - "s889m889s889m889s889m889s889m889s889m889s889m889s113778", + "s889m889s889m889s889m889s889m889s889m889s889m889s89775", irsend.outputStr()); } @@ -135,40 +139,44 @@ TEST(TestSendRC5, SendWithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendRC5(0x175, RC5_BITS, 1); + irsend.sendRC5(0x175, kRC5Bits, 1); EXPECT_EQ( "m889s889m1778s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s114667" + "m889s889m889s889m1778s1778m1778s1778m889s90664" "m889s889m1778s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s113778", irsend.outputStr()); + "m889s889m889s889m1778s1778m1778s1778m889s88886", + irsend.outputStr()); irsend.reset(); - irsend.sendRC5(0x175, RC5_BITS, 2); + irsend.sendRC5(0x175, kRC5Bits, 2); EXPECT_EQ( "m889s889m1778s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s114667" + "m889s889m889s889m1778s1778m1778s1778m889s90664" "m889s889m1778s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s114667" + "m889s889m889s889m1778s1778m1778s1778m889s89775" "m889s889m1778s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s113778", irsend.outputStr()); + "m889s889m889s889m1778s1778m1778s1778m889s88886", + irsend.outputStr()); irsend.reset(); - irsend.sendRC5(0x175, RC5X_BITS, 1); + irsend.sendRC5(0x175, kRC5XBits, 1); EXPECT_EQ( "m889s889m1778s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s114667" + "m889s889m889s889m1778s1778m1778s1778m889s90664" "m889s889m1778s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s113778", irsend.outputStr()); + "m889s889m889s889m1778s1778m1778s1778m889s88886", + irsend.outputStr()); irsend.reset(); - irsend.sendRC5(0x1175, RC5X_BITS, 2); + irsend.sendRC5(0x1175, kRC5XBits, 2); EXPECT_EQ( "m1778s889m889s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s114667" + "m889s889m889s889m1778s1778m1778s1778m889s90664" "m1778s889m889s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s114667" + "m889s889m889s889m1778s1778m1778s1778m889s89775" "m1778s889m889s889m889s889m889s1778m1778s1778" - "m889s889m889s889m1778s1778m1778s1778m889s113778", irsend.outputStr()); + "m889s889m889s889m1778s1778m1778s1778m889s88886", + irsend.outputStr()); } // Tests for decodeRC5(). @@ -182,9 +190,9 @@ TEST(TestDecodeRC5, NormalDecodeWithStrict) { irsend.reset(); irsend.sendRC5(0x175); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, RC5_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, kRC5Bits, true)); EXPECT_EQ(RC5, irsend.capture.decode_type); - EXPECT_EQ(RC5_BITS, irsend.capture.bits); + EXPECT_EQ(kRC5Bits, irsend.capture.bits); EXPECT_EQ(0x175, irsend.capture.value); EXPECT_EQ(0x05, irsend.capture.address); EXPECT_EQ(0x35, irsend.capture.command); @@ -194,9 +202,9 @@ TEST(TestDecodeRC5, NormalDecodeWithStrict) { irsend.reset(); irsend.sendRC5(0x175); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, RC5X_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, kRC5XBits, true)); EXPECT_EQ(RC5, irsend.capture.decode_type); - EXPECT_EQ(RC5_BITS, irsend.capture.bits); + EXPECT_EQ(kRC5Bits, irsend.capture.bits); EXPECT_EQ(0x175, irsend.capture.value); EXPECT_EQ(0x05, irsend.capture.address); EXPECT_EQ(0x35, irsend.capture.command); @@ -205,11 +213,11 @@ TEST(TestDecodeRC5, NormalDecodeWithStrict) { // A RC-5X 13-bit message but with a value that is valid for RC-5 decoded // as RC5-X. irsend.reset(); - irsend.sendRC5(0x175, RC5X_BITS); + irsend.sendRC5(0x175, kRC5XBits); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, RC5X_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, kRC5XBits, true)); EXPECT_EQ(RC5, irsend.capture.decode_type); - EXPECT_EQ(RC5_BITS, irsend.capture.bits); + EXPECT_EQ(kRC5Bits, irsend.capture.bits); EXPECT_EQ(0x175, irsend.capture.value); EXPECT_EQ(0x05, irsend.capture.address); EXPECT_EQ(0x35, irsend.capture.command); @@ -219,9 +227,9 @@ TEST(TestDecodeRC5, NormalDecodeWithStrict) { irsend.reset(); irsend.sendRC5(irsend.encodeRC5(0x00, 0x0B, true)); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, RC5_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, kRC5Bits, true)); EXPECT_EQ(RC5, irsend.capture.decode_type); - EXPECT_EQ(RC5_BITS, irsend.capture.bits); + EXPECT_EQ(kRC5Bits, irsend.capture.bits); EXPECT_EQ(0x80B, irsend.capture.value); EXPECT_EQ(0x00, irsend.capture.address); EXPECT_EQ(0x0B, irsend.capture.command); @@ -229,11 +237,11 @@ TEST(TestDecodeRC5, NormalDecodeWithStrict) { // Synthesised Normal RC-5X 13-bit message. irsend.reset(); - irsend.sendRC5(irsend.encodeRC5X(0x02, 0x41, true), RC5X_BITS); + irsend.sendRC5(irsend.encodeRC5X(0x02, 0x41, true), kRC5XBits); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, RC5X_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, kRC5XBits, true)); EXPECT_EQ(RC5X, irsend.capture.decode_type); - EXPECT_EQ(RC5X_BITS, irsend.capture.bits); + EXPECT_EQ(kRC5XBits, irsend.capture.bits); EXPECT_EQ(0x1881, irsend.capture.value); EXPECT_EQ(0x02, irsend.capture.address); EXPECT_EQ(0x41, irsend.capture.command); @@ -242,9 +250,9 @@ TEST(TestDecodeRC5, NormalDecodeWithStrict) { // Synthesised Normal RC-5X 13-bit message should fail at being decoded // as a normal RC-5 (12 bit) message. irsend.reset(); - irsend.sendRC5(irsend.encodeRC5X(0x02, 0x41, true), RC5X_BITS); + irsend.sendRC5(irsend.encodeRC5X(0x02, 0x41, true), kRC5XBits); irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, RC5_BITS, true)); + ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, kRC5Bits, true)); } // Decode normal repeated RC5 messages. @@ -255,33 +263,33 @@ TEST(TestDecodeRC5, NormalDecodeWithRepeatAndStrict) { // Normal RC-5 12-bit (even) message with one repeat. irsend.reset(); - irsend.sendRC5(0x174, RC5_BITS, 1); + irsend.sendRC5(0x174, kRC5Bits, 1); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, RC5_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, kRC5Bits, true)); EXPECT_EQ(RC5, irsend.capture.decode_type); - EXPECT_EQ(RC5_BITS, irsend.capture.bits); + EXPECT_EQ(kRC5Bits, irsend.capture.bits); EXPECT_EQ(0x174, irsend.capture.value); EXPECT_EQ(0x05, irsend.capture.address); EXPECT_EQ(0x34, irsend.capture.command); // Normal RC-5 12-bit (odd) message with one repeat. irsend.reset(); - irsend.sendRC5(0x175, RC5_BITS, 1); + irsend.sendRC5(0x175, kRC5Bits, 1); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, RC5_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, kRC5Bits, true)); EXPECT_EQ(RC5, irsend.capture.decode_type); - EXPECT_EQ(RC5_BITS, irsend.capture.bits); + EXPECT_EQ(kRC5Bits, irsend.capture.bits); EXPECT_EQ(0x175, irsend.capture.value); EXPECT_EQ(0x05, irsend.capture.address); EXPECT_EQ(0x35, irsend.capture.command); // Synthesised Normal RC-5X 13-bit message with 2 repeats. irsend.reset(); - irsend.sendRC5(irsend.encodeRC5X(0x02, 0x41, true), RC5X_BITS, 2); + irsend.sendRC5(irsend.encodeRC5X(0x02, 0x41, true), kRC5XBits, 2); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, RC5X_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, kRC5XBits, true)); EXPECT_EQ(RC5X, irsend.capture.decode_type); - EXPECT_EQ(RC5X_BITS, irsend.capture.bits); + EXPECT_EQ(kRC5XBits, irsend.capture.bits); EXPECT_EQ(0x1881, irsend.capture.value); EXPECT_EQ(0x02, irsend.capture.address); EXPECT_EQ(0x41, irsend.capture.command); @@ -297,8 +305,8 @@ TEST(TestDecodeRC5, DecodeWithNonStrictValues) { irsend.sendRC5(0xFA, 8); // Illegal value RC5 8-bit message. irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, RC5_BITS, true)); - ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, RC5X_BITS, true)); + ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, kRC5Bits, true)); + ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, kRC5XBits, true)); // Should pass if strict off. ASSERT_TRUE(irrecv.decodeRC5(&irsend.capture, 8, false)); EXPECT_EQ(RC5, irsend.capture.decode_type); @@ -311,8 +319,8 @@ TEST(TestDecodeRC5, DecodeWithNonStrictValues) { irsend.sendRC5(0x12345678, 32); // Illegal size RC5 32-bit message. irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, RC5_BITS, true)); - ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, RC5X_BITS, true)); + ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, kRC5Bits, true)); + ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, kRC5XBits, true)); irsend.makeDecodeResult(); // Should fail with strict when we ask for the wrong bit size. @@ -327,8 +335,8 @@ TEST(TestDecodeRC5, DecodeWithNonStrictValues) { irsend.sendRC5(0x87654321, 32); // Illegal size RC5 32-bit message. irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, RC5_BITS, true)); - ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, RC5X_BITS, true)); + ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, kRC5Bits, true)); + ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, kRC5XBits, true)); irsend.makeDecodeResult(); // Should fail with strict when we ask for the wrong bit size. @@ -364,14 +372,15 @@ TEST(TestDecodeRC5, FailToDecodeNonRC5Example) { irsend.begin(); irsend.reset(); - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, RC5_BITS, false)); + ASSERT_FALSE(irrecv.decodeRC5(&irsend.capture, kRC5Bits, false)); } // RRRRRR CCCCC 666 @@ -383,24 +392,24 @@ TEST(TestDecodeRC5, FailToDecodeNonRC5Example) { // Tests for encodeRC6(). TEST(TestEncodeRC6, Mode0Encoding) { IRsendTest irsend(4); - EXPECT_EQ(0x0, irsend.encodeRC6(0, 0, RC6_MODE0_BITS)); - EXPECT_EQ(0x1234, irsend.encodeRC6(0x12, 0x34, RC6_MODE0_BITS)); - EXPECT_EQ(0x12345, irsend.encodeRC6(0x123, 0x45, RC6_MODE0_BITS)); - EXPECT_EQ(0xFFFFF, irsend.encodeRC6(0xFFF, 0xFF, RC6_MODE0_BITS)); - EXPECT_EQ(0xFFF00, irsend.encodeRC6(0xFFFF, 0x00, RC6_MODE0_BITS)); - EXPECT_EQ(0xFF, irsend.encodeRC6(0x00, 0xFF, RC6_MODE0_BITS)); + EXPECT_EQ(0x0, irsend.encodeRC6(0, 0, kRC6Mode0Bits)); + EXPECT_EQ(0x1234, irsend.encodeRC6(0x12, 0x34, kRC6Mode0Bits)); + EXPECT_EQ(0x12345, irsend.encodeRC6(0x123, 0x45, kRC6Mode0Bits)); + EXPECT_EQ(0xFFFFF, irsend.encodeRC6(0xFFF, 0xFF, kRC6Mode0Bits)); + EXPECT_EQ(0xFFF00, irsend.encodeRC6(0xFFFF, 0x00, kRC6Mode0Bits)); + EXPECT_EQ(0xFF, irsend.encodeRC6(0x00, 0xFF, kRC6Mode0Bits)); } TEST(TestEncodeRC6, 36BitEncoding) { IRsendTest irsend(4); - EXPECT_EQ(0x0, irsend.encodeRC6(0, 0, RC6_36_BITS)); - EXPECT_EQ(0x1234, irsend.encodeRC6(0x12, 0x34, RC6_36_BITS)); - EXPECT_EQ(0x123456789, irsend.encodeRC6(0x1234567, 0x89, RC6_36_BITS)); - EXPECT_EQ(0xFFFFFFFFF, irsend.encodeRC6(0xFFFFFFF, 0xFF, RC6_36_BITS)); - EXPECT_EQ(0xFFFFFFFFF, irsend.encodeRC6(0xFFFFFFFF, 0xFF, RC6_36_BITS)); - EXPECT_EQ(0xFFFFFFF00, irsend.encodeRC6(0xFFFFFFF, 0x00, RC6_36_BITS)); - EXPECT_EQ(0xFF, irsend.encodeRC6(0x0, 0xFF, RC6_36_BITS)); - EXPECT_EQ(0xFFFFFFFFF, irsend.encodeRC6(0xFFFFFFFF, 0xFF, RC6_36_BITS)); + EXPECT_EQ(0x0, irsend.encodeRC6(0, 0, kRC6_36Bits)); + EXPECT_EQ(0x1234, irsend.encodeRC6(0x12, 0x34, kRC6_36Bits)); + EXPECT_EQ(0x123456789, irsend.encodeRC6(0x1234567, 0x89, kRC6_36Bits)); + EXPECT_EQ(0xFFFFFFFFF, irsend.encodeRC6(0xFFFFFFF, 0xFF, kRC6_36Bits)); + EXPECT_EQ(0xFFFFFFFFF, irsend.encodeRC6(0xFFFFFFFF, 0xFF, kRC6_36Bits)); + EXPECT_EQ(0xFFFFFFF00, irsend.encodeRC6(0xFFFFFFF, 0x00, kRC6_36Bits)); + EXPECT_EQ(0xFF, irsend.encodeRC6(0x0, 0xFF, kRC6_36Bits)); + EXPECT_EQ(0xFFFFFFFFF, irsend.encodeRC6(0xFFFFFFFF, 0xFF, kRC6_36Bits)); } // Tests for toggleRC6(). @@ -410,7 +419,7 @@ TEST(TestToggleRC6, Mode0) { IRsendTest irsend(4); EXPECT_EQ(0x10000, irsend.toggleRC6(0x0)); - EXPECT_EQ(irsend.toggleRC6(0x0), irsend.toggleRC6(0x0, RC6_MODE0_BITS)); + EXPECT_EQ(irsend.toggleRC6(0x0), irsend.toggleRC6(0x0, kRC6Mode0Bits)); EXPECT_EQ(0x0, irsend.toggleRC6(0x10000)); EXPECT_EQ(0x0, irsend.toggleRC6(irsend.toggleRC6(0x0))); } @@ -419,10 +428,10 @@ TEST(TestToggleRC6, Mode0) { TEST(TestToggleRC6, 36BitUse) { IRsendTest irsend(4); - EXPECT_EQ(0x8000, irsend.toggleRC6(0x0, RC6_36_BITS)); - EXPECT_EQ(0x0, irsend.toggleRC6(0x8000, RC6_36_BITS)); - EXPECT_EQ(0x0, irsend.toggleRC6(irsend.toggleRC6(0x0, RC6_36_BITS), - RC6_36_BITS)); + EXPECT_EQ(0x8000, irsend.toggleRC6(0x0, kRC6_36Bits)); + EXPECT_EQ(0x0, irsend.toggleRC6(0x8000, kRC6_36Bits)); + EXPECT_EQ(0x0, + irsend.toggleRC6(irsend.toggleRC6(0x0, kRC6_36Bits), kRC6_36Bits)); } // Tests for sendRC6(). @@ -439,7 +448,8 @@ TEST(TestSendRC6, SendMode0DataOnly) { "m444s888m444s444m444s444m444s888m888s444m444s444m444s444" "m444s444m444s444m444s444m444s444m444s444m444s444m444s444" "m444s444m444s444m444s444m444s444m444s444m444s444m444" - "s83028", irsend.outputStr()); + "s83028", + irsend.outputStr()); irsend.reset(); irsend.sendRC6(0x1FFFF); @@ -448,7 +458,8 @@ TEST(TestSendRC6, SendMode0DataOnly) { "m444s888m444s444m444s444m1332s888m444s444m444s444m444s444" "m444s444m444s444m444s444m444s444m444s444m444s444m444s444" "m444s444m444s444m444s444m444s444m444s444m444" - "s83472", irsend.outputStr()); + "s83472", + irsend.outputStr()); irsend.reset(); irsend.sendRC6(0x15555); @@ -456,7 +467,8 @@ TEST(TestSendRC6, SendMode0DataOnly) { "m2664s888" "m444s888m444s444m444s444m1332s1332m888s888m888s888" "m888s888m888s888m888s888m888s888m888s888m888" - "s83472", irsend.outputStr()); + "s83472", + irsend.outputStr()); } // Test sending typical RC-6 36-bit data only. @@ -465,7 +477,7 @@ TEST(TestSendRC6, Send36BitDataOnly) { irsend.begin(); irsend.reset(); - irsend.sendRC6(0x0, RC6_36_BITS); + irsend.sendRC6(0x0, kRC6_36Bits); EXPECT_EQ( "m2664s888" "m444s888m444s444m444s444m444" @@ -474,10 +486,11 @@ TEST(TestSendRC6, Send36BitDataOnly) { "s444m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" "s444m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" "s444m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" - "s83028", irsend.outputStr()); + "s83028", + irsend.outputStr()); irsend.reset(); - irsend.sendRC6(0xFFFFFFFFF, RC6_36_BITS); + irsend.sendRC6(0xFFFFFFFFF, kRC6_36Bits); EXPECT_EQ( "m2664s888" "m444s444m444s444m444s444m444s444" @@ -486,10 +499,11 @@ TEST(TestSendRC6, Send36BitDataOnly) { "m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444s444" "m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444s444" "m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" - "s83472", irsend.outputStr()); + "s83472", + irsend.outputStr()); irsend.reset(); - irsend.sendRC6(0xAAAAAAAAAA, RC6_36_BITS); + irsend.sendRC6(0xAAAAAAAAAA, kRC6_36Bits); EXPECT_EQ( "m2664s888m444s444m444s888m888" "s1332m1332" @@ -498,7 +512,7 @@ TEST(TestSendRC6, Send36BitDataOnly) { irsend.outputStr()); irsend.reset(); - irsend.sendRC6(0xC800F740C, RC6_36_BITS); // Xbox 360 OnOff code + irsend.sendRC6(0xC800F740C, kRC6_36Bits); // Xbox 360 OnOff code EXPECT_EQ( "m2664s888" "m444s444m444s444m444s888m444" @@ -506,10 +520,11 @@ TEST(TestSendRC6, Send36BitDataOnly) { "s888m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" "s444m444s444m444s444m888s444m444s444m444s444m444s888m888s444m444" "s444m444s888m888s888m444s444m444s444m444s444m444s444m444s444m888" - "s444m444s888m444s444m444s83028", irsend.outputStr()); + "s444m444s888m444s444m444s83028", + irsend.outputStr()); irsend.reset(); - irsend.sendRC6(irsend.toggleRC6(0xC800F740C, RC6_36_BITS), - RC6_36_BITS); // Xbox 360 OnOff code (toggled) + irsend.sendRC6(irsend.toggleRC6(0xC800F740C, kRC6_36Bits), + kRC6_36Bits); // Xbox 360 OnOff code (toggled) EXPECT_EQ( "m2664s888" "m444s444m444s444m444s888m444" @@ -517,7 +532,8 @@ TEST(TestSendRC6, Send36BitDataOnly) { "s888m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" "s444m444s444m444s444m888s444m444s444m444s444m444s444m444s444m444" "s444m444s444m444s888m888s888m444s444m444s444m444s444m444s444m444" - "s444m888s444m444s888m444s444m444s83028", irsend.outputStr()); + "s444m888s444m444s888m444s444m444s83028", + irsend.outputStr()); } // Test sending RC-6 Mode 0 with different repeats. @@ -526,16 +542,17 @@ TEST(TestSendRC6, SendMode0WithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendRC6(0x175, RC6_MODE0_BITS, 0); + irsend.sendRC6(0x175, kRC6Mode0Bits, 0); EXPECT_EQ( "m2664s888" "m444s888m444s444m444s444m444" "s888m888" "s444m444s444m444s444m444s444m444s444m444s444m444s444m888s888m888" - "s444m444s444m444s888m888s888m888s83472", irsend.outputStr()); + "s444m444s444m444s888m888s888m888s83472", + irsend.outputStr()); irsend.reset(); - irsend.sendRC6(0x175, RC6_MODE0_BITS, 1); + irsend.sendRC6(0x175, kRC6Mode0Bits, 1); EXPECT_EQ( "m2664s888" "m444s888m444s444m444s444m444" @@ -546,10 +563,11 @@ TEST(TestSendRC6, SendMode0WithRepeats) { "m444s888m444s444m444s444m444" "s888m888" "s444m444s444m444s444m444s444m444s444m444s444m444s444m888s888m888" - "s444m444s444m444s888m888s888m888s83472", irsend.outputStr()); + "s444m444s444m444s888m888s888m888s83472", + irsend.outputStr()); irsend.reset(); - irsend.sendRC6(0x175, RC6_MODE0_BITS, 2); + irsend.sendRC6(0x175, kRC6Mode0Bits, 2); EXPECT_EQ( "m2664s888" "m444s888m444s444m444s444m444" @@ -565,7 +583,8 @@ TEST(TestSendRC6, SendMode0WithRepeats) { "m444s888m444s444m444s444m444" "s888m888" "s444m444s444m444s444m444s444m444s444m444s444m444s444m888s888m888" - "s444m444s444m444s888m888s888m888s83472", irsend.outputStr()); + "s444m444s444m444s888m888s888m888s83472", + irsend.outputStr()); } // Test sending RC-6 36-bit with different repeats. @@ -574,7 +593,7 @@ TEST(TestSendRC6, Send36BitWithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendRC6(0x175, RC6_36_BITS, 0); + irsend.sendRC6(0x175, kRC6_36Bits, 0); EXPECT_EQ( "m2664s888" "m444s888m444s444m444s444m444" @@ -582,10 +601,11 @@ TEST(TestSendRC6, Send36BitWithRepeats) { "s444m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" "s444m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" "s444m444s444m444s444m444s444m444s444m444s444m444s444m888s888m888" - "s444m444s444m444s888m888s888m888s83472", irsend.outputStr()); + "s444m444s444m444s888m888s888m888s83472", + irsend.outputStr()); irsend.reset(); - irsend.sendRC6(0x175, RC6_36_BITS, 1); + irsend.sendRC6(0x175, kRC6_36Bits, 1); EXPECT_EQ( "m2664s888" "m444s888m444s444m444s444m444" @@ -600,10 +620,11 @@ TEST(TestSendRC6, Send36BitWithRepeats) { "s444m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" "s444m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" "s444m444s444m444s444m444s444m444s444m444s444m444s444m888s888m888" - "s444m444s444m444s888m888s888m888s83472", irsend.outputStr()); + "s444m444s444m444s888m888s888m888s83472", + irsend.outputStr()); irsend.reset(); - irsend.sendRC6(0x175, RC6_36_BITS, 2); + irsend.sendRC6(0x175, kRC6_36Bits, 2); EXPECT_EQ( "m2664s888" "m444s888m444s444m444s444m444" @@ -625,7 +646,8 @@ TEST(TestSendRC6, Send36BitWithRepeats) { "s444m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" "s444m444s444m444s444m444s444m444s444m444s444m444s444m444s444m444" "s444m444s444m444s444m444s444m444s444m444s444m444s444m888s888m888" - "s444m444s444m444s888m888s888m888s83472", irsend.outputStr()); + "s444m444s444m444s888m888s888m888s83472", + irsend.outputStr()); } // Tests for decodeRC6(). @@ -640,9 +662,9 @@ TEST(TestDecodeRC6, NormalMode0DecodeWithStrict) { irsend.reset(); irsend.sendRC6(0x175); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, RC6_MODE0_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, kRC6Mode0Bits, true)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_MODE0_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6Mode0Bits, irsend.capture.bits); EXPECT_EQ(0x175, irsend.capture.value); EXPECT_EQ(0x01, irsend.capture.address); EXPECT_EQ(0x75, irsend.capture.command); @@ -650,11 +672,11 @@ TEST(TestDecodeRC6, NormalMode0DecodeWithStrict) { // Normal Synthesised RC-6 Mode 0 (20-bit) message. irsend.reset(); - irsend.sendRC6(irsend.encodeRC6(0x1234567, 0x89, RC6_MODE0_BITS)); + irsend.sendRC6(irsend.encodeRC6(0x1234567, 0x89, kRC6Mode0Bits)); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, RC6_MODE0_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, kRC6Mode0Bits, true)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_MODE0_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6Mode0Bits, irsend.capture.bits); EXPECT_EQ(0x56789, irsend.capture.value); EXPECT_EQ(0x567, irsend.capture.address); EXPECT_EQ(0x89, irsend.capture.command); @@ -662,11 +684,11 @@ TEST(TestDecodeRC6, NormalMode0DecodeWithStrict) { // Same again, but encoded manually. irsend.reset(); - irsend.sendRC6(0x123456789, RC6_MODE0_BITS); + irsend.sendRC6(0x123456789, kRC6Mode0Bits); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, RC6_MODE0_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, kRC6Mode0Bits, true)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_MODE0_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6Mode0Bits, irsend.capture.bits); EXPECT_EQ(0x56789, irsend.capture.value); EXPECT_EQ(0x567, irsend.capture.address); EXPECT_EQ(0x89, irsend.capture.command); @@ -681,11 +703,11 @@ TEST(TestDecodeRC6, Normal36BitDecodeWithStrict) { // Normal RC-6 36-bit message. irsend.reset(); - irsend.sendRC6(0x175, RC6_36_BITS); + irsend.sendRC6(0x175, kRC6_36Bits); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, RC6_36_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, kRC6_36Bits, true)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_36_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6_36Bits, irsend.capture.bits); EXPECT_EQ(0x175, irsend.capture.value); EXPECT_EQ(0x01, irsend.capture.address); EXPECT_EQ(0x75, irsend.capture.command); @@ -693,11 +715,11 @@ TEST(TestDecodeRC6, Normal36BitDecodeWithStrict) { // Normal Synthesised RC-6 36-bit message. irsend.reset(); - irsend.sendRC6(irsend.encodeRC6(0x1234567, 0x89, RC6_36_BITS), RC6_36_BITS); + irsend.sendRC6(irsend.encodeRC6(0x1234567, 0x89, kRC6_36Bits), kRC6_36Bits); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, RC6_36_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, kRC6_36Bits, true)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_36_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6_36Bits, irsend.capture.bits); EXPECT_EQ(0x123456789, irsend.capture.value); EXPECT_EQ(0x1234567, irsend.capture.address); EXPECT_EQ(0x89, irsend.capture.command); @@ -712,22 +734,22 @@ TEST(TestDecodeRC6, NormalMode0DecodeWithRepeatAndStrict) { // Normal RC-6 Mode 0 (20-bit) even message with one repeat. irsend.reset(); - irsend.sendRC6(0x174, RC6_MODE0_BITS, 1); + irsend.sendRC6(0x174, kRC6Mode0Bits, 1); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, RC6_MODE0_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, kRC6Mode0Bits, true)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_MODE0_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6Mode0Bits, irsend.capture.bits); EXPECT_EQ(0x174, irsend.capture.value); EXPECT_EQ(0x1, irsend.capture.address); EXPECT_EQ(0x74, irsend.capture.command); // Normal RC-6 Mode 0 (20-bit) odd message with one repeat. irsend.reset(); - irsend.sendRC6(0x175, RC6_MODE0_BITS, 1); + irsend.sendRC6(0x175, kRC6Mode0Bits, 1); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, RC6_MODE0_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, kRC6Mode0Bits, true)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_MODE0_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6Mode0Bits, irsend.capture.bits); EXPECT_EQ(0x175, irsend.capture.value); EXPECT_EQ(0x1, irsend.capture.address); EXPECT_EQ(0x75, irsend.capture.command); @@ -741,22 +763,22 @@ TEST(TestDecodeRC6, Normal36BitDecodeWithRepeatAndStrict) { // Normal RC-6 36-bit odd message with one repeat. irsend.reset(); - irsend.sendRC6(0x175, RC6_36_BITS, 1); + irsend.sendRC6(0x175, kRC6_36Bits, 1); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, RC6_36_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, kRC6_36Bits, true)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_36_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6_36Bits, irsend.capture.bits); EXPECT_EQ(0x175, irsend.capture.value); EXPECT_EQ(0x1, irsend.capture.address); EXPECT_EQ(0x75, irsend.capture.command); // Normal RC-6 36-bit even message with one repeat. irsend.reset(); - irsend.sendRC6(0x174, RC6_36_BITS, 1); + irsend.sendRC6(0x174, kRC6_36Bits, 1); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, RC6_36_BITS, true)); + ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, kRC6_36Bits, true)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_36_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6_36Bits, irsend.capture.bits); EXPECT_EQ(0x174, irsend.capture.value); EXPECT_EQ(0x1, irsend.capture.address); EXPECT_EQ(0x74, irsend.capture.command); @@ -770,11 +792,11 @@ TEST(TestDecodeRC6, NormalDecodeWithoutStrict) { // Normal RC-6 Mode 0 (20-bit) message. irsend.reset(); - irsend.sendRC6(0x175, RC6_MODE0_BITS); + irsend.sendRC6(0x175, kRC6Mode0Bits); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_MODE0_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6Mode0Bits, irsend.capture.bits); EXPECT_EQ(0x175, irsend.capture.value); EXPECT_EQ(0x01, irsend.capture.address); EXPECT_EQ(0x75, irsend.capture.command); @@ -782,11 +804,11 @@ TEST(TestDecodeRC6, NormalDecodeWithoutStrict) { // Normal RC-6 Mode 0 (20-bit) message. irsend.reset(); - irsend.sendRC6(0x174, RC6_MODE0_BITS); + irsend.sendRC6(0x174, kRC6Mode0Bits); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_MODE0_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6Mode0Bits, irsend.capture.bits); EXPECT_EQ(0x174, irsend.capture.value); EXPECT_EQ(0x01, irsend.capture.address); EXPECT_EQ(0x74, irsend.capture.command); @@ -794,11 +816,11 @@ TEST(TestDecodeRC6, NormalDecodeWithoutStrict) { // Normal RC-6 36-bit message. irsend.reset(); - irsend.sendRC6(0x174, RC6_36_BITS); + irsend.sendRC6(0x174, kRC6_36Bits); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_36_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6_36Bits, irsend.capture.bits); EXPECT_EQ(0x174, irsend.capture.value); EXPECT_EQ(0x01, irsend.capture.address); EXPECT_EQ(0x74, irsend.capture.command); @@ -806,11 +828,11 @@ TEST(TestDecodeRC6, NormalDecodeWithoutStrict) { // Normal Synthesised RC-6 36-bit message. irsend.reset(); - irsend.sendRC6(irsend.encodeRC6(0x1234567, 0x89, RC6_36_BITS), RC6_36_BITS); + irsend.sendRC6(irsend.encodeRC6(0x1234567, 0x89, kRC6_36Bits), kRC6_36Bits); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_36_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6_36Bits, irsend.capture.bits); EXPECT_EQ(0x123456789, irsend.capture.value); EXPECT_EQ(0x1234567, irsend.capture.address); EXPECT_EQ(0x89, irsend.capture.command); @@ -825,17 +847,17 @@ TEST(TestDecodeRC6, Decode36BitGlobalCacheExample) { irsend.reset(); // Xbox-360 Power On from Global Cache. - uint16_t gc_test[65] = {36000, 1, 1, 96, 32, 16, 16, 16, 16, 16, 32, 16, 32, - 48, 32, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, - 16, 16, 16, 16, 16, 16, 16, 16, 16, 32, 16, 16, 16, - 16, 16, 16, 32, 32, 16, 16, 16, 16, 32, 32, 32, 16, - 16, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 16, 2476}; + uint16_t gc_test[65] = { + 36000, 1, 1, 96, 32, 16, 16, 16, 16, 16, 32, 16, 32, 48, 32, 16, 16, + 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, + 16, 32, 16, 16, 16, 16, 16, 16, 32, 32, 16, 16, 16, 16, 32, 32, 32, + 16, 16, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 16, 2476}; irsend.sendGC(gc_test, 65); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, RC6_36_BITS)); + ASSERT_TRUE(irrecv.decodeRC6(&irsend.capture, kRC6_36Bits)); EXPECT_EQ(RC6, irsend.capture.decode_type); - EXPECT_EQ(RC6_36_BITS, irsend.capture.bits); + EXPECT_EQ(kRC6_36Bits, irsend.capture.bits); EXPECT_EQ(0xC800F742A, irsend.capture.value); EXPECT_EQ(0xC800F74, irsend.capture.address); EXPECT_EQ(0x2A, irsend.capture.command); @@ -849,25 +871,26 @@ TEST(TestDecodeRC5, FailToDecodeNonRC6Example) { irsend.begin(); irsend.reset(); - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, RC6_MODE0_BITS, true)); - ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, RC6_MODE0_BITS, false)); - ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, RC6_36_BITS, true)); - ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, RC6_36_BITS, false)); + ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, kRC6Mode0Bits, true)); + ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, kRC6Mode0Bits, false)); + ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, kRC6_36Bits, true)); + ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, kRC6_36Bits, false)); irsend.reset(); irsend.sendRC5(0x0); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, RC6_MODE0_BITS, true)); - ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, RC6_MODE0_BITS, false)); - ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, RC6_36_BITS, true)); - ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, RC6_36_BITS, false)); + ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, kRC6Mode0Bits, true)); + ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, kRC6Mode0Bits, false)); + ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, kRC6_36Bits, true)); + ASSERT_FALSE(irrecv.decodeRC6(&irsend.capture, kRC6_36Bits, false)); } diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_RCMM_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_RCMM_test.cpp similarity index 72% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_RCMM_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_RCMM_test.cpp index 2115dcb2e..028dbd8b3 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_RCMM_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_RCMM_test.cpp @@ -13,16 +13,20 @@ TEST(TestSendRCMM, SendDataOnly) { irsend.reset(); irsend.sendRCMM(0xe0a600); - EXPECT_EQ("m416s277" - "m166s777m166s611m166s277m166s277" - "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" - "m166s27778", irsend.outputStr()); + EXPECT_EQ( + "m416s277" + "m166s777m166s611m166s277m166s277" + "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" + "m166s19600", + irsend.outputStr()); irsend.reset(); irsend.sendRCMM(0x28e0a600UL, 32); - EXPECT_EQ("m416s277" - "m166s277m166s611m166s611m166s277m166s777m166s611m166s277m166s277" - "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" - "m166s27778", irsend.outputStr()); + EXPECT_EQ( + "m416s277" + "m166s277m166s611m166s611m166s277m166s777m166s611m166s277m166s277" + "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" + "m166s17160", + irsend.outputStr()); } // Test sending with different repeats. @@ -32,36 +36,42 @@ TEST(TestSendRCMM, SendWithRepeats) { irsend.reset(); irsend.sendRCMM(0x28e0a600, 32, 2); // 2 repeats. - EXPECT_EQ("m416s277" - "m166s277m166s611m166s611m166s277m166s777m166s611m166s277m166s277" - "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" - "m166s27778" - "m416s277" - "m166s277m166s611m166s611m166s277m166s777m166s611m166s277m166s277" - "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" - "m166s27778" - "m416s277" - "m166s277m166s611m166s611m166s277m166s777m166s611m166s277m166s277" - "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" - "m166s27778", irsend.outputStr()); + EXPECT_EQ( + "m416s277" + "m166s277m166s611m166s611m166s277m166s777m166s611m166s277m166s277" + "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" + "m166s17160" + "m416s277" + "m166s277m166s611m166s611m166s277m166s777m166s611m166s277m166s277" + "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" + "m166s17160" + "m416s277" + "m166s277m166s611m166s611m166s277m166s777m166s611m166s277m166s277" + "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" + "m166s17160", + irsend.outputStr()); } // Test sending an atypical data size. -TEST(TestSendRCMM, SendUsualSize) { +TEST(TestSendRCMM, SendUnusualSize) { IRsendTest irsend(4); irsend.begin(); irsend.reset(); irsend.sendRCMM(0xE0, 8); - EXPECT_EQ("m416s277" - "m166s777m166s611m166s277m166s277" - "m166s27778", irsend.outputStr()); + EXPECT_EQ( + "m416s277" + "m166s777m166s611m166s277m166s277" + "m166s24313", + irsend.outputStr()); irsend.reset(); irsend.sendRCMM(0x28e0a60000UL, 40); - EXPECT_EQ("m416s277" - "m166s277m166s611m166s611m166s277m166s777m166s611m166s277m166s277" - "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" - "m166s277m166s277m166s277m166s277m166s27778", irsend.outputStr()); + EXPECT_EQ( + "m416s277" + "m166s277m166s611m166s611m166s277m166s777m166s611m166s277m166s277" + "m166s611m166s611m166s444m166s611m166s277m166s277m166s277m166s277" + "m166s277m166s277m166s277m166s277m166s15388", + irsend.outputStr()); } // Tests for decodeRCMM(). @@ -76,9 +86,9 @@ TEST(TestDecodeRCMM, NormalDecodeWithStrict) { irsend.reset(); irsend.sendRCMM(0xe0a600); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeRCMM(&irsend.capture, RCMM_BITS, true)); + ASSERT_TRUE(irrecv.decodeRCMM(&irsend.capture, kRCMMBits, true)); EXPECT_EQ(RCMM, irsend.capture.decode_type); - EXPECT_EQ(RCMM_BITS, irsend.capture.bits); + EXPECT_EQ(kRCMMBits, irsend.capture.bits); EXPECT_EQ(0xe0a600, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -203,14 +213,15 @@ TEST(TestDecodeRCMM, FailToDecodeNonRCMMExample) { irsend.reset(); // Modified a few entries to unexpected values, based on previous test case. - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeRCMM(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeRCMM(&irsend.capture, RCMM_BITS, false)); + ASSERT_FALSE(irrecv.decodeRCMM(&irsend.capture, kRCMMBits, false)); } // Issue 281 Debugging @@ -220,11 +231,12 @@ TEST(TestDecodeRCMM, DebugIssue281) { irsend.begin(); // Data from Issue #281 (shortened version) - uint16_t rawData[36] = {448, 276, 150, 285, 164, 613, 163, 447, 162, 613, - 164, 445, 164, 776, 167, 278, 163, 280, 163, 280, - 162, 611, 168, 444, 163, 612, 164, 277, 168, 447, - 157, 282, 165, 276, - 165, 65535}; // Last value modified from 89729 + uint16_t + rawData[36] = {448, 276, 150, 285, 164, 613, 163, 447, 162, 613, + 164, 445, 164, 776, 167, 278, 163, 280, 163, 280, + 162, 611, 168, 444, 163, 612, 164, 277, 168, 447, + 157, 282, 165, 276, 165, 65535}; // Last value modified + // from 89729 irsend.reset(); irsend.sendRaw(rawData, 36, 36); diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Samsung_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Samsung_test.cpp new file mode 100644 index 000000000..9ee1fcabb --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Samsung_test.cpp @@ -0,0 +1,907 @@ +// Copyright 2017 David Conran + +#include "ir_Samsung.h" +#include "IRrecv.h" +#include "IRrecv_test.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendSAMSUNG(). + +// Test sending typical data only. +TEST(TestSendSamsung, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendSAMSUNG(0xE0E09966); // Samsung TV Power On. + EXPECT_EQ( + "m4480s4480" + "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" + "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" + "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" + "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" + "m560s560m560s1680m560s1680m560s560m560s47040", + irsend.outputStr()); + + irsend.reset(); +} + +// Test sending with different repeats. +TEST(TestSendSamsung, SendWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendSAMSUNG(0xE0E09966, kSamsungBits, 1); // 1 repeat. + EXPECT_EQ( + "m4480s4480" + "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" + "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" + "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" + "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" + "m560s560m560s1680m560s1680m560s560m560s47040" + "m4480s4480" + "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" + "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" + "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" + "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" + "m560s560m560s1680m560s1680m560s560m560s47040", + irsend.outputStr()); + irsend.sendSAMSUNG(0xE0E09966, kSamsungBits, 2); // 2 repeats. + EXPECT_EQ( + "m4480s4480" + "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" + "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" + "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" + "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" + "m560s560m560s1680m560s1680m560s560m560s47040" + "m4480s4480" + "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" + "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" + "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" + "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" + "m560s560m560s1680m560s1680m560s560m560s47040" + "m4480s4480" + "m560s1680m560s1680m560s1680m560s560m560s560m560s560m560s560" + "m560s560m560s1680m560s1680m560s1680m560s560m560s560m560s560" + "m560s560m560s560m560s1680m560s560m560s560m560s1680m560s1680" + "m560s560m560s560m560s1680m560s560m560s1680m560s1680m560s560" + "m560s560m560s1680m560s1680m560s560m560s47040", + irsend.outputStr()); +} + +// Tests for encodeSAMSUNG(). + +TEST(TestEncodeSamsung, NormalEncoding) { + IRsendTest irsend(4); + EXPECT_EQ(0xFF, irsend.encodeSAMSUNG(0, 0)); + EXPECT_EQ(0x8080807F, irsend.encodeSAMSUNG(1, 1)); + EXPECT_EQ(0xF8F805FA, irsend.encodeSAMSUNG(0x1F, 0xA0)); + EXPECT_EQ(0xA0A0CC33, irsend.encodeSAMSUNG(0x05, 0x33)); + EXPECT_EQ(0xFFFFFF00, irsend.encodeSAMSUNG(0xFF, 0xFF)); + EXPECT_EQ(0xE0E09966, irsend.encodeSAMSUNG(0x07, 0x99)); +} + +// Tests for decodeSAMSUNG(). + +// Decode normal Samsung messages. +TEST(TestDecodeSamsung, NormalDecodeWithStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Normal Samsung 32-bit message. + irsend.reset(); + irsend.sendSAMSUNG(0xE0E09966); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, true)); + EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); + EXPECT_EQ(kSamsungBits, irsend.capture.bits); + EXPECT_EQ(0xE0E09966, irsend.capture.value); + EXPECT_EQ(0x07, irsend.capture.address); + EXPECT_EQ(0x99, irsend.capture.command); + + // Synthesised Normal Samsung 32-bit message. + irsend.reset(); + irsend.sendSAMSUNG(irsend.encodeSAMSUNG(0x07, 0x99)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, true)); + EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); + EXPECT_EQ(kSamsungBits, irsend.capture.bits); + EXPECT_EQ(0xE0E09966, irsend.capture.value); + EXPECT_EQ(0x07, irsend.capture.address); + EXPECT_EQ(0x99, irsend.capture.command); + + // Synthesised Normal Samsung 32-bit message. + irsend.reset(); + irsend.sendSAMSUNG(irsend.encodeSAMSUNG(0x1, 0x1)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, true)); + EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); + EXPECT_EQ(kSamsungBits, irsend.capture.bits); + EXPECT_EQ(0x8080807F, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); + EXPECT_EQ(0x1, irsend.capture.command); +} + +// Decode normal repeated Samsung messages. +TEST(TestDecodeSamsung, NormalDecodeWithRepeatAndStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Normal Samsung 32-bit message. + irsend.reset(); + irsend.sendSAMSUNG(0xE0E09966, kSamsungBits, 2); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, true)); + EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); + EXPECT_EQ(kSamsungBits, irsend.capture.bits); + EXPECT_EQ(0xE0E09966, irsend.capture.value); + EXPECT_EQ(0x07, irsend.capture.address); + EXPECT_EQ(0x99, irsend.capture.command); +} + +// Decode unsupported Samsung messages. +TEST(TestDecodeSamsung, DecodeWithNonStrictValues) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + irsend.sendSAMSUNG(0x0); // Illegal value Samsung 32-bit message. + irsend.makeDecodeResult(); + // Should fail with strict on. + ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, true)); + // Should pass if strict off. + ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, false)); + EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); + EXPECT_EQ(kSamsungBits, irsend.capture.bits); + EXPECT_EQ(0x0, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + + irsend.reset(); + irsend.sendSAMSUNG(0x12345678); // Illegal value Samsung 32-bit message. + irsend.makeDecodeResult(); + // Should fail with strict on. + ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, true)); + // Should pass if strict off. + ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, false)); + EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); + EXPECT_EQ(kSamsungBits, irsend.capture.bits); + EXPECT_EQ(0x12345678, irsend.capture.value); + EXPECT_EQ(0x48, irsend.capture.address); + EXPECT_EQ(0x6A, irsend.capture.command); + + // Illegal over length (36-bit) message. + irsend.reset(); + irsend.sendSAMSUNG(irsend.encodeSAMSUNG(0, 0), 36); + irsend.makeDecodeResult(); + // Should fail with strict on. + ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, true)); + // Shouldn't pass if strict off and wrong expected bit size. + ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, false)); + // Re-decode with correct bit size. + ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, 36, true)); + ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, 36, false)); + EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); + EXPECT_EQ(36, irsend.capture.bits); + EXPECT_EQ(0xFF, irsend.capture.value); // We told it to expect 8 bits less. + EXPECT_EQ(0x00, irsend.capture.address); + EXPECT_EQ(0x00, irsend.capture.command); + + // Illegal under length (16-bit) message + irsend.reset(); + irsend.sendSAMSUNG(irsend.encodeSAMSUNG(0x0, 0x0), 16); + irsend.makeDecodeResult(); + // Should fail with strict on. + ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, true)); + // And it should fail when we expect more bits. + ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, false)); + + // Should pass if strict off if we ask for correct nr. of bits sent. + ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, 16, false)); + EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); + EXPECT_EQ(16, irsend.capture.bits); + EXPECT_EQ(0xFF, irsend.capture.value); // We told it to expect 4 bits less. + EXPECT_EQ(0x00, irsend.capture.address); + EXPECT_EQ(0x00, irsend.capture.command); + + // Should fail as we are expecting less bits than there are. + ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, 12, false)); +} + +// Decode (non-standard) 64-bit messages. +// Decode unsupported Samsung messages. +TEST(TestDecodeSamsung, Decode64BitMessages) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Illegal value & size Samsung 64-bit message. + irsend.sendSAMSUNG(0xFFFFFFFFFFFFFFFF, 64); + irsend.makeDecodeResult(); + ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, true)); + // Should work with a 'normal' match (not strict) + ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture, 64, false)); + EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); + EXPECT_EQ(64, irsend.capture.bits); + EXPECT_EQ(0xFFFFFFFFFFFFFFFF, irsend.capture.value); + EXPECT_EQ(0xFF, irsend.capture.address); + EXPECT_EQ(0xFF, irsend.capture.command); +} + +// Decode a 'real' example via GlobalCache +TEST(TestDecodeSamsung, DecodeGlobalCacheExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Samsung TV Power On from Global Cache. + uint16_t gc_test[71] = {38000, 1, 1, 172, 172, 22, 64, 22, 64, 22, 64, 22, + 21, 22, 21, 22, 21, 22, 21, 22, 21, 22, 64, 22, + 64, 22, 64, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 64, 22, 21, 22, 21, 22, 64, 22, 64, 22, + 21, 22, 21, 22, 64, 22, 21, 22, 64, 22, 64, 22, + 21, 22, 21, 22, 64, 22, 64, 22, 21, 22, 1820}; + irsend.sendGC(gc_test, 71); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decodeSAMSUNG(&irsend.capture)); + EXPECT_EQ(SAMSUNG, irsend.capture.decode_type); + EXPECT_EQ(kSamsungBits, irsend.capture.bits); + EXPECT_EQ(0xE0E09966, irsend.capture.value); + EXPECT_EQ(0x07, irsend.capture.address); + EXPECT_EQ(0x99, irsend.capture.command); +} + +// Fail to decode a non-Samsung example via GlobalCache +TEST(TestDecodeSamsung, FailToDecodeNonSamsungExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Modified a few entries to unexpected values, based on previous test case. + uint16_t gc_test[71] = {38000, 1, 1, 172, 172, 22, 64, 22, 64, 22, 64, 22, + 21, 22, 21, 22, 21, 22, 11, 22, 21, 22, 128, 22, + 64, 22, 64, 22, 21, 22, 21, 22, 21, 22, 21, 22, + 21, 22, 64, 22, 21, 22, 21, 22, 64, 22, 64, 22, + 21, 22, 21, 22, 64, 22, 21, 22, 64, 22, 64, 22, + 21, 22, 21, 22, 64, 22, 64, 22, 21, 22, 1820}; + irsend.sendGC(gc_test, 71); + irsend.makeDecodeResult(); + + ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture)); + ASSERT_FALSE(irrecv.decodeSAMSUNG(&irsend.capture, kSamsungBits, false)); +} + +// Tests for sendSamsungAC(). + +// Test sending typical data only. +TEST(TestSendSamsungAC, SendDataOnly) { + IRsendTest irsend(0); + irsend.begin(); + uint8_t data[kSamsungAcStateLength] = {0x02, 0x92, 0x0F, 0x00, 0x00, + 0x00, 0xF0, 0x01, 0x02, 0xAF, + 0x71, 0x00, 0x15, 0xF0}; + irsend.sendSamsungAC(data); + EXPECT_EQ( + "m690s17844" + "m3086s8864" + "m586s436m586s1432m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s1432m586s436m586s436m586s1432m586s436m586s436m586s1432" + "m586s1432m586s1432m586s1432m586s1432m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s1432m586s1432m586s1432m586s1432" + "m586s2886" + "m3086s8864" + "m586s1432m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s1432m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s1432m586s1432m586s1432m586s1432m586s436m586s1432m586s436m586s1432" + "m586s1432m586s436m586s436m586s436m586s1432m586s1432m586s1432m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s1432m586s436m586s1432m586s436m586s1432m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s1432m586s1432m586s1432m586s1432" + "m586s100000", + irsend.outputStr()); +} + +// Test sending extended data. +TEST(TestSendSamsungAC, SendExtendedData) { + IRsendTest irsend(0); + irsend.begin(); + // "Off" message. + uint8_t data[kSamsungAcExtendedStateLength] = { + 0x02, 0xB2, 0x0F, 0x00, 0x00, 0x00, 0xC0, 0x01, 0xD2, 0x0F, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x02, 0xFF, 0x71, 0x80, 0x11, 0xC0}; + irsend.sendSamsungAC(data, kSamsungAcExtendedStateLength); + EXPECT_EQ( + "m690s17844" + "m3086s8864" + "m586s436m586s1432m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s1432m586s436m586s436m586s1432m586s1432m586s436m586s1432" + "m586s1432m586s1432m586s1432m586s1432m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s1432m586s1432" + "m586s2886" + "m3086s8864" + "m586s1432m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s1432m586s436m586s436m586s1432m586s436m586s1432m586s1432" + "m586s1432m586s1432m586s1432m586s1432m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s2886" + "m3086s8864" + "m586s1432m586s436m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s436m586s1432m586s436m586s436m586s436m586s436m586s436m586s436" + "m586s1432m586s1432m586s1432m586s1432m586s1432m586s1432m586s1432m586s1432" + "m586s1432m586s436m586s436m586s436m586s1432m586s1432m586s1432m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s436m586s1432" + "m586s1432m586s436m586s436m586s436m586s1432m586s436m586s436m586s436" + "m586s436m586s436m586s436m586s436m586s436m586s436m586s1432m586s1432" + "m586s100000", + irsend.outputStr()); +} + +// Tests for IRSamsungAc class. + +TEST(TestIRSamsungAcClass, SetAndGetRaw) { + uint8_t expectedState[kSamsungAcStateLength] = {0x02, 0x92, 0x0F, 0x00, 0x00, + 0x00, 0xF0, 0x01, 0xE2, 0xFE, + 0x71, 0x40, 0x11, 0xF0}; + IRSamsungAc samsung(0); + samsung.setRaw(expectedState); + EXPECT_STATE_EQ(expectedState, samsung.getRaw(), kSamsungAcBits); + uint8_t extendedState[kSamsungAcExtendedStateLength] = { + 0x02, 0x92, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x01, 0xD2, 0x0F, 0x00, + 0x00, 0x00, 0x00, 0x01, 0xE2, 0xFE, 0x71, 0x40, 0x11, 0xF0}; + samsung.setRaw(extendedState, kSamsungAcExtendedStateLength); + // We should NOT get the extended state back. + EXPECT_STATE_EQ(expectedState, samsung.getRaw(), kSamsungAcBits); +} + +TEST(TestIRSamsungAcClass, SetAndGetPower) { + IRSamsungAc samsung(0); + samsung.on(); + EXPECT_TRUE(samsung.getPower()); + samsung.off(); + EXPECT_FALSE(samsung.getPower()); + samsung.setPower(true); + EXPECT_TRUE(samsung.getPower()); + samsung.setPower(false); + EXPECT_FALSE(samsung.getPower()); +} + +TEST(TestIRSamsungAcClass, SetAndGetSwing) { + IRSamsungAc samsung(0); + samsung.setSwing(true); + EXPECT_TRUE(samsung.getSwing()); + samsung.setSwing(false); + EXPECT_FALSE(samsung.getSwing()); + samsung.setSwing(true); + EXPECT_TRUE(samsung.getSwing()); + + // Real examples from: + // https://github.com/markszabo/IRremoteESP8266/issues/505#issuecomment-424036602 + // TODO(Hollako): Explain why state[9] lowest bit changes between on and off. + const uint8_t expected_off[kSamsungAcStateLength] = { + 0x02, 0x92, 0x0F, 0x00, 0x00, 0x00, 0xF0, + 0x01, 0xE2, 0xFE, 0x71, 0x80, 0x11, 0xF0}; + samsung.setRaw(expected_off); + EXPECT_FALSE(samsung.getSwing()); + const uint8_t expected_on[kSamsungAcStateLength] = { + 0x02, 0x92, 0x0F, 0x00, 0x00, 0x00, 0xF0, + 0x01, 0x02, 0xAF, 0x71, 0x80, 0x11, 0xF0}; + samsung.setRaw(expected_on); + EXPECT_TRUE(samsung.getSwing()); +} + +TEST(TestIRSamsungAcClass, SetAndGetClean) { + IRSamsungAc samsung(0); + samsung.setClean(true); + EXPECT_TRUE(samsung.getClean()); + samsung.setClean(false); + EXPECT_FALSE(samsung.getClean()); + samsung.setClean(true); + EXPECT_TRUE(samsung.getClean()); +} + +TEST(TestIRSamsungAcClass, SetAndGetBeep) { + IRSamsungAc samsung(0); + samsung.setBeep(false); + EXPECT_FALSE(samsung.getBeep()); + samsung.setBeep(true); + EXPECT_TRUE(samsung.getBeep()); + samsung.setBeep(false); + EXPECT_FALSE(samsung.getBeep()); + samsung.setBeep(true); + EXPECT_TRUE(samsung.getBeep()); +} + +TEST(TestIRSamsungAcClass, SetAndGetTemp) { + IRSamsungAc samsung(0); + samsung.setTemp(25); + EXPECT_EQ(25, samsung.getTemp()); + samsung.setTemp(kSamsungAcMinTemp); + EXPECT_EQ(kSamsungAcMinTemp, samsung.getTemp()); + samsung.setTemp(kSamsungAcMinTemp - 1); + EXPECT_EQ(kSamsungAcMinTemp, samsung.getTemp()); + samsung.setTemp(kSamsungAcMaxTemp); + EXPECT_EQ(kSamsungAcMaxTemp, samsung.getTemp()); + samsung.setTemp(kSamsungAcMaxTemp + 1); + EXPECT_EQ(kSamsungAcMaxTemp, samsung.getTemp()); +} + +TEST(TestIRSamsungAcClass, SetAndGetMode) { + IRSamsungAc samsung(0); + samsung.setMode(kSamsungAcCool); + EXPECT_EQ(kSamsungAcCool, samsung.getMode()); + EXPECT_NE(kSamsungAcFanAuto2, samsung.getFan()); + samsung.setMode(kSamsungAcHeat); + EXPECT_EQ(kSamsungAcHeat, samsung.getMode()); + EXPECT_NE(kSamsungAcFanAuto2, samsung.getFan()); + samsung.setMode(kSamsungAcAuto); + EXPECT_EQ(kSamsungAcAuto, samsung.getMode()); + EXPECT_EQ(kSamsungAcFanAuto2, samsung.getFan()); + samsung.setMode(kSamsungAcDry); + EXPECT_EQ(kSamsungAcDry, samsung.getMode()); + EXPECT_NE(kSamsungAcFanAuto2, samsung.getFan()); +} + +TEST(TestIRSamsungAcClass, SetAndGetFan) { + IRSamsungAc samsung(0); + samsung.setMode(kSamsungAcCool); // Most fan modes avail in this setting. + samsung.setFan(kSamsungAcFanAuto); + EXPECT_EQ(kSamsungAcFanAuto, samsung.getFan()); + samsung.setFan(kSamsungAcFanLow); + EXPECT_EQ(kSamsungAcFanLow, samsung.getFan()); + samsung.setFan(kSamsungAcFanAuto2); // Not available in Cool mode. + EXPECT_EQ(kSamsungAcFanLow, samsung.getFan()); // Shouldn't change. + samsung.setMode(kSamsungAcAuto); // Has special fan setting. + EXPECT_EQ(kSamsungAcFanAuto2, samsung.getFan()); + samsung.setFan(kSamsungAcFanLow); // Shouldn't be available in Auto mode. + EXPECT_EQ(kSamsungAcFanAuto2, samsung.getFan()); + samsung.setMode(kSamsungAcHeat); // Most fan modes avail in this setting. + samsung.setFan(kSamsungAcFanHigh); + EXPECT_EQ(kSamsungAcFanHigh, samsung.getFan()); +} + +TEST(TestIRSamsungAcClass, SetAndGetQuiet) { + IRSamsungAc samsung(0); + samsung.setQuiet(false); + EXPECT_FALSE(samsung.getQuiet()); + samsung.setFan(kSamsungAcFanHigh); + samsung.setQuiet(true); + EXPECT_TRUE(samsung.getQuiet()); + EXPECT_EQ(kSamsungAcFanAuto, samsung.getFan()); + samsung.setQuiet(false); + EXPECT_FALSE(samsung.getQuiet()); +} + +TEST(TestIRSamsungAcClass, ChecksumCalculation) { + IRSamsungAc samsung(0); + + const uint8_t originalstate[kSamsungAcStateLength] = { + 0x02, 0x92, 0x0F, 0x00, 0x00, 0x00, 0xF0, + 0x01, 0x02, 0xAF, 0x71, 0x00, 0x15, 0xF0}; + uint8_t examplestate[kSamsungAcStateLength] = {0x02, 0x92, 0x0F, 0x00, 0x00, + 0x00, 0xF0, 0x01, 0x02, 0xAF, + 0x71, 0x00, 0x15, 0xF0}; + + EXPECT_TRUE(IRSamsungAc::validChecksum(examplestate)); + EXPECT_EQ(0, IRSamsungAc::calcChecksum(examplestate)); + + examplestate[8] = 0x12; // Set an incoorect checksum. + EXPECT_FALSE(IRSamsungAc::validChecksum(examplestate)); + EXPECT_EQ(0, IRSamsungAc::calcChecksum(examplestate)); + samsung.setRaw(examplestate); + // Extracting the state from the object should have a correct checksum. + EXPECT_TRUE(IRSamsungAc::validChecksum(samsung.getRaw())); + EXPECT_STATE_EQ(originalstate, samsung.getRaw(), kSamsungAcBits); + examplestate[8] = 0x02; // Restore old checksum value. + + // Change the state to force a different checksum. + examplestate[11] = 0x01; + EXPECT_FALSE(IRSamsungAc::validChecksum(examplestate)); + EXPECT_EQ(0xF, IRSamsungAc::calcChecksum(examplestate)); +} + +TEST(TestIRSamsungAcClass, HumanReadable) { + IRSamsungAc samsung(0); + EXPECT_EQ( + "Power: On, Mode: 1 (COOL), Temp: 16C, Fan: 2 (LOW), Swing: On, " + "Beep: Off, Clean: Off, Quiet: Off", + samsung.toString()); + samsung.setTemp(kSamsungAcMaxTemp); + samsung.setMode(kSamsungAcHeat); + samsung.off(); + samsung.setFan(kSamsungAcFanHigh); + samsung.setSwing(false); + samsung.setBeep(true); + samsung.setClean(true); + EXPECT_EQ( + "Power: Off, Mode: 4 (HEAT), Temp: 30C, Fan: 5 (HIGH), Swing: Off, " + "Beep: On, Clean: On, Quiet: Off", + samsung.toString()); + samsung.setQuiet(true); + EXPECT_EQ( + "Power: Off, Mode: 4 (HEAT), Temp: 30C, Fan: 0 (AUTO), Swing: Off, " + "Beep: On, Clean: On, Quiet: On", + samsung.toString()); +} + +TEST(TestIRSamsungAcClass, GeneralConstruction) { + IRSamsungAc samsung(0); + + uint8_t OnCoolFAutoBOffCOffQOffT20Soff[kSamsungAcStateLength] = { + 0x02, 0x92, 0x0F, 0x00, 0x00, 0x00, 0xF0, + 0x01, 0xE2, 0xFE, 0x71, 0x40, 0x11, 0xF0}; + + samsung.setPower(true); + samsung.setMode(kSamsungAcCool); + samsung.setFan(kSamsungAcFanAuto); + samsung.setSwing(false); + samsung.setBeep(false); + samsung.setClean(false); + samsung.setQuiet(false); + samsung.setTemp(20); + EXPECT_STATE_EQ(OnCoolFAutoBOffCOffQOffT20Soff, samsung.getRaw(), + kSamsungAcBits); + /* Disabled until we understand why LSB bit of the swing byte changes. + // TODO(Hollako): Explain why sometimes the LSB of state[9] is a 1. + // e.g. 0xAE or 0XAF for swing move. + uint8_t OnHeatFAutoBOffCOffQOffT17Son[kSamsungAcStateLength] = { + 0x02, 0x92, 0x0F, 0x00, 0x00, 0x00, 0xF0, + 0x01, 0x02, 0xAF, 0x71, 0x10, 0x41, 0xF0}; + samsung.setPower(true); + samsung.setMode(kSamsungAcHeat); + samsung.setFan(kSamsungAcFanAuto); + samsung.setSwing(true); + samsung.setBeep(false); + samsung.setClean(false); + samsung.setQuiet(false); + samsung.setTemp(17); + EXPECT_STATE_EQ(OnHeatFAutoBOffCOffQOffT17Son, samsung.getRaw(), + kSamsungAcBits); + */ +} +// Tests for decodeSamsungAC(). + +// Decode normal SamsungAC messages. +TEST(TestDecodeSamsungAC, SyntheticDecode) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + irsend.reset(); + uint8_t expectedState[kSamsungAcStateLength] = {0x02, 0x92, 0x0F, 0x00, 0x00, + 0x00, 0xF0, 0x01, 0x02, 0xAF, + 0x71, 0x00, 0x15, 0xF0}; + // Synthesised Normal Samsung A/C message. + irsend.sendSamsungAC(expectedState); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(SAMSUNG_AC, irsend.capture.decode_type); + EXPECT_EQ(kSamsungAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); +} + +// Decode a real Samsung A/C example from Issue #505 +TEST(TestDecodeSamsungAC, DecodeRealExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Samsung A/C example from Issue #505 + uint16_t rawData[233] = { + 690, 17844, 3084, 8864, 606, 406, 586, 1410, 580, 436, 570, 424, + 570, 426, 570, 404, 596, 418, 580, 416, 584, 410, 586, 1402, + 588, 408, 586, 410, 584, 1380, 610, 408, 586, 408, 586, 1404, + 586, 1404, 586, 1408, 594, 1396, 596, 1394, 602, 418, 582, 410, + 586, 408, 584, 408, 586, 408, 586, 410, 586, 408, 586, 410, + 586, 408, 586, 408, 586, 408, 586, 408, 586, 410, 584, 436, + 558, 436, 570, 424, 570, 424, 574, 420, 578, 416, 582, 412, + 586, 410, 586, 408, 584, 410, 586, 408, 586, 410, 584, 410, + 584, 408, 586, 408, 586, 410, 586, 408, 586, 412, 584, 436, + 556, 1410, 592, 1396, 602, 1390, 608, 1384, 608, 2886, 3086, 8858, + 610, 1380, 610, 410, 586, 408, 586, 410, 586, 408, 586, 410, + 586, 408, 586, 436, 558, 436, 554, 1410, 594, 426, 572, 422, + 578, 418, 582, 412, 586, 410, 584, 410, 586, 1380, 610, 1382, + 608, 1404, 586, 1404, 586, 408, 586, 1432, 558, 436, 554, 1414, + 590, 1398, 602, 418, 580, 414, 586, 410, 584, 1382, 606, 1382, + 608, 1382, 608, 408, 586, 408, 586, 408, 586, 408, 586, 410, + 584, 436, 560, 434, 570, 426, 566, 430, 568, 1400, 600, 416, + 584, 1406, 586, 410, 584, 1384, 606, 410, 586, 410, 584, 408, + 586, 408, 586, 408, 586, 408, 588, 410, 584, 1408, 590, 1400, + 592, 1398, 602, 1388, 612}; + uint8_t expectedState[kSamsungAcStateLength] = {0x02, 0x92, 0x0F, 0x00, 0x00, + 0x00, 0xF0, 0x01, 0x02, 0xAF, + 0x71, 0x00, 0x15, 0xF0}; + + irsend.sendRaw(rawData, 233, 38000); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(SAMSUNG_AC, irsend.capture.decode_type); + EXPECT_EQ(kSamsungAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + + IRSamsungAc samsung(0); + samsung.setRaw(irsend.capture.state); + EXPECT_EQ( + "Power: On, Mode: 1 (COOL), Temp: 16C, Fan: 2 (LOW), Swing: On, " + "Beep: Off, Clean: Off, Quiet: Off", + samsung.toString()); +} + +// Decode a real Samsung A/C example from Issue #505 +TEST(TestDecodeSamsungAC, DecodeRealExample2) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Samsung A/C example from Issue #505 + uint16_t rawData[233] = { + 668, 17834, 3092, 8862, 608, 410, 586, 1378, 612, 410, 584, 410, + 586, 410, 584, 410, 586, 408, 586, 408, 586, 410, 586, 1404, + 588, 436, 558, 436, 570, 1398, 592, 424, 576, 420, 578, 1388, + 608, 1382, 610, 1382, 608, 1380, 610, 1384, 606, 408, 586, 408, + 588, 408, 588, 408, 586, 436, 558, 436, 570, 424, 570, 426, + 572, 422, 578, 418, 582, 412, 586, 408, 586, 410, 584, 410, + 584, 410, 584, 410, 586, 410, 586, 408, 586, 408, 586, 408, + 586, 408, 586, 408, 586, 438, 558, 436, 568, 426, 570, 424, + 574, 422, 576, 418, 582, 414, 584, 410, 586, 410, 584, 410, + 586, 1380, 610, 1382, 608, 1404, 586, 1404, 602, 2872, 3096, 8878, + 582, 1432, 570, 426, 568, 426, 574, 420, 578, 416, 582, 412, + 586, 410, 584, 410, 586, 410, 586, 1382, 608, 410, 586, 410, + 586, 408, 586, 1404, 586, 1408, 582, 1410, 590, 428, 568, 1400, + 598, 1394, 606, 1382, 610, 1382, 608, 1378, 612, 1382, 608, 1384, + 606, 1404, 586, 408, 586, 414, 582, 436, 558, 1410, 590, 1422, + 576, 1390, 608, 410, 586, 410, 586, 410, 584, 410, 584, 410, + 586, 410, 586, 410, 584, 410, 586, 1404, 586, 1404, 588, 436, + 560, 436, 486, 510, 566, 1400, 598, 420, 576, 418, 582, 414, + 586, 410, 584, 410, 584, 410, 586, 410, 584, 1382, 608, 1384, + 606, 1384, 606, 1408, 600}; + uint8_t expectedState[kSamsungAcStateLength] = {0x02, 0x92, 0x0F, 0x00, 0x00, + 0x00, 0xF0, 0x01, 0xE2, 0xFE, + 0x71, 0x80, 0x11, 0xF0}; + + irsend.sendRaw(rawData, 233, 38000); + irsend.makeDecodeResult(); + + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(SAMSUNG_AC, irsend.capture.decode_type); + EXPECT_EQ(kSamsungAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + + IRSamsungAc samsung(0); + samsung.setRaw(irsend.capture.state); + EXPECT_EQ( + "Power: On, Mode: 1 (COOL), Temp: 24C, Fan: 0 (AUTO), Swing: Off, " + "Beep: Off, Clean: Off, Quiet: Off", + samsung.toString()); +} + +// Decode a real Samsung A/C example from: +// https://github.com/markszabo/IRremoteESP8266/issues/505#issuecomment-424036602 +TEST(TestDecodeSamsungAC, DecodePowerOnSample) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + uint16_t rawData[349] = { + 662, 17870, 3026, 8966, 540, 484, 514, 1482, 518, 482, 514, 482, + 518, 482, 516, 510, 490, 508, 490, 508, 572, 428, 576, 1398, + 542, 482, 514, 484, 514, 1460, 540, 482, 518, 482, 516, 1456, + 544, 1480, 518, 1480, 518, 1480, 518, 1484, 514, 510, 566, 432, + 576, 424, 574, 426, 540, 458, 516, 482, 516, 482, 516, 482, + 518, 480, 518, 482, 518, 482, 518, 482, 516, 482, 518, 482, + 516, 482, 518, 480, 516, 508, 492, 508, 490, 508, 572, 428, + 576, 422, 572, 428, 542, 456, 514, 484, 518, 480, 518, 480, + 518, 480, 516, 482, 516, 482, 520, 478, 518, 482, 518, 480, + 518, 1480, 518, 1480, 516, 1484, 594, 1428, 518, 2964, 3032, 8964, + 540, 1458, 542, 480, 518, 480, 520, 480, 518, 482, 520, 480, + 520, 478, 518, 480, 520, 478, 520, 1478, 522, 478, 518, 506, + 494, 1484, 594, 426, 574, 1400, 564, 1434, 540, 1454, 544, 1478, + 520, 1454, 544, 1458, 540, 480, 520, 480, 518, 480, 520, 480, + 518, 508, 490, 506, 568, 432, 572, 426, 576, 424, 544, 454, + 518, 480, 516, 482, 520, 478, 520, 478, 522, 478, 518, 480, + 520, 478, 520, 478, 520, 478, 520, 478, 520, 478, 518, 478, + 522, 506, 494, 504, 566, 432, 576, 424, 576, 424, 570, 428, + 518, 482, 518, 480, 518, 482, 520, 478, 520, 478, 520, 480, + 520, 478, 520, 478, 520, 2964, 3032, 8986, 520, 1478, 520, 506, + 492, 506, 492, 506, 568, 430, 574, 424, 546, 454, 516, 482, + 518, 482, 518, 1456, 544, 478, 546, 452, 520, 478, 544, 1432, + 542, 1478, 520, 1478, 520, 478, 520, 1482, 586, 1412, 598, 1400, + 564, 1432, 540, 1458, 544, 1454, 544, 1454, 544, 1456, 542, 480, + 518, 480, 520, 480, 520, 1462, 536, 1482, 588, 1410, 598, 424, + 572, 426, 542, 456, 518, 482, 520, 478, 520, 478, 522, 478, + 520, 478, 520, 1456, 542, 1458, 540, 478, 520, 478, 520, 478, + 520, 1482, 540, 482, 568, 430, 576, 424, 570, 428, 542, 458, + 518, 480, 520, 480, 520, 1454, 568, 1430, 566, 1432, 566, 1454, + 594}; + uint8_t expectedState[kSamsungAcExtendedStateLength] = { + 0x02, 0x92, 0x0F, 0x00, 0x00, 0x00, 0xF0, 0x01, 0xD2, 0x0F, 0x00, + 0x00, 0x00, 0x00, 0x01, 0xE2, 0xFE, 0x71, 0x80, 0x11, 0xF0}; + + irsend.sendRaw(rawData, 349, 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(SAMSUNG_AC, irsend.capture.decode_type); + EXPECT_EQ(kSamsungAcExtendedBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + + IRSamsungAc samsung(0); + samsung.setRaw(irsend.capture.state, kSamsungAcExtendedStateLength); + EXPECT_EQ( + "Power: On, Mode: 1 (COOL), Temp: 24C, Fan: 0 (AUTO), Swing: Off, " + "Beep: Off, Clean: Off, Quiet: Off", + samsung.toString()); +} + +// Decode a real Samsung A/C example from: +// https://github.com/markszabo/IRremoteESP8266/issues/505#issuecomment-424036602 +TEST(TestDecodeSamsungAC, DecodePowerOffSample) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + uint16_t rawData[349] = { + 670, 17802, 3096, 8898, 602, 420, 580, 1418, 582, 418, 582, 416, + 582, 416, 584, 442, 550, 448, 568, 430, 570, 430, 576, 1396, + 600, 424, 546, 452, 578, 1394, 604, 1396, 600, 420, 580, 1398, + 602, 1416, 586, 1412, 582, 1420, 576, 1422, 592, 428, 574, 424, + 576, 422, 578, 420, 548, 452, 578, 420, 578, 420, 584, 416, + 580, 418, 580, 418, 582, 418, 580, 418, 582, 414, 584, 414, + 584, 416, 582, 418, 584, 442, 558, 442, 568, 430, 576, 424, + 578, 420, 576, 424, 576, 422, 580, 420, 584, 414, 584, 416, + 584, 414, 582, 418, 580, 418, 582, 416, 582, 416, 584, 414, + 584, 414, 586, 442, 554, 1420, 570, 1452, 578, 2884, 3120, 8898, + 596, 1400, 602, 422, 582, 418, 584, 414, 582, 416, 584, 414, + 584, 416, 582, 416, 584, 416, 584, 1410, 586, 414, 582, 444, + 556, 1420, 590, 432, 572, 1402, 602, 1396, 600, 1398, 606, 1414, + 582, 1394, 604, 1394, 604, 414, 584, 414, 586, 412, 586, 410, + 586, 442, 556, 440, 544, 456, 568, 430, 576, 424, 578, 420, + 578, 420, 576, 424, 584, 412, 586, 412, 586, 412, 584, 414, + 586, 412, 584, 414, 586, 412, 586, 412, 586, 414, 586, 412, + 584, 442, 558, 442, 558, 440, 566, 432, 574, 424, 578, 422, + 576, 422, 578, 420, 586, 414, 586, 414, 586, 412, 584, 414, + 586, 414, 586, 414, 586, 2902, 3096, 8900, 600, 1416, 586, 442, + 556, 442, 558, 440, 564, 434, 572, 428, 578, 420, 580, 420, + 578, 420, 584, 1392, 608, 414, 586, 414, 582, 414, 586, 412, + 586, 412, 586, 414, 584, 1394, 606, 1416, 580, 1418, 568, 1432, + 594, 1402, 602, 1398, 606, 1392, 606, 1390, 608, 1390, 608, 414, + 584, 414, 586, 414, 584, 1412, 586, 1398, 600, 1418, 590, 430, + 566, 432, 576, 422, 578, 420, 578, 422, 582, 416, 586, 414, + 586, 412, 584, 1390, 606, 1392, 608, 414, 586, 412, 584, 412, + 588, 1410, 586, 442, 558, 440, 568, 430, 566, 434, 574, 426, + 578, 420, 578, 420, 582, 416, 586, 412, 586, 1390, 608, 1390, + 608}; + + uint8_t expectedState[kSamsungAcExtendedStateLength] = { + 0x02, 0xB2, 0x0F, 0x00, 0x00, 0x00, 0xC0, 0x01, 0xD2, 0x0F, 0x00, + 0x00, 0x00, 0x00, 0x01, 0x02, 0xFF, 0x71, 0x80, 0x11, 0xC0}; + + irsend.sendRaw(rawData, 349, 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(SAMSUNG_AC, irsend.capture.decode_type); + EXPECT_EQ(kSamsungAcExtendedBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + + IRSamsungAc samsung(0); + samsung.setRaw(irsend.capture.state, kSamsungAcExtendedStateLength); + EXPECT_EQ( + "Power: Off, Mode: 1 (COOL), Temp: 24C, Fan: 0 (AUTO), Swing: Off, " + "Beep: Off, Clean: Off, Quiet: Off", + samsung.toString()); +} + +TEST(TestDecodeSamsungAC, DecodeHeatSample) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + uint16_t rawData[233] = { + 650, 16260, 3014, 8934, 534, 486, 508, 1478, 514, 484, 510, 486, + 508, 512, 484, 510, 562, 432, 572, 422, 540, 454, 514, 1452, + 534, 486, 510, 484, 510, 1456, 536, 484, 510, 484, 510, 1454, + 536, 1478, 512, 1476, 514, 1482, 508, 1482, 592, 428, 570, 424, + 538, 456, 508, 486, 510, 484, 512, 484, 510, 486, 510, 484, + 510, 484, 510, 486, 510, 484, 510, 484, 510, 484, 510, 484, + 510, 484, 510, 486, 508, 510, 484, 510, 568, 428, 570, 424, + 538, 458, 512, 482, 510, 486, 510, 484, 510, 484, 510, 484, + 510, 484, 510, 484, 510, 484, 510, 484, 510, 484, 510, 484, + 510, 1474, 516, 1502, 534, 1432, 594, 1398, 536, 2954, 3018, 8932, + 536, 1458, 532, 484, 510, 484, 512, 484, 510, 484, 510, 484, + 510, 484, 512, 484, 510, 484, 510, 1480, 508, 510, 530, 464, + 568, 426, 568, 426, 514, 480, 508, 486, 508, 1456, 534, 1478, + 514, 1452, 538, 1478, 512, 484, 510, 1456, 534, 486, 510, 1478, + 512, 1480, 570, 450, 570, 424, 540, 454, 512, 1452, 534, 1458, + 534, 1454, 536, 484, 512, 482, 512, 484, 512, 484, 512, 482, + 512, 1474, 514, 484, 512, 510, 486, 508, 534, 1430, 594, 426, + 512, 482, 512, 482, 510, 484, 512, 482, 512, 1452, 538, 482, + 512, 482, 512, 482, 510, 484, 510, 484, 510, 1478, 512, 1504, + 488, 1480, 560, 1454, 514}; + + uint8_t expectedState[kSamsungAcStateLength] = {0x02, 0x92, 0x0F, 0x00, 0x00, + 0x00, 0xF0, 0x01, 0x02, 0xAF, + 0x71, 0x10, 0x41, 0xF0}; + + irsend.sendRaw(rawData, 233, 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(SAMSUNG_AC, irsend.capture.decode_type); + EXPECT_EQ(kSamsungAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + + IRSamsungAc samsung(0); + samsung.setRaw(irsend.capture.state); + EXPECT_EQ( + "Power: On, Mode: 4 (HEAT), Temp: 17C, Fan: 0 (AUTO), Swing: On, " + "Beep: Off, Clean: Off, Quiet: Off", + samsung.toString()); +} + +TEST(TestDecodeSamsungAC, DecodeCoolSample) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + uint16_t rawData[233] = { + 690, 17854, 3086, 8862, 610, 410, 584, 1382, 610, 410, 586, 408, + 586, 408, 586, 408, 588, 410, 584, 436, 558, 436, 570, 1396, + 598, 422, 576, 418, 580, 1384, 612, 410, 586, 410, 584, 1380, + 612, 1382, 608, 1384, 606, 1404, 586, 1404, 586, 436, 558, 438, + 566, 428, 568, 426, 570, 424, 576, 418, 578, 416, 584, 410, + 586, 408, 584, 410, 586, 408, 586, 408, 586, 410, 586, 408, + 586, 408, 588, 408, 586, 408, 588, 408, 586, 438, 558, 436, + 568, 426, 568, 428, 568, 426, 576, 418, 578, 416, 584, 412, + 584, 410, 586, 408, 586, 410, 586, 410, 584, 410, 586, 408, + 586, 1384, 606, 1402, 588, 1410, 580, 1410, 608, 2864, 3108, 8864, + 594, 1394, 604, 416, 584, 410, 586, 410, 586, 410, 586, 410, + 584, 410, 586, 410, 586, 408, 586, 1404, 588, 408, 586, 408, + 586, 436, 560, 1408, 592, 1400, 596, 1396, 600, 416, 584, 1382, + 608, 1380, 610, 1404, 586, 1384, 608, 1384, 606, 1402, 588, 1408, + 582, 1410, 564, 452, 568, 428, 572, 424, 576, 1414, 582, 1386, + 608, 1382, 608, 410, 584, 410, 584, 410, 586, 408, 586, 408, + 586, 408, 586, 408, 588, 1408, 582, 436, 540, 1426, 590, 428, + 574, 420, 578, 418, 580, 1384, 610, 410, 584, 410, 584, 410, + 584, 412, 584, 408, 586, 410, 586, 408, 586, 1404, 586, 1408, + 582, 1410, 562, 1426, 610}; + + uint8_t expectedState[kSamsungAcStateLength] = {0x02, 0x92, 0x0F, 0x00, 0x00, + 0x00, 0xF0, 0x01, 0xE2, 0xFE, + 0x71, 0x40, 0x11, 0xF0}; + + irsend.sendRaw(rawData, 233, 38000); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(SAMSUNG_AC, irsend.capture.decode_type); + EXPECT_EQ(kSamsungAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); + + IRSamsungAc samsung(0); + samsung.setRaw(irsend.capture.state); + EXPECT_EQ( + "Power: On, Mode: 1 (COOL), Temp: 20C, Fan: 0 (AUTO), Swing: Off, " + "Beep: Off, Clean: Off, Quiet: Off", + samsung.toString()); +} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Sanyo_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Sanyo_test.cpp similarity index 63% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_Sanyo_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_Sanyo_test.cpp index 9442f3db5..14c1c7da0 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Sanyo_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Sanyo_test.cpp @@ -4,7 +4,6 @@ #include "IRsend_test.h" #include "gtest/gtest.h" - // Tests for encodeSanyoLC7461(). TEST(TestEncodeSanyoLC7461, NormalEncoding) { @@ -34,7 +33,8 @@ TEST(TestEncodeSanyoLC7461, SendDataOnly) { "m560s560m560s1680m560s560m560s560m560s1680m560s1680m560s1680m560s1680" "m560s1680m560s1680m560s560m560s560m560s560m560s560m560s560m560s560" "m560s560m560s560m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" - "m560s1680m560s1680m560s108080", irsend.outputStr()); + "m560s1680m560s1680m560s23520", + irsend.outputStr()); } // Test sending with different repeats. @@ -43,7 +43,7 @@ TEST(TestEncodeSanyoLC7461, SendWithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendSanyoLC7461(0x1D8113F00FF, SANYO_LC7461_BITS, 1); // 1 repeat. + irsend.sendSanyoLC7461(0x1D8113F00FF, kSanyoLC7461Bits, 1); // 1 repeat. EXPECT_EQ( "m8960s4480" "m560s560m560s1680m560s1680m560s1680m560s560m560s1680m560s1680m560s560" @@ -51,8 +51,9 @@ TEST(TestEncodeSanyoLC7461, SendWithRepeats) { "m560s560m560s1680m560s560m560s560m560s1680m560s1680m560s1680m560s1680" "m560s1680m560s1680m560s560m560s560m560s560m560s560m560s560m560s560" "m560s560m560s560m560s1680m560s1680m560s1680m560s1680m560s1680m560s1680" - "m560s1680m560s1680m560s108080" - "m8960s2240m560s108080", irsend.outputStr()); + "m560s1680m560s1680m560s23520" + "m8960s2240m560s96320", + irsend.outputStr()); } // Tests for decodeSanyoLC7461(). @@ -67,10 +68,10 @@ TEST(TestDecodeSanyoLC7461, NormalDecodeWithStrict) { irsend.reset(); irsend.sendSanyoLC7461(0x1D8113F00FF); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSanyoLC7461(&irsend.capture, SANYO_LC7461_BITS, - true)); + ASSERT_TRUE( + irrecv.decodeSanyoLC7461(&irsend.capture, kSanyoLC7461Bits, true)); EXPECT_EQ(SANYO_LC7461, irsend.capture.decode_type); - EXPECT_EQ(SANYO_LC7461_BITS, irsend.capture.bits); + EXPECT_EQ(kSanyoLC7461Bits, irsend.capture.bits); EXPECT_EQ(0x1D8113F00FF, irsend.capture.value); EXPECT_EQ(0xEC0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -80,10 +81,10 @@ TEST(TestDecodeSanyoLC7461, NormalDecodeWithStrict) { irsend.reset(); irsend.sendSanyoLC7461(irsend.encodeSanyoLC7461(0x1234, 0x56)); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSanyoLC7461(&irsend.capture, SANYO_LC7461_BITS, - true)); + ASSERT_TRUE( + irrecv.decodeSanyoLC7461(&irsend.capture, kSanyoLC7461Bits, true)); EXPECT_EQ(SANYO_LC7461, irsend.capture.decode_type); - EXPECT_EQ(SANYO_LC7461_BITS, irsend.capture.bits); + EXPECT_EQ(kSanyoLC7461Bits, irsend.capture.bits); EXPECT_EQ(0x2468DCB56A9, irsend.capture.value); EXPECT_EQ(0x1234, irsend.capture.address); EXPECT_EQ(0x56, irsend.capture.command); @@ -93,10 +94,10 @@ TEST(TestDecodeSanyoLC7461, NormalDecodeWithStrict) { irsend.reset(); irsend.sendSanyoLC7461(irsend.encodeSanyoLC7461(0x1, 0x1)); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSanyoLC7461(&irsend.capture, SANYO_LC7461_BITS, - true)); + ASSERT_TRUE( + irrecv.decodeSanyoLC7461(&irsend.capture, kSanyoLC7461Bits, true)); EXPECT_EQ(SANYO_LC7461, irsend.capture.decode_type); - EXPECT_EQ(SANYO_LC7461_BITS, irsend.capture.bits); + EXPECT_EQ(kSanyoLC7461Bits, irsend.capture.bits); EXPECT_EQ(0x3FFE01FE, irsend.capture.value); EXPECT_EQ(0x1, irsend.capture.address); EXPECT_EQ(0x1, irsend.capture.command); @@ -111,12 +112,12 @@ TEST(TestDecodeSanyoLC7461, NormalDecodeWithRepeatAndStrict) { // Normal Sanyo LC7461 16-bit message with 1 repeat. irsend.reset(); - irsend.sendSanyoLC7461(0x3FFE01FE, SANYO_LC7461_BITS, 1); + irsend.sendSanyoLC7461(0x3FFE01FE, kSanyoLC7461Bits, 1); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSanyoLC7461(&irsend.capture, SANYO_LC7461_BITS, - true)); + ASSERT_TRUE( + irrecv.decodeSanyoLC7461(&irsend.capture, kSanyoLC7461Bits, true)); EXPECT_EQ(SANYO_LC7461, irsend.capture.decode_type); - EXPECT_EQ(SANYO_LC7461_BITS, irsend.capture.bits); + EXPECT_EQ(kSanyoLC7461Bits, irsend.capture.bits); EXPECT_EQ(0x3FFE01FE, irsend.capture.value); EXPECT_EQ(0x1, irsend.capture.address); EXPECT_EQ(0x1, irsend.capture.command); @@ -133,13 +134,13 @@ TEST(TestDecodeSanyoLC7461, DecodeWithNonStrictValues) { irsend.sendSanyoLC7461(0x0); // Illegal value Sanyo LC7461 message. irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeSanyoLC7461(&irsend.capture, SANYO_LC7461_BITS, - true)); + ASSERT_FALSE( + irrecv.decodeSanyoLC7461(&irsend.capture, kSanyoLC7461Bits, true)); // Should pass if strict off. - ASSERT_TRUE(irrecv.decodeSanyoLC7461(&irsend.capture, SANYO_LC7461_BITS, - false)); + ASSERT_TRUE( + irrecv.decodeSanyoLC7461(&irsend.capture, kSanyoLC7461Bits, false)); EXPECT_EQ(SANYO_LC7461, irsend.capture.decode_type); - EXPECT_EQ(SANYO_LC7461_BITS, irsend.capture.bits); + EXPECT_EQ(kSanyoLC7461Bits, irsend.capture.bits); EXPECT_EQ(0x0, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -148,22 +149,20 @@ TEST(TestDecodeSanyoLC7461, DecodeWithNonStrictValues) { // Illegal value Sanyo LC7461 42-bit message. irsend.sendSanyoLC7461(0x1234567890A); irsend.makeDecodeResult(); - ASSERT_FALSE(irrecv.decodeSanyoLC7461(&irsend.capture, SANYO_LC7461_BITS, - true)); + ASSERT_FALSE( + irrecv.decodeSanyoLC7461(&irsend.capture, kSanyoLC7461Bits, true)); // Should fail with strict when we ask for the wrong bit size. - ASSERT_FALSE(irrecv.decodeSanyoLC7461(&irsend.capture, 32, - true)); - ASSERT_FALSE(irrecv.decodeSanyoLC7461(&irsend.capture, 64, - true)); + ASSERT_FALSE(irrecv.decodeSanyoLC7461(&irsend.capture, 32, true)); + ASSERT_FALSE(irrecv.decodeSanyoLC7461(&irsend.capture, 64, true)); // And should fail for a bad value. - ASSERT_FALSE(irrecv.decodeSanyoLC7461(&irsend.capture, SANYO_LC7461_BITS, - true)); + ASSERT_FALSE( + irrecv.decodeSanyoLC7461(&irsend.capture, kSanyoLC7461Bits, true)); // Should pass if strict off. - ASSERT_TRUE(irrecv.decodeSanyoLC7461(&irsend.capture, SANYO_LC7461_BITS, - false)); + ASSERT_TRUE( + irrecv.decodeSanyoLC7461(&irsend.capture, kSanyoLC7461Bits, false)); EXPECT_EQ(SANYO_LC7461, irsend.capture.decode_type); - EXPECT_EQ(SANYO_LC7461_BITS, irsend.capture.bits); + EXPECT_EQ(kSanyoLC7461Bits, irsend.capture.bits); EXPECT_EQ(0x1234567890A, irsend.capture.value); EXPECT_EQ(0x91A, irsend.capture.address); EXPECT_EQ(0x89, irsend.capture.command); @@ -193,33 +192,33 @@ TEST(TestDecodeSanyoLC7461, Decode64BitMessages) { // Decode a 'real' example via GlobalCache TEST(TestDecodeSanyoLC7461, DecodeGlobalCacheExample) { -IRsendTest irsend(4); -IRrecv irrecv(4); -irsend.begin(); + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); -irsend.reset(); -uint16_t gc_test[95] = {38000, 1, 89, 342, 171, 21, 21, 21, 64, 21, 64, - 21, 64, 21, 21, 21, 64, 21, 64, 21, 21, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 64, 21, 21, - 21, 21, 21, 21, 21, 64, 21, 21, 21, 21, 21, 64, - 21, 64, 21, 64, 21, 64, 21, 64, 21, 64, 21, 21, - 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, - 21, 21, 21, 64, 21, 64, 21, 64, 21, 64, 21, 64, - 21, 64, 21, 64, 21, 64, 21, 875, 342, 171, 21, 3565}; -irsend.sendGC(gc_test, 95); -irsend.makeDecodeResult(); + irsend.reset(); + uint16_t gc_test[95] = { + 38000, 1, 89, 342, 171, 21, 21, 21, 64, 21, 64, 21, 64, 21, 21, 21, + 64, 21, 64, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, + 64, 21, 21, 21, 21, 21, 21, 21, 64, 21, 21, 21, 21, 21, 64, 21, + 64, 21, 64, 21, 64, 21, 64, 21, 64, 21, 21, 21, 21, 21, 21, 21, + 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 64, 21, 64, 21, 64, 21, + 64, 21, 64, 21, 64, 21, 64, 21, 64, 21, 875, 342, 171, 21, 3565}; + irsend.sendGC(gc_test, 95); + irsend.makeDecodeResult(); -ASSERT_TRUE(irrecv.decodeSanyoLC7461(&irsend.capture, SANYO_LC7461_BITS, true)); -EXPECT_EQ(SANYO_LC7461, irsend.capture.decode_type); -EXPECT_EQ(SANYO_LC7461_BITS, irsend.capture.bits); -EXPECT_EQ(0x1D8113F00FF, irsend.capture.value); -EXPECT_EQ(0xEC0, irsend.capture.address); -EXPECT_EQ(0x0, irsend.capture.command); -EXPECT_FALSE(irsend.capture.repeat); + ASSERT_TRUE( + irrecv.decodeSanyoLC7461(&irsend.capture, kSanyoLC7461Bits, true)); + EXPECT_EQ(SANYO_LC7461, irsend.capture.decode_type); + EXPECT_EQ(kSanyoLC7461Bits, irsend.capture.bits); + EXPECT_EQ(0x1D8113F00FF, irsend.capture.value); + EXPECT_EQ(0xEC0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + EXPECT_FALSE(irsend.capture.repeat); -// Confirm what the 42-bit NEC decode is. -ASSERT_TRUE(irrecv.decodeNEC(&irsend.capture, 42, false)); -EXPECT_EQ(0x1D8113F00FF, irsend.capture.value); + // Confirm what the 42-bit NEC decode is. + ASSERT_TRUE(irrecv.decodeNEC(&irsend.capture, 42, false)); + EXPECT_EQ(0x1D8113F00FF, irsend.capture.value); } // Fail to decode a non-Sanyo LC7461 example via GlobalCache @@ -230,13 +229,14 @@ TEST(TestDecodeSanyoLC7461, FailToDecodeNonSanyoLC7461Example) { irsend.reset(); // Modified a few entries to unexpected values, based on previous test case. - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeSanyoLC7461(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeSanyoLC7461(&irsend.capture, SANYO_LC7461_BITS, - false)); + ASSERT_FALSE( + irrecv.decodeSanyoLC7461(&irsend.capture, kSanyoLC7461Bits, false)); } diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Sharp_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Sharp_test.cpp similarity index 79% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_Sharp_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_Sharp_test.cpp index 0329b4e27..8481a4649 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Sharp_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Sharp_test.cpp @@ -37,7 +37,6 @@ TEST(TestEncodeSharp, AdvancedEncoding) { EXPECT_EQ(0x454A, irsend.encodeSharp(0x11, 0x52, 1, 0, true)); } - // Tests for sendSharp(). // Test sending typical data only. @@ -53,7 +52,8 @@ TEST(TestSendSharp, SendDataOnly) { "m260s43602" "m260s1820m260s780m260s780m260s780m260s1820m260s1820m260s780m260s1820" "m260s780m260s1820m260s1820m260s780m260s1820m260s780m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); } // Test sending with different repeats. @@ -62,7 +62,7 @@ TEST(TestSendSharp, SendWithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendSharp(0x11, 0x52, SHARP_BITS, 1); // 1 repeat. + irsend.sendSharp(0x11, 0x52, kSharpBits, 1); // 1 repeat. EXPECT_EQ( "m260s1820m260s780m260s780m260s780m260s1820m260s780m260s1820m260s780" "m260s1820m260s780m260s780m260s1820m260s780m260s1820m260s780" @@ -75,7 +75,8 @@ TEST(TestSendSharp, SendWithRepeats) { "m260s43602" "m260s1820m260s780m260s780m260s780m260s1820m260s1820m260s780m260s1820" "m260s780m260s1820m260s1820m260s780m260s1820m260s780m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); } // Test sending an atypical data size. @@ -89,7 +90,8 @@ TEST(TestSendSharp, SendUnusualSize) { "m260s780m260s780m260s780m260s780m260s780m260s780m260s1820m260s780" "m260s43602" "m260s1820m260s1820m260s1820m260s1820m260s1820m260s1820m260s780m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); irsend.reset(); irsend.sendSharp(0x0, 0x0, 16); @@ -99,7 +101,8 @@ TEST(TestSendSharp, SendUnusualSize) { "m260s43602" "m260s780m260s780m260s780m260s780m260s780m260s780m260s1820m260s1820" "m260s1820m260s1820m260s1820m260s1820m260s1820m260s1820m260s780m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); } // Tests for sendSharpRaw(). @@ -117,7 +120,8 @@ TEST(TestSendSharpRaw, SendDataOnly) { "m260s43602" "m260s1820m260s780m260s780m260s780m260s1820m260s1820m260s780m260s1820" "m260s780m260s1820m260s1820m260s780m260s1820m260s780m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); } // Test sending with different repeats. @@ -126,7 +130,7 @@ TEST(TestSendSharpRaw, SendWithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendSharpRaw(0x454A, SHARP_BITS, 1); // 1 repeat. + irsend.sendSharpRaw(0x454A, kSharpBits, 1); // 1 repeat. EXPECT_EQ( "m260s1820m260s780m260s780m260s780m260s1820m260s780m260s1820m260s780" "m260s1820m260s780m260s780m260s1820m260s780m260s1820m260s780" @@ -139,7 +143,8 @@ TEST(TestSendSharpRaw, SendWithRepeats) { "m260s43602" "m260s1820m260s780m260s780m260s780m260s1820m260s1820m260s780m260s1820" "m260s780m260s1820m260s1820m260s780m260s1820m260s780m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); } // Test sending an atypical data size. @@ -153,7 +158,8 @@ TEST(TestSendSharpRaw, SendUnusualSize) { "m260s780m260s780m260s780m260s780m260s780m260s780m260s1820m260s780" "m260s43602" "m260s1820m260s1820m260s1820m260s1820m260s1820m260s1820m260s780m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); irsend.reset(); irsend.sendSharpRaw(0x2, 16); @@ -163,7 +169,8 @@ TEST(TestSendSharpRaw, SendUnusualSize) { "m260s43602" "m260s780m260s780m260s780m260s780m260s780m260s780m260s1820m260s1820" "m260s1820m260s1820m260s1820m260s1820m260s1820m260s1820m260s780m260s1820" - "m260s43602", irsend.outputStr()); + "m260s43602", + irsend.outputStr()); } // Tests for decodeSharp(). @@ -178,9 +185,9 @@ TEST(TestDecodeSharp, NormalDecodeWithStrict) { irsend.reset(); irsend.sendSharpRaw(0x454A); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture, SHARP_BITS, true)); + ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture, kSharpBits, true)); EXPECT_EQ(SHARP, irsend.capture.decode_type); - EXPECT_EQ(SHARP_BITS, irsend.capture.bits); + EXPECT_EQ(kSharpBits, irsend.capture.bits); EXPECT_EQ(0x454A, irsend.capture.value); EXPECT_EQ(0x11, irsend.capture.address); EXPECT_EQ(0x4A, irsend.capture.command); @@ -190,9 +197,9 @@ TEST(TestDecodeSharp, NormalDecodeWithStrict) { irsend.reset(); irsend.sendSharpRaw(irsend.encodeSharp(0x07, 0x99)); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture, SHARP_BITS, true)); + ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture, kSharpBits, true)); EXPECT_EQ(SHARP, irsend.capture.decode_type); - EXPECT_EQ(SHARP_BITS, irsend.capture.bits); + EXPECT_EQ(kSharpBits, irsend.capture.bits); EXPECT_EQ(0x7266, irsend.capture.value); EXPECT_EQ(0x07, irsend.capture.address); EXPECT_EQ(0x99, irsend.capture.command); @@ -202,9 +209,9 @@ TEST(TestDecodeSharp, NormalDecodeWithStrict) { irsend.reset(); irsend.sendSharpRaw(irsend.encodeSharp(0x1, 0x1)); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture, SHARP_BITS, true)); + ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture, kSharpBits, true)); EXPECT_EQ(SHARP, irsend.capture.decode_type); - EXPECT_EQ(SHARP_BITS, irsend.capture.bits); + EXPECT_EQ(kSharpBits, irsend.capture.bits); EXPECT_EQ(0x4202, irsend.capture.value); EXPECT_EQ(0x1, irsend.capture.address); EXPECT_EQ(0x1, irsend.capture.command); @@ -219,19 +226,19 @@ TEST(TestDecodeSharp, NormalDecodeWithRepeatAndStrict) { // Normal Sharp 15-bit message with 1 repeat. irsend.reset(); - irsend.sendSharpRaw(0x7266, SHARP_BITS, 1); + irsend.sendSharpRaw(0x7266, kSharpBits, 1); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture, SHARP_BITS, true)); + ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture, kSharpBits, true)); EXPECT_EQ(SHARP, irsend.capture.decode_type); - EXPECT_EQ(SHARP_BITS, irsend.capture.bits); + EXPECT_EQ(kSharpBits, irsend.capture.bits); EXPECT_EQ(0x7266, irsend.capture.value); EXPECT_EQ(0x07, irsend.capture.address); EXPECT_EQ(0x99, irsend.capture.command); - irsend.makeDecodeResult(2 * (2 * SHARP_BITS + FOOTER)); - ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture, SHARP_BITS, true)); + irsend.makeDecodeResult(2 * (2 * kSharpBits + kFooter)); + ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture, kSharpBits, true)); EXPECT_EQ(SHARP, irsend.capture.decode_type); - EXPECT_EQ(SHARP_BITS, irsend.capture.bits); + EXPECT_EQ(kSharpBits, irsend.capture.bits); EXPECT_EQ(0x7266, irsend.capture.value); } @@ -245,7 +252,7 @@ TEST(TestDecodeSharp, DecodeWithNonStrict) { irsend.sendSharpRaw(0x0, 8); // Illegal length Sharp 8-bit message. irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeSharp(&irsend.capture, SHARP_BITS, true)); + ASSERT_FALSE(irrecv.decodeSharp(&irsend.capture, kSharpBits, true)); // Should pass if strict off. ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture, 8, false)); EXPECT_EQ(SHARP, irsend.capture.decode_type); @@ -258,7 +265,7 @@ TEST(TestDecodeSharp, DecodeWithNonStrict) { irsend.sendSharpRaw(0x12345678, 32); // Illegal length Sharp 32-bit message. irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeSharp(&irsend.capture, SHARP_BITS, true)); + ASSERT_FALSE(irrecv.decodeSharp(&irsend.capture, kSharpBits, true)); // Should fail with strict when we ask for the wrong bit size. ASSERT_FALSE(irrecv.decodeSharp(&irsend.capture, 32, true)); @@ -298,21 +305,17 @@ TEST(TestDecodeSharp, DecodeGlobalCacheExample) { irsend.reset(); // Sharp Power On from Global Cache. - uint16_t gc_test[67] = {38000, 1, 1, - 10, 70, 10, 30, 10, 30, 10, 30, 10, 70, 10, 30, - 10, 70, 10, 30, 10, 70, 10, 30, 10, 30, 10, 70, - 10, 30, 10, 70, 10, 30, - 10, 1657, - 10, 70, 10, 30, 10, 30, 10, 30, 10, 70, 10, 70, - 10, 30, 10, 70, 10, 30, 10, 70, 10, 70, 10, 30, - 10, 70, 10, 30, 10, 70, - 10, 1657}; + uint16_t gc_test[67] = { + 38000, 1, 1, 10, 70, 10, 30, 10, 30, 10, 30, 10, 70, 10, 30, 10, 70, + 10, 30, 10, 70, 10, 30, 10, 30, 10, 70, 10, 30, 10, 70, 10, 30, 10, + 1657, 10, 70, 10, 30, 10, 30, 10, 30, 10, 70, 10, 70, 10, 30, 10, 70, + 10, 30, 10, 70, 10, 70, 10, 30, 10, 70, 10, 30, 10, 70, 10, 1657}; irsend.sendGC(gc_test, 67); irsend.makeDecodeResult(); ASSERT_TRUE(irrecv.decodeSharp(&irsend.capture)); EXPECT_EQ(SHARP, irsend.capture.decode_type); - EXPECT_EQ(SHARP_BITS, irsend.capture.bits); + EXPECT_EQ(kSharpBits, irsend.capture.bits); EXPECT_EQ(0x454A, irsend.capture.value); EXPECT_EQ(0x11, irsend.capture.address); EXPECT_EQ(0x4A, irsend.capture.command); @@ -327,31 +330,25 @@ TEST(TestDecodeSharp, FailToDecodeNonSharpExample) { irsend.reset(); // Modified a few entries to unexpected values, based on previous test case. - uint16_t gc_test[67] = {38000, 1, 1, - 10, 70, 30, 30, 10, 30, 10, 30, 10, 70, 10, 30, - 10, 70, 10, 30, 10, 70, 10, 30, 10, 30, 10, 70, - 10, 30, 10, 70, 10, 30, - 10, 1657, - 10, 70, 10, 30, 10, 30, 10, 30, 10, 70, 10, 70, - 10, 30, 10, 60, 10, 30, 10, 70, 10, 70, 10, 30, - 10, 10, 70, 30, 10, 70, - 10, 1657}; + uint16_t gc_test[67] = { + 38000, 1, 1, 10, 70, 30, 30, 10, 30, 10, 30, 10, 70, 10, 30, 10, 70, + 10, 30, 10, 70, 10, 30, 10, 30, 10, 70, 10, 30, 10, 70, 10, 30, 10, + 1657, 10, 70, 10, 30, 10, 30, 10, 30, 10, 70, 10, 70, 10, 30, 10, 60, + 10, 30, 10, 70, 10, 70, 10, 30, 10, 10, 70, 30, 10, 70, 10, 1657}; irsend.sendGC(gc_test, 67); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeSharp(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeSharp(&irsend.capture, SHARP_BITS, false)); + ASSERT_FALSE(irrecv.decodeSharp(&irsend.capture, kSharpBits, false)); // Test only half of a good message, as it is sent (sort of) twice. - uint16_t gc_half[35] = {38000, 1, 1, - 10, 70, 10, 30, 10, 30, 10, 30, 10, 70, 10, 30, - 10, 70, 10, 30, 10, 70, 10, 30, 10, 30, 10, 70, - 10, 30, 10, 70, 10, 30, - 10, 1657}; + uint16_t gc_half[35] = {38000, 1, 1, 10, 70, 10, 30, 10, 30, 10, 30, 10, + 70, 10, 30, 10, 70, 10, 30, 10, 70, 10, 30, 10, + 30, 10, 70, 10, 30, 10, 70, 10, 30, 10, 1657}; irsend.sendGC(gc_half, 35); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeSharp(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeSharp(&irsend.capture, SHARP_BITS, false)); + ASSERT_FALSE(irrecv.decodeSharp(&irsend.capture, kSharpBits, false)); } diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Sherwood_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Sherwood_test.cpp new file mode 100644 index 000000000..22d9ead38 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Sherwood_test.cpp @@ -0,0 +1,78 @@ +// Copyright 2017 David Conran + +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendSherwood(). + +// Test sending typical data only. +TEST(TestSendSherwood, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendSherwood(0xC1A28877); + EXPECT_EQ( + "m8960s4480m560s1680m560s1680m560s560m560s560m560s560m560s560" + "m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s560m560s560" + "m560s1680m560s560m560s560m560s560m560s560m560s1680m560s1680" + "m560s1680m560s560m560s1680m560s1680m560s1680m560s42560" + "m8960s2240m560s96320", + irsend.outputStr()); +} + +// Test sending typical data with extra repeats. +TEST(TestSendSherwood, SendDataWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendSherwood(0xC1A28877, 32, 2); + EXPECT_EQ( + "m8960s4480m560s1680m560s1680m560s560m560s560m560s560m560s560" + "m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s560m560s560" + "m560s1680m560s560m560s560m560s560m560s560m560s1680m560s1680" + "m560s1680m560s560m560s1680m560s1680m560s1680m560s42560" + "m8960s2240m560s96320" + "m8960s2240m560s96320", + irsend.outputStr()); +} + +// Test sending typical data with explicit no repeats. +TEST(TestSendSherwood, SendDataWithZeroRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendSherwood(0xC1A28877, 32, 0); + // Should have a single NEC repeat, as we always send one. + EXPECT_EQ( + "m8960s4480m560s1680m560s1680m560s560m560s560m560s560m560s560" + "m560s560m560s1680m560s1680m560s560m560s1680m560s560m560s560" + "m560s560m560s1680m560s560m560s1680m560s560m560s560m560s560" + "m560s1680m560s560m560s560m560s560m560s560m560s1680m560s1680" + "m560s1680m560s560m560s1680m560s1680m560s1680m560s42560" + "m8960s2240m560s96320", + irsend.outputStr()); +} + +// Test that a typical Sherwood send decodes as the appropriate NEC value. +TEST(TestSendSherwood, DecodesAsNEC) { + IRsendTest irsend(4); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + irsend.sendSherwood(0xC1A28877); + irsend.makeDecodeResult(); + + EXPECT_TRUE(irrecv.decodeNEC(&irsend.capture)); + EXPECT_EQ(NEC, irsend.capture.decode_type); + EXPECT_EQ(kNECBits, irsend.capture.bits); + EXPECT_EQ(0xC1A28877, irsend.capture.value); + EXPECT_EQ(0x4583, irsend.capture.address); + EXPECT_EQ(0x11, irsend.capture.command); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Sony_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Sony_test.cpp new file mode 100644 index 000000000..c79ff6175 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Sony_test.cpp @@ -0,0 +1,357 @@ +// Copyright 2017 David Conran + +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendSony(). + +// Test sending typical data only. +TEST(TestSendSony, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendSony(0); + // We expect three 20-bit commands to be sent. + EXPECT_EQ( + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m600s600m600s600m600s600m600s18600" + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m600s600m600s600m600s600m600s18600" + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m600s600m600s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m600s600m600s600m600s600m600s18600", + irsend.outputStr()); + + irsend.reset(); + irsend.sendSony(0x240C, kSony20Bits); + // We expect three 20-bit commands to be sent. + EXPECT_EQ( + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" + "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m1200s600m1200s600m600s600m600s16200" + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" + "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m1200s600m1200s600m600s600m600s16200" + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" + "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m1200s600m1200s600m600s600m600s16200", + irsend.outputStr()); + + irsend.reset(); + irsend.sendSony(0x240C, kSony15Bits); + // We expect three 15-bit commands to be sent. + EXPECT_EQ( + "m2400s600m600s600m1200s600m600s600m600s600m1200s600m600s600" + "m600s600m600s600m600s600m600s600m600s600m1200s600m1200s600m600s600" + "m600s22200" + "m2400s600m600s600m1200s600m600s600m600s600m1200s600m600s600" + "m600s600m600s600m600s600m600s600m600s600m1200s600m1200s600m600s600" + "m600s22200" + "m2400s600m600s600m1200s600m600s600m600s600m1200s600m600s600" + "m600s600m600s600m600s600m600s600m600s600m1200s600m1200s600m600s600" + "m600s22200", + irsend.outputStr()); + + irsend.reset(); + irsend.sendSony(0xA90, kSony12Bits); + // We expect three 15-bit commands to be sent. + EXPECT_EQ( + "m2400s600m1200s600m600s600m1200s600m600s600m1200s600m600s600" + "m600s600m1200s600m600s600m600s600m600s600m600s25800" + "m2400s600m1200s600m600s600m1200s600m600s600m1200s600m600s600" + "m600s600m1200s600m600s600m600s600m600s600m600s25800" + "m2400s600m1200s600m600s600m1200s600m600s600m1200s600m600s600" + "m600s600m1200s600m600s600m600s600m600s600m600s25800", + irsend.outputStr()); +} + +// Test sending with different repeats. +TEST(TestSendSony, SendWithDiffRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + irsend.sendSony(0x240C, kSony20Bits, 0); // Send a command with 0 repeats. + EXPECT_EQ( + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" + "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m1200s600m1200s600m600s600m600s16200", + irsend.outputStr()); + irsend.sendSony(0x240C, kSony20Bits, 1); // Send a command with 1 repeat. + EXPECT_EQ( + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" + "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m1200s600m1200s600m600s600m600s16200" + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" + "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m1200s600m1200s600m600s600m600s16200", + irsend.outputStr()); + irsend.sendSony(0x240C, kSony20Bits, 3); // Send a command with 3 repeats. + EXPECT_EQ( + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" + "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m1200s600m1200s600m600s600m600s16200" + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" + "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m1200s600m1200s600m600s600m600s16200" + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" + "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m1200s600m1200s600m600s600m600s16200" + "m2400s600m600s600m600s600m600s600m600s600m600s600m600s600m1200s600" + "m600s600m600s600m1200s600m600s600m600s600m600s600m600s600m600s600" + "m600s600m1200s600m1200s600m600s600m600s16200", + irsend.outputStr()); +} + +// Tests for encodeSony(). + +TEST(TestEncodeSony, NormalSonyEncoding) { + IRsendTest irsend(4); + EXPECT_EQ(0x0, irsend.encodeSony(kSony12Bits, 0, 0)); + EXPECT_EQ(0xA90, irsend.encodeSony(kSony12Bits, 21, 1)); + EXPECT_EQ(0xFFF, irsend.encodeSony(kSony12Bits, 0x7F, 0x1F)); + + EXPECT_EQ(0x0, irsend.encodeSony(kSony15Bits, 0, 0)); + EXPECT_EQ(0x5480, irsend.encodeSony(kSony15Bits, 21, 1)); + EXPECT_EQ(0x5455, irsend.encodeSony(kSony15Bits, 21, 0xAA)); + EXPECT_EQ(0x7FFF, irsend.encodeSony(kSony15Bits, 0x7F, 0xFF)); + + EXPECT_EQ(0x0, irsend.encodeSony(kSony20Bits, 0, 0, 0)); + EXPECT_EQ(0x81080, irsend.encodeSony(kSony20Bits, 1, 1, 1)); + EXPECT_EQ(0xFFFFF, irsend.encodeSony(kSony20Bits, 0x7F, 0x1F, 0xFF)); +} + +TEST(TestEncodeSony, SonyEncodingWithOversizedValues) { + IRsendTest irsend(4); + EXPECT_EQ(0xFFF, irsend.encodeSony(kSony12Bits, 0xFFFF, 0xFFFF)); + + EXPECT_EQ(0x7FFF, irsend.encodeSony(kSony15Bits, 0xFFFF, 0xFFFF)); + + EXPECT_EQ(0xFFFFF, irsend.encodeSony(kSony20Bits, 0xFFFF, 0xFFFF, 0xFFFF)); +} + +// Tests for decodeSony(). + +// Decode normal Sony messages. +TEST(TestDecodeSony, NormalSonyDecodeWithStrict) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Synthesised Normal Sony 20-bit message. + irsend.reset(); + irsend.sendSony(irsend.encodeSony(kSony20Bits, 0x1, 0x1, 0x1)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, kSony20Bits, true)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(kSony20Bits, irsend.capture.bits); + EXPECT_EQ(0x81080, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); + EXPECT_EQ(0x81, irsend.capture.command); + + // Synthesised Normal Sony 15-bit message. + irsend.reset(); + irsend.sendSony(irsend.encodeSony(kSony15Bits, 21, 1), kSony15Bits); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, kSony15Bits, true)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(kSony15Bits, irsend.capture.bits); + EXPECT_EQ(0x5480, irsend.capture.value); + EXPECT_EQ(1, irsend.capture.address); + EXPECT_EQ(21, irsend.capture.command); + + // Synthesised Normal Sony 12-bit message. + irsend.reset(); + irsend.sendSony(irsend.encodeSony(kSony12Bits, 21, 1), kSony12Bits); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, kSony12Bits, true)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(kSony12Bits, irsend.capture.bits); + EXPECT_EQ(0xA90, irsend.capture.value); + EXPECT_EQ(1, irsend.capture.address); + EXPECT_EQ(21, irsend.capture.command); +} + +// Decode unexpected Sony messages. i.e longer than minimum etc. +TEST(TestDecodeSony, SonyDecodeWithUnexpectedLegalSize) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + // Synthesised Normal Sony 20-bit message decoded when looking for 12-bits + irsend.reset(); + irsend.sendSony(irsend.encodeSony(kSony20Bits, 0x1, 0x1, 0x1)); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, kSonyMinBits)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(kSony20Bits, irsend.capture.bits); + EXPECT_EQ(0x81080, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); + EXPECT_EQ(0x81, irsend.capture.command); + + // Synthesised Normal Sony 12-bit message when expecting 20-bits. + irsend.reset(); + irsend.sendSony(irsend.encodeSony(kSony12Bits, 21, 1), kSony12Bits); + irsend.makeDecodeResult(); + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, kSony20Bits)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(kSony12Bits, irsend.capture.bits); + EXPECT_EQ(0xA90, irsend.capture.value); + EXPECT_EQ(1, irsend.capture.address); + EXPECT_EQ(21, irsend.capture.command); + + // 12-bit message should be regected when using strict and a different size. + irsend.reset(); + irsend.sendSony(irsend.encodeSony(kSony12Bits, 21, 1), kSony12Bits); + irsend.makeDecodeResult(); + ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, kSony20Bits, true)); + ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, kSony15Bits, true)); + + // 15-bit message should be regected when using strict and a different size. + irsend.reset(); + irsend.sendSony(irsend.encodeSony(kSony15Bits, 21, 1), kSony15Bits); + irsend.makeDecodeResult(); + ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, kSony12Bits, true)); + ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, kSony20Bits, true)); + + // 20-bit message should be regected when using strict and a different size. + irsend.reset(); + irsend.sendSony(irsend.encodeSony(kSony20Bits, 1, 1, 1), kSony20Bits); + irsend.makeDecodeResult(); + ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, kSony12Bits, true)); + ASSERT_FALSE(irrecv.decodeSony(&irsend.capture, kSony15Bits, true)); +} + +// Decode unsupported Sony messages. i.e non-standard sizes. +TEST(TestDecodeSony, SonyDecodeWithIllegalSize) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + irsend.sendSony(0xFF, 8); // Illegal 8-bit Sony-like message. + irsend.makeDecodeResult(); + // Should fail with strict on. + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSonyMinBits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony12Bits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony15Bits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony20Bits, true)); + // Should work with a 'normal' match (not strict) + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(8, irsend.capture.bits); + EXPECT_EQ(0xFF, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + + irsend.reset(); + irsend.sendSony(0x1FFF, 13); // Illegal 13-bit Sony-like message. + irsend.makeDecodeResult(); + // Should fail with strict on. + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSonyMinBits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony12Bits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony15Bits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony20Bits, true)); + // Should work with a 'normal' match (not strict) + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(13, irsend.capture.bits); + EXPECT_EQ(0x1FFF, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + + irsend.reset(); + irsend.sendSony(0x1FFFF, 17); // Illegal 17-bit Sony-like message. + irsend.makeDecodeResult(); + // Should fail with strict on. + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSonyMinBits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony12Bits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony15Bits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony20Bits, true)); + // Should work with a 'normal' match (not strict) + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(17, irsend.capture.bits); + EXPECT_EQ(0x1FFFF, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + + irsend.reset(); + irsend.sendSony(0x1FFFFF, 21); // Illegal 21-bit Sony-like message. + irsend.makeDecodeResult(); + // Should fail with strict on. + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSonyMinBits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony12Bits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony15Bits, true)); + EXPECT_FALSE(irrecv.decodeSony(&irsend.capture, kSony20Bits, true)); + // Should work with a 'normal' match (not strict) + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(21, irsend.capture.bits); + EXPECT_EQ(0x1FFFFF, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); + + irsend.reset(); + // Illegal 64-bit (max) Sony-like message. + irsend.sendSony(0xFFFFFFFFFFFFFFFF, 64, 0); + irsend.makeDecodeResult(); + // Should work with a 'normal' match (not strict) + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(64, irsend.capture.bits); + EXPECT_EQ(0xFFFFFFFFFFFFFFFF, irsend.capture.value); + EXPECT_EQ(0x0, irsend.capture.address); + EXPECT_EQ(0x0, irsend.capture.command); +} + +// Decode unsupported Sony messages. i.e non-standard sizes. +TEST(TestDecodeSony, DecodeGlobalCacheExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + irsend.reset(); + // Sony "Power On" from Global Cache. + uint16_t gc_test[29] = {40000, 1, 1, 96, 24, 24, 24, 48, 24, 48, + 24, 48, 24, 24, 24, 48, 24, 24, 24, 48, + 24, 24, 24, 24, 24, 24, 24, 24, 1013}; + irsend.sendGC(gc_test, 29); + irsend.makeDecodeResult(); + + // Without strict. + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(12, irsend.capture.bits); + EXPECT_EQ(0x750, irsend.capture.value); + EXPECT_EQ(0x1, irsend.capture.address); + EXPECT_EQ(0x2E, irsend.capture.command); + // With strict and correct size. + ASSERT_TRUE(irrecv.decodeSony(&irsend.capture, kSony12Bits, true)); +} + +// Encoding & Decode 20 bit Sony messages. Issue #476 +TEST(TestEncodeSony, Issue476) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + irsend.reset(); + irsend.sendSony(0x6AB47, 20); + irsend.makeDecodeResult(); + + // Without strict. + ASSERT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(SONY, irsend.capture.decode_type); + EXPECT_EQ(20, irsend.capture.bits); + EXPECT_EQ(0x6AB47, irsend.capture.value); // 20 bits + EXPECT_EQ(0x1A, irsend.capture.address); // 5 bits + EXPECT_EQ(0x7156, irsend.capture.command); // 15 bits + EXPECT_EQ(0x56, 0x7156 & 0x7F); // command (lower 7 bits) + EXPECT_EQ(0xE2, (0x7156 >> 7) & 0xFF); // extended (top 8 of 15 bits) + EXPECT_EQ(0x6AB47, irsend.encodeSony(20, 0x56, 0x1A, 0xE2)); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Toshiba_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Toshiba_test.cpp new file mode 100644 index 000000000..b5e1e07a9 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Toshiba_test.cpp @@ -0,0 +1,664 @@ +// Copyright 2017 David Conran +#include "ir_Toshiba.h" +#include "IRrecv.h" +#include "IRrecv_test.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for Toshiba A/C methods. + +// Test sending typical data only. +TEST(TestSendToshibaAC, SendDataOnly) { + IRsendTest irsend(4); + irsend.begin(); + + uint8_t toshiba_code[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0x00, 0x00, 0x00}; + irsend.reset(); + irsend.sendToshibaAC(toshiba_code); + EXPECT_EQ( + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s7048" + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s7048", + irsend.outputStr()); +} + +// Test sending with repeats. +TEST(TestSendToshibaAC, SendWithRepeats) { + IRsendTest irsend(4); + irsend.begin(); + + irsend.reset(); + uint8_t toshiba_code[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0x00, 0x00, 0x00}; + + irsend.sendToshibaAC(toshiba_code, kToshibaACStateLength, 0); + EXPECT_EQ( + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s7048", + irsend.outputStr()); + + irsend.reset(); + irsend.sendToshibaAC(toshiba_code, kToshibaACStateLength, 2); + EXPECT_EQ( + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s7048" + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s7048" + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s7048", + irsend.outputStr()); +} + +// Test sending atypical sizes. +TEST(TestSendToshibaAC, SendUnexpectedSizes) { + IRsendTest irsend(4); + irsend.begin(); + + uint8_t toshiba_short_code[8] = {0x01, 0x02, 0x03, 0x04, + 0x05, 0x06, 0x07, 0x08}; + uint8_t toshiba_long_code[10] = {0x01, 0x02, 0x03, 0x04, 0x05, + 0x06, 0x07, 0x08, 0x09, 0x0A}; + irsend.reset(); + irsend.sendToshibaAC(toshiba_short_code, kToshibaACStateLength - 1); + ASSERT_EQ("", irsend.outputStr()); + + irsend.reset(); + irsend.sendToshibaAC(toshiba_long_code, kToshibaACStateLength + 1); + ASSERT_EQ( + "m4400s4300" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623m543s1623" + "m543s472m543s472m543s472m543s472m543s1623m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s1623m543s472m543s1623m543s472" + "m543s7048" + "m4400s4300" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623m543s1623" + "m543s472m543s472m543s472m543s472m543s1623m543s472m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s1623m543s472m543s1623m543s472" + "m543s7048", + irsend.outputStr()); +} + +// Tests for IRToshibaAC class. + +TEST(TestToshibaACClass, Power) { + IRToshibaAC toshiba(0); + toshiba.begin(); + + toshiba.on(); + EXPECT_TRUE(toshiba.getPower()); + + toshiba.off(); + EXPECT_FALSE(toshiba.getPower()); + + toshiba.setPower(true); + EXPECT_TRUE(toshiba.getPower()); + + toshiba.setPower(false); + EXPECT_FALSE(toshiba.getPower()); +} + +TEST(TestToshibaACClass, Temperature) { + IRToshibaAC toshiba(0); + toshiba.begin(); + + toshiba.setTemp(0); + EXPECT_EQ(kToshibaAcMinTemp, toshiba.getTemp()); + + toshiba.setTemp(255); + EXPECT_EQ(kToshibaAcMaxTemp, toshiba.getTemp()); + + toshiba.setTemp(kToshibaAcMinTemp); + EXPECT_EQ(kToshibaAcMinTemp, toshiba.getTemp()); + + toshiba.setTemp(kToshibaAcMaxTemp); + EXPECT_EQ(kToshibaAcMaxTemp, toshiba.getTemp()); + + toshiba.setTemp(kToshibaAcMinTemp - 1); + EXPECT_EQ(kToshibaAcMinTemp, toshiba.getTemp()); + + toshiba.setTemp(kToshibaAcMaxTemp + 1); + EXPECT_EQ(kToshibaAcMaxTemp, toshiba.getTemp()); + + toshiba.setTemp(17); + EXPECT_EQ(17, toshiba.getTemp()); + + toshiba.setTemp(21); + EXPECT_EQ(21, toshiba.getTemp()); + + toshiba.setTemp(25); + EXPECT_EQ(25, toshiba.getTemp()); + + toshiba.setTemp(30); + EXPECT_EQ(30, toshiba.getTemp()); +} + +TEST(TestToshibaACClass, OperatingMode) { + IRToshibaAC toshiba(0); + toshiba.begin(); + + toshiba.setMode(kToshibaAcAuto); + EXPECT_EQ(kToshibaAcAuto, toshiba.getMode()); + + toshiba.setMode(kToshibaAcCool); + EXPECT_EQ(kToshibaAcCool, toshiba.getMode()); + + toshiba.setMode(kToshibaAcHeat); + EXPECT_EQ(kToshibaAcHeat, toshiba.getMode()); + + toshiba.setMode(kToshibaAcDry); + EXPECT_EQ(kToshibaAcDry, toshiba.getMode()); + + toshiba.setMode(kToshibaAcHeat + 1); + EXPECT_EQ(kToshibaAcAuto, toshiba.getMode()); + + toshiba.setMode(255); + EXPECT_EQ(kToshibaAcAuto, toshiba.getMode()); + + // Setting the power off changes the underlying mode in the state to heat. + toshiba.setPower(true); + toshiba.setMode(kToshibaAcCool); + EXPECT_EQ(kToshibaAcCool, toshiba.getMode()); + EXPECT_EQ(kToshibaAcCool, toshiba.getMode(true)); + toshiba.setPower(false); + EXPECT_EQ(kToshibaAcCool, toshiba.getMode()); + EXPECT_EQ(kToshibaAcHeat, toshiba.getMode(true)); +} + +TEST(TestToshibaACClass, FanSpeed) { + IRToshibaAC toshiba(0); + toshiba.begin(); + + toshiba.setFan(kToshibaAcFanAuto); + EXPECT_EQ(kToshibaAcFanAuto, toshiba.getFan()); + + toshiba.setFan(255); + EXPECT_EQ(kToshibaAcFanMax, toshiba.getFan()); + + toshiba.setFan(kToshibaAcFanMax); + EXPECT_EQ(kToshibaAcFanMax, toshiba.getFan()); + + toshiba.setFan(kToshibaAcFanMax - 1); + EXPECT_EQ(kToshibaAcFanMax - 1, toshiba.getFan()); + + toshiba.setFan(1); + EXPECT_EQ(1, toshiba.getFan()); + + toshiba.setFan(2); + EXPECT_EQ(2, toshiba.getFan()); + + toshiba.setFan(3); + EXPECT_EQ(3, toshiba.getFan()); + + toshiba.setFan(4); + EXPECT_EQ(4, toshiba.getFan()); + + toshiba.setFan(kToshibaAcFanMax + 1); + EXPECT_EQ(kToshibaAcFanMax, toshiba.getFan()); +} + +TEST(TestToshibaACClass, RawState) { + IRToshibaAC toshiba(0); + toshiba.begin(); + + uint8_t initial_state[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0x00, 0x00, 0x01}; + uint8_t modified_state[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0xC1, 0x00, 0xC0}; + + // Verify the starting state. + EXPECT_STATE_EQ(initial_state, toshiba.getRaw(), kToshibaACBits); + EXPECT_TRUE(toshiba.getPower()); + EXPECT_EQ(kToshibaAcAuto, toshiba.getMode()); + EXPECT_EQ(kToshibaAcFanAuto, toshiba.getFan()); + + // Change some settings. + toshiba.setMode(kToshibaAcCool); + toshiba.setFan(kToshibaAcFanMax); + toshiba.setTemp(kToshibaAcMinTemp); + // Verify those were set. + EXPECT_EQ(kToshibaAcCool, toshiba.getMode()); + EXPECT_EQ(kToshibaAcFanMax, toshiba.getFan()); + EXPECT_EQ(kToshibaAcMinTemp, toshiba.getTemp()); + // Retrieve the modified state. + EXPECT_STATE_EQ(modified_state, toshiba.getRaw(), kToshibaACBits); + + // Set it back to the initial state. + toshiba.setRaw(initial_state); + + // Check the new state was set correctly. + EXPECT_TRUE(toshiba.getPower()); + EXPECT_EQ(kToshibaAcAuto, toshiba.getMode()); + EXPECT_EQ(kToshibaAcFanAuto, toshiba.getFan()); + EXPECT_STATE_EQ(initial_state, toshiba.getRaw(), kToshibaACBits); +} + +TEST(TestToshibaACClass, Checksums) { + IRToshibaAC toshiba(0); + toshiba.begin(); + + uint8_t initial_state[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0x00, 0x00, 0x01}; + uint8_t modified_state[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0xC1, 0x00, 0xC0}; + uint8_t invalid_state[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0x00, 0x00, 0x00}; + + EXPECT_EQ(0x01, toshiba.calcChecksum(initial_state)); + EXPECT_EQ(0xC0, toshiba.calcChecksum(modified_state)); + // Check we can call it without instantiating the object. + EXPECT_EQ(0x01, IRToshibaAC::calcChecksum(initial_state)); + // Use different lengths. + EXPECT_EQ(0x01, IRToshibaAC::calcChecksum(initial_state, + kToshibaACStateLength - 1)); + EXPECT_EQ(0xFF, IRToshibaAC::calcChecksum(initial_state, 3)); + // Minimum length that actually means anything. + EXPECT_EQ(0xF2, IRToshibaAC::calcChecksum(initial_state, 2)); + // Technically, there is no such thing as a checksum for a length of < 2 + // But test it anyway + EXPECT_EQ(0x00, IRToshibaAC::calcChecksum(initial_state, 1)); + EXPECT_EQ(0x00, IRToshibaAC::calcChecksum(initial_state, 0)); + + // Validity tests. + EXPECT_TRUE(IRToshibaAC::validChecksum(initial_state)); + EXPECT_TRUE(IRToshibaAC::validChecksum(modified_state)); + EXPECT_FALSE(IRToshibaAC::validChecksum(invalid_state)); + EXPECT_FALSE(IRToshibaAC::validChecksum(initial_state, 0)); + EXPECT_FALSE(IRToshibaAC::validChecksum(initial_state, 1)); + EXPECT_FALSE(IRToshibaAC::validChecksum(initial_state, 2)); +} + +TEST(TestToshibaACClass, HumanReadableOutput) { + IRToshibaAC toshiba(0); + toshiba.begin(); + + uint8_t initial_state[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0x00, 0x00, 0x01}; + uint8_t modified_state[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0xC1, 0x00, 0xC0}; + + toshiba.setRaw(initial_state); + EXPECT_EQ("Power: On, Mode: 0 (AUTO), Temp: 17C, Fan: 0 (AUTO)", + toshiba.toString()); + toshiba.setRaw(modified_state); + EXPECT_EQ("Power: On, Mode: 1 (COOL), Temp: 17C, Fan: 5 (MAX)", + toshiba.toString()); + toshiba.off(); + toshiba.setTemp(25); + toshiba.setFan(3); + toshiba.setMode(kToshibaAcDry); + EXPECT_EQ("Power: Off, Mode: 2 (DRY), Temp: 25C, Fan: 3", toshiba.toString()); +} + +TEST(TestToshibaACClass, MessageConstuction) { + IRToshibaAC toshiba(0); + IRsendTest irsend(4); + toshiba.begin(); + irsend.begin(); + + toshiba.setFan(1); + toshiba.setMode(kToshibaAcCool); + toshiba.setTemp(27); + toshiba.on(); + + // Check everything for kicks. + EXPECT_EQ(1, toshiba.getFan()); + EXPECT_EQ(kToshibaAcCool, toshiba.getMode()); + EXPECT_EQ(27, toshiba.getTemp()); + EXPECT_TRUE(toshiba.getPower()); + + irsend.reset(); + irsend.sendToshibaAC(toshiba.getRaw()); + EXPECT_EQ( + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s1623m543s472m543s1623m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s1623m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s1623m543s1623m543s1623m543s472m543s472m543s472m543s472m543s472" + "m543s7048" + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s1623m543s472m543s1623m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s1623m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s1623m543s1623m543s1623m543s472m543s472m543s472m543s472m543s472" + "m543s7048", + irsend.outputStr()); + + // Turn off the power and re-check. + toshiba.setPower(false); + // Check everything for kicks. + EXPECT_EQ(1, toshiba.getFan()); + EXPECT_EQ(kToshibaAcCool, toshiba.getMode()); + EXPECT_EQ(27, toshiba.getTemp()); + EXPECT_FALSE(toshiba.getPower()); + + irsend.reset(); + irsend.sendToshibaAC(toshiba.getRaw()); + EXPECT_EQ( + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s1623m543s472m543s1623m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s1623m543s472m543s472m543s472m543s1623m543s1623m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s1623m543s472" + "m543s7048" + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s1623m543s472m543s1623m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s1623m543s472m543s472m543s472m543s1623m543s1623m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s1623m543s472" + "m543s7048", + irsend.outputStr()); + + // Turn the power back on, and check nothing changed. + toshiba.on(); + + EXPECT_EQ(1, toshiba.getFan()); + EXPECT_EQ(kToshibaAcCool, toshiba.getMode()); + EXPECT_EQ(27, toshiba.getTemp()); + EXPECT_TRUE(toshiba.getPower()); + + irsend.reset(); + irsend.sendToshibaAC(toshiba.getRaw()); + EXPECT_EQ( + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s1623m543s472m543s1623m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s1623m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s1623m543s1623m543s1623m543s472m543s472m543s472m543s472m543s472" + "m543s7048" + "m4400s4300" + "m543s1623m543s1623m543s1623m543s1623m543s472m543s472m543s1623m543s472" + "m543s472m543s472m543s472m543s472m543s1623m543s1623m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s1623m543s1623" + "m543s1623m543s1623m543s1623m543s1623m543s1623m543s1623m543s472m543s472" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s1623m543s472m543s1623m543s472m543s472m543s472m543s472m543s472" + "m543s472m543s1623m543s472m543s472m543s472m543s472m543s472m543s1623" + "m543s472m543s472m543s472m543s472m543s472m543s472m543s472m543s472" + "m543s1623m543s1623m543s1623m543s472m543s472m543s472m543s472m543s472" + "m543s7048", + irsend.outputStr()); +} + +// Decoding a message we entirely constructed based solely on a given state. +TEST(TestDecodeToshibaAC, SyntheticExample) { + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + uint8_t expectedState[kToshibaACStateLength] = {0xF2, 0x0D, 0x03, 0xFC, 0x01, + 0x00, 0x00, 0x00, 0x01}; + + irsend.reset(); + irsend.sendToshibaAC(expectedState); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(TOSHIBA_AC, irsend.capture.decode_type); + ASSERT_EQ(kToshibaACBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); +} + +// Test decoding against captures from a real Toshiba A/C remote. +// Recorded by @mwildbolz +TEST(TestDecodeToshibaAC, RealExamples) { + IRToshibaAC toshiba(0); + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + + uint16_t rawData1[295] = { + 4442, 4292, 612, 1544, 616, 1544, 616, 1544, 612, 1548, 610, 468, + 612, 468, 662, 1494, 640, 438, 616, 464, 614, 464, 616, 464, + 612, 468, 610, 1544, 616, 1544, 616, 468, 612, 1544, 616, 464, + 694, 386, 616, 464, 612, 468, 612, 468, 636, 444, 610, 1546, + 616, 1544, 612, 1546, 614, 1546, 616, 1546, 740, 1420, 612, 1544, + 616, 1546, 616, 464, 610, 468, 610, 470, 612, 468, 610, 468, + 610, 470, 636, 438, 616, 464, 616, 464, 616, 1546, 636, 442, + 612, 1546, 614, 1544, 616, 464, 614, 464, 610, 468, 612, 468, + 612, 468, 612, 468, 636, 440, 614, 464, 616, 464, 616, 464, + 612, 468, 636, 442, 638, 442, 662, 418, 610, 464, 616, 464, + 616, 464, 610, 468, 612, 468, 636, 444, 610, 468, 638, 438, + 614, 1546, 612, 1548, 612, 470, 610, 468, 636, 442, 612, 468, + 612, 1544, 612, 7396, 4442, 4292, 610, 1546, 616, 1544, 612, 1548, + 612, 1546, 616, 464, 616, 464, 616, 1544, 612, 468, 662, 418, + 610, 468, 638, 442, 638, 438, 616, 1546, 616, 1544, 612, 468, + 610, 1546, 616, 464, 616, 464, 642, 438, 616, 464, 612, 468, + 610, 470, 610, 1546, 616, 1544, 612, 1546, 616, 1546, 614, 1546, + 612, 1550, 610, 1544, 616, 1546, 614, 464, 642, 438, 610, 468, + 612, 468, 612, 468, 612, 468, 610, 468, 638, 438, 614, 464, + 616, 1544, 636, 444, 636, 1520, 616, 1544, 616, 464, 616, 464, + 612, 468, 612, 468, 612, 468, 612, 468, 612, 464, 612, 470, + 636, 442, 638, 442, 612, 470, 692, 384, 614, 464, 616, 464, + 612, 468, 610, 468, 612, 468, 610, 470, 610, 464, 616, 464, + 616, 464, 616, 464, 610, 1550, 610, 1546, 640, 444, 688, 386, + 616, 464, 612, 468, 612, 1544, 642}; + + irsend.reset(); + irsend.sendRaw(rawData1, 295, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(TOSHIBA_AC, irsend.capture.decode_type); + ASSERT_EQ(kToshibaACBits, irsend.capture.bits); + toshiba.setRaw(irsend.capture.state); + EXPECT_TRUE(toshiba.getPower()); + EXPECT_EQ(23, toshiba.getTemp()); + EXPECT_EQ(kToshibaAcFanAuto, toshiba.getFan()); + EXPECT_EQ(kToshibaAcAuto, toshiba.getMode()); + + uint16_t rawData2[295] = { + 4500, 4236, 636, 1520, 642, 1520, 640, 1520, 664, 1492, 642, 440, + 668, 412, 642, 1518, 638, 438, 666, 414, 640, 438, 642, 438, + 638, 442, 642, 1516, 640, 1520, 642, 438, 642, 1520, 636, 438, + 668, 412, 640, 440, 666, 412, 642, 438, 668, 412, 640, 1516, + 668, 1492, 642, 1520, 666, 1494, 638, 1520, 642, 1520, 668, 1490, + 666, 1494, 642, 438, 638, 438, 668, 412, 668, 412, 642, 438, + 642, 438, 664, 412, 642, 438, 642, 438, 642, 1518, 642, 434, + 668, 412, 642, 438, 668, 412, 692, 388, 666, 412, 642, 434, + 642, 438, 642, 1518, 668, 412, 668, 412, 640, 438, 638, 438, + 642, 438, 640, 438, 668, 1492, 642, 440, 666, 412, 640, 438, + 642, 438, 642, 434, 668, 412, 668, 412, 666, 414, 666, 1494, + 640, 438, 642, 434, 668, 412, 642, 438, 642, 438, 668, 412, + 668, 414, 640, 7362, 4474, 4262, 642, 1518, 638, 1520, 640, 1520, + 668, 1494, 640, 434, 642, 438, 640, 1520, 642, 438, 642, 438, + 642, 438, 642, 438, 642, 434, 668, 1494, 642, 1518, 638, 442, + 638, 1520, 642, 438, 642, 438, 668, 414, 664, 408, 642, 438, + 668, 412, 642, 1520, 666, 1494, 642, 1514, 642, 1518, 642, 1520, + 636, 1520, 668, 1494, 666, 1494, 638, 438, 666, 414, 640, 440, + 666, 412, 668, 412, 668, 412, 642, 434, 668, 412, 668, 412, + 668, 1494, 642, 438, 642, 434, 642, 438, 642, 438, 642, 438, + 642, 438, 642, 434, 646, 434, 642, 1518, 668, 412, 642, 438, + 642, 434, 666, 414, 640, 438, 642, 438, 642, 1518, 642, 438, + 642, 434, 668, 412, 642, 438, 642, 438, 642, 438, 642, 438, + 642, 438, 640, 1520, 636, 438, 642, 438, 642, 438, 666, 414, + 668, 412, 642, 440, 640, 438, 640}; + + irsend.reset(); + irsend.sendRaw(rawData2, 295, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(TOSHIBA_AC, irsend.capture.decode_type); + ASSERT_EQ(kToshibaACBits, irsend.capture.bits); + toshiba.setRaw(irsend.capture.state); + EXPECT_TRUE(toshiba.getPower()); + EXPECT_EQ(17, toshiba.getTemp()); + EXPECT_EQ(3, toshiba.getFan()); + EXPECT_EQ(kToshibaAcCool, toshiba.getMode()); + + uint16_t rawData3[295] = { + 4474, 4262, 642, 1514, 642, 1520, 642, 1520, 642, 1514, 642, 438, + 642, 438, 642, 1520, 636, 438, 642, 438, 642, 438, 642, 438, + 642, 438, 640, 1520, 638, 1520, 642, 438, 640, 1520, 642, 438, + 642, 434, 642, 438, 642, 438, 642, 438, 668, 414, 636, 1520, + 642, 1520, 642, 1514, 642, 1520, 642, 1520, 640, 1518, 638, 1520, + 666, 1494, 642, 438, 642, 434, 642, 438, 640, 438, 642, 438, + 642, 440, 640, 434, 642, 438, 642, 438, 642, 1520, 642, 438, + 642, 1514, 642, 1520, 640, 1520, 636, 438, 642, 438, 642, 438, + 666, 414, 642, 1520, 636, 1520, 642, 438, 642, 438, 640, 438, + 642, 434, 642, 1518, 642, 1520, 642, 438, 642, 434, 640, 438, + 642, 438, 642, 438, 642, 440, 642, 438, 668, 408, 642, 1520, + 642, 438, 642, 1520, 638, 1518, 642, 438, 642, 438, 640, 1520, + 640, 438, 642, 7362, 4474, 4262, 642, 1518, 638, 1520, 640, 1520, + 642, 1520, 638, 438, 642, 438, 642, 1518, 642, 438, 638, 438, + 642, 438, 642, 438, 642, 438, 642, 1514, 642, 1520, 642, 438, + 666, 1490, 642, 438, 642, 438, 642, 440, 640, 438, 642, 434, + 640, 438, 642, 1520, 642, 1520, 636, 1520, 642, 1520, 642, 1514, + 642, 1518, 642, 1518, 640, 1516, 642, 438, 642, 438, 642, 438, + 640, 438, 638, 442, 642, 434, 642, 440, 640, 438, 642, 438, + 642, 1518, 642, 438, 642, 1514, 642, 1520, 642, 1518, 642, 438, + 642, 432, 642, 438, 642, 438, 642, 1520, 642, 1514, 642, 438, + 642, 438, 642, 438, 642, 438, 642, 1514, 642, 1520, 642, 438, + 642, 438, 638, 438, 642, 438, 642, 438, 640, 440, 642, 438, + 640, 434, 642, 1520, 642, 438, 640, 1520, 668, 1490, 666, 414, + 640, 438, 642, 1520, 642, 438, 636}; + + irsend.reset(); + irsend.sendRaw(rawData3, 295, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(TOSHIBA_AC, irsend.capture.decode_type); + ASSERT_EQ(kToshibaACBits, irsend.capture.bits); + toshiba.setRaw(irsend.capture.state); + EXPECT_TRUE(toshiba.getPower()); + EXPECT_EQ(24, toshiba.getTemp()); + EXPECT_EQ(kToshibaAcFanMax, toshiba.getFan()); + EXPECT_EQ(kToshibaAcHeat, toshiba.getMode()); + + uint16_t rawData4[295] = { + 4474, 4262, 636, 1520, 640, 1520, 640, 1520, 638, 1518, 642, 438, + 642, 438, 642, 1520, 636, 438, 642, 438, 642, 438, 642, 438, + 636, 444, 636, 1520, 640, 1520, 642, 438, 638, 1524, 638, 438, + 640, 438, 642, 438, 640, 438, 642, 438, 638, 438, 642, 1518, + 642, 1520, 666, 1494, 636, 1520, 640, 1520, 640, 1520, 636, 1524, + 638, 1520, 640, 440, 640, 438, 642, 438, 636, 444, 636, 438, + 642, 438, 640, 440, 640, 438, 642, 438, 642, 1518, 638, 438, + 642, 1518, 642, 438, 640, 1520, 636, 444, 636, 438, 640, 438, + 642, 438, 668, 1494, 640, 438, 642, 1518, 636, 444, 636, 438, + 640, 1520, 642, 1518, 642, 1520, 636, 444, 636, 438, 642, 438, + 642, 438, 640, 440, 640, 438, 640, 440, 640, 438, 640, 1518, + 642, 1520, 636, 1524, 636, 1518, 642, 438, 642, 1518, 642, 1518, + 640, 438, 642, 7364, 4472, 4262, 642, 1518, 642, 1518, 638, 1518, + 642, 1520, 642, 438, 642, 438, 640, 1520, 636, 440, 640, 438, + 642, 438, 640, 438, 642, 438, 642, 1518, 636, 1524, 636, 438, + 640, 1520, 642, 438, 642, 438, 640, 438, 636, 444, 636, 438, + 668, 412, 642, 1518, 642, 1520, 642, 1520, 636, 1518, 642, 1518, + 642, 1520, 636, 1520, 668, 1494, 642, 438, 636, 444, 664, 412, + 642, 438, 668, 412, 642, 438, 636, 442, 638, 442, 638, 438, + 642, 1518, 642, 438, 642, 1518, 638, 438, 642, 1518, 642, 440, + 640, 438, 636, 444, 636, 444, 636, 1520, 642, 438, 642, 1520, + 636, 444, 636, 438, 642, 1520, 640, 1520, 636, 1520, 668, 412, + 642, 438, 642, 438, 642, 438, 638, 442, 636, 438, 642, 438, + 668, 412, 640, 1520, 638, 1524, 636, 1520, 642, 1520, 636, 444, + 638, 1522, 638, 1518, 640, 438, 642}; + + irsend.reset(); + irsend.sendRaw(rawData4, 295, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + ASSERT_EQ(TOSHIBA_AC, irsend.capture.decode_type); + ASSERT_EQ(kToshibaACBits, irsend.capture.bits); + toshiba.setRaw(irsend.capture.state); + EXPECT_FALSE(toshiba.getPower()); + EXPECT_EQ(22, toshiba.getTemp()); + EXPECT_EQ(4, toshiba.getFan()); + + // Confirming the quirky behaviour that the 'Power OFF' signal + // sets the mode to heat. + // The previous state the remote was in was 'AUTO' just prior to + // sending the power off message. + EXPECT_EQ(kToshibaAcHeat, toshiba.getMode()); +} diff --git a/lib/IRremoteESP8266-2.5.2.03/test/ir_Whirlpool_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Whirlpool_test.cpp new file mode 100644 index 000000000..c30cb21d3 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Whirlpool_test.cpp @@ -0,0 +1,118 @@ +// Copyright 2018 David Conran + +#include "IRrecv.h" +#include "IRrecv_test.h" +#include "IRsend.h" +#include "IRsend_test.h" +#include "gtest/gtest.h" + +// Tests for sendWhirlpoolAC(). + +// Test sending typical data only. +TEST(TestSendWhirlpoolAC, SendDataOnly) { + IRsendTest irsend(0); + irsend.begin(); + uint8_t data[kWhirlpoolAcStateLength] = { + 0x83, 0x06, 0x10, 0x71, 0x00, 0x00, 0x91, 0x1F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xEF, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02}; + + irsend.sendWhirlpoolAC(data); + EXPECT_EQ( + "m8950s4484" + "m597s1649m597s1649m597s533m597s533m597s533m597s533m597s533m597s1649" + "m597s533m597s1649m597s1649m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s533m597s533m597s533m597s1649m597s533m597s533m597s533" + "m597s1649m597s533m597s533m597s533m597s1649m597s1649m597s1649m597s533" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s7920" + "m597s1649m597s533m597s533m597s533m597s1649m597s533m597s533m597s1649" + "m597s1649m597s1649m597s1649m597s1649m597s1649m597s533m597s533m597s533" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s1649m597s1649m597s1649m597s1649m597s533m597s1649m597s1649m597s1649" + "m597s7920" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s1649m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s533m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s533m597s1649m597s533m597s533m597s533m597s533m597s533m597s533" + "m597s100000", + irsend.outputStr()); +} + +// Tests for decodeWhirlpoolAC(). +// Decode normal WhirlpoolAC messages. +TEST(TestDecodeWhirlpoolAC, SyntheticDecode) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Synthesised Normal WhirlpoolAC message. + irsend.reset(); + uint8_t expectedState[kWhirlpoolAcStateLength] = { + 0x83, 0x06, 0x10, 0x71, 0x00, 0x00, 0x91, 0x1F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xEF, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02}; + irsend.sendWhirlpoolAC(expectedState); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(WHIRLPOOL_AC, irsend.capture.decode_type); + EXPECT_EQ(kWhirlpoolAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); +} + +// Decode a recorded example +TEST(TestDecodeWhirlpoolAC, RealExampleDecode) { + IRsendTest irsend(0); + IRrecv irrecv(0); + irsend.begin(); + + // Real WhirlpoolAC message. + // Ref: https://github.com/markszabo/IRremoteESP8266/issues/509 + uint16_t rawData[343] = { + 8950, 4484, 598, 1642, 598, 1646, 594, 534, 594, 538, 602, 532, + 598, 540, 600, 542, 598, 1650, 600, 522, 598, 1644, 596, 1650, + 600, 532, 598, 538, 602, 536, 594, 548, 592, 538, 602, 518, + 600, 524, 596, 532, 598, 532, 598, 1654, 596, 544, 596, 544, + 596, 536, 594, 1644, 596, 528, 600, 528, 592, 538, 602, 1648, + 602, 1654, 596, 1664, 598, 534, 594, 526, 594, 530, 598, 528, + 602, 530, 600, 534, 596, 542, 598, 542, 598, 534, 596, 526, + 594, 530, 600, 528, 602, 530, 600, 534, 596, 542, 598, 544, + 596, 518, 602, 7916, 598, 1642, 598, 528, 600, 528, 602, 530, + 600, 1652, 598, 542, 598, 544, 596, 1654, 596, 1644, 596, 1648, + 602, 1644, 596, 1654, 596, 1656, 604, 536, 594, 548, 602, 528, + 600, 520, 600, 524, 596, 532, 598, 532, 596, 538, 602, 536, + 594, 546, 594, 538, 602, 518, 600, 524, 596, 532, 598, 532, + 598, 536, 594, 544, 596, 544, 596, 536, 594, 526, 592, 530, + 600, 528, 600, 530, 602, 532, 596, 542, 598, 542, 598, 534, + 596, 524, 596, 528, 600, 526, 592, 538, 592, 542, 598, 540, + 600, 540, 600, 530, 598, 522, 598, 526, 594, 534, 596, 534, + 594, 540, 602, 536, 592, 548, 592, 538, 600, 1636, 594, 1648, + 602, 1642, 598, 1652, 598, 538, 602, 1680, 570, 1662, 598, 1634, + 596, 7924, 600, 520, 598, 526, 592, 534, 596, 534, 596, 540, + 600, 536, 604, 538, 602, 530, 600, 520, 598, 1640, 600, 528, + 600, 530, 600, 534, 594, 544, 596, 544, 596, 534, 596, 526, + 594, 528, 600, 526, 594, 536, 592, 542, 598, 538, 602, 538, + 602, 528, 600, 520, 600, 524, 596, 530, 600, 532, 598, 534, + 596, 542, 598, 542, 598, 532, 598, 524, 596, 528, 602, 526, + 594, 536, 594, 540, 600, 536, 594, 548, 592, 538, 602, 518, + 602, 522, 596, 530, 600, 530, 600, 534, 596, 542, 598, 544, + 596, 534, 596, 524, 594, 1644, 596, 532, 596, 534, 596, 538, + 602, 536, 594, 546, 594, 520, 600}; + uint8_t expectedState[kWhirlpoolAcStateLength] = { + 0x83, 0x06, 0x10, 0x71, 0x00, 0x00, 0x91, 0x1F, 0x00, 0x00, 0x00, + 0x00, 0x00, 0xEF, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x02}; + + irsend.reset(); + irsend.sendRaw(rawData, 343, 38000); + irsend.makeDecodeResult(); + EXPECT_TRUE(irrecv.decode(&irsend.capture)); + EXPECT_EQ(WHIRLPOOL_AC, irsend.capture.decode_type); + EXPECT_EQ(kWhirlpoolAcBits, irsend.capture.bits); + EXPECT_STATE_EQ(expectedState, irsend.capture.state, irsend.capture.bits); +} diff --git a/lib/IRremoteESP8266-2.2.1.02/test/ir_Whynter_test.cpp b/lib/IRremoteESP8266-2.5.2.03/test/ir_Whynter_test.cpp similarity index 82% rename from lib/IRremoteESP8266-2.2.1.02/test/ir_Whynter_test.cpp rename to lib/IRremoteESP8266-2.5.2.03/test/ir_Whynter_test.cpp index 4978bb6f5..748a4c9bf 100644 --- a/lib/IRremoteESP8266-2.2.1.02/test/ir_Whynter_test.cpp +++ b/lib/IRremoteESP8266-2.5.2.03/test/ir_Whynter_test.cpp @@ -19,7 +19,8 @@ TEST(TestSendWhynter, SendDataOnly) { "m750s750m750s750m750s750m750s750m750s750m750s750m750s750m750s750" "m750s750m750s750m750s750m750s750m750s750m750s750m750s750m750s750" "m750s750m750s750m750s750m750s750m750s750m750s750m750s750m750s750" - "m750s108000", irsend.outputStr()); + "m750s52050", + irsend.outputStr()); irsend.reset(); irsend.sendWhynter(0xFFFFFFFF); @@ -29,7 +30,8 @@ TEST(TestSendWhynter, SendDataOnly) { "m750s2150m750s2150m750s2150m750s2150m750s2150m750s2150m750s2150m750s2150" "m750s2150m750s2150m750s2150m750s2150m750s2150m750s2150m750s2150m750s2150" "m750s2150m750s2150m750s2150m750s2150m750s2150m750s2150m750s2150m750s2150" - "m750s108000", irsend.outputStr()); + "m750s12200", + irsend.outputStr()); irsend.reset(); irsend.sendWhynter(0x87654321); @@ -39,7 +41,8 @@ TEST(TestSendWhynter, SendDataOnly) { "m750s750m750s2150m750s2150m750s750m750s750m750s2150m750s750m750s2150" "m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150" "m750s750m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150" - "m750s108000", irsend.outputStr()); + "m750s33850", + irsend.outputStr()); } // Test sending with different repeats. @@ -48,50 +51,55 @@ TEST(TestSendWhynter, SendWithRepeats) { irsend.begin(); irsend.reset(); - irsend.sendWhynter(0x87654321, WHYNTER_BITS, 0); // 0 repeats. + irsend.sendWhynter(0x87654321, kWhynterBits, 0); // 0 repeats. EXPECT_EQ( "m750s750m2850s2850" "m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150m750s2150" "m750s750m750s2150m750s2150m750s750m750s750m750s2150m750s750m750s2150" "m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150" "m750s750m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150" - "m750s108000", irsend.outputStr()); + "m750s33850", + irsend.outputStr()); irsend.reset(); - irsend.sendWhynter(0x87654321, WHYNTER_BITS, 1); // 1 repeat. + irsend.sendWhynter(0x87654321, kWhynterBits, 1); // 1 repeat. EXPECT_EQ( "m750s750m2850s2850" "m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150m750s2150" "m750s750m750s2150m750s2150m750s750m750s750m750s2150m750s750m750s2150" "m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150" "m750s750m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150" - "m750s108000" + "m750s33850" "m750s750m2850s2850" "m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150m750s2150" "m750s750m750s2150m750s2150m750s750m750s750m750s2150m750s750m750s2150" "m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150" "m750s750m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150" - "m750s108000", irsend.outputStr()); - irsend.sendWhynter(0x87654321, WHYNTER_BITS, 2); // 2 repeats. + "m750s33850", + irsend.outputStr()); + + irsend.reset(); + irsend.sendWhynter(0x87654321, kWhynterBits, 2); // 2 repeats. EXPECT_EQ( "m750s750m2850s2850" "m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150m750s2150" "m750s750m750s2150m750s2150m750s750m750s750m750s2150m750s750m750s2150" "m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150" "m750s750m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150" - "m750s108000" + "m750s33850" "m750s750m2850s2850" "m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150m750s2150" "m750s750m750s2150m750s2150m750s750m750s750m750s2150m750s750m750s2150" "m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150" "m750s750m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150" - "m750s108000" + "m750s33850" "m750s750m2850s2850" "m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150m750s2150" "m750s750m750s2150m750s2150m750s750m750s750m750s2150m750s750m750s2150" "m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150m750s2150" "m750s750m750s750m750s2150m750s750m750s750m750s750m750s750m750s2150" - "m750s108000", irsend.outputStr()); + "m750s33850", + irsend.outputStr()); } // Test sending an atypical data size. @@ -104,7 +112,8 @@ TEST(TestSendWhynter, SendUnusualSize) { EXPECT_EQ( "m750s750m2850s2850" "m750s750m750s750m750s750m750s750m750s750m750s750m750s750m750s750" - "m750s108000", irsend.outputStr()); + "m750s88050", + irsend.outputStr()); irsend.reset(); irsend.sendWhynter(0x1234567890ABCDEF, 64); @@ -118,7 +127,8 @@ TEST(TestSendWhynter, SendUnusualSize) { "m750s2150m750s750m750s2150m750s750m750s2150m750s750m750s2150m750s2150" "m750s2150m750s2150m750s750m750s750m750s2150m750s2150m750s750m750s2150" "m750s2150m750s2150m750s2150m750s750m750s2150m750s2150m750s2150m750s2150" - "m750s108000", irsend.outputStr()); + "m750s12200", + irsend.outputStr()); } // Tests for decodeWhynter(). @@ -133,9 +143,9 @@ TEST(TestDecodeWhynter, NormalDecodeWithStrict) { irsend.reset(); irsend.sendWhynter(0x87654321); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeWhynter(&irsend.capture, WHYNTER_BITS, true)); + ASSERT_TRUE(irrecv.decodeWhynter(&irsend.capture, kWhynterBits, true)); EXPECT_EQ(WHYNTER, irsend.capture.decode_type); - EXPECT_EQ(WHYNTER_BITS, irsend.capture.bits); + EXPECT_EQ(kWhynterBits, irsend.capture.bits); EXPECT_EQ(0x87654321, irsend.capture.value); EXPECT_EQ(0x0, irsend.capture.address); EXPECT_EQ(0x0, irsend.capture.command); @@ -150,24 +160,24 @@ TEST(TestDecodeWhynter, NormalDecodeWithRepeatAndStrict) { // Normal Whynter 32-bit message with 2 repeats. irsend.reset(); - irsend.sendWhynter(0x87654321, WHYNTER_BITS, 2); + irsend.sendWhynter(0x87654321, kWhynterBits, 2); irsend.makeDecodeResult(); - ASSERT_TRUE(irrecv.decodeWhynter(&irsend.capture, WHYNTER_BITS, true)); + ASSERT_TRUE(irrecv.decodeWhynter(&irsend.capture, kWhynterBits, true)); EXPECT_EQ(WHYNTER, irsend.capture.decode_type); - EXPECT_EQ(WHYNTER_BITS, irsend.capture.bits); + EXPECT_EQ(kWhynterBits, irsend.capture.bits); EXPECT_EQ(0x87654321, irsend.capture.value); EXPECT_FALSE(irsend.capture.repeat); - irsend.makeDecodeResult(2 * WHYNTER_BITS + 6); - ASSERT_TRUE(irrecv.decodeWhynter(&irsend.capture, WHYNTER_BITS, true)); + irsend.makeDecodeResult(2 * kWhynterBits + 6); + ASSERT_TRUE(irrecv.decodeWhynter(&irsend.capture, kWhynterBits, true)); EXPECT_EQ(WHYNTER, irsend.capture.decode_type); - EXPECT_EQ(WHYNTER_BITS, irsend.capture.bits); + EXPECT_EQ(kWhynterBits, irsend.capture.bits); EXPECT_EQ(0x87654321, irsend.capture.value); - irsend.makeDecodeResult(2 * (2 * WHYNTER_BITS + 6)); - ASSERT_TRUE(irrecv.decodeWhynter(&irsend.capture, WHYNTER_BITS, true)); + irsend.makeDecodeResult(2 * (2 * kWhynterBits + 6)); + ASSERT_TRUE(irrecv.decodeWhynter(&irsend.capture, kWhynterBits, true)); EXPECT_EQ(WHYNTER, irsend.capture.decode_type); - EXPECT_EQ(WHYNTER_BITS, irsend.capture.bits); + EXPECT_EQ(kWhynterBits, irsend.capture.bits); EXPECT_EQ(0x87654321, irsend.capture.value); } @@ -181,7 +191,7 @@ TEST(TestDecodeWhynter, DecodeWithNonStrictSizes) { irsend.sendWhynter(0x12, 8); // Illegal sized Whynter 8-bit message. irsend.makeDecodeResult(); // Should fail with strict on. - ASSERT_FALSE(irrecv.decodeWhynter(&irsend.capture, WHYNTER_BITS, true)); + ASSERT_FALSE(irrecv.decodeWhynter(&irsend.capture, kWhynterBits, true)); ASSERT_FALSE(irrecv.decodeWhynter(&irsend.capture, 8, true)); // Should pass if strict off. ASSERT_TRUE(irrecv.decodeWhynter(&irsend.capture, 8, false)); @@ -195,7 +205,7 @@ TEST(TestDecodeWhynter, DecodeWithNonStrictSizes) { irsend.sendWhynter(0x1234567890, 40); // Illegal size Whynter 40-bit message. irsend.makeDecodeResult(); // Shouldn't pass with strict when we ask for less bits than we got. - ASSERT_FALSE(irrecv.decodeWhynter(&irsend.capture, WHYNTER_BITS, true)); + ASSERT_FALSE(irrecv.decodeWhynter(&irsend.capture, kWhynterBits, true)); irsend.makeDecodeResult(); // Should fail with strict when we ask for the wrong bit size. @@ -236,12 +246,13 @@ TEST(TestDecodeWhynter, FailToDecodeNonWhynterExample) { irsend.reset(); // Modified a few entries to unexpected values, based on previous test case. - uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, 20, 20, 20, - 20, 20, 20, 127, 20, 61, 9, 20, 20, 61, 20, 20, 20, - 61, 20, 61, 20, 61, 20, 20, 20, 20, 20, 20, 20, 884}; + uint16_t gc_test[39] = {38000, 1, 1, 322, 162, 20, 61, 20, 61, 20, + 20, 20, 20, 20, 20, 20, 127, 20, 61, 9, + 20, 20, 61, 20, 20, 20, 61, 20, 61, 20, + 61, 20, 20, 20, 20, 20, 20, 20, 884}; irsend.sendGC(gc_test, 39); irsend.makeDecodeResult(); ASSERT_FALSE(irrecv.decodeWhynter(&irsend.capture)); - ASSERT_FALSE(irrecv.decodeWhynter(&irsend.capture, WHYNTER_BITS, false)); + ASSERT_FALSE(irrecv.decodeWhynter(&irsend.capture, kWhynterBits, false)); } diff --git a/lib/IRremoteESP8266-2.2.1.02/tools/Makefile b/lib/IRremoteESP8266-2.5.2.03/tools/Makefile similarity index 63% rename from lib/IRremoteESP8266-2.2.1.02/tools/Makefile rename to lib/IRremoteESP8266-2.5.2.03/tools/Makefile index 84bf6569b..c303e051d 100644 --- a/lib/IRremoteESP8266-2.2.1.02/tools/Makefile +++ b/lib/IRremoteESP8266-2.5.2.03/tools/Makefile @@ -22,10 +22,22 @@ CPPFLAGS += -DUNIT_TEST # Flags passed to the C++ compiler. CXXFLAGS += -g -Wall -Wextra -pthread -all : gc_decode +all : gc_decode mode2_decode + +run_tests : all + failed=""; \ + for py_unittest in *_test.py; do \ + echo "RUNNING: $${py_unittest}"; \ + python ./$${py_unittest} || failed="$${failed} $${py_unittest}"; \ + done; \ + if [ -n "$${failed}" ]; then \ + echo "FAIL: :-( :-( Unit test(s)$${failed} failed! :-( :-("; exit 1; \ + else \ + echo "PASS: \o/ \o/ All unit tests passed. \o/ \o/"; \ + fi clean : - rm -f *.o gc_decode + rm -f *.o *.pyc gc_decode mode2_decode # All the IR protocol object files. @@ -33,9 +45,13 @@ PROTOCOLS = ir_NEC.o ir_Sony.o ir_Samsung.o ir_JVC.o ir_RCMM.o ir_RC5_RC6.o \ ir_LG.o ir_Mitsubishi.o ir_Fujitsu.o ir_Sharp.o ir_Sanyo.o \ ir_Denon.o ir_Dish.o ir_Panasonic.o ir_Whynter.o ir_Coolix.o \ ir_Aiwa.o ir_Sherwood.o ir_Kelvinator.o ir_Daikin.o ir_Gree.o \ - ir_Pronto.o ir_GlobalCache.o ir_Nikai.o + ir_Pronto.o ir_GlobalCache.o ir_Nikai.o ir_Toshiba.o ir_Midea.o \ + ir_Magiquest.o ir_Lasertag.o ir_Carrier.o ir_Haier.o ir_Hitachi.o \ + ir_GICable.o ir_Whirlpool.o ir_Lutron.o ir_Electra.o ir_Pioneer.o \ + ir_MWM.o + # Common object files -COMMON_OBJ = IRutils.o IRtimer.o IRsend.o IRrecv.o $(PROTOCOLS) +COMMON_OBJ = IRutils.o IRtimer.o IRsend.o IRrecv.o $(PROTOCOLS) # Common dependencies COMMON_DEPS = $(USER_DIR)/IRrecv.h $(USER_DIR)/IRsend.h $(USER_DIR)/IRtimer.h \ @@ -49,8 +65,13 @@ gc_decode.o : gc_decode.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) gc_decode : $(COMMON_OBJ) gc_decode.o $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ +mode2_decode.o : mode2_decode.cpp $(COMMON_TEST_DEPS) $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -I$(USER_DIR) -I$(TEST_DIR) -c mode2_decode.cpp -IRutils.o : $(USER_DIR)/IRutils.cpp $(USER_DIR)/IRutils.h +mode2_decode : $(COMMON_OBJ) mode2_decode.o + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -lpthread $^ -o $@ + +IRutils.o : $(USER_DIR)/IRutils.cpp $(USER_DIR)/IRutils.h $(USER_DIR)/IRremoteESP8266.h $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/IRutils.cpp IRtimer.o : $(USER_DIR)/IRtimer.cpp $(USER_DIR)/IRtimer.h @@ -75,7 +96,7 @@ ir_Sherwood.o : $(USER_DIR)/ir_Sherwood.cpp $(COMMON_DEPS) ir_Sony.o : $(USER_DIR)/ir_Sony.cpp $(COMMON_DEPS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Sony.cpp -ir_Samsung.o : $(USER_DIR)/ir_Samsung.cpp $(COMMON_DEPS) +ir_Samsung.o : $(USER_DIR)/ir_Samsung.cpp $(USER_DIR)/ir_Samsung.h $(COMMON_DEPS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Samsung.cpp ir_Kelvinator.o : $(USER_DIR)/ir_Kelvinator.cpp $(USER_DIR)/ir_Kelvinator.h $(COMMON_DEPS) @@ -134,3 +155,42 @@ ir_Pronto.o : $(USER_DIR)/ir_Pronto.cpp $(GTEST_HEADERS) ir_Nikai.o : $(USER_DIR)/ir_Nikai.cpp $(GTEST_HEADERS) $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Nikai.cpp + +ir_Toshiba.o : $(USER_DIR)/ir_Toshiba.h $(USER_DIR)/ir_Toshiba.cpp $(COMMON_DEPS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Toshiba.cpp + +ir_Midea.o : $(USER_DIR)/ir_Midea.cpp $(COMMON_DEPS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Midea.cpp + +ir_Magiquest.o : $(USER_DIR)/ir_Magiquest.cpp $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Magiquest.cpp + +ir_Lasertag.o : $(USER_DIR)/ir_Lasertag.cpp $(USER_DIR)/ir_RC5_RC6.cpp $(COMMON_DEPS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Lasertag.cpp + +ir_Carrier.o : $(USER_DIR)/ir_Carrier.cpp $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Carrier.cpp + +ir_Haier.o : $(USER_DIR)/ir_Haier.cpp $(USER_DIR)/ir_Haier.h $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Haier.cpp + +ir_Hitachi.o : $(USER_DIR)/ir_Hitachi.cpp $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Hitachi.cpp + +ir_GICable.o : $(USER_DIR)/ir_GICable.cpp $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_GICable.cpp + +ir_Whirlpool.o : $(USER_DIR)/ir_Whirlpool.cpp $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Whirlpool.cpp + +ir_Lutron.o : $(USER_DIR)/ir_Lutron.cpp $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Lutron.cpp + +ir_Electra.o : $(USER_DIR)/ir_Electra.cpp $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Electra.cpp + +ir_Pioneer.o : $(USER_DIR)/ir_Pioneer.cpp $(GTEST_HEADERS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_Pioneer.cpp + +ir_MWM.o : $(USER_DIR)/ir_MWM.cpp $(USER_DIR)/ir_RC5_RC6.cpp $(COMMON_DEPS) + $(CXX) $(CPPFLAGS) $(CXXFLAGS) -c $(USER_DIR)/ir_MWM.cpp diff --git a/lib/IRremoteESP8266-2.5.2.03/tools/RawToGlobalCache.sh b/lib/IRremoteESP8266-2.5.2.03/tools/RawToGlobalCache.sh new file mode 100644 index 000000000..e0b0ebe35 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/tools/RawToGlobalCache.sh @@ -0,0 +1,53 @@ +#!/bin/bash +# Convert IRremoteESP8266's rawData output into Global Cache format. + +function isDigits() +{ + [[ "$1" =~ ^[0-9]+$ ]] +} + +function usage() +{ +cat << EOF +Usage: $0 Frequency_in_Hz + Reads an IRremoteESP8266 rawData declaration from STDIN and converts it to + GlobalCache format. + e.g. + uint16_t rawbuf[37] = { + 7930, 3952, 494, 1482, 520, 1482, 494, 1508, + 494, 520, 494, 1482, 494, 520, 494, 1482, + 494, 1482, 494, 3978, 494, 520, 494, 520, + 494, 520, 494, 520, 520, 520, 494, 520, + 494, 520, 494, 520, 494}; +EOF + exit 1 +} + +# We need a frequency argument. +if [[ $# -ne 1 ]]; then + usage +fi +HZ="$1" +# HZ must be a positive number +if ! isDigits "${HZ}"; then + usage +fi +# HZ must not be zero. +if [[ ${HZ} == 0 ]]; then + usage +fi + + +PERIOD_OFFSET=0 +period=$((((1000000 + (${HZ} / 2)) / ${HZ}) + ${PERIOD_OFFSET})) +result="${HZ},1,1" +while read line; do + # Quick and Dirty Removal of any array declaration syntax, and any commas. + line="$(echo ${line} | sed 's/uint.*{//i' | sed 's/,//g' | sed 's/};.*//g')" + for msecs in ${line}; do + if isDigits "${msecs}"; then + result="${result},$((${msecs} / ${period}))" + fi + done +done +echo "GlobalCache code = \"${result}\"" diff --git a/lib/IRremoteESP8266-2.5.2.03/tools/auto_analyse_raw_data.py b/lib/IRremoteESP8266-2.5.2.03/tools/auto_analyse_raw_data.py new file mode 100644 index 000000000..5fd399807 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/tools/auto_analyse_raw_data.py @@ -0,0 +1,432 @@ +#!/usr/bin/python +"""Attempt an automatic analysis of IRremoteESP8266's Raw data output. + Makes suggestions on key values and tried to break down the message + into likely chunks.""" +# +# Copyright 2018 David Conran +import argparse +import sys + + +class RawIRMessage(object): + """Basic analyse functions & structure for raw IR messages.""" + + # pylint: disable=too-many-instance-attributes + + def __init__(self, margin, timings, output=sys.stdout, verbose=True): + self.hdr_mark = None + self.hdr_space = None + self.bit_mark = None + self.zero_space = None + self.one_space = None + self.gaps = [] + self.margin = margin + self.marks = [] + self.mark_buckets = {} + self.spaces = [] + self.space_buckets = {} + self.output = output + self.verbose = verbose + if len(timings) <= 3: + raise ValueError("Too few message timings supplied.") + self.timings = timings + self._generate_timing_candidates() + self._calc_values() + + def _generate_timing_candidates(self): + """Determine the likely values from the given data.""" + count = 0 + for usecs in self.timings: + count = count + 1 + if count % 2: + self.marks.append(usecs) + else: + self.spaces.append(usecs) + self.marks, self.mark_buckets = self.reduce_list(self.marks) + self.spaces, self.space_buckets = self.reduce_list(self.spaces) + + def reduce_list(self, items): + """Reduce a list of numbers into buckets that are at least margin apart.""" + result = [] + last = -1 + buckets = {} + for item in sorted(items, reverse=True): + if last == -1 or item < last - self.margin: + result.append(item) + last = item + buckets[last] = [item] + else: + buckets[last].append(item) + return result, buckets + + def _usec_compare(self, seen, expected): + """Compare two usec values and see if they match within a + subtractive margin.""" + return seen <= expected and seen > expected - self.margin + + def _usec_compares(self, usecs, expecteds): + """Compare a usec value to a list of values and return True + if they are within a subtractive margin.""" + for expected in expecteds: + if self._usec_compare(usecs, expected): + return True + return False + + def display_binary(self, binary_str): + """Display common representations of the suppied binary string.""" + num = int(binary_str, 2) + bits = len(binary_str) + rev_binary_str = binary_str[::-1] + rev_num = int(rev_binary_str, 2) + self.output.write("\n Bits: %d\n" + " Hex: %s (MSB first)\n" + " %s (LSB first)\n" + " Dec: %s (MSB first)\n" + " %s (LSB first)\n" + " Bin: 0b%s (MSB first)\n" + " 0b%s (LSB first)\n" % + (bits, "0x{0:0{1}X}".format(num, bits / 4), + "0x{0:0{1}X}".format(rev_num, bits / 4), num, rev_num, + binary_str, rev_binary_str)) + + def add_data_code(self, bin_str, footer=True): + """Add the common "data" sequence of code to send the bulk of a message.""" + # pylint: disable=no-self-use + code = [] + code.append(" // Data") + code.append(" // e.g. data = 0x%X, nbits = %d" % (int(bin_str, 2), + len(bin_str))) + code.append(" sendData(kBitMark, kOneSpace, kBitMark, kZeroSpace, data, " + "nbits, true);") + if footer: + code.append(" // Footer") + code.append(" mark(kBitMark);") + return code + + def _calc_values(self): + """Calculate the values which describe the standard timings + for the protocol.""" + if self.verbose: + self.output.write("Potential Mark Candidates:\n" + "%s\n" + "Potential Space Candidates:\n" + "%s\n" % (str(self.marks), str(self.spaces))) + # Largest mark is likely the kHdrMark + self.hdr_mark = self.marks[0] + # The bit mark is likely to be the smallest mark. + self.bit_mark = self.marks[-1] + + if self.is_space_encoded() and len(self.spaces) >= 3: + if self.verbose and len(self.marks) > 2: + self.output.write("DANGER: Unexpected and unused mark timings!") + # We should have 3 space candidates at least. + # They should be: zero_space (smallest), one_space, & hdr_space (largest) + spaces = list(self.spaces) + self.zero_space = spaces.pop() + self.one_space = spaces.pop() + self.hdr_space = spaces.pop() + # Rest are probably message gaps + self.gaps = spaces + + def is_space_encoded(self): + """Make an educated guess if the message is space encoded.""" + return len(self.spaces) > len(self.marks) + + def is_hdr_mark(self, usec): + """Is usec the header mark?""" + return self._usec_compare(usec, self.hdr_mark) + + def is_hdr_space(self, usec): + """Is usec the header space?""" + return self._usec_compare(usec, self.hdr_space) + + def is_bit_mark(self, usec): + """Is usec the bit mark?""" + return self._usec_compare(usec, self.bit_mark) + + def is_one_space(self, usec): + """Is usec the one space?""" + return self._usec_compare(usec, self.one_space) + + def is_zero_space(self, usec): + """Is usec the zero_space?""" + return self._usec_compare(usec, self.zero_space) + + def is_gap(self, usec): + """Is usec the a space gap?""" + return self._usec_compares(usec, self.gaps) + + +def avg_list(items): + """Return the average of a list of numbers.""" + if items: + return sum(items) / len(items) + return 0 + + +def add_bit(so_far, bit, output=sys.stdout): + """Add a bit to the end of the bits collected so far.""" + if bit == "reset": + return "" + output.write(str(bit)) # This effectively displays in LSB first order. + return so_far + str(bit) # Storing it in MSB first order. + + +def convert_rawdata(data_str): + """Parse a C++ rawdata declaration into a list of values.""" + start = data_str.find('{') + end = data_str.find('}') + if end == -1: + end = len(data_str) + if start > end: + raise ValueError("Raw Data not parsible due to parentheses placement.") + data_str = data_str[start + 1:end] + results = [] + for timing in [x.strip() for x in data_str.split(',')]: + try: + results.append(int(timing)) + except ValueError: + raise ValueError( + "Raw Data contains a non-numeric value of '%s'." % timing) + return results + + +def dump_constants(message, defines, output=sys.stdout): + """Dump the key constants and generate the C++ #defines.""" + hdr_mark = avg_list(message.mark_buckets[message.hdr_mark]) + bit_mark = avg_list(message.mark_buckets[message.bit_mark]) + hdr_space = avg_list(message.space_buckets[message.hdr_space]) + one_space = avg_list(message.space_buckets[message.one_space]) + zero_space = avg_list(message.space_buckets[message.zero_space]) + + output.write("Guessing key value:\n" + "kHdrMark = %d\n" + "kHdrSpace = %d\n" + "kBitMark = %d\n" + "kOneSpace = %d\n" + "kZeroSpace = %d\n" % (hdr_mark, hdr_space, bit_mark, one_space, + zero_space)) + defines.append("const uint16_t kHdrMark = %d;" % hdr_mark) + defines.append("const uint16_t kBitMark = %d;" % bit_mark) + defines.append("const uint16_t kHdrSpace = %d;" % hdr_space) + defines.append("const uint16_t kOneSpace = %d;" % one_space) + defines.append("const uint16_t kZeroSpace = %d;" % zero_space) + + avg_gaps = [avg_list(message.space_buckets[x]) for x in message.gaps] + if len(message.gaps) == 1: + output.write("kSpaceGap = %d\n" % avg_gaps[0]) + defines.append("const uint16_t kSpaceGap = %d;" % avg_gaps[0]) + else: + count = 0 + for gap in avg_gaps: + # We probably (still) have a gap in the protocol. + count = count + 1 + output.write("kSpaceGap%d = %d\n" % (count, gap)) + defines.append("const uint16_t kSpaceGap%d = %d;" % (count, gap)) + + +def parse_and_report(rawdata_str, margin, gen_code=False, output=sys.stdout): + """Analyse the rawdata c++ definition of a IR message.""" + defines = [] + function_code = [] + + # Parse the input. + rawdata = convert_rawdata(rawdata_str) + + output.write("Found %d timing entries.\n" % len(rawdata)) + + message = RawIRMessage(margin, rawdata, output) + output.write("\nGuessing encoding type:\n") + if message.is_space_encoded(): + output.write("Looks like it uses space encoding. Yay!\n\n") + dump_constants(message, defines, output) + else: + output.write("Sorry, it looks like it is Mark encoded. " + "I can't do that yet. Exiting.\n") + sys.exit(1) + total_bits = decode_data(message, defines, function_code, output) + if gen_code: + generate_irsend_code(defines, function_code, total_bits, output) + + +def decode_data(message, defines, function_code, output=sys.stdout): + """Decode the data sequence with the given values in mind.""" + # pylint: disable=too-many-branches,too-many-statements + + # Now we have likely candidates for the key values, go through the original + # sequence and break it up and indicate accordingly. + + output.write("\nDecoding protocol based on analysis so far:\n\n") + state = "" + count = 1 + total_bits = "" + binary_value = add_bit("", "reset") + + function_code.extend([ + "// Function should be safe up to 64 bits.", + "void IRsend::sendXyz(const uint64_t data, const uint16_t" + " nbits, const uint16_t repeat) {", + " enableIROut(38); // A guess. Most common frequency.", + " for (uint16_t r = 0; r <= repeat; r++) {" + ]) + + for usec in message.timings: + if (message.is_hdr_mark(usec) and count % 2 and + not message.is_bit_mark(usec)): + state = "HM" + if binary_value: + message.display_binary(binary_value) + function_code.extend(message.add_data_code(binary_value, False)) + total_bits = total_bits + binary_value + binary_value = add_bit(binary_value, "reset") + output.write("kHdrMark+") + function_code.extend([" // Header", " mark(kHdrMark);"]) + elif message.is_hdr_space(usec) and not message.is_one_space(usec): + if state != "HM": + if binary_value: + message.display_binary(binary_value) + total_bits = total_bits + binary_value + function_code.extend(message.add_data_code(binary_value)) + binary_value = add_bit(binary_value, "reset") + output.write("UNEXPECTED->") + state = "HS" + output.write("kHdrSpace+") + function_code.append(" space(kHdrSpace);") + elif message.is_bit_mark(usec) and count % 2: + if state != "HS" and state != "BS": + output.write("kBitMark(UNEXPECTED)") + state = "BM" + elif message.is_zero_space(usec): + if state != "BM": + output.write("kZeroSpace(UNEXPECTED)") + state = "BS" + binary_value = add_bit(binary_value, 0, output) + elif message.is_one_space(usec): + if state != "BM": + output.write("kOneSpace(UNEXPECTED)") + state = "BS" + binary_value = add_bit(binary_value, 1, output) + elif message.is_gap(usec): + if state != "BM": + output.write("UNEXPECTED->") + state = "GS" + output.write("GAP(%d)" % usec) + if binary_value: + message.display_binary(binary_value) + function_code.extend(message.add_data_code(binary_value)) + else: + function_code.extend([" // Gap", " mark(kBitMark);"]) + function_code.append(" space(kSpaceGap);") + total_bits = total_bits + binary_value + binary_value = add_bit(binary_value, "reset") + else: + output.write("UNKNOWN(%d)" % usec) + state = "UNK" + count = count + 1 + if binary_value: + message.display_binary(binary_value) + function_code.extend(message.add_data_code(binary_value)) + function_code.extend([ + " space(100000); // A 100% made up guess of the gap" + " between messages.", " }", "}" + ]) + + total_bits = total_bits + binary_value + output.write("\nTotal Nr. of suspected bits: %d\n" % len(total_bits)) + defines.append("const uint16_t kXyzBits = %d;" % len(total_bits)) + if len(total_bits) > 64: + defines.append("const uint16_t kXyzStateLength = %d;" % + (len(total_bits) / 8)) + return total_bits + + +def generate_irsend_code(defines, normal, bits_str, output=sys.stdout): + """Output the estimated C++ code to reproduce the IR message.""" + output.write("\nGenerating a VERY rough code outline:\n\n" + "// WARNING: This probably isn't directly usable." + " It's a guide only.\n") + for line in defines: + output.write("%s\n" % line) + + if len(bits_str) > 64: # Will it fit in a uint64_t? + output.write("// DANGER: More than 64 bits detected. A uint64_t for " + "'data' won't work!\n") + # Display the "normal" version's code incase there are some + # oddities in it. + for line in normal: + output.write("%s\n" % line) + + if len(bits_str) > 64: # Will it fit in a uint64_t? + output.write("\n\n// Alternative >64 bit Function\n" + "void IRsend::sendXyz(uint8_t data[], uint16_t nbytes," + " uint16_t repeat) {\n" + " // nbytes should typically be kXyzStateLength\n" + " // data should typically be:\n" + " // uint8_t data[kXyzStateLength] = {0x%s};\n" + " // data[] is assumed to be in MSB order for this code.\n" + " for (uint16_t r = 0; r <= repeat; r++) {\n" + " sendGeneric(kHdrMark, kHdrSpace,\n" + " kBitMark, kOneSpace,\n" + " kBitMark, kZeroSpace,\n" + " kBitMark,\n" + " 100000, // 100%% made-up guess at the" + " message gap.\n" + " data, nbytes,\n" + " 38000, // Complete guess of the modulation" + " frequency.\n" + " true, 0, 50);\n" + " }\n" + "}\n" % ", 0x".join("%02X" % int(bits_str[i:i + 8], 2) + for i in range(0, len(bits_str), 8))) + + +def main(): + """Parse the commandline arguments and call the method.""" + arg_parser = argparse.ArgumentParser( + description="Read an IRremoteESP8266 rawData declaration and tries to " + "analyse it.", + formatter_class=argparse.ArgumentDefaultsHelpFormatter) + arg_parser.add_argument( + "-g", + "--code", + action="store_true", + default=False, + dest="gen_code", + help="Generate a C++ code outline to aid making an IRsend function.") + arg_group = arg_parser.add_mutually_exclusive_group(required=True) + arg_group.add_argument( + "rawdata", + help="A rawData line from IRrecvDumpV2. e.g. 'uint16_t rawbuf[37] = {" + "7930, 3952, 494, 1482, 520, 1482, 494, 1508, 494, 520, 494, 1482, 494, " + "520, 494, 1482, 494, 1482, 494, 3978, 494, 520, 494, 520, 494, 520, " + "494, 520, 520, 520, 494, 520, 494, 520, 494, 520, 494};'", + nargs="?") + arg_group.add_argument( + "-f", "--file", help="Read in a rawData line from the file.") + arg_parser.add_argument( + "-r", + "--range", + type=int, + help="Max number of micro-seconds difference between values to consider" + " it the same value.", + dest="margin", + default=200) + arg_group.add_argument( + "--stdin", + help="Read in a rawData line from STDIN.", + action="store_true", + default=False) + arg_options = arg_parser.parse_args() + + if arg_options.stdin: + data = sys.stdin.read() + elif arg_options.file: + with open(arg_options.file) as input_file: + data = input_file.read() + else: + data = arg_options.rawdata + parse_and_report(data, arg_options.margin, arg_options.gen_code) + + +if __name__ == '__main__': + main() diff --git a/lib/IRremoteESP8266-2.5.2.03/tools/auto_analyse_raw_data_test.py b/lib/IRremoteESP8266-2.5.2.03/tools/auto_analyse_raw_data_test.py new file mode 100644 index 000000000..681ff5520 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/tools/auto_analyse_raw_data_test.py @@ -0,0 +1,492 @@ +#!/usr/bin/python +"""Unit tests for auto_analyse_raw_data.py""" +import StringIO +import unittest +import auto_analyse_raw_data as analyse + + +class TestRawIRMessage(unittest.TestCase): + """Unit tests for the RawIRMessage class.""" + + # pylint: disable=too-many-public-methods + + def test_display_binary(self): + """Test the display_binary() method.""" + output = StringIO.StringIO() + message = analyse.RawIRMessage(100, [8000, 4000, 500, 500, 500], output, + False) + self.assertEqual(output.getvalue(), '') + message.display_binary("10101010") + message.display_binary("0000000000000000") + message.display_binary("00010010001101000101011001111000") + self.assertEqual(output.getvalue(), '\n' + ' Bits: 8\n' + ' Hex: 0xAA (MSB first)\n' + ' 0x55 (LSB first)\n' + ' Dec: 170 (MSB first)\n' + ' 85 (LSB first)\n' + ' Bin: 0b10101010 (MSB first)\n' + ' 0b01010101 (LSB first)\n' + '\n' + ' Bits: 16\n' + ' Hex: 0x0000 (MSB first)\n' + ' 0x0000 (LSB first)\n' + ' Dec: 0 (MSB first)\n' + ' 0 (LSB first)\n' + ' Bin: 0b0000000000000000 (MSB first)\n' + ' 0b0000000000000000 (LSB first)\n' + '\n' + ' Bits: 32\n' + ' Hex: 0x12345678 (MSB first)\n' + ' 0x1E6A2C48 (LSB first)\n' + ' Dec: 305419896 (MSB first)\n' + ' 510274632 (LSB first)\n' + ' Bin: 0b00010010001101000101011001111000 (MSB first)\n' + ' 0b00011110011010100010110001001000 (LSB first)\n') + + +class TestAutoAnalyseRawData(unittest.TestCase): + """Unit tests for the functions in AutoAnalyseRawData.""" + + # pylint: disable=too-many-public-methods + + def test_dump_constants_simple(self): + """Simple tests for the dump_constants() function.""" + ignore = StringIO.StringIO() + output = StringIO.StringIO() + defs = [] + message = analyse.RawIRMessage(200, [ + 7930, 3952, 494, 1482, 520, 1482, 494, 1508, 494, 520, 494, 1482, 494, + 520, 494, 1482, 494, 1482, 494, 3978, 494, 520, 494, 520, 494, 520, 494, + 520, 520, 520, 494, 520, 494, 520, 494, 1482, 494 + ], ignore) + analyse.dump_constants(message, defs, output) + self.assertEqual(defs, [ + 'const uint16_t kHdrMark = 7930;', 'const uint16_t kBitMark = 496;', + 'const uint16_t kHdrSpace = 3965;', 'const uint16_t kOneSpace = 1485;', + 'const uint16_t kZeroSpace = 520;' + ]) + self.assertEqual(output.getvalue(), 'Guessing key value:\n' + 'kHdrMark = 7930\n' + 'kHdrSpace = 3965\n' + 'kBitMark = 496\n' + 'kOneSpace = 1485\n' + 'kZeroSpace = 520\n') + + def test_dump_constants_aircon(self): + """More complex tests for the dump_constants() function.""" + ignore = StringIO.StringIO() + output = StringIO.StringIO() + defs = [] + message = analyse.RawIRMessage(200, [ + 9008, 4496, 644, 1660, 676, 530, 648, 558, 672, 1636, 646, 1660, 644, + 556, 650, 584, 626, 560, 644, 580, 628, 1680, 624, 560, 648, 1662, 644, + 582, 648, 536, 674, 530, 646, 580, 628, 560, 670, 532, 646, 562, 644, + 556, 672, 536, 648, 1662, 646, 1660, 652, 554, 644, 558, 672, 538, 644, + 560, 668, 560, 648, 1638, 668, 536, 644, 1660, 668, 532, 648, 560, 648, + 1660, 674, 554, 622, 19990, 646, 580, 624, 1660, 648, 556, 648, 558, + 674, 556, 622, 560, 644, 564, 668, 536, 646, 1662, 646, 1658, 672, 534, + 648, 558, 644, 562, 648, 1662, 644, 584, 622, 558, 648, 562, 668, 534, + 670, 536, 670, 532, 672, 536, 646, 560, 646, 558, 648, 558, 670, 534, + 650, 558, 646, 560, 646, 560, 668, 1638, 646, 1662, 646, 1660, 646, + 1660, 648 + ], ignore) + analyse.dump_constants(message, defs, output) + self.assertEqual(defs, [ + 'const uint16_t kHdrMark = 9008;', 'const uint16_t kBitMark = 650;', + 'const uint16_t kHdrSpace = 4496;', 'const uint16_t kOneSpace = 1657;', + 'const uint16_t kZeroSpace = 554;', 'const uint16_t kSpaceGap = 19990;' + ]) + self.assertEqual(output.getvalue(), 'Guessing key value:\n' + 'kHdrMark = 9008\n' + 'kHdrSpace = 4496\n' + 'kBitMark = 650\n' + 'kOneSpace = 1657\n' + 'kZeroSpace = 554\n' + 'kSpaceGap = 19990\n') + + def test_convert_rawdata(self): + """Tests for the convert_rawdata() function.""" + # trivial cases + self.assertEqual(analyse.convert_rawdata("0"), [0]) + with self.assertRaises(ValueError) as context: + analyse.convert_rawdata("") + self.assertEqual(context.exception.message, + "Raw Data contains a non-numeric value of ''.") + + # Single parenthesis + self.assertEqual(analyse.convert_rawdata("foo {10"), [10]) + self.assertEqual(analyse.convert_rawdata("20} bar"), [20]) + + # No parentheses + self.assertEqual(analyse.convert_rawdata("10,20 , 30"), [10, 20, 30]) + + # Dual parentheses + self.assertEqual(analyse.convert_rawdata("{10,20 , 30}"), [10, 20, 30]) + self.assertEqual(analyse.convert_rawdata("foo{10,20}bar"), [10, 20]) + + # Many parentheses + self.assertEqual(analyse.convert_rawdata("foo{10,20}{bar}"), [10, 20]) + self.assertEqual(analyse.convert_rawdata("foo{10,20}{bar}}{"), [10, 20]) + + # Bad parentheses + with self.assertRaises(ValueError) as context: + analyse.convert_rawdata("}10{") + self.assertEqual(context.exception.message, + "Raw Data not parsible due to parentheses placement.") + + # Non base-10 values + with self.assertRaises(ValueError) as context: + analyse.convert_rawdata("10, 20, foo, bar, 30") + self.assertEqual(context.exception.message, + "Raw Data contains a non-numeric value of 'foo'.") + + # A messy usual "good" case. + input_str = """uint16_t rawbuf[6] = { + 9008, 4496, 644, + 1660, 676, + + 530} + ;""" + self.assertEqual( + analyse.convert_rawdata(input_str), [9008, 4496, 644, 1660, 676, 530]) + + def test_parse_and_report(self): + """Tests for the parse_and_report() function.""" + + # Without code generation. + output = StringIO.StringIO() + input_str = """ + uint16_t rawbuf[139] = {9008, 4496, 644, 1660, 676, 530, 648, 558, 672, + 1636, 646, 1660, 644, 556, 650, 584, 626, 560, 644, 580, 628, 1680, + 624, 560, 648, 1662, 644, 582, 648, 536, 674, 530, 646, 580, 628, + 560, 670, 532, 646, 562, 644, 556, 672, 536, 648, 1662, 646, 1660, + 652, 554, 644, 558, 672, 538, 644, 560, 668, 560, 648, 1638, 668, + 536, 644, 1660, 668, 532, 648, 560, 648, 1660, 674, 554, 622, 19990, + 646, 580, 624, 1660, 648, 556, 648, 558, 674, 556, 622, 560, 644, + 564, 668, 536, 646, 1662, 646, 1658, 672, 534, 648, 558, 644, 562, + 648, 1662, 644, 584, 622, 558, 648, 562, 668, 534, 670, 536, 670, + 532, 672, 536, 646, 560, 646, 558, 648, 558, 670, 534, 650, 558, + 646, 560, 646, 560, 668, 1638, 646, 1662, 646, 1660, 646, 1660, + 648};""" + analyse.parse_and_report(input_str, 200, False, output) + self.assertEqual( + output.getvalue(), 'Found 139 timing entries.\n' + 'Potential Mark Candidates:\n' + '[9008, 676]\n' + 'Potential Space Candidates:\n' + '[19990, 4496, 1680, 584]\n' + '\n' + 'Guessing encoding type:\n' + 'Looks like it uses space encoding. Yay!\n' + '\n' + 'Guessing key value:\n' + 'kHdrMark = 9008\n' + 'kHdrSpace = 4496\n' + 'kBitMark = 650\n' + 'kOneSpace = 1657\n' + 'kZeroSpace = 554\n' + 'kSpaceGap = 19990\n' + '\n' + 'Decoding protocol based on analysis so far:\n' + '\n' + 'kHdrMark+kHdrSpace+10011000010100000000011000001010010GAP(19990)\n' + ' Bits: 35\n' + ' Hex: 0x4C2803052 (MSB first)\n' + ' 0x250600A19 (LSB first)\n' + ' Dec: 20443050066 (MSB first)\n' + ' 9938405913 (LSB first)\n' + ' Bin: 0b10011000010100000000011000001010010 (MSB first)\n' + ' 0b01001010000011000000000101000011001 (LSB first)\n' + 'kBitMark(UNEXPECTED)01000000110001000000000000001111\n' + ' Bits: 32\n' + ' Hex: 0x40C4000F (MSB first)\n' + ' 0xF0002302 (LSB first)\n' + ' Dec: 1086586895 (MSB first)\n' + ' 4026540802 (LSB first)\n' + ' Bin: 0b01000000110001000000000000001111 (MSB first)\n' + ' 0b11110000000000000010001100000010 (LSB first)\n' + '\n' + 'Total Nr. of suspected bits: 67\n') + + # With code generation. + output = StringIO.StringIO() + input_str = """ + uint16_t rawbuf[37] = {7930, 3952, 494, 1482, 520, 1482, 494, + 1508, 494, 520, 494, 1482, 494, 520, 494, 1482, 494, 1482, 494, + 3978, 494, 520, 494, 520, 494, 520, 494, 520, 520, 520, 494, 520, + 494, 520, 494, 1482, 494};""" + analyse.parse_and_report(input_str, 200, True, output) + self.assertEqual( + output.getvalue(), 'Found 37 timing entries.\n' + 'Potential Mark Candidates:\n' + '[7930, 520]\n' + 'Potential Space Candidates:\n' + '[3978, 1508, 520]\n' + '\n' + 'Guessing encoding type:\n' + 'Looks like it uses space encoding. Yay!\n' + '\n' + 'Guessing key value:\n' + 'kHdrMark = 7930\n' + 'kHdrSpace = 3965\n' + 'kBitMark = 496\n' + 'kOneSpace = 1485\n' + 'kZeroSpace = 520\n' + '\n' + 'Decoding protocol based on analysis so far:\n' + '\n' + 'kHdrMark+kHdrSpace+11101011\n' + ' Bits: 8\n' + ' Hex: 0xEB (MSB first)\n' + ' 0xD7 (LSB first)\n' + ' Dec: 235 (MSB first)\n' + ' 215 (LSB first)\n' + ' Bin: 0b11101011 (MSB first)\n' + ' 0b11010111 (LSB first)\n' + 'UNEXPECTED->kHdrSpace+00000001\n' + ' Bits: 8\n' + ' Hex: 0x01 (MSB first)\n' + ' 0x80 (LSB first)\n' + ' Dec: 1 (MSB first)\n' + ' 128 (LSB first)\n' + ' Bin: 0b00000001 (MSB first)\n' + ' 0b10000000 (LSB first)\n' + '\n' + 'Total Nr. of suspected bits: 16\n' + '\n' + 'Generating a VERY rough code outline:\n' + '\n' + "// WARNING: This probably isn't directly usable. It's a guide only.\n" + 'const uint16_t kHdrMark = 7930;\n' + 'const uint16_t kBitMark = 496;\n' + 'const uint16_t kHdrSpace = 3965;\n' + 'const uint16_t kOneSpace = 1485;\n' + 'const uint16_t kZeroSpace = 520;\n' + 'const uint16_t kXyzBits = 16;\n' + '// Function should be safe up to 64 bits.\n' + 'void IRsend::sendXyz(const uint64_t data, const uint16_t nbits,' + ' const uint16_t repeat) {\n' + ' enableIROut(38); // A guess. Most common frequency.\n' + ' for (uint16_t r = 0; r <= repeat; r++) {\n' + ' // Header\n' + ' mark(kHdrMark);\n' + ' space(kHdrSpace);\n' + ' // Data\n' + ' // e.g. data = 0xEB, nbits = 8\n' + ' sendData(kBitMark, kOneSpace, kBitMark, kZeroSpace, data, nbits,' + ' true);\n' + ' // Footer\n' + ' mark(kBitMark);\n' + ' space(kHdrSpace);\n' + ' // Data\n' + ' // e.g. data = 0x1, nbits = 8\n' + ' sendData(kBitMark, kOneSpace, kBitMark, kZeroSpace, data, nbits,' + ' true);\n' + ' // Footer\n' + ' mark(kBitMark);\n' + ' space(100000); // A 100% made up guess of the gap between' + ' messages.\n' + ' }\n' + '}\n') + + def test_unusual_gaps(self): + """Tests for unusual Space Gaps in parse_and_report() function.""" + + # Tests for unusual Gaps. (Issue #482) + output = StringIO.StringIO() + input_str = """ + uint16_t rawbuf[272] = {3485, 3512, 864, 864, 864, 2620, 864, 864, + 864, 2620, 864, 2620, 864, 2620, 864, 2620, 864, 2620, 864, 864, + 864, 2620, 864, 864, 864, 2620, 864, 2620, 864, 2620, 864, 2620, + 864, 2620, 864, 864, 864, 2620, 864, 864, 864, 864, 864, 864, + 864, 864, 864, 864, 864, 864, 864, 864, 864, 2620, 864, 864, + 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + 3485, 3512, 864, 864, 864, 2620, 864, 864, 864, 2620, 864, 2620, + 864, 2620, 864, 2620, 864, 2620, 864, 864, 864, 2620, 864, 864, + 864, 2620, 864, 2620, 864, 2620, 864, 2620, 864, 2620, 864, 864, + 864, 2620, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, 864, + 864, 864, 864, 864, 2620, 864, 864, 864, 864, 864, 864, 864, 864, + 864, 864, 864, 864, + 3485, 3512, 864, 13996, + 3485, 3512, 864, 864, 864, 864, 864, 2620, 864, 864, 864, 2620, + 864, 2620, 864, 2620, 864, 2620, 864, 864, 864, 864, 864, 2620, + 864, 864, 864, 2620, 864, 2620, 864, 2620, 864, 2620, 864, 864, + 864, 2620, 864, 2620, 864, 864, 864, 2620, 864, 2620, 864, 864, + 864, 864, 864, 864, 864, 2620, 864, 2620, 864, 864, 864, 2620, + 864, 2620, 864, 864, 864, 864, + 3485, 3512, 864, 864, 864, 864, 864, 2620, 864, 864, 864, 2620, + 864, 2620, 864, 2620, 864, 2620, 864, 864, 864, 864, 864, 2620, + 864, 864, 864, 2620, 864, 2620, 864, 2620, 864, 2620, 864, 864, + 864, 2620, 864, 2620, 864, 864, 864, 2620, 864, 2620, 864, 864, + 864, 864, 864, 864, 864, 2620, 864, 2620, 864, 864, 864, 2620, + 864, 2620, 864, 864, 864, 864, 3485, 3512, 864, 13996};""" + analyse.parse_and_report(input_str, 200, True, output) + self.assertEqual( + output.getvalue(), 'Found 272 timing entries.\n' + 'Potential Mark Candidates:\n' + '[3485, 864]\n' + 'Potential Space Candidates:\n' + '[13996, 3512, 2620, 864]\n' + '\n' + 'Guessing encoding type:\n' + 'Looks like it uses space encoding. Yay!\n' + '\n' + 'Guessing key value:\n' + 'kHdrMark = 3485\n' + 'kHdrSpace = 3512\n' + 'kBitMark = 864\n' + 'kOneSpace = 2620\n' + 'kZeroSpace = 864\n' + 'kSpaceGap = 13996\n' + '\n' + 'Decoding protocol based on analysis so far:\n' + '\n' + 'kHdrMark+kHdrSpace+01011111010111110100000001000000\n' + ' Bits: 32\n' + ' Hex: 0x5F5F4040 (MSB first)\n' + ' 0x0202FAFA (LSB first)\n' + ' Dec: 1600077888 (MSB first)\n' + ' 33749754 (LSB first)\n' + ' Bin: 0b01011111010111110100000001000000 (MSB first)\n' + ' 0b00000010000000101111101011111010 (LSB first)\n' + 'kHdrMark+kHdrSpace+01011111010111110100000001000000\n' + ' Bits: 32\n' + ' Hex: 0x5F5F4040 (MSB first)\n' + ' 0x0202FAFA (LSB first)\n' + ' Dec: 1600077888 (MSB first)\n' + ' 33749754 (LSB first)\n' + ' Bin: 0b01011111010111110100000001000000 (MSB first)\n' + ' 0b00000010000000101111101011111010 (LSB first)\n' + 'kHdrMark+kHdrSpace+GAP(13996)' + 'kHdrMark+kHdrSpace+00101111001011110110110001101100\n' + ' Bits: 32\n' + ' Hex: 0x2F2F6C6C (MSB first)\n' + ' 0x3636F4F4 (LSB first)\n' + ' Dec: 791637100 (MSB first)\n' + ' 909571316 (LSB first)\n' + ' Bin: 0b00101111001011110110110001101100 (MSB first)\n' + ' 0b00110110001101101111010011110100 (LSB first)\n' + 'kHdrMark+kHdrSpace+00101111001011110110110001101100\n' + ' Bits: 32\n' + ' Hex: 0x2F2F6C6C (MSB first)\n' + ' 0x3636F4F4 (LSB first)\n' + ' Dec: 791637100 (MSB first)\n' + ' 909571316 (LSB first)\n' + ' Bin: 0b00101111001011110110110001101100 (MSB first)\n' + ' 0b00110110001101101111010011110100 (LSB first)\n' + 'kHdrMark+kHdrSpace+GAP(13996)\n' + 'Total Nr. of suspected bits: 128\n' + '\n' + 'Generating a VERY rough code outline:\n' + '\n' + "// WARNING: This probably isn't directly usable. It's a guide only.\n" + 'const uint16_t kHdrMark = 3485;\n' + 'const uint16_t kBitMark = 864;\n' + 'const uint16_t kHdrSpace = 3512;\n' + 'const uint16_t kOneSpace = 2620;\n' + 'const uint16_t kZeroSpace = 864;\n' + 'const uint16_t kSpaceGap = 13996;\n' + 'const uint16_t kXyzBits = 128;\n' + 'const uint16_t kXyzStateLength = 16;\n' + "// DANGER: More than 64 bits detected. A uint64_t for 'data' won't" + ' work!\n' + '// Function should be safe up to 64 bits.\n' + 'void IRsend::sendXyz(const uint64_t data, const uint16_t nbits,' + ' const uint16_t repeat) {\n' + ' enableIROut(38); // A guess. Most common frequency.\n' + ' for (uint16_t r = 0; r <= repeat; r++) {\n' + ' // Header\n' + ' mark(kHdrMark);\n' + ' space(kHdrSpace);\n' + ' // Data\n' + ' // e.g. data = 0x5F5F4040, nbits = 32\n' + ' sendData(kBitMark, kOneSpace, kBitMark, kZeroSpace, data, nbits,' + ' true);\n' + ' // Header\n' + ' mark(kHdrMark);\n' + ' space(kHdrSpace);\n' + ' // Data\n' + ' // e.g. data = 0x5F5F4040, nbits = 32\n' + ' sendData(kBitMark, kOneSpace, kBitMark, kZeroSpace, data, nbits,' + ' true);\n' + ' // Header\n' + ' mark(kHdrMark);\n' + ' space(kHdrSpace);\n' + ' // Gap\n' + ' mark(kBitMark);\n' + ' space(kSpaceGap);\n' + ' // Header\n' + ' mark(kHdrMark);\n' + ' space(kHdrSpace);\n' + ' // Data\n' + ' // e.g. data = 0x2F2F6C6C, nbits = 32\n' + ' sendData(kBitMark, kOneSpace, kBitMark, kZeroSpace, data, nbits,' + ' true);\n' + ' // Header\n' + ' mark(kHdrMark);\n' + ' space(kHdrSpace);\n' + ' // Data\n' + ' // e.g. data = 0x2F2F6C6C, nbits = 32\n' + ' sendData(kBitMark, kOneSpace, kBitMark, kZeroSpace, data, nbits,' + ' true);\n' + ' // Header\n' + ' mark(kHdrMark);\n' + ' space(kHdrSpace);\n' + ' // Gap\n' + ' mark(kBitMark);\n' + ' space(kSpaceGap);\n' + ' space(100000); // A 100% made up guess of the gap between' + ' messages.\n' + ' }\n' + '}\n' + '\n' + '\n' + '// Alternative >64 bit Function\n' + 'void IRsend::sendXyz(uint8_t data[], uint16_t nbytes, uint16_t repeat)' + ' {\n' + ' // nbytes should typically be kXyzStateLength\n' + ' // data should typically be:\n' + ' // uint8_t data[kXyzStateLength] = {0x5F, 0x5F, 0x40, 0x40, 0x5F,' + ' 0x5F, 0x40, 0x40, 0x2F, 0x2F, 0x6C, 0x6C, 0x2F, 0x2F, 0x6C, 0x6C};\n' + ' // data[] is assumed to be in MSB order for this code.\n' + ' for (uint16_t r = 0; r <= repeat; r++) {\n' + ' sendGeneric(kHdrMark, kHdrSpace,\n' + ' kBitMark, kOneSpace,\n' + ' kBitMark, kZeroSpace,\n' + ' kBitMark,\n' + ' 100000, // 100% made-up guess at the message gap.\n' + ' data, nbytes,\n' + ' 38000, // Complete guess of the modulation' + ' frequency.\n' + ' true, 0, 50);\n' + ' }\n' + '}\n') + + def test_reduce_list(self): + """Tests for the reduce_list method.""" + + ignore = StringIO.StringIO() + message = analyse.RawIRMessage(200, [ + 7930, 3952, 494, 1482, 520, 1482, 494, 1508, 494, 520, 494, 1482, 494, + 520, 494, 1482, 494, 1482, 494, 3978, 494, 520, 494, 520, 494, 520, 494, + 520, 520, 520, 494, 520, 494, 520, 494, 1482, 494 + ], ignore) + test_space_data = [4496, 1660, 530, 558, 1636, 1660, 556] + result_list, result_dict = message.reduce_list(test_space_data) + self.assertEqual([4496, 1660, 558], result_list) + self.assertEqual({ + 558: [558, 556, 530], + 1660: [1660, 1660, 1636], + 4496: [4496] + }, result_dict) + + def test_avg_list(self): + """Tests for the avg_list method.""" + + self.assertEqual(0, analyse.avg_list([])) + self.assertEqual(23, analyse.avg_list([10, 20, 40])) + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/lib/IRremoteESP8266-2.5.2.03/tools/gc_decode.cpp b/lib/IRremoteESP8266-2.5.2.03/tools/gc_decode.cpp new file mode 100644 index 000000000..52ffd17b7 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/tools/gc_decode.cpp @@ -0,0 +1,109 @@ +// Quick and dirty tool to decode GlobalCache (GC) codes +// and ProntoHex codes +// Copyright 2017 Jorge Cisneros + +#include +#include +#include +#include +#include +#include "IRsend.h" +#include "IRsend_test.h" +#include "IRutils.h" + +const uint16_t kMaxGcCodeLength = 10000; + +void str_to_uint16(char *str, uint16_t *res, uint8_t base) { + char *end; + errno = 0; + intmax_t val = strtoimax(str, &end, base); + if (errno == ERANGE || val < 0 || val > UINT16_MAX || end == str || + *end != '\0') + return; + *res = (uint16_t)val; +} + +void usage_error(char *name) { + std::cerr << "Usage: " << name << " [-raw] " << std::endl + << "Usage: " << name << " -prontohex [-raw] " + << std::endl; +} + +int main(int argc, char *argv[]) { + int argv_offset = 1; + bool dumpraw = false; + bool prontohex = false; + + // Check the invocation/calling usage. + if (argc < 2 || argc > 4) { + usage_error(argv[0]); + return 1; + } + if (strncmp("-prontohex", argv[argv_offset], 10) == 0) { + prontohex = true; + argv_offset++; + } + + if (strncmp("-raw", argv[argv_offset], 4) == 0) { + dumpraw = true; + argv_offset++; + } + if (argc - argv_offset != 1) { + usage_error(argv[0]); + return 1; + } + + uint16_t gc_test[kMaxGcCodeLength]; + int index = 0; + char *pch; + char *saveptr1; + char *sep = const_cast(","); + int codebase = 10; + + if (prontohex) { + sep = const_cast(" "); + codebase = 16; + } + + pch = strtok_r(argv[argv_offset], sep, &saveptr1); + while (pch != NULL && index < kMaxGcCodeLength) { + str_to_uint16(pch, &gc_test[index], codebase); + pch = strtok_r(NULL, sep, &saveptr1); + index++; + } + + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + irsend.reset(); + + if (prontohex) { + irsend.sendPronto(gc_test, index); + } else { + irsend.sendGC(gc_test, index); + } + irsend.makeDecodeResult(); + irrecv.decode(&irsend.capture); + + std::cout << "Code length " << index << std::endl + << "Code type " << irsend.capture.decode_type << " (" + << typeToString(irsend.capture.decode_type) << ")" << std::endl + << "Code bits " << irsend.capture.bits << std::endl; + if (hasACState(irsend.capture.decode_type)) { + std::cout << "State value 0x"; + for (uint16_t i = 0; i < irsend.capture.bits / 8; i++) + printf("%02X", irsend.capture.state[i]); + std::cout << std::endl; + } else { + std::cout << "Code value 0x" << std::hex << irsend.capture.value + << std::endl + << "Code address 0x" << std::hex << irsend.capture.address + << std::endl + << "Code command 0x" << std::hex << irsend.capture.command + << std::endl; + } + + if (dumpraw || irsend.capture.decode_type == UNKNOWN) irsend.dumpRawResult(); + + return 0; +} diff --git a/lib/IRremoteESP8266-2.5.2.03/tools/mkkeywords b/lib/IRremoteESP8266-2.5.2.03/tools/mkkeywords new file mode 100644 index 000000000..a2cdccd9b --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/tools/mkkeywords @@ -0,0 +1,82 @@ +#!/bin/bash +# Generate a keywords.txt for the library that is suitable for the Arduino IDE. +# Expects to run from the top directory of the library. + +# Set the locale for sorting +export LC_ALL=C + +cat << EndOfTextEndOfTextEndOfText +######################################### +# Syntax Coloring Map For IRremoteESP8266 +######################################### + +################################################ +# WARNING: Do NOT edit this file directly. +# It is generated by 'tools/mkkeywords' +# e.g. tools/mkkeywords > keywords.txt +################################################ + +####################################################### +# The Arduino IDE requires the use of a tab separator +# between the name and identifier. Without this tab the +# keyword is not highlighted. +# +# Reference: https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification#keywords +####################################################### + +####################################### +# Datatypes & Classes (KEYWORD1) +####################################### + +EndOfTextEndOfTextEndOfText + +CLASSES=$(grep "^class " src/*.h | cut -d' ' -f2 | sort -u) +# Manually add typedefs as they are hard to parse out. +CLASSES="${CLASSES} ir_params_t match_result_t" +for i in ${CLASSES}; do + echo -e "${i}\tKEYWORD1" +done | sort -du + +cat << EndOfTextEndOfTextEndOfText + +####################################### +# Methods and Functions (KEYWORD2) +####################################### + +EndOfTextEndOfTextEndOfText + +METHODS=$(egrep "^(u?int|void|bool|String|static|match_result_t).*\(" src/*.cpp| + cut -d' ' -f2- | sed 's/^.*:://' | cut -d'(' -f1 | sort -u | + grep -v ICACHE_RAM_ATTR) +for i in ${METHODS}; do + echo -e "${i}\tKEYWORD2" +done | sort -u + +cat << EndOfTextEndOfTextEndOfText + +####################################### +# Constants (LITERAL1) +####################################### + +EndOfTextEndOfTextEndOfText +LITERALS=$(grep "^#define [A-Z]" src/*.cpp src/*.h | + while read ignore define ignore; do + echo ${define}; + done | sort -u | + grep -v [\(\)] | grep -v ^_ | grep -v _\$ | grep -v VIRTUAL) +CONSTS=$(grep "^const " src/*.cpp src/*.h | + sed 's/\[.*\] =.*//;s/ =.*//;s/^.* k/k/') +ENUMS=$(cat src/*.h | while read a b; do + if [[ ${a} == "};" ]]; then + ENUM=0; + fi; + if [[ ${ENUM} -eq 1 ]]; then + echo $a | sed 's/,//g'; + fi; + if [[ ${a} == "enum" ]]; then + ENUM=1; + fi; + done) +for i in ${LITERALS} ${CONSTS} ${ENUMS}; do + echo -e "${i}\tLITERAL1" +done | sort -u diff --git a/lib/IRremoteESP8266-2.5.2.03/tools/mode2_decode.cpp b/lib/IRremoteESP8266-2.5.2.03/tools/mode2_decode.cpp new file mode 100644 index 000000000..63dfa6221 --- /dev/null +++ b/lib/IRremoteESP8266-2.5.2.03/tools/mode2_decode.cpp @@ -0,0 +1,122 @@ +// Quick and dirty tool to decode mode2 data from LIRC +// Copyright 2018 Brett T. Warden +// based on c2_decode.cpp, Copyright 2017 Jorge Cisneros + +// Usage example: +// mode2 -H udp -d 5000 | ./mode2_decode + +/* Sample input (alternating space and pulse durations in microseconds): +space 500000 +pulse 915 +space 793 +pulse 488 +space 366 +pulse 915 +space 793 +pulse 427 +space 500000 +*/ + +#include +#include +#include +#include +#include +#include +#include +#include "IRsend.h" +#include "IRsend_test.h" +#include "IRutils.h" + +const uint16_t kMaxGcCodeLength = 10000; + +void str_to_uint16(char *str, uint16_t *res, uint8_t base) { + char *end; + errno = 0; + intmax_t val = strtoimax(str, &end, base); + if (errno == ERANGE || val < 0 || val > UINT16_MAX || end == str || + *end != '\0') + return; + *res = (uint16_t)val; +} + +void usage_error(char *name) { + std::cerr << "Usage: " << name << " [-raw]" << std::endl; +} + +int main(int argc, char *argv[]) { + bool dumpraw = false; + + // Check the invocation/calling usage. + if (argc > 2) { + usage_error(argv[0]); + return 1; + } + + if (argc == 2 && strncmp("-raw", argv[1], 4) == 0) { + dumpraw = true; + } + + int index = 0; + std::string line, type; + std::string pulse = "pulse"; + std::string space = "space"; + int duration; + + IRsendTest irsend(4); + IRrecv irrecv(4); + irsend.begin(); + irsend.reset(); + + while (getline(std::cin, line)) { + std::istringstream iss1(line); + iss1 >> type; + iss1 >> duration; + + // Clamp duration to int16_t + if (duration > 0xFFFF) { + duration = 0xFFFF; + } + if (pulse.compare(type) == 0) { + irsend.mark(duration); + } else if (space.compare(type) == 0) { + irsend.space(duration); + } + index++; + + if (duration > 20000 || index >= kMaxGcCodeLength) { + // Skip long spaces at beginning + if (index > 1) { + irsend.makeDecodeResult(); + irrecv.decode(&irsend.capture); + + std::cout << "Code length " << index << std::endl + << "Code type " << irsend.capture.decode_type << " (" + << typeToString(irsend.capture.decode_type) << ")" + << std::endl + << "Code bits " << irsend.capture.bits << std::endl; + if (hasACState(irsend.capture.decode_type)) { + std::cout << "State value 0x"; + for (uint16_t i = 0; i < irsend.capture.bits / 8; i++) + printf("%02X", irsend.capture.state[i]); + std::cout << std::endl; + } else { + std::cout << "Code value 0x" << std::hex << irsend.capture.value + << std::endl + << "Code address 0x" << std::hex << irsend.capture.address + << std::endl + << "Code command 0x" << std::hex << irsend.capture.command + << std::endl; + } + + if (dumpraw || irsend.capture.decode_type == UNKNOWN) + irsend.dumpRawResult(); + } + + irsend.reset(); + index = 0; + } + } + + return 0; +} diff --git a/lib/NewPing-1.9.1/README.md b/lib/NewPing-1.9.1/README.md new file mode 100644 index 000000000..8760c35ff --- /dev/null +++ b/lib/NewPing-1.9.1/README.md @@ -0,0 +1,3 @@ +# NewPing Arduino Library for Arduino + +## See the [NewPing Wiki](https://bitbucket.org/teckel12/arduino-new-ping/wiki/Home) for documentation \ No newline at end of file diff --git a/lib/NewPing-1.9.1/examples/NewPing15SensorsTimer/NewPing15SensorsTimer.pde b/lib/NewPing-1.9.1/examples/NewPing15SensorsTimer/NewPing15SensorsTimer.pde new file mode 100644 index 000000000..a42c792b8 --- /dev/null +++ b/lib/NewPing-1.9.1/examples/NewPing15SensorsTimer/NewPing15SensorsTimer.pde @@ -0,0 +1,78 @@ +// --------------------------------------------------------------------------- +// Before attempting to use this sketch, please read the "Help with 15 Sensors Example Sketch": +// https://bitbucket.org/teckel12/arduino-new-ping/wiki/Help%20with%2015%20Sensors%20Example%20Sketch +// +// This example code was used to successfully communicate with 15 ultrasonic sensors. You can adjust +// the number of sensors in your project by changing SONAR_NUM and the number of NewPing objects in the +// "sonar" array. You also need to change the pins for each sensor for the NewPing objects. Each sensor +// is pinged at 33ms intervals. So, one cycle of all sensors takes 495ms (33 * 15 = 495ms). The results +// are sent to the "oneSensorCycle" function which currently just displays the distance data. Your project +// would normally process the sensor results in this function (for example, decide if a robot needs to +// turn and call the turn function). Keep in mind this example is event-driven. Your complete sketch needs +// to be written so there's no "delay" commands and the loop() cycles at faster than a 33ms rate. If other +// processes take longer than 33ms, you'll need to increase PING_INTERVAL so it doesn't get behind. +// --------------------------------------------------------------------------- +#include + +#define SONAR_NUM 15 // Number of sensors. +#define MAX_DISTANCE 200 // Maximum distance (in cm) to ping. +#define PING_INTERVAL 33 // Milliseconds between sensor pings (29ms is about the min to avoid cross-sensor echo). + +unsigned long pingTimer[SONAR_NUM]; // Holds the times when the next ping should happen for each sensor. +unsigned int cm[SONAR_NUM]; // Where the ping distances are stored. +uint8_t currentSensor = 0; // Keeps track of which sensor is active. + +NewPing sonar[SONAR_NUM] = { // Sensor object array. + NewPing(41, 42, MAX_DISTANCE), // Each sensor's trigger pin, echo pin, and max distance to ping. + NewPing(43, 44, MAX_DISTANCE), + NewPing(45, 20, MAX_DISTANCE), + NewPing(21, 22, MAX_DISTANCE), + NewPing(23, 24, MAX_DISTANCE), + NewPing(25, 26, MAX_DISTANCE), + NewPing(27, 28, MAX_DISTANCE), + NewPing(29, 30, MAX_DISTANCE), + NewPing(31, 32, MAX_DISTANCE), + NewPing(34, 33, MAX_DISTANCE), + NewPing(35, 36, MAX_DISTANCE), + NewPing(37, 38, MAX_DISTANCE), + NewPing(39, 40, MAX_DISTANCE), + NewPing(50, 51, MAX_DISTANCE), + NewPing(52, 53, MAX_DISTANCE) +}; + +void setup() { + Serial.begin(115200); + pingTimer[0] = millis() + 75; // First ping starts at 75ms, gives time for the Arduino to chill before starting. + for (uint8_t i = 1; i < SONAR_NUM; i++) // Set the starting time for each sensor. + pingTimer[i] = pingTimer[i - 1] + PING_INTERVAL; +} + +void loop() { + for (uint8_t i = 0; i < SONAR_NUM; i++) { // Loop through all the sensors. + if (millis() >= pingTimer[i]) { // Is it this sensor's time to ping? + pingTimer[i] += PING_INTERVAL * SONAR_NUM; // Set next time this sensor will be pinged. + if (i == 0 && currentSensor == SONAR_NUM - 1) oneSensorCycle(); // Sensor ping cycle complete, do something with the results. + sonar[currentSensor].timer_stop(); // Make sure previous timer is canceled before starting a new ping (insurance). + currentSensor = i; // Sensor being accessed. + cm[currentSensor] = 0; // Make distance zero in case there's no ping echo for this sensor. + sonar[currentSensor].ping_timer(echoCheck); // Do the ping (processing continues, interrupt will call echoCheck to look for echo). + } + } + // Other code that *DOESN'T* analyze ping results can go here. +} + +void echoCheck() { // If ping received, set the sensor distance to array. + if (sonar[currentSensor].check_timer()) + cm[currentSensor] = sonar[currentSensor].ping_result / US_ROUNDTRIP_CM; +} + +void oneSensorCycle() { // Sensor ping cycle complete, do something with the results. + // The following code would be replaced with your code that does something with the ping results. + for (uint8_t i = 0; i < SONAR_NUM; i++) { + Serial.print(i); + Serial.print("="); + Serial.print(cm[i]); + Serial.print("cm "); + } + Serial.println(); +} \ No newline at end of file diff --git a/lib/NewPing-1.9.1/examples/NewPing3Sensors/NewPing3Sensors.pde b/lib/NewPing-1.9.1/examples/NewPing3Sensors/NewPing3Sensors.pde new file mode 100644 index 000000000..061d7f3ee --- /dev/null +++ b/lib/NewPing-1.9.1/examples/NewPing3Sensors/NewPing3Sensors.pde @@ -0,0 +1,29 @@ +// --------------------------------------------------------------------------- +// Example NewPing library sketch that pings 3 sensors 20 times a second. +// --------------------------------------------------------------------------- + +#include + +#define SONAR_NUM 3 // Number of sensors. +#define MAX_DISTANCE 200 // Maximum distance (in cm) to ping. + +NewPing sonar[SONAR_NUM] = { // Sensor object array. + NewPing(4, 5, MAX_DISTANCE), // Each sensor's trigger pin, echo pin, and max distance to ping. + NewPing(6, 7, MAX_DISTANCE), + NewPing(8, 9, MAX_DISTANCE) +}; + +void setup() { + Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results. +} + +void loop() { + for (uint8_t i = 0; i < SONAR_NUM; i++) { // Loop through each sensor and display results. + delay(50); // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings. + Serial.print(i); + Serial.print("="); + Serial.print(sonar[i].ping_cm()); + Serial.print("cm "); + } + Serial.println(); +} \ No newline at end of file diff --git a/lib/NewPing-1.9.1/examples/NewPingEventTimer/NewPingEventTimer.pde b/lib/NewPing-1.9.1/examples/NewPingEventTimer/NewPingEventTimer.pde new file mode 100644 index 000000000..d9d26673e --- /dev/null +++ b/lib/NewPing-1.9.1/examples/NewPingEventTimer/NewPingEventTimer.pde @@ -0,0 +1,46 @@ +// --------------------------------------------------------------------------- +// This example shows how to use NewPing's ping_timer method which uses the Timer2 interrupt to get the +// ping time. The advantage of using this method over the standard ping method is that it permits a more +// event-driven sketch which allows you to appear to do two things at once. An example would be to ping +// an ultrasonic sensor for a possible collision while at the same time navigating. This allows a +// properly developed sketch to multitask. Be aware that because the ping_timer method uses Timer2, +// other features or libraries that also use Timer2 would be effected. For example, the PWM function on +// pins 3 & 11 on Arduino Uno (pins 9 and 11 on Arduino Mega) and the Tone library. Note, only the PWM +// functionality of the pins is lost (as they use Timer2 to do PWM), the pins are still available to use. +// NOTE: For Teensy/Leonardo (ATmega32U4) the library uses Timer4 instead of Timer2. +// --------------------------------------------------------------------------- +#include + +#define TRIGGER_PIN 12 // Arduino pin tied to trigger pin on ping sensor. +#define ECHO_PIN 11 // Arduino pin tied to echo pin on ping sensor. +#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. + +NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance. + +unsigned int pingSpeed = 50; // How frequently are we going to send out a ping (in milliseconds). 50ms would be 20 times a second. +unsigned long pingTimer; // Holds the next ping time. + +void setup() { + Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results. + pingTimer = millis(); // Start now. +} + +void loop() { + // Notice how there's no delays in this sketch to allow you to do other processing in-line while doing distance pings. + if (millis() >= pingTimer) { // pingSpeed milliseconds since last ping, do another ping. + pingTimer += pingSpeed; // Set the next ping time. + sonar.ping_timer(echoCheck); // Send out the ping, calls "echoCheck" function every 24uS where you can check the ping status. + } + // Do other stuff here, really. Think of it as multi-tasking. +} + +void echoCheck() { // Timer2 interrupt calls this function every 24uS where you can check the ping status. + // Don't do anything here! + if (sonar.check_timer()) { // This is how you check to see if the ping was received. + // Here's where you can add code. + Serial.print("Ping: "); + Serial.print(sonar.ping_result / US_ROUNDTRIP_CM); // Ping returned, uS result in ping_result, convert to cm with US_ROUNDTRIP_CM. + Serial.println("cm"); + } + // Don't do anything here! +} \ No newline at end of file diff --git a/lib/NewPing-1.9.1/examples/NewPingExample/NewPingExample.pde b/lib/NewPing-1.9.1/examples/NewPingExample/NewPingExample.pde new file mode 100644 index 000000000..12f6fdaaf --- /dev/null +++ b/lib/NewPing-1.9.1/examples/NewPingExample/NewPingExample.pde @@ -0,0 +1,22 @@ +// --------------------------------------------------------------------------- +// Example NewPing library sketch that does a ping about 20 times per second. +// --------------------------------------------------------------------------- + +#include + +#define TRIGGER_PIN 12 // Arduino pin tied to trigger pin on the ultrasonic sensor. +#define ECHO_PIN 11 // Arduino pin tied to echo pin on the ultrasonic sensor. +#define MAX_DISTANCE 200 // Maximum distance we want to ping for (in centimeters). Maximum sensor distance is rated at 400-500cm. + +NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance. + +void setup() { + Serial.begin(115200); // Open serial monitor at 115200 baud to see ping results. +} + +void loop() { + delay(50); // Wait 50ms between pings (about 20 pings/sec). 29ms should be the shortest delay between pings. + Serial.print("Ping: "); + Serial.print(sonar.ping_cm()); // Send ping, get distance in cm and print result (0 = outside set distance range) + Serial.println("cm"); +} \ No newline at end of file diff --git a/lib/NewPing-1.9.1/examples/NewPingTimerMedian/NewPingTimerMedian.pde b/lib/NewPing-1.9.1/examples/NewPingTimerMedian/NewPingTimerMedian.pde new file mode 100644 index 000000000..5908f5858 --- /dev/null +++ b/lib/NewPing-1.9.1/examples/NewPingTimerMedian/NewPingTimerMedian.pde @@ -0,0 +1,60 @@ +// --------------------------------------------------------------------------- +// Calculate a ping median using the ping_timer() method. +// --------------------------------------------------------------------------- + +#include + +#define ITERATIONS 5 // Number of iterations. +#define TRIGGER_PIN 12 // Arduino pin tied to trigger pin on ping sensor. +#define ECHO_PIN 11 // Arduino pin tied to echo pin on ping sensor. +#define MAX_DISTANCE 200 // Maximum distance (in cm) to ping. +#define PING_INTERVAL 33 // Milliseconds between sensor pings (29ms is about the min to avoid cross-sensor echo). + +unsigned long pingTimer[ITERATIONS]; // Holds the times when the next ping should happen for each iteration. +unsigned int cm[ITERATIONS]; // Where the ping distances are stored. +uint8_t currentIteration = 0; // Keeps track of iteration step. + +NewPing sonar(TRIGGER_PIN, ECHO_PIN, MAX_DISTANCE); // NewPing setup of pins and maximum distance. + +void setup() { + Serial.begin(115200); + pingTimer[0] = millis() + 75; // First ping starts at 75ms, gives time for the Arduino to chill before starting. + for (uint8_t i = 1; i < ITERATIONS; i++) // Set the starting time for each iteration. + pingTimer[i] = pingTimer[i - 1] + PING_INTERVAL; +} + +void loop() { + for (uint8_t i = 0; i < ITERATIONS; i++) { // Loop through all the iterations. + if (millis() >= pingTimer[i]) { // Is it this iteration's time to ping? + pingTimer[i] += PING_INTERVAL * ITERATIONS; // Set next time this sensor will be pinged. + if (i == 0 && currentIteration == ITERATIONS - 1) oneSensorCycle(); // Sensor ping cycle complete, do something with the results. + sonar.timer_stop(); // Make sure previous timer is canceled before starting a new ping (insurance). + currentIteration = i; // Sensor being accessed. + cm[currentIteration] = 0; // Make distance zero in case there's no ping echo for this iteration. + sonar.ping_timer(echoCheck); // Do the ping (processing continues, interrupt will call echoCheck to look for echo). + } + } + // Other code that *DOESN'T* analyze ping results can go here. +} + +void echoCheck() { // If ping received, set the sensor distance to array. + if (sonar.check_timer()) + cm[currentIteration] = sonar.ping_result / US_ROUNDTRIP_CM; +} + +void oneSensorCycle() { // All iterations complete, calculate the median. + unsigned int uS[ITERATIONS]; + uint8_t j, it = ITERATIONS; + uS[0] = NO_ECHO; + for (uint8_t i = 0; i < it; i++) { // Loop through iteration results. + if (cm[i] != NO_ECHO) { // Ping in range, include as part of median. + if (i > 0) { // Don't start sort till second ping. + for (j = i; j > 0 && uS[j - 1] < cm[i]; j--) // Insertion sort loop. + uS[j] = uS[j - 1]; // Shift ping array to correct position for sort insertion. + } else j = 0; // First ping is sort starting point. + uS[j] = cm[i]; // Add last ping to array in sorted position. + } else it--; // Ping out of range, skip and don't include as part of median. + } + Serial.print(uS[it >> 1]); + Serial.println("cm"); +} \ No newline at end of file diff --git a/lib/NewPing-1.9.1/examples/TimerExample/TimerExample.pde b/lib/NewPing-1.9.1/examples/TimerExample/TimerExample.pde new file mode 100644 index 000000000..35e1db227 --- /dev/null +++ b/lib/NewPing-1.9.1/examples/TimerExample/TimerExample.pde @@ -0,0 +1,25 @@ +// --------------------------------------------------------------------------- +// While the NewPing library's primary goal is to interface with ultrasonic sensors, interfacing with +// the Timer2 interrupt was a result of creating an interrupt-based ping method. Since these Timer2 +// interrupt methods were built, the library may as well provide the functionality to use these methods +// in your sketches. This shows how simple it is (no ultrasonic sensor required). Keep in mind that +// these methods use Timer2, as does NewPing's ping_timer method for using ultrasonic sensors. You +// can't use ping_timer at the same time you're using timer_ms or timer_us as all use the same timer. +// --------------------------------------------------------------------------- + +#include + +#define LED_PIN 13 // Pin with LED attached. + +void setup() { + pinMode(LED_PIN, OUTPUT); + NewPing::timer_ms(500, toggleLED); // Create a Timer2 interrupt that calls toggleLED in your sketch once every 500 milliseconds. +} + +void loop() { + // Do anything here, the Timer2 interrupt will take care of the flashing LED without your intervention. +} + +void toggleLED() { + digitalWrite(LED_PIN, !digitalRead(LED_PIN)); // Toggle the LED. +} \ No newline at end of file diff --git a/lib/NewPing-1.9.1/keywords.txt b/lib/NewPing-1.9.1/keywords.txt new file mode 100644 index 000000000..0487ff26d --- /dev/null +++ b/lib/NewPing-1.9.1/keywords.txt @@ -0,0 +1,31 @@ +################################### +# Syntax Coloring Map For NewPing +################################### + +################################### +# Datatypes (KEYWORD1) +################################### + +NewPing KEYWORD1 + +################################### +# Methods and Functions (KEYWORD2) +################################### + +ping KEYWORD2 +ping_in KEYWORD2 +ping_cm KEYWORD2 +ping_median KEYWORD2 +ping_timer KEYWORD2 +check_timer KEYWORD2 +ping_result KEYWORD2 +timer_us KEYWORD2 +timer_ms KEYWORD2 +timer_stop KEYWORD2 +convert_in KEYWORD2 +convert_cm KEYWORD2 + +################################### +# Constants (LITERAL1) +################################### + diff --git a/lib/NewPing-1.9.1/library.properties b/lib/NewPing-1.9.1/library.properties new file mode 100644 index 000000000..c825146d9 --- /dev/null +++ b/lib/NewPing-1.9.1/library.properties @@ -0,0 +1,10 @@ +name=NewPing +version=1.9.1 +author=Tim Eckel +maintainer=Tim Eckel +sentence=A library that makes working with ultrasonic sensors easy. +paragraph=When I first received an ultrasonic sensor I was not happy with how poorly it performed. I soon realized the problem was not the sensor, it was the available ping and ultrasonic libraries causing the problem. The NewPing library totally fixes these problems, adds many new features, and breathes new life into these very affordable distance sensors. +category=Sensors +url=https://bitbucket.org/teckel12/arduino-new-ping/wiki/Home +architectures=avr,arm,esp8266 +includes=NewPing.h diff --git a/lib/NewPing-1.9.1/src/NewPing.cpp b/lib/NewPing-1.9.1/src/NewPing.cpp new file mode 100644 index 000000000..05c8af4c6 --- /dev/null +++ b/lib/NewPing-1.9.1/src/NewPing.cpp @@ -0,0 +1,365 @@ +// --------------------------------------------------------------------------- +// Created by Tim Eckel - teckel@leethost.com +// +// See NewPing.h for license, purpose, syntax, version history, links, etc. +// --------------------------------------------------------------------------- + +#include "NewPing.h" + + +// --------------------------------------------------------------------------- +// NewPing constructor +// --------------------------------------------------------------------------- + +NewPing::NewPing(uint8_t trigger_pin, uint8_t echo_pin, unsigned int max_cm_distance) { +#if DO_BITWISE == true + _triggerBit = digitalPinToBitMask(trigger_pin); // Get the port register bitmask for the trigger pin. + _echoBit = digitalPinToBitMask(echo_pin); // Get the port register bitmask for the echo pin. + + _triggerOutput = portOutputRegister(digitalPinToPort(trigger_pin)); // Get the output port register for the trigger pin. + _echoInput = portInputRegister(digitalPinToPort(echo_pin)); // Get the input port register for the echo pin. + + _triggerMode = (uint8_t *) portModeRegister(digitalPinToPort(trigger_pin)); // Get the port mode register for the trigger pin. +#else + _triggerPin = trigger_pin; + _echoPin = echo_pin; +#endif + + set_max_distance(max_cm_distance); // Call function to set the max sensor distance. + +#if (defined (__arm__) && (defined (TEENSYDUINO) || defined(PARTICLE))) || DO_BITWISE != true + pinMode(echo_pin, INPUT); // Set echo pin to input (on Teensy 3.x (ARM), pins default to disabled, at least one pinMode() is needed for GPIO mode). + pinMode(trigger_pin, OUTPUT); // Set trigger pin to output (on Teensy 3.x (ARM), pins default to disabled, at least one pinMode() is needed for GPIO mode). +#endif + +#if defined (ARDUINO_AVR_YUN) + pinMode(echo_pin, INPUT); // Set echo pin to input for the Arduino Yun, not sure why it doesn't default this way. +#endif + +#if ONE_PIN_ENABLED != true && DO_BITWISE == true + *_triggerMode |= _triggerBit; // Set trigger pin to output. +#endif +} + + +// --------------------------------------------------------------------------- +// Standard ping methods +// --------------------------------------------------------------------------- + +unsigned int NewPing::ping(unsigned int max_cm_distance) { + if (max_cm_distance > 0) set_max_distance(max_cm_distance); // Call function to set a new max sensor distance. + + if (!ping_trigger()) return NO_ECHO; // Trigger a ping, if it returns false, return NO_ECHO to the calling function. + +#if URM37_ENABLED == true + #if DO_BITWISE == true + while (!(*_echoInput & _echoBit)) // Wait for the ping echo. + #else + while (!digitalRead(_echoPin)) // Wait for the ping echo. + #endif + if (micros() > _max_time) return NO_ECHO; // Stop the loop and return NO_ECHO (false) if we're beyond the set maximum distance. +#else + #if DO_BITWISE == true + while (*_echoInput & _echoBit) // Wait for the ping echo. + #else + while (digitalRead(_echoPin)) // Wait for the ping echo. + #endif + if (micros() > _max_time) return NO_ECHO; // Stop the loop and return NO_ECHO (false) if we're beyond the set maximum distance. +#endif + + return (micros() - (_max_time - _maxEchoTime) - PING_OVERHEAD); // Calculate ping time, include overhead. +} + + +unsigned long NewPing::ping_cm(unsigned int max_cm_distance) { + unsigned long echoTime = NewPing::ping(max_cm_distance); // Calls the ping method and returns with the ping echo distance in uS. +#if ROUNDING_ENABLED == false + return (echoTime / US_ROUNDTRIP_CM); // Call the ping method and returns the distance in centimeters (no rounding). +#else + return NewPingConvert(echoTime, US_ROUNDTRIP_CM); // Convert uS to centimeters. +#endif +} + + +unsigned long NewPing::ping_in(unsigned int max_cm_distance) { + unsigned long echoTime = NewPing::ping(max_cm_distance); // Calls the ping method and returns with the ping echo distance in uS. +#if ROUNDING_ENABLED == false + return (echoTime / US_ROUNDTRIP_IN); // Call the ping method and returns the distance in inches (no rounding). +#else + return NewPingConvert(echoTime, US_ROUNDTRIP_IN); // Convert uS to inches. +#endif +} + + +unsigned long NewPing::ping_median(uint8_t it, unsigned int max_cm_distance) { + unsigned int uS[it], last; + uint8_t j, i = 0; + unsigned long t; + uS[0] = NO_ECHO; + + while (i < it) { + t = micros(); // Start ping timestamp. + last = ping(max_cm_distance); // Send ping. + + if (last != NO_ECHO) { // Ping in range, include as part of median. + if (i > 0) { // Don't start sort till second ping. + for (j = i; j > 0 && uS[j - 1] < last; j--) // Insertion sort loop. + uS[j] = uS[j - 1]; // Shift ping array to correct position for sort insertion. + } else j = 0; // First ping is sort starting point. + uS[j] = last; // Add last ping to array in sorted position. + i++; // Move to next ping. + } else it--; // Ping out of range, skip and don't include as part of median. + + if (i < it && micros() - t < PING_MEDIAN_DELAY) + delay((PING_MEDIAN_DELAY + t - micros()) / 1000); // Millisecond delay between pings. + + } + return (uS[it >> 1]); // Return the ping distance median. +} + + +// --------------------------------------------------------------------------- +// Standard and timer interrupt ping method support functions (not called directly) +// --------------------------------------------------------------------------- + +boolean NewPing::ping_trigger() { +#if DO_BITWISE == true + #if ONE_PIN_ENABLED == true + *_triggerMode |= _triggerBit; // Set trigger pin to output. + #endif + + *_triggerOutput &= ~_triggerBit; // Set the trigger pin low, should already be low, but this will make sure it is. + delayMicroseconds(4); // Wait for pin to go low. + *_triggerOutput |= _triggerBit; // Set trigger pin high, this tells the sensor to send out a ping. + delayMicroseconds(10); // Wait long enough for the sensor to realize the trigger pin is high. Sensor specs say to wait 10uS. + *_triggerOutput &= ~_triggerBit; // Set trigger pin back to low. + + #if ONE_PIN_ENABLED == true + *_triggerMode &= ~_triggerBit; // Set trigger pin to input (when using one Arduino pin, this is technically setting the echo pin to input as both are tied to the same Arduino pin). + #endif + + #if URM37_ENABLED == true + if (!(*_echoInput & _echoBit)) return false; // Previous ping hasn't finished, abort. + _max_time = micros() + _maxEchoTime + MAX_SENSOR_DELAY; // Maximum time we'll wait for ping to start (most sensors are <450uS, the SRF06 can take up to 34,300uS!) + while (*_echoInput & _echoBit) // Wait for ping to start. + if (micros() > _max_time) return false; // Took too long to start, abort. + #else + if (*_echoInput & _echoBit) return false; // Previous ping hasn't finished, abort. + _max_time = micros() + _maxEchoTime + MAX_SENSOR_DELAY; // Maximum time we'll wait for ping to start (most sensors are <450uS, the SRF06 can take up to 34,300uS!) + while (!(*_echoInput & _echoBit)) // Wait for ping to start. + if (micros() > _max_time) return false; // Took too long to start, abort. + #endif +#else + #if ONE_PIN_ENABLED == true + pinMode(_triggerPin, OUTPUT); // Set trigger pin to output. + #endif + + digitalWrite(_triggerPin, LOW); // Set the trigger pin low, should already be low, but this will make sure it is. + delayMicroseconds(4); // Wait for pin to go low. + digitalWrite(_triggerPin, HIGH); // Set trigger pin high, this tells the sensor to send out a ping. + delayMicroseconds(10); // Wait long enough for the sensor to realize the trigger pin is high. Sensor specs say to wait 10uS. + digitalWrite(_triggerPin, LOW); // Set trigger pin back to low. + + #if ONE_PIN_ENABLED == true + pinMode(_triggerPin, INPUT); // Set trigger pin to input (when using one Arduino pin, this is technically setting the echo pin to input as both are tied to the same Arduino pin). + #endif + + #if URM37_ENABLED == true + if (!digitalRead(_echoPin)) return false; // Previous ping hasn't finished, abort. + _max_time = micros() + _maxEchoTime + MAX_SENSOR_DELAY; // Maximum time we'll wait for ping to start (most sensors are <450uS, the SRF06 can take up to 34,300uS!) + while (digitalRead(_echoPin)) // Wait for ping to start. + if (micros() > _max_time) return false; // Took too long to start, abort. + #else + if (digitalRead(_echoPin)) return false; // Previous ping hasn't finished, abort. + _max_time = micros() + _maxEchoTime + MAX_SENSOR_DELAY; // Maximum time we'll wait for ping to start (most sensors are <450uS, the SRF06 can take up to 34,300uS!) + while (!digitalRead(_echoPin)) // Wait for ping to start. + if (micros() > _max_time) return false; // Took too long to start, abort. + #endif +#endif + + _max_time = micros() + _maxEchoTime; // Ping started, set the time-out. + return true; // Ping started successfully. +} + + +void NewPing::set_max_distance(unsigned int max_cm_distance) { +#if ROUNDING_ENABLED == false + _maxEchoTime = min(max_cm_distance + 1, (unsigned int) MAX_SENSOR_DISTANCE + 1) * US_ROUNDTRIP_CM; // Calculate the maximum distance in uS (no rounding). +#else + _maxEchoTime = min(max_cm_distance, (unsigned int) MAX_SENSOR_DISTANCE) * US_ROUNDTRIP_CM + (US_ROUNDTRIP_CM / 2); // Calculate the maximum distance in uS. +#endif +} + + +#if TIMER_ENABLED == true && DO_BITWISE == true + + // --------------------------------------------------------------------------- + // Timer interrupt ping methods (won't work with ATmega128, ATtiny and most non-AVR microcontrollers) + // --------------------------------------------------------------------------- + + void NewPing::ping_timer(void (*userFunc)(void), unsigned int max_cm_distance) { + if (max_cm_distance > 0) set_max_distance(max_cm_distance); // Call function to set a new max sensor distance. + + if (!ping_trigger()) return; // Trigger a ping, if it returns false, return without starting the echo timer. + timer_us(ECHO_TIMER_FREQ, userFunc); // Set ping echo timer check every ECHO_TIMER_FREQ uS. + } + + + boolean NewPing::check_timer() { + if (micros() > _max_time) { // Outside the time-out limit. + timer_stop(); // Disable timer interrupt + return false; // Cancel ping timer. + } + + #if URM37_ENABLED == false + if (!(*_echoInput & _echoBit)) { // Ping echo received. + #else + if (*_echoInput & _echoBit) { // Ping echo received. + #endif + timer_stop(); // Disable timer interrupt + ping_result = (micros() - (_max_time - _maxEchoTime) - PING_TIMER_OVERHEAD); // Calculate ping time including overhead. + return true; // Return ping echo true. + } + + return false; // Return false because there's no ping echo yet. + } + + + // --------------------------------------------------------------------------- + // Timer2/Timer4 interrupt methods (can be used for non-ultrasonic needs) + // --------------------------------------------------------------------------- + + // Variables used for timer functions + void (*intFunc)(); + void (*intFunc2)(); + unsigned long _ms_cnt_reset; + volatile unsigned long _ms_cnt; + #if defined(__arm__) && (defined (TEENSYDUINO) || defined(PARTICLE)) + IntervalTimer itimer; + #endif + + + void NewPing::timer_us(unsigned int frequency, void (*userFunc)(void)) { + intFunc = userFunc; // User's function to call when there's a timer event. + timer_setup(); // Configure the timer interrupt. + + #if defined (__AVR_ATmega32U4__) // Use Timer4 for ATmega32U4 (Teensy/Leonardo). + OCR4C = min((frequency>>2) - 1, 255); // Every count is 4uS, so divide by 4 (bitwise shift right 2) subtract one, then make sure we don't go over 255 limit. + TIMSK4 = (1<>2) - 1, 255); // Every count is 4uS, so divide by 4 (bitwise shift right 2) subtract one, then make sure we don't go over 255 limit. + TIMSK2 |= (1<= 100 + #include + #else + #include + #if defined (PARTICLE) + #include + #else + #include + #endif + #endif + + #if defined (__AVR__) + #include + #include + #endif + + // Shouldn't need to change these values unless you have a specific need to do so. + #define MAX_SENSOR_DISTANCE 500 // Maximum sensor distance can be as high as 500cm, no reason to wait for ping longer than sound takes to travel this distance and back. Default=500 + #define US_ROUNDTRIP_CM 57 // Microseconds (uS) it takes sound to travel round-trip 1cm (2cm total), uses integer to save compiled code space. Default=57 + #define US_ROUNDTRIP_IN 146 // Microseconds (uS) it takes sound to travel round-trip 1 inch (2 inches total), uses integer to save compiled code space. Defalult=146 + #define ONE_PIN_ENABLED true // Set to "false" to disable one pin mode which saves around 14-26 bytes of binary size. Default=true + #define ROUNDING_ENABLED false // Set to "true" to enable distance rounding which also adds 64 bytes to binary size. Default=false + #define URM37_ENABLED false // Set to "true" to enable support for the URM37 sensor in PWM mode. Default=false + #define TIMER_ENABLED true // Set to "false" to disable the timer ISR (if getting "__vector_7" compile errors set this to false). Default=true + + // Probably shouldn't change these values unless you really know what you're doing. + #define NO_ECHO 0 // Value returned if there's no ping echo within the specified MAX_SENSOR_DISTANCE or max_cm_distance. Default=0 + #define MAX_SENSOR_DELAY 5800 // Maximum uS it takes for sensor to start the ping. Default=5800 + #define ECHO_TIMER_FREQ 24 // Frequency to check for a ping echo (every 24uS is about 0.4cm accuracy). Default=24 + #define PING_MEDIAN_DELAY 29000 // Microsecond delay between pings in the ping_median method. Default=29000 + #define PING_OVERHEAD 5 // Ping overhead in microseconds (uS). Default=5 + #define PING_TIMER_OVERHEAD 13 // Ping timer overhead in microseconds (uS). Default=13 + #if URM37_ENABLED == true + #undef US_ROUNDTRIP_CM + #undef US_ROUNDTRIP_IN + #define US_ROUNDTRIP_CM 50 // Every 50uS PWM signal is low indicates 1cm distance. Default=50 + #define US_ROUNDTRIP_IN 127 // If 50uS is 1cm, 1 inch would be 127uS (50 x 2.54 = 127). Default=127 + #endif + + // Conversion from uS to distance (round result to nearest cm or inch). + #define NewPingConvert(echoTime, conversionFactor) (max(((unsigned int)echoTime + conversionFactor / 2) / conversionFactor, (echoTime ? 1 : 0))) + + // Detect non-AVR microcontrollers (Teensy 3.x, Arduino DUE, etc.) and don't use port registers or timer interrupts as required. + #if (defined (__arm__) && (defined (TEENSYDUINO) || defined (PARTICLE))) + #undef PING_OVERHEAD + #define PING_OVERHEAD 1 + #undef PING_TIMER_OVERHEAD + #define PING_TIMER_OVERHEAD 1 + #define DO_BITWISE true + #elif !defined (__AVR__) + #undef PING_OVERHEAD + #define PING_OVERHEAD 1 + #undef PING_TIMER_OVERHEAD + #define PING_TIMER_OVERHEAD 1 + #undef TIMER_ENABLED + #define TIMER_ENABLED false + #define DO_BITWISE false + #else + #define DO_BITWISE true + #endif + + // Disable the timer interrupts when using ATmega128 and all ATtiny microcontrollers. + #if defined (__AVR_ATmega128__) || defined (__AVR_ATtiny24__) || defined (__AVR_ATtiny44__) || defined (__AVR_ATtiny441__) || defined (__AVR_ATtiny84__) || defined (__AVR_ATtiny841__) || defined (__AVR_ATtiny25__) || defined (__AVR_ATtiny45__) || defined (__AVR_ATtiny85__) || defined (__AVR_ATtiny261__) || defined (__AVR_ATtiny461__) || defined (__AVR_ATtiny861__) || defined (__AVR_ATtiny43U__) + #undef TIMER_ENABLED + #define TIMER_ENABLED false + #endif + + // Define timers when using ATmega8, ATmega16, ATmega32 and ATmega8535 microcontrollers. + #if defined (__AVR_ATmega8__) || defined (__AVR_ATmega16__) || defined (__AVR_ATmega32__) || defined (__AVR_ATmega8535__) + #define OCR2A OCR2 + #define TIMSK2 TIMSK + #define OCIE2A OCIE2 + #endif + + class NewPing { + public: + NewPing(uint8_t trigger_pin, uint8_t echo_pin, unsigned int max_cm_distance = MAX_SENSOR_DISTANCE); + unsigned int ping(unsigned int max_cm_distance = 0); + unsigned long ping_cm(unsigned int max_cm_distance = 0); + unsigned long ping_in(unsigned int max_cm_distance = 0); + unsigned long ping_median(uint8_t it = 5, unsigned int max_cm_distance = 0); + static unsigned int convert_cm(unsigned int echoTime); + static unsigned int convert_in(unsigned int echoTime); + #if TIMER_ENABLED == true + void ping_timer(void (*userFunc)(void), unsigned int max_cm_distance = 0); + boolean check_timer(); + unsigned long ping_result; + static void timer_us(unsigned int frequency, void (*userFunc)(void)); + static void timer_ms(unsigned long frequency, void (*userFunc)(void)); + static void timer_stop(); + #endif + private: + boolean ping_trigger(); + void set_max_distance(unsigned int max_cm_distance); + #if TIMER_ENABLED == true + boolean ping_trigger_timer(unsigned int trigger_delay); + boolean ping_wait_timer(); + static void timer_setup(); + static void timer_ms_cntdwn(); + #endif + #if DO_BITWISE == true + uint8_t _triggerBit; + uint8_t _echoBit; + #if defined(PARTICLE) + #if !defined(portModeRegister) + #if defined (STM32F10X_MD) + #define portModeRegister(port) ( &(port->CRL) ) + #elif defined (STM32F2XX) + #define portModeRegister(port) ( &(port->MODER) ) + #endif + #endif + volatile uint32_t *_triggerOutput; + volatile uint32_t *_echoInput; + volatile uint32_t *_triggerMode; + #else + volatile uint8_t *_triggerOutput; + volatile uint8_t *_echoInput; + volatile uint8_t *_triggerMode; + #endif + #else + uint8_t _triggerPin; + uint8_t _echoPin; + #endif + unsigned int _maxEchoTime; + unsigned long _max_time; + }; + + +#endif diff --git a/lib/TasmotaSerial-2.1.0/README.md b/lib/TasmotaSerial-2.2.0/README.md similarity index 100% rename from lib/TasmotaSerial-2.1.0/README.md rename to lib/TasmotaSerial-2.2.0/README.md diff --git a/lib/TasmotaSerial-2.1.0/examples/swsertest/swsertest.ino b/lib/TasmotaSerial-2.2.0/examples/swsertest/swsertest.ino similarity index 100% rename from lib/TasmotaSerial-2.1.0/examples/swsertest/swsertest.ino rename to lib/TasmotaSerial-2.2.0/examples/swsertest/swsertest.ino diff --git a/lib/TasmotaSerial-2.1.0/keywords.txt b/lib/TasmotaSerial-2.2.0/keywords.txt similarity index 100% rename from lib/TasmotaSerial-2.1.0/keywords.txt rename to lib/TasmotaSerial-2.2.0/keywords.txt diff --git a/lib/TasmotaSerial-2.1.0/library.json b/lib/TasmotaSerial-2.2.0/library.json similarity index 94% rename from lib/TasmotaSerial-2.1.0/library.json rename to lib/TasmotaSerial-2.2.0/library.json index 59d06ad5f..23a2ddab9 100644 --- a/lib/TasmotaSerial-2.1.0/library.json +++ b/lib/TasmotaSerial-2.2.0/library.json @@ -1,6 +1,6 @@ { "name": "TasmotaSerial", - "version": "2.1.0", + "version": "2.2.0", "keywords": [ "serial", "io", "TasmotaSerial" ], diff --git a/lib/TasmotaSerial-2.1.0/library.properties b/lib/TasmotaSerial-2.2.0/library.properties similarity index 94% rename from lib/TasmotaSerial-2.1.0/library.properties rename to lib/TasmotaSerial-2.2.0/library.properties index 93f4a1d39..54c79e218 100644 --- a/lib/TasmotaSerial-2.1.0/library.properties +++ b/lib/TasmotaSerial-2.2.0/library.properties @@ -1,5 +1,5 @@ name=TasmotaSerial -version=2.1.0 +version=2.2.0 author=Theo Arends maintainer=Theo Arends sentence=Implementation of software serial with hardware serial fallback for ESP8266. diff --git a/lib/TasmotaSerial-2.1.0/src/TasmotaSerial.cpp b/lib/TasmotaSerial-2.2.0/src/TasmotaSerial.cpp similarity index 95% rename from lib/TasmotaSerial-2.1.0/src/TasmotaSerial.cpp rename to lib/TasmotaSerial-2.2.0/src/TasmotaSerial.cpp index d9fc29e6f..3df42f834 100644 --- a/lib/TasmotaSerial-2.1.0/src/TasmotaSerial.cpp +++ b/lib/TasmotaSerial-2.2.0/src/TasmotaSerial.cpp @@ -76,10 +76,11 @@ static void (*ISRList[16])() = { tms_isr_15 }; -TasmotaSerial::TasmotaSerial(int receive_pin, int transmit_pin, bool hardware_fallback) +TasmotaSerial::TasmotaSerial(int receive_pin, int transmit_pin, int hardware_fallback) { m_valid = false; m_hardserial = 0; + m_hardswap = 0; m_stop_bits = 1; if (!((isValidGPIOpin(receive_pin)) && (isValidGPIOpin(transmit_pin) || transmit_pin == 16))) { return; @@ -87,9 +88,14 @@ TasmotaSerial::TasmotaSerial(int receive_pin, int transmit_pin, bool hardware_fa m_rx_pin = receive_pin; m_tx_pin = transmit_pin; m_in_pos = m_out_pos = 0; - if (hardware_fallback && (((1 == m_rx_pin) && (3 == m_tx_pin)) || ((3 == m_rx_pin) && (-1 == m_tx_pin)) || ((-1 == m_rx_pin) && (1 == m_tx_pin)))) { + if (hardware_fallback && (((3 == m_rx_pin) && (1 == m_tx_pin)) || ((3 == m_rx_pin) && (-1 == m_tx_pin)) || ((-1 == m_rx_pin) && (1 == m_tx_pin)))) { m_hardserial = 1; - } else { + } + else if ((2 == hardware_fallback) && (((13 == m_rx_pin) && (15 == m_tx_pin)) || ((13 == m_rx_pin) && (-1 == m_tx_pin)) || ((-1 == m_rx_pin) && (15 == m_tx_pin)))) { + m_hardserial = 1; + m_hardswap = 1; + } + else { if (m_rx_pin > -1) { m_buffer = (uint8_t*)malloc(TM_SERIAL_BUFFER_SIZE); if (m_buffer == NULL) return; @@ -134,6 +140,9 @@ bool TasmotaSerial::begin(long speed, int stop_bits) { } else { Serial.begin(speed, SERIAL_8N1); } + if (m_hardswap) { + Serial.swap(); + } } else { // Use getCycleCount() loop to get as exact timing as possible m_bit_time = ESP.getCpuFreqMHz() *1000000 /speed; diff --git a/lib/TasmotaSerial-2.1.0/src/TasmotaSerial.h b/lib/TasmotaSerial-2.2.0/src/TasmotaSerial.h similarity index 95% rename from lib/TasmotaSerial-2.1.0/src/TasmotaSerial.h rename to lib/TasmotaSerial-2.2.0/src/TasmotaSerial.h index e40c34ee8..de991526a 100644 --- a/lib/TasmotaSerial-2.1.0/src/TasmotaSerial.h +++ b/lib/TasmotaSerial-2.2.0/src/TasmotaSerial.h @@ -38,7 +38,7 @@ class TasmotaSerial : public Stream { public: - TasmotaSerial(int receive_pin, int transmit_pin, bool hardware_fallback = false); + TasmotaSerial(int receive_pin, int transmit_pin, int hardware_fallback = 0); virtual ~TasmotaSerial(); bool begin(long speed, int stop_bits = 1); @@ -62,6 +62,7 @@ class TasmotaSerial : public Stream { // Member variables bool m_valid; bool m_hardserial; + bool m_hardswap; bool m_high_speed; int m_rx_pin; int m_tx_pin; diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/.gitignore b/lib/esp-epaper-29-ws-20171230-gemu-1.0/.gitignore new file mode 100644 index 000000000..fa4850d8f --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/.gitignore @@ -0,0 +1,12 @@ +sdkconfig* +.cproject +.project +.settings/* +build/* +doxygen_sqlite3.db +docs/_build +docs/man +docs/xml +docs/doxygen-warning-log.txt +docs/sphinx-warning-log.txt +*.pyc diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/.travis.yml b/lib/esp-epaper-29-ws-20171230-gemu-1.0/.travis.yml new file mode 100644 index 000000000..08c8c109e --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/.travis.yml @@ -0,0 +1,43 @@ +sudo: false +language: bash +os: + - linux + +addons: + apt: + packages: + - gperf + - python + - python-serial + +before_install: + # Save path to the git respository + - PROJECT_PATH=$(pwd) + +install: + # Install ESP32 toochain following steps as desribed + # in http://esp-idf.readthedocs.io/en/latest/linux-setup.html + # + # Get required packages - already done above, see addons: apt: packages: + # - sudo apt-get install git wget make libncurses-dev flex bison gperf python python-serial + # Prepare directory for the toolchain + - mkdir -p ~/esp + - cd ~/esp + - XTENSA_DIST=xtensa-esp32-elf-linux64-1.22.0-75-gbaf03c2-5.2.0.tar.gz + # Download binary toolchain for the ESP32 + - wget https://dl.espressif.com/dl/$XTENSA_DIST + - tar -xzf $XTENSA_DIST + # Make xtensa-esp32-elf available for all terminal sessions + - export PATH=$PATH:$HOME/esp/xtensa-esp32-elf/bin + # Get ESP-IDF from github + - git clone --recursive https://github.com/espressif/esp-idf.git + # Set the path to ESP-IDF directory + - export IDF_PATH=~/esp/esp-idf + +script: + # Go back to the git repository + - cd $PROJECT_PATH + # Update configuration so that kconfig doesn't start interactive mode + - make defconfig + # Build project from the git repository + - make diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/Arduino/epd2in9-demo/epd2in9-demo.ino b/lib/esp-epaper-29-ws-20171230-gemu-1.0/Arduino/epd2in9-demo/epd2in9-demo.ino new file mode 100644 index 000000000..a407cb818 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/Arduino/epd2in9-demo/epd2in9-demo.ino @@ -0,0 +1,82 @@ +/** + * @filename : epd2in9-demo.ino + * @brief : 2.9inch e-paper display demo + * @author : Yehui from Waveshare + * + * Copyright (C) Waveshare September 9 2017 + * + * @author : Updated by krzychb@gazeta,pl + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documnetation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include +#include +#include +#include "imagedata.h" + +#define COLORED 0 +#define UNCOLORED 1 + +unsigned char image[4736]; +Paint paint(image, 0, 0); // width should be the multiple of 8 +Epd epd; + +void setup() { + Serial.begin(115200); + Serial.println("Starting..."); + if (epd.Init(lut_full_update) != 0) { + Serial.println("e-Paper init failed"); + return; + } + Serial.println("Init done"); +} + +void loop() { + + // Clear image memory + epd.ClearFrameMemory(0xFF); // bit set = white, bit reset = black + epd.DisplayFrame(); + Serial.println("Cleared frame memory"); + + // Welcome text + paint.SetRotate(ROTATE_270); + paint.SetWidth(128); + paint.SetHeight(296); + paint.Clear(UNCOLORED); + paint.DrawStringAt(50, 50, "Hello world!", &Font24, COLORED); + epd.SetFrameMemory(paint.GetImage(), 0, 0, paint.GetWidth(), paint.GetHeight()); + epd.DisplayFrame(); + Serial.println("Displayed welcome text"); + delay(3000); + + epd.SetFrameMemory(IMAGE_DATA); + epd.DisplayFrame(); + Serial.println("Displayed image data"); + delay(3000); + + // Black screen + epd.ClearFrameMemory(0); + epd.DisplayFrame(); + Serial.println("Displayed black screen"); + delay(3000); + + epd.Reset(); +} + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/Arduino/libraries/readme.txt b/lib/esp-epaper-29-ws-20171230-gemu-1.0/Arduino/libraries/readme.txt new file mode 100644 index 000000000..96ce674fe --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/Arduino/libraries/readme.txt @@ -0,0 +1 @@ +For information on installing libraries, see: http://www.arduino.cc/en/Guide/Libraries diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/LICENSE b/lib/esp-epaper-29-ws-20171230-gemu-1.0/LICENSE new file mode 100644 index 000000000..d64569567 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/Makefile b/lib/esp-epaper-29-ws-20171230-gemu-1.0/Makefile new file mode 100644 index 000000000..ad8f69434 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/Makefile @@ -0,0 +1,9 @@ +# +# This is a project Makefile. It is assumed the directory this Makefile resides in is a +# project subdirectory. +# + +PROJECT_NAME := esp-epaper-29-ws + +include $(IDF_PATH)/make/project.mk + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/README.md b/lib/esp-epaper-29-ws-20171230-gemu-1.0/README.md new file mode 100644 index 000000000..4afa05aa6 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/README.md @@ -0,0 +1,124 @@ +# 2.9" Waveshare ePaper Driver Example + +Communicate with [2.9" Waveshare ePaper Module](https://www.waveshare.com/wiki/2.9inch_e-Paper_Module) using SPI interface of [ESP32](http://espressif.com/en/products/hardware/esp32/overview) and [ESP-IDF](https://github.com/espressif/esp-idf) or [Arduino](https://www.arduino.cc/). + +* [2.9" Waveshare ePaper Module Datasheet](pictures/2.9inch_e-Paper_Datasheet.pdf) + + +## About + +ePaper displays are great for low power applications. They do not need much energy when operated. They retain the last image at zero energy consumed. You can buy them cheaply as they are produced in high volumes to be used in stores as electronic shelf labels. If your do not need fast update of displayed information, go ahead and use ePaper display for your project! This is what I decided to do. Unfortunately I could not find a driver that would easy integrate into my code. Also documentation how to drive them is still somewhat obscure (December 2017). Fortunately with help of great resources mentioned in [Credits](#credits) I was able to develop the driver I was looking for. + +![alt text](pictures/e-paper-and-esp-sample-image.jpg "ePaper display showing a sample graphics image") +![alt text](pictures/e-paper-and-esp-sample-text.jpg "ePaper display showing a sample text and lines drawn from the application using graphics functions") + + +### How to run this example + +#### Arduino + +The quickest way check this software in action is in [Arduino](https://www.arduino.cc/) environment. It should work with all Arduino boards that have SPI interface. Some concern may be the size of memory to store the image. To display the full memory buffer you need 4736 bytes of RAM. If you do not have enough memory, then you can update display where it changed, using smaller chunks of memory. As this project is oriented to use [ESP32](http://espressif.com/en/products/hardware/esp32/overview) chip, there is no concern, it has more than enough RAM. To load the [application](Arduino/epd2in9-demo) use instructions in [espressif/arduino-esp32](https://github.com/espressif/arduino-esp32) repository. + +#### ESP-IDF + +To use the [example code](main) with [ESP-IDF](https://github.com/espressif/esp-idf) framework, please follow [ESP32 Get Started](https://esp-idf.readthedocs.io/en/latest/get-started/index.html). + + +### Wiring of ePaper Module used in example code + +| Signal Name | ePaper Module | ESP32 | +| :--- | :---: | :---: | +| Module Busy | BUSY | GPIO22 | +| Reset | RST | GPIO23 | +| Data / Command | DC | GPIO21 | +| Slave Select | CS | GPIO19 | +| Serial Clock | CLK | GPIO18 | +| Master Out Slave In | DIN | GPIO5 | +| Ground | GND | GND | +| Power Supply | 3.3V | 3V3 | + + +### Example log output + +### Arduino + +``` +Starting... +Init done. +Cleared frame memory. +Displayed welcome text +Displayed image data +Displayed black screen +``` + +### ESP-IDF + +``` +I (0) cpu_start: Starting scheduler on APP CPU. +I (259) ePaper Example: Starting example +I (259) ePaper Example: Before ePaper driver init, heap: 297852 +I (279) ePaper Driver: SPI data sent 30 +I (279) ePaper Example: e-Paper Display Espressif logo +I (279) ePaper Driver: SPI data sent 4736 +I (6969) ePaper Example: e-Paper Display sample graphics +I (7039) ePaper Driver: SPI data sent 4736 +I (8669) ePaper Example: EPD Display update count: 0 +I (8669) ePaper Example: After ePaper driver delete, heap: 302292 + +``` + + +## Build Status for ESP-IDF + +[![Build Status](https://travis-ci.org/krzychb/esp-epaper-29-ws.svg?branch=master)](https://travis-ci.org/krzychb/esp-epaper-29-ws) + + +## Documentation for ESP-IDF + +[![Documentation Status](https://readthedocs.org/projects/esp-epaper-29-ws/badge/?version=latest)](http://esp-epaper-29-ws.readthedocs.io/en/latest/?badge=latest) + + +## ESP-IDF Usage Notes + +### Changes to the original driver + +I have discovered that there are plenty of similar e-paper displays on the market that look exactly the same, but require some modifications in the driver code. In my case I have modified the following: + +* Display initialization sequence in function `iot_epaper_spi_init()` +* LUT tables, they differ in size and quantity and dictate how the image is "developed" on the screen +* Commands to to configure image data transfer to the display, two extra functions have been added - `iot_set_ram_area()` and `iot_set_ram_address_counter()`. +* Commands to show up the image +* Other minor things like configuration of checking the BUSY signal, command to put the ePaper into sleep mode, display resolution, etc. + + +### Optimizing the SPI communication + +I have decided to make some updates to the SPI code in original [epaper](https://github.com/espressif/esp-iot-solution/tree/master/components/spi_devices/epaper/test) component. In particular I have configured DMA transfer instead of sending image data byte by byte. Also I have removed pre and post transfer delays. + + +### Converting pictures + +To convert an exiting image to the C header file, use an application recommended by Waveshare in their [Wiki](https://www.waveshare.com/wiki/2.9inch_e-Paper_Module#How_to_display_an_image). See a picture below what parameters to set. I have discovered that you need to mirror the image and this was not documented in the Wiki. + +![alt text](pictures/image-conversion-setup.png "Example how to set up the application to convert an image to the C header file") + + +## Contribute + +Feel free to contribute to the project in any way you like! + +If you find any issues with code or description please report them using *Issues* tab above. + + +## Credits + +This repository has been prepared thanks to great work of the following teams and individuals: + +* Espressif team that develops and maintains [esp-idf](https://github.com/espressif/esp-idf) repository +* esp-iot-solution team that developed cleanly coded [epaper](https://github.com/espressif/esp-iot-solution/tree/master/components/spi_devices/epaper/test) component for another type of display +* Waveshare that provides [great documentation](https://www.waveshare.com/wiki/2.9inch_e-Paper_Module) and [demo code](https://www.waveshare.com/wiki/File:2.9inch_e-Paper_Module_code.7z) for various displays they supply + + +## License + +[Apache License Version 2.0, January 2004](LICENSE) \ No newline at end of file diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/component.mk b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/component.mk new file mode 100644 index 000000000..2581b048f --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/component.mk @@ -0,0 +1,2 @@ +COMPONENT_ADD_INCLUDEDIRS := . + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper-29-ws.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper-29-ws.c new file mode 100644 index 000000000..c4090a83c --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper-29-ws.c @@ -0,0 +1,695 @@ +// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include + +#include +#include +#include +#include "driver/gpio.h" +#include "driver/spi_master.h" + +#include "freertos/FreeRTOS.h" +#include "freertos/semphr.h" +#include "freertos/xtensa_api.h" +#include "freertos/task.h" +#include "freertos/queue.h" +#include "freertos/ringbuf.h" +#include "esp_log.h" + +#include "epaper-29-ws.h" + +static const char* TAG = "ePaper Driver"; + +#define EPAPER_QUE_SIZE_DEFAULT 10 + +const unsigned char lut_full_update[] = +{ + 0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22, + 0x66, 0x69, 0x69, 0x59, 0x58, 0x99, 0x99, 0x88, + 0x00, 0x00, 0x00, 0x00, 0xF8, 0xB4, 0x13, 0x51, + 0x35, 0x51, 0x51, 0x19, 0x01, 0x00 +}; + +// This LUT is not yet used in the code below +const unsigned char lut_partial_update[] = +{ + 0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +static portMUX_TYPE epaper_spinlock = portMUX_INITIALIZER_UNLOCKED; +#define EPAPER_ENTER_CRITICAL(mux) portENTER_CRITICAL(mux) +#define EPAPER_EXIT_CRITICAL(mux) portEXIT_CRITICAL(mux) + +// LCD data/command +typedef struct { + uint8_t dc_io; + uint8_t dc_level; +} epaper_dc_t; + +typedef struct { + spi_device_handle_t bus; + epaper_conf_t pin; /* EPD properties */ + epaper_paint_t paint; /* Paint properties */ + epaper_dc_t dc; + xSemaphoreHandle spi_mux; +} epaper_dev_t; + +/* This function is called (in irq context!) just before a transmission starts. + * It will set the D/C line to the value indicated in the user field + */ +static void iot_epaper_pre_transfer_callback(spi_transaction_t *t) +{ + epaper_dc_t *dc = (epaper_dc_t *) t->user; + gpio_set_level((int)dc->dc_io, (int)dc->dc_level); +} + +static esp_err_t _iot_epaper_spi_send(spi_device_handle_t spi, spi_transaction_t* t) +{ + return spi_device_transmit(spi, t); +} + +void iot_epaper_send(spi_device_handle_t spi, const uint8_t *data, int len, epaper_dc_t *dc) +{ + esp_err_t ret; + if (len == 0) { + return; // no need to send anything + } + spi_transaction_t t = { + .length = len * 8, // Len is in bytes, transaction length is in bits. + .tx_buffer = data, + .user = (void *) dc, + }; + ret = _iot_epaper_spi_send(spi, &t); + assert(ret == ESP_OK); +} + +static void iot_epaper_send_command(epaper_handle_t dev, unsigned char command) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + device->dc.dc_io = device->pin.dc_pin; + device->dc.dc_level = device->pin.dc_lev_cmd; + iot_epaper_send(device->bus, &command, 1, &device->dc); +} + +static void iot_epaper_send_byte(epaper_handle_t dev, const uint8_t data) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + device->dc.dc_io = device->pin.dc_pin; + device->dc.dc_level = device->pin.dc_lev_data; + iot_epaper_send(device->bus, &data, 1, &device->dc); +} + +static void iot_epaper_send_data(epaper_handle_t dev, const uint8_t *data, int length) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + device->dc.dc_io = device->pin.dc_pin; + device->dc.dc_level = device->pin.dc_lev_data; + // To Do: original driver was sending byte by byte + // Pay attention to possible performance issues + iot_epaper_send(device->bus, data, length, &device->dc); + ESP_LOGI(TAG, "SPI data sent %d", length); +} + +static void iot_epaper_paint_init(epaper_handle_t dev, unsigned char* image, int width, int height) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + device->paint.rotate = E_PAPER_ROTATE_0; + device->paint.image = image; + /* 1 byte = 8 pixels, so the width should be the multiple of 8 */ + device->paint.width = width % 8 ? width + 8 - (width % 8) : width; + device->paint.height = height; +} + +static void iot_epaper_gpio_init(epaper_conf_t * pin) +{ + gpio_pad_select_gpio(pin->reset_pin); + gpio_set_direction(pin->reset_pin, GPIO_MODE_OUTPUT); + gpio_set_level(pin->reset_pin, pin->rst_active_level); + gpio_pad_select_gpio(pin->dc_pin); + gpio_set_direction(pin->dc_pin, GPIO_MODE_OUTPUT); + gpio_set_level(pin->dc_pin, 1); + ets_delay_us(10000); + gpio_set_level(pin->dc_pin, 0); + gpio_pad_select_gpio(pin->busy_pin); + gpio_set_direction(pin->busy_pin, GPIO_MODE_INPUT); + gpio_set_pull_mode(pin->busy_pin, GPIO_PULLUP_ONLY); +} + +static esp_err_t iot_epaper_spi_init(epaper_handle_t dev, spi_device_handle_t *e_spi, epaper_conf_t *pin) +{ + esp_err_t ret; + spi_bus_config_t buscfg = { + .miso_io_num = -1, // MISO not used, we are transferring to the slave only + .mosi_io_num = pin->mosi_pin, + .sclk_io_num = pin->sck_pin, + .quadwp_io_num = -1, + .quadhd_io_num = -1, + // The maximum size sent below covers the case + // when the whole frame buffer is transferred to the slave + .max_transfer_sz = EPD_WIDTH * EPD_HEIGHT / 8, + }; + spi_device_interface_config_t devcfg = { + .clock_speed_hz = pin->clk_freq_hz, + .mode = 0, // SPI mode 0 + .spics_io_num = pin->cs_pin, + // To Do: clarify what does it mean + .queue_size = EPAPER_QUE_SIZE_DEFAULT, + // We are sending only in one direction (to the ePaper slave) + .flags = (SPI_DEVICE_HALFDUPLEX | SPI_DEVICE_3WIRE), + //Specify pre-transfer callback to handle D/C line + .pre_cb = iot_epaper_pre_transfer_callback, + }; + ret = spi_bus_initialize(pin->spi_host, &buscfg, 1); + assert(ret == ESP_OK); + ret = spi_bus_add_device(pin->spi_host, &devcfg, e_spi); + assert(ret == ESP_OK); + return ret; +} + +static void iot_epaper_set_lut(epaper_handle_t dev) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + iot_epaper_send_command(dev, E_PAPER_WRITE_LUT_REGISTER); + iot_epaper_send_data(dev, lut_full_update, sizeof(lut_full_update)); + xSemaphoreGiveRecursive(device->spi_mux); +} + +static void iot_epaper_epd_init(epaper_handle_t dev) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + + iot_epaper_reset(dev); + + /* This part of code is ePaper module specific + * It has been copied from the instructions as it is + */ + iot_epaper_send_command(dev, E_PAPER_DRIVER_OUTPUT_CONTROL); + iot_epaper_send_byte(dev, (EPD_HEIGHT - 1) & 0xff); + iot_epaper_send_byte(dev, ((EPD_HEIGHT - 1) >> 8) & 0xff); + iot_epaper_send_byte(dev, 0x00); // GD = 0; SM = 0; TB = 0 + + iot_epaper_send_command(dev, E_PAPER_BOOSTER_SOFT_START_CONTROL); + iot_epaper_send_byte(dev, 0xD7); + iot_epaper_send_byte(dev, 0xD6); + iot_epaper_send_byte(dev, 0x9D); + + iot_epaper_send_command(dev, E_PAPER_WRITE_VCOM_REGISTER); + iot_epaper_send_byte(dev, 0xA8); // VCOM 7C + + iot_epaper_send_command(dev, E_PAPER_SET_DUMMY_LINE_PERIOD); + iot_epaper_send_byte(dev, 0x1A); // 4 dummy lines per gate + + iot_epaper_send_command(dev, E_PAPER_SET_GATE_TIME); + iot_epaper_send_byte(dev, 0x08); // 2us per line + + iot_epaper_send_command(dev, E_PAPER_DATA_ENTRY_MODE_SETTING); + iot_epaper_send_byte(dev, 0x03); // X increment; Y increment + + iot_epaper_set_lut(dev); + xSemaphoreGiveRecursive(device->spi_mux); +} + +epaper_handle_t iot_epaper_create(spi_device_handle_t bus, epaper_conf_t *epconf) +{ + epaper_dev_t* dev = (epaper_dev_t*) calloc(1, sizeof(epaper_dev_t)); + dev->spi_mux = xSemaphoreCreateRecursiveMutex(); + uint8_t* frame_buf = (unsigned char*) heap_caps_malloc( + (epconf->width * epconf->height / 8), MALLOC_CAP_8BIT); + if (frame_buf == NULL) { + ESP_LOGE(TAG, "frame_buffer malloc fail"); + return NULL; + } + iot_epaper_gpio_init(epconf); + ESP_LOGD(TAG, "gpio init ok"); + if (bus) { + dev->bus = bus; + } else { + iot_epaper_spi_init(dev, &dev->bus, epconf); + ESP_LOGD(TAG, "spi init ok"); + } + dev->pin = *epconf; + iot_epaper_epd_init(dev); + iot_epaper_paint_init(dev, frame_buf, epconf->width, epconf->height); + return (epaper_handle_t) dev; +} + +esp_err_t iot_epaper_delete(epaper_handle_t dev, bool del_bus) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + + iot_epaper_sleep(dev); + + spi_bus_remove_device(device->bus); + if (del_bus) { + spi_bus_free(device->pin.spi_host); + } + vSemaphoreDelete(device->spi_mux); + if (device->paint.image) { + free(device->paint.image); + device->paint.image = NULL; + } + free(device); + return ESP_OK; +} + +int iot_epaper_get_width(epaper_handle_t dev) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + return device->paint.width; +} + +void iot_epaper_set_width(epaper_handle_t dev, int width) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + device->paint.width = width % 8 ? width + 8 - (width % 8) : width; + xSemaphoreGiveRecursive(device->spi_mux); + +} + +int iot_epaper_get_height(epaper_handle_t dev) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + return device->paint.height; +} + +void iot_epaper_set_height(epaper_handle_t dev, int height) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + device->paint.height = height; + xSemaphoreGiveRecursive(device->spi_mux); +} + +int iot_epaper_get_rotate(epaper_handle_t dev) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + return device->paint.rotate; +} + +void iot_epaper_set_rotate(epaper_handle_t dev, int rotate) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + device->paint.rotate = rotate; + xSemaphoreGiveRecursive(device->spi_mux); +} + +/** + * @brief: Getters and Setters + */ +unsigned char* iot_epaper_get_image(epaper_handle_t dev) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + return device->paint.image; +} + +/** + * @brief: this draws a pixel by absolute coordinates. + * this function won't be affected by the rotate parameter. + */ +static void iot_epaper_draw_absolute_pixel(epaper_handle_t dev, int x, int y, int colored) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + if (x < 0 || x >= device->paint.width || y < 0 || y >= device->paint.height) { + return; + } + EPAPER_ENTER_CRITICAL(&epaper_spinlock); + if (device->pin.color_inv) { + if (colored) { + device->paint.image[(x + y * device->paint.width) / 8] |= 0x80 >> (x % 8); + } else { + device->paint.image[(x + y * device->paint.width) / 8] &= ~(0x80 >> (x % 8)); + } + } else { + if (colored) { + device->paint.image[(x + y * device->paint.width) / 8] &= ~(0x80 >> (x % 8)); + } else { + device->paint.image[(x + y * device->paint.width) / 8] |= 0x80 >> (x % 8); + } + } + EPAPER_EXIT_CRITICAL(&epaper_spinlock); +} + +void iot_epaper_clean_paint(epaper_handle_t dev, int colored) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + for (int x = 0; x < device->paint.width; x++) { + for (int y = 0; y < device->paint.height; y++) { + iot_epaper_draw_absolute_pixel(dev, x, y, colored); + } + } + xSemaphoreGiveRecursive(device->spi_mux); +} + +/** + * @brief: this displays a string on the frame buffer but not refresh + */ +void iot_epaper_draw_string(epaper_handle_t dev, int x, int y, const char* text, epaper_font_t* font, int colored) +{ + const char* p_text = text; + unsigned int counter = 0; + int refcolumn = x; + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + /* Send the string character by character on EPD */ + while (*p_text != 0) { + /* Display one character on EPD */ + iot_epaper_draw_char(dev, refcolumn, y, *p_text, font, colored); + /* Decrement the column position by 16 */ + refcolumn += font->width; + /* Point on the next character */ + p_text++; + counter++; + } + xSemaphoreGiveRecursive(device->spi_mux); +} + +/** + * @brief: this draws a pixel by the coordinates + */ +void iot_epaper_draw_pixel(epaper_handle_t dev, int x, int y, int colored) +{ + int point_temp; + epaper_dev_t* device = (epaper_dev_t*) dev; + if (device->paint.rotate == E_PAPER_ROTATE_0) { + if (x < 0 || x >= device->paint.width || y < 0 || y >= device->paint.height) { + return; + } + iot_epaper_draw_absolute_pixel(dev, x, y, colored); + } else if (device->paint.rotate == E_PAPER_ROTATE_90) { + if (x < 0 || x >= device->paint.height || y < 0 || y >= device->paint.width) { + return; + } + point_temp = x; + x = device->paint.width - y; + y = point_temp; + iot_epaper_draw_absolute_pixel(dev, x, y, colored); + } else if (device->paint.rotate == E_PAPER_ROTATE_180) { + if (x < 0 || x >= device->paint.width || y < 0 || y >= device->paint.height) { + return; + } + x = device->paint.width - x; + y = device->paint.height - y; + iot_epaper_draw_absolute_pixel(dev, x, y, colored); + } else if (device->paint.rotate == E_PAPER_ROTATE_270) { + if (x < 0 || x >= device->paint.height || y < 0 || y >= device->paint.width) { + return; + } + point_temp = x; + x = y; + y = device->paint.height - point_temp; + iot_epaper_draw_absolute_pixel(dev, x, y, colored); + } +} + +/** + * @brief: this draws a character on the frame buffer but not refresh + */ +void iot_epaper_draw_char(epaper_handle_t dev, int x, int y, char ascii_char, epaper_font_t* font, int colored) +{ + int i, j; + unsigned int char_offset = (ascii_char - ' ') * font->height * (font->width / 8 + (font->width % 8 ? 1 : 0)); + const unsigned char* ptr = &font->font_table[char_offset]; + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + for (j = 0; j < font->height; j++) { + for (i = 0; i < font->width; i++) { + if (*ptr & (0x80 >> (i % 8))) { + iot_epaper_draw_pixel(dev, x + i, y + j, colored); + } + if (i % 8 == 7) { + ptr++; + } + } + if (font->width % 8 != 0) { + ptr++; + } + } + xSemaphoreGiveRecursive(device->spi_mux); +} + +/** + * @brief: this draws a line on the frame buffer + */ +void iot_epaper_draw_line(epaper_handle_t dev, int x0, int y0, int x1, int y1, + int colored) +{ + /* Bresenham algorithm */ + int dx = x1 - x0 >= 0 ? x1 - x0 : x0 - x1; + int sx = x0 < x1 ? 1 : -1; + int dy = y1 - y0 <= 0 ? y1 - y0 : y0 - y1; + int sy = y0 < y1 ? 1 : -1; + int err = dx + dy; + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + while ((x0 != x1) && (y0 != y1)) { + iot_epaper_draw_pixel(dev, x0, y0, colored); + if (2 * err >= dy) { + err += dy; + x0 += sx; + } + if (2 * err <= dx) { + err += dx; + y0 += sy; + } + } + xSemaphoreGiveRecursive(device->spi_mux); +} + +/** + * @brief: this draws a horizontal line on the frame buffer + */ +void iot_epaper_draw_horizontal_line(epaper_handle_t dev, int x, int y, int width, int colored) +{ + int i; + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + for (i = x; i < x + width; i++) { + iot_epaper_draw_pixel(dev, i, y, colored); + } + xSemaphoreGiveRecursive(device->spi_mux); +} + +/** + * @brief: this draws a vertical line on the frame buffer + */ +void iot_epaper_draw_vertical_line(epaper_handle_t dev, int x, int y, int height, int colored) +{ + int i; + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + for (i = y; i < y + height; i++) { + iot_epaper_draw_pixel(dev, x, i, colored); + } + xSemaphoreGiveRecursive(device->spi_mux); +} + +/** + * @brief: this draws a rectangle + */ +void iot_epaper_draw_rectangle(epaper_handle_t dev, int x0, int y0, int x1, int y1, int colored) +{ + int min_x, min_y, max_x, max_y; + min_x = x1 > x0 ? x0 : x1; + max_x = x1 > x0 ? x1 : x0; + min_y = y1 > y0 ? y0 : y1; + max_y = y1 > y0 ? y1 : y0; + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + iot_epaper_draw_horizontal_line(dev, min_x, min_y, max_x - min_x + 1, colored); + iot_epaper_draw_horizontal_line(dev, min_x, max_y, max_x - min_x + 1, colored); + iot_epaper_draw_vertical_line(dev, min_x, min_y, max_y - min_y + 1, colored); + iot_epaper_draw_vertical_line(dev, max_x, min_y, max_y - min_y + 1, colored); + xSemaphoreGiveRecursive(device->spi_mux); +} + +/** + * @brief: this draws a filled rectangle + */ +void ior_epaper_draw_filled_rectangle(epaper_handle_t dev, int x0, int y0, int x1, int y1, int colored) +{ + int min_x, min_y, max_x, max_y; + int i; + min_x = x1 > x0 ? x0 : x1; + max_x = x1 > x0 ? x1 : x0; + min_y = y1 > y0 ? y0 : y1; + max_y = y1 > y0 ? y1 : y0; + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + for (i = min_x; i <= max_x; i++) { + iot_epaper_draw_vertical_line(dev, i, min_y, max_y - min_y + 1, colored); + } + xSemaphoreGiveRecursive(device->spi_mux); +} + +/** + * @brief: this draws a circle + */ +void iot_epaper_draw_circle(epaper_handle_t dev, int x, int y, int radius, + int colored) +{ + /* Bresenham algorithm */ + int x_pos = -radius; + int y_pos = 0; + int err = 2 - 2 * radius; + int e2; + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + do { + iot_epaper_draw_pixel(dev, x - x_pos, y + y_pos, colored); + iot_epaper_draw_pixel(dev, x + x_pos, y + y_pos, colored); + iot_epaper_draw_pixel(dev, x + x_pos, y - y_pos, colored); + iot_epaper_draw_pixel(dev, x - x_pos, y - y_pos, colored); + e2 = err; + if (e2 <= y_pos) { + err += ++y_pos * 2 + 1; + if (-x_pos == y_pos && e2 <= x_pos) { + e2 = 0; + } + } + if (e2 > x_pos) { + err += ++x_pos * 2 + 1; + } + } while (x_pos <= 0); + xSemaphoreGiveRecursive(device->spi_mux); +} + +/** + * @brief: this draws a filled circle + */ +void iot_epaper_draw_filled_circle(epaper_handle_t dev, int x, int y, int radius, int colored) +{ + /* Bresenham algorithm */ + int x_pos = -radius; + int y_pos = 0; + int err = 2 - 2 * radius; + int e2; + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + do { + iot_epaper_draw_pixel(dev, x - x_pos, y + y_pos, colored); + iot_epaper_draw_pixel(dev, x + x_pos, y + y_pos, colored); + iot_epaper_draw_pixel(dev, x + x_pos, y - y_pos, colored); + iot_epaper_draw_pixel(dev, x - x_pos, y - y_pos, colored); + iot_epaper_draw_horizontal_line(dev, x + x_pos, y + y_pos, 2 * (-x_pos) + 1, colored); + iot_epaper_draw_horizontal_line(dev, x + x_pos, y - y_pos, 2 * (-x_pos) + 1, colored); + e2 = err; + if (e2 <= y_pos) { + err += ++y_pos * 2 + 1; + if (-x_pos == y_pos && e2 <= x_pos) { + e2 = 0; + } + } + if (e2 > x_pos) { + err += ++x_pos * 2 + 1; + } + } while (x_pos <= 0); + xSemaphoreGiveRecursive(device->spi_mux); +} + +void iot_epaper_wait_idle(epaper_handle_t dev) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + while (gpio_get_level((gpio_num_t) device->pin.busy_pin) == device->pin.busy_active_level) { + vTaskDelay(10 / portTICK_RATE_MS); + } +} + +void iot_epaper_reset(epaper_handle_t dev) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + gpio_set_level((gpio_num_t) device->pin.reset_pin, (~(device->pin.rst_active_level)) & 0x1); + ets_delay_us(200); + gpio_set_level((gpio_num_t) device->pin.reset_pin, (device->pin.rst_active_level) & 0x1); //module reset + ets_delay_us(200); + gpio_set_level((gpio_num_t) device->pin.reset_pin, (~(device->pin.rst_active_level)) & 0x1); + iot_epaper_wait_idle(dev); + xSemaphoreGiveRecursive(device->spi_mux); +} + +/* This function has been exposed to implement partial updates of the image + * To Do: implement partial updates of the image + */ +void iot_set_ram_area(epaper_handle_t dev, int x_start, int y_start, int x_end, int y_end) +{ + iot_epaper_send_command(dev, E_PAPER_SET_RAM_X_ADDRESS_START_END_POSITION); + iot_epaper_send_byte(dev, x_start >> 3); // 8 pixels per byte + iot_epaper_send_byte(dev, x_end >> 3); // 8 pixels per byte + iot_epaper_send_command(dev, E_PAPER_SET_RAM_Y_ADDRESS_START_END_POSITION); + iot_epaper_send_byte(dev, y_start & 0xff); + iot_epaper_send_byte(dev, y_start >> 8); + iot_epaper_send_byte(dev, y_end & 0xff); + iot_epaper_send_byte(dev, y_end >> 8); +} + +/* This function has been exposed to implement partial updates of the image + * To Do: implement partial updates of the image + */ +void iot_set_ram_address_counter(epaper_handle_t dev, int x, int y) +{ + iot_epaper_send_command(dev, E_PAPER_SET_RAM_X_ADDRESS_COUNTER); + iot_epaper_send_byte(dev, x >> 3); // 8 pixels per byte + iot_epaper_send_command(dev, E_PAPER_SET_RAM_Y_ADDRESS_COUNTER); + iot_epaper_send_byte(dev, y & 0xff); + iot_epaper_send_byte(dev, y >> 8); +} + +/* This transfer to the display the whole image frame + * To Do: implement partial updates of the image + */ +void iot_epaper_display_frame(epaper_handle_t dev, const unsigned char* frame_buffer) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + if (frame_buffer == NULL) { + frame_buffer = device->paint.image; + } + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + if (frame_buffer != NULL) { + + // configure ePaper's memory to send data + iot_set_ram_area(dev, 0, 0, EPD_WIDTH-1, EPD_HEIGHT-1); + iot_set_ram_address_counter(dev, 0, 0); + + // send image data + iot_epaper_send_command(dev, E_PAPER_WRITE_RAM); + iot_epaper_send_data(dev, frame_buffer, device->paint.width / 8 * device->paint.height); + + // update display + iot_epaper_send_command(dev, E_PAPER_DISPLAY_UPDATE_CONTROL_2); + iot_epaper_send_byte(dev, 0xC4); + iot_epaper_send_command(dev, E_PAPER_MASTER_ACTIVATION); + iot_epaper_send_command(dev, E_PAPER_TERMINATE_FRAME_READ_WRITE); + iot_epaper_wait_idle(dev); + } + xSemaphoreGiveRecursive(device->spi_mux); +} + +void iot_epaper_sleep(epaper_handle_t dev) +{ + epaper_dev_t* device = (epaper_dev_t*) dev; + xSemaphoreTakeRecursive(device->spi_mux, portMAX_DELAY); + iot_epaper_send_command(dev, E_PAPER_DEEP_SLEEP_MODE); + iot_epaper_wait_idle(dev); + xSemaphoreGiveRecursive(device->spi_mux); +} + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper-29-ws.h b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper-29-ws.h new file mode 100644 index 000000000..929395395 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper-29-ws.h @@ -0,0 +1,351 @@ +// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef _IOT_E_PAPER_29_H_ +#define _IOT_E_PAPER_29_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif +#include "driver/spi_master.h" + +// Display orientation +typedef enum { + E_PAPER_ROTATE_0, + E_PAPER_ROTATE_90, + E_PAPER_ROTATE_180, + E_PAPER_ROTATE_270, +} epaper_rotate_t; + +typedef struct +{ + uint16_t width; + uint16_t height; + const uint8_t *font_table; +} epaper_font_t; + +#define COLORED 0 +#define UNCOLORED 1 + +// Display resolution +#define EPD_WIDTH 128 +#define EPD_HEIGHT 296 + +// Display CONTROLLER COMMANDS +#define E_PAPER_DRIVER_OUTPUT_CONTROL 0x01 +#define E_PAPER_BOOSTER_SOFT_START_CONTROL 0x0C +#define E_PAPER_GATE_SCAN_START_POSITION 0x0F +#define E_PAPER_DEEP_SLEEP_MODE 0x10 +#define E_PAPER_DATA_ENTRY_MODE_SETTING 0x11 +#define E_PAPER_SW_RESET 0x12 +#define E_PAPER_TEMPERATURE_SENSOR_CONTROL 0x1A +#define E_PAPER_MASTER_ACTIVATION 0x20 +#define E_PAPER_DISPLAY_UPDATE_CONTROL_1 0x21 +#define E_PAPER_DISPLAY_UPDATE_CONTROL_2 0x22 +#define E_PAPER_WRITE_RAM 0x24 +#define E_PAPER_WRITE_VCOM_REGISTER 0x2C +#define E_PAPER_WRITE_LUT_REGISTER 0x32 +#define E_PAPER_SET_DUMMY_LINE_PERIOD 0x3A +#define E_PAPER_SET_GATE_TIME 0x3B +#define E_PAPER_BORDER_WAVEFORM_CONTROL 0x3C +#define E_PAPER_SET_RAM_X_ADDRESS_START_END_POSITION 0x44 +#define E_PAPER_SET_RAM_Y_ADDRESS_START_END_POSITION 0x45 +#define E_PAPER_SET_RAM_X_ADDRESS_COUNTER 0x4E +#define E_PAPER_SET_RAM_Y_ADDRESS_COUNTER 0x4F +#define E_PAPER_TERMINATE_FRAME_READ_WRITE 0xFF + +/* Paint properties */ +typedef struct { + unsigned char* image; + epaper_rotate_t rotate; + int width; + int height; +} epaper_paint_t; + +/* EPD properties */ +typedef struct { + int reset_pin; + int dc_pin; + int cs_pin; + int busy_pin; + int mosi_pin; + int miso_pin; + int sck_pin; + + uint8_t rst_active_level; + uint8_t busy_active_level; + uint8_t dc_lev_data; + uint8_t dc_lev_cmd; + + int clk_freq_hz; + spi_host_device_t spi_host; + + int width; + int height; + bool color_inv; +} epaper_conf_t; + +typedef void* epaper_handle_t; /*handle of epaper*/ + +/** + * @brief Create and init epaper and return a epaper handle + * + * @param bus handle of spi device + * @param epconf configure struct for epaper device + * + * @return + * - handle of epaper + */ +epaper_handle_t iot_epaper_create(spi_device_handle_t bus, epaper_conf_t * epconf); + +/** + * @brief delete epaper handle_t + * + * @param dev object handle of epaper + * @param del_bus whether to delete spi bus + * + * @return + * - ESP_OK Success + * - ESP_FAIL Fail + */ +esp_err_t iot_epaper_delete(epaper_handle_t dev, bool del_bus); + +/** + * @brief clear display frame buffer + * + * @param dev object handle of epaper + * @param colored to set display color + */ +void iot_epaper_clean_paint(epaper_handle_t dev, int colored); + +/** + * @brief get paint width + * + * @param dev object handle of epaper + * + * @return + * - paint width + */ +int iot_epaper_get_width(epaper_handle_t dev); + +/** + * @brief set paint width + * @param dev object handle of epaper + * @param width paint width + */ +void iot_epaper_set_width(epaper_handle_t dev, int width); + +/** + * @brief get paint height + * @param dev object handle of epaper + * @return + * - paint height + */ +int iot_epaper_get_height(epaper_handle_t dev); + +/** + * @brief set paint height + * @param dev object handle of epaper + * @param paint height + */ +void iot_epaper_set_height(epaper_handle_t dev, int height); + +/** + * @brief get paint rotate + * @param dev object handle of epaper + * @return + * - current rotation + */ +int iot_epaper_get_rotate(epaper_handle_t dev); + +/** + * @brief set paint rotate + * @param dev object handle of epaper + * @param rotation + */ +void iot_epaper_set_rotate(epaper_handle_t dev, int rotate); + +/** + * @brief get display data + * @param dev object handle of epaper + * @return + * - Pointer to display data + */ +unsigned char* iot_epaper_get_image(epaper_handle_t dev); + +/** + * @brief draw string start on point(x,y) and save on display data array, + * screen will display when call iot_epaper_display_frame function. + * @param dev object handle of epaper + * @param x poing (x) + * @param y poing (y) + * @param text display string + * @param font Font style + * @param colored display color + */ +void iot_epaper_draw_string(epaper_handle_t dev, int x, int y, const char* text, + epaper_font_t* font, int colored); + +/** + * @brief draw pixel and save on display data array, + * screen will display when call iot_epaper_display_frame function. + * @param dev object handle of epaper + * @param x point (x) + * @param y point (y) + * @param colored display color + */ +void iot_epaper_draw_pixel(epaper_handle_t dev, int x, int y, int colored); + +/** + * @brief draw char and save on display data array, + * screen will display when call iot_epaper_display_frame function. + * @param dev object handle of epaper + * @param x poing (x) + * @param y poing (y) + * @param ascii_char display char + * @param font font style + * @param colored display color + */ +void iot_epaper_draw_char(epaper_handle_t dev, int x, int y, char ascii_char, + epaper_font_t* font, int colored); + +/** + * @brief draw line start on point(x0,y0) end on point(x1,y1) and save on display data array, + * screen will display when call iot_epaper_display_frame function. + * + * @param dev object handle of epaper + * @param x0 poing (x0) + * @param y0 poing (y0) + * @param x1 poing (x1) + * @param y1 poing (y1) + * @param colored display color + */ +void iot_epaper_draw_line(epaper_handle_t dev, int x0, int y0, int x1, int y1, + int colored); + +/** + * @brief draw horizontal line start on point(x,y) and save on display data array, + * screen will display when call iot_epaper_display_frame function. + * @param dev object handle of epaper + * @param x poing (x) + * @param y poing (y) + * @param width line width + * @param colored display color + */ +void iot_epaper_draw_horizontal_line(epaper_handle_t dev, int x, int y, + int width, int colored); + +/** + * @brief draw vertical line start on point(x,y) and save on display data array, + * screen will display when call iot_epaper_display_frame function. + * + * @param dev object handle of epaper + * @param x poing (x) + * @param y poing (y) + * @param line height + * @param display color + */ +void iot_epaper_draw_vertical_line(epaper_handle_t dev, int x, int y, + int height, int colored); + +/** + * @brief draw rectangle point(x0,y0) (x1,y1) and save on display data array, + * screen will display when call iot_epaper_display_frame function. + * + * @param dev object handle of epaper + * @param x0 point(x0,y0) + * @param y0 point(x0,y0) + * @param x1 point(x1,y1) + * @param y1 point(x1,y1) + * @param colored display color + */ +void iot_epaper_draw_rectangle(epaper_handle_t dev, int x0, int y0, int x1, + int y1, int colored); + +/** + * @brief draw fill rectangle point(x0,y0) (x1,y1) and save on display data array, + * screen will display when call iot_epaper_display_frame function. + * + * @param dev object handle of epaper + * @param x0 point(x0,y0) + * @param y0 point(x0,y0) + * @param x1 point(x1,y1) + * @param y1 point(x1,y1) + * @param colored display color + */ +void ior_epaper_draw_filled_rectangle(epaper_handle_t dev, int x0, int y0, + int x1, int y1, int colored); + +/** + * @brief draw a circle at point(x,y) and save on display data array, + * screen will display when call iot_epaper_display_frame function. + * + * @param dev object handle of epaper + * @param x point(x,y) + * @param y point(x,y) + * @param colored display color + */ +void iot_epaper_draw_circle(epaper_handle_t dev, int x, int y, int radius, + int colored); + +/** + * @brief draw a fill circle at point(x,y) and save on display data array, + * screen will display when call iot_epaper_display_frame function. + * + * @param dev object handle of epaper + * @param x point(x,y) + * @param y point(x,y) + * @param radius radius of the circle + * @param colored display color + */ +void iot_epaper_draw_filled_circle(epaper_handle_t dev, int x, int y, + int radius, int colored); + +/** + * @brief wait until idle + * @param dev object handle of epaper + */ +void iot_epaper_wait_idle(epaper_handle_t dev); + +/** + * @brief reset device + * + * @param dev object handle of epaper + */ +void iot_epaper_reset(epaper_handle_t dev); + +/** + * @brief dispaly frame, refresh screen + * + * @param dev object handle of epaper + */ +void iot_epaper_display_frame(epaper_handle_t dev, const unsigned char* frame_buffer); + +/** + * @brief After this command is transmitted, the chip would enter the deep-sleep mode to save power. + * The deep sleep mode would return to standby by hardware reset. The only one parameter is a + * check code, the command would be executed if check code = 0xA5. + * You can use iot_epaper_reset() to awaken and EPD_Init() to initialize + * + * @param dev object handle of epaper + */ +void iot_epaper_sleep(epaper_handle_t dev); + +#ifdef __cplusplus +} +#endif + +#endif //_IOT_E_PAPER_29_H_ + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper_font.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper_font.c new file mode 100644 index 000000000..3c745541e --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper_font.c @@ -0,0 +1,8615 @@ +// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +#include "epaper_fonts.h" + +const uint8_t Font8_Table[] = { +// @0 ' ' (5 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @8 '!' (5 pixels wide) + 0x20,// # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @16 '"' (5 pixels wide) + 0x50,// # # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @24 '#' (5 pixels wide) + 0x28,// # # + 0x50, // # # + 0xF8, // ##### + 0x50, // # # + 0xF8, // ##### + 0x50, // # # + 0xA0, // # # + 0x00, // + + // @32 '$' (5 pixels wide) + 0x20,// # + 0x30, // ## + 0x60, // ## + 0x30, // ## + 0x10, // # + 0x60, // ## + 0x20, // # + 0x00, // + + // @40 '%' (5 pixels wide) + 0x20,// # + 0x20, // # + 0x18, // ## + 0x60, // ## + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + + // @48 '&' (5 pixels wide) + 0x00,// + 0x38, // ### + 0x20, // # + 0x60, // ## + 0x50, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @56 ''' (5 pixels wide) + 0x20,// # + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @64 '(' (5 pixels wide) + 0x10,// # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @72 ')' (5 pixels wide) + 0x40,// # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x40, // # + 0x00, // + + // @80 '*' (5 pixels wide) + 0x20,// # + 0x70, // ### + 0x20, // # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @88 '+' (5 pixels wide) + 0x00,// + 0x20, // # + 0x20, // # + 0xF8, // ##### + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + + // @96 ',' (5 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x00, // + 0x10, // # + 0x20, // # + 0x20, // # + 0x00, // + + // @104 '-' (5 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @112 '.' (5 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @120 '/' (5 pixels wide) + 0x10,// # + 0x20, // # + 0x20, // # + 0x20, // # + 0x40, // # + 0x40, // # + 0x80, // # + 0x00, // + + // @128 '0' (5 pixels wide) + 0x20,// # + 0x50, // # # + 0x50, // # # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @136 '1' (5 pixels wide) + 0x60,// ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @144 '2' (5 pixels wide) + 0x20,// # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x40, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @152 '3' (5 pixels wide) + 0x20,// # + 0x50, // # # + 0x10, // # + 0x20, // # + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @160 '4' (5 pixels wide) + 0x10,// # + 0x30, // ## + 0x50, // # # + 0x78, // #### + 0x10, // # + 0x38, // ### + 0x00, // + 0x00, // + + // @168 '5' (5 pixels wide) + 0x70,// ### + 0x40, // # + 0x60, // ## + 0x10, // # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @176 '6' (5 pixels wide) + 0x30,// ## + 0x40, // # + 0x60, // ## + 0x50, // # # + 0x50, // # # + 0x60, // ## + 0x00, // + 0x00, // + + // @184 '7' (5 pixels wide) + 0x70,// ### + 0x50, // # # + 0x10, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + + // @192 '8' (5 pixels wide) + 0x20,// # + 0x50, // # # + 0x20, // # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @200 '9' (5 pixels wide) + 0x30,// ## + 0x50, // # # + 0x50, // # # + 0x30, // ## + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @208 ':' (5 pixels wide) + 0x00,// + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @216 ';' (5 pixels wide) + 0x00,// + 0x00, // + 0x10, // # + 0x00, // + 0x10, // # + 0x20, // # + 0x00, // + 0x00, // + + // @224 '<' (5 pixels wide) + 0x00,// + 0x10, // # + 0x20, // # + 0xC0, // ## + 0x20, // # + 0x10, // # + 0x00, // + 0x00, // + + // @232 '=' (5 pixels wide) + 0x00,// + 0x70, // ### + 0x00, // + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @240 '>' (5 pixels wide) + 0x00,// + 0x40, // # + 0x20, // # + 0x18, // ## + 0x20, // # + 0x40, // # + 0x00, // + 0x00, // + + // @248 '?' (5 pixels wide) + 0x20,// # + 0x50, // # # + 0x10, // # + 0x20, // # + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @256 '@' (5 pixels wide) + 0x30,// ## + 0x48, // # # + 0x48, // # # + 0x58, // # ## + 0x48, // # # + 0x40, // # + 0x38, // ### + 0x00, // + + // @264 'A' (5 pixels wide) + 0x60,// ## + 0x20, // # + 0x50, // # # + 0x70, // ### + 0x88, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @272 'B' (5 pixels wide) + 0xF0,// #### + 0x48, // # # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @280 'C' (5 pixels wide) + 0x70,// ### + 0x50, // # # + 0x40, // # + 0x40, // # + 0x40, // # + 0x30, // ## + 0x00, // + 0x00, // + + // @288 'D' (5 pixels wide) + 0xF0,// #### + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @296 'E' (5 pixels wide) + 0xF8,// ##### + 0x48, // # # + 0x60, // ## + 0x40, // # + 0x48, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @304 'F' (5 pixels wide) + 0xF8,// ##### + 0x48, // # # + 0x60, // ## + 0x40, // # + 0x40, // # + 0xE0, // ### + 0x00, // + 0x00, // + + // @312 'G' (5 pixels wide) + 0x70,// ### + 0x40, // # + 0x40, // # + 0x58, // # ## + 0x50, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @320 'H' (5 pixels wide) + 0xE8,// ### # + 0x48, // # # + 0x78, // #### + 0x48, // # # + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @328 'I' (5 pixels wide) + 0x70,// ### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @336 'J' (5 pixels wide) + 0x38,// ### + 0x10, // # + 0x10, // # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @344 'K' (5 pixels wide) + 0xD8,// ## ## + 0x50, // # # + 0x60, // ## + 0x70, // ### + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @352 'L' (5 pixels wide) + 0xE0,// ### + 0x40, // # + 0x40, // # + 0x40, // # + 0x48, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @360 'M' (5 pixels wide) + 0xD8,// ## ## + 0xD8, // ## ## + 0xD8, // ## ## + 0xA8, // # # # + 0x88, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @368 'N' (5 pixels wide) + 0xD8,// ## ## + 0x68, // ## # + 0x68, // ## # + 0x58, // # ## + 0x58, // # ## + 0xE8, // ### # + 0x00, // + 0x00, // + + // @376 'O' (5 pixels wide) + 0x30,// ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @384 'P' (5 pixels wide) + 0xF0,// #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x40, // # + 0xE0, // ### + 0x00, // + 0x00, // + + // @392 'Q' (5 pixels wide) + 0x30,// ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x18, // ## + 0x00, // + + // @400 'R' (5 pixels wide) + 0xF0,// #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @408 'S' (5 pixels wide) + 0x70,// ### + 0x50, // # # + 0x20, // # + 0x10, // # + 0x50, // # # + 0x70, // ### + 0x00, // + 0x00, // + + // @416 'T' (5 pixels wide) + 0xF8,// ##### + 0xA8, // # # # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @424 'U' (5 pixels wide) + 0xD8,// ## ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @432 'V' (5 pixels wide) + 0xD8,// ## ## + 0x88, // # # + 0x48, // # # + 0x50, // # # + 0x50, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @440 'W' (5 pixels wide) + 0xD8,// ## ## + 0x88, // # # + 0xA8, // # # # + 0xA8, // # # # + 0xA8, // # # # + 0x50, // # # + 0x00, // + 0x00, // + + // @448 'X' (5 pixels wide) + 0xD8,// ## ## + 0x50, // # # + 0x20, // # + 0x20, // # + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @456 'Y' (5 pixels wide) + 0xD8,// ## ## + 0x88, // # # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @464 'Z' (5 pixels wide) + 0x78,// #### + 0x48, // # # + 0x10, // # + 0x20, // # + 0x48, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @472 '[' (5 pixels wide) + 0x30,// ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x30, // ## + 0x00, // + + // @480 '\' (5 pixels wide) + 0x80,// # + 0x40, // # + 0x40, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @488 ']' (5 pixels wide) + 0x60,// ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x60, // ## + 0x00, // + + // @496 '^' (5 pixels wide) + 0x20,// # + 0x20, // # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @504 '_' (5 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0xF8, // ##### + + // @512 '`' (5 pixels wide) + 0x20,// # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @520 'a' (5 pixels wide) + 0x00,// + 0x00, // + 0x30, // ## + 0x10, // # + 0x70, // ### + 0x78, // #### + 0x00, // + 0x00, // + + // @528 'b' (5 pixels wide) + 0xC0,// ## + 0x40, // # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @536 'c' (5 pixels wide) + 0x00,// + 0x00, // + 0x70, // ### + 0x40, // # + 0x40, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @544 'd' (5 pixels wide) + 0x18,// ## + 0x08, // # + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x00, // + 0x00, // + + // @552 'e' (5 pixels wide) + 0x00,// + 0x00, // + 0x70, // ### + 0x70, // ### + 0x40, // # + 0x30, // ## + 0x00, // + 0x00, // + + // @560 'f' (5 pixels wide) + 0x10,// # + 0x20, // # + 0x70, // ### + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @568 'g' (5 pixels wide) + 0x00,// + 0x00, // + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x08, // # + 0x30, // ## + + // @576 'h' (5 pixels wide) + 0xC0,// ## + 0x40, // # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @584 'i' (5 pixels wide) + 0x20,// # + 0x00, // + 0x60, // ## + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @592 'j' (5 pixels wide) + 0x20,// # + 0x00, // + 0x70, // ### + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x70, // ### + + // @600 'k' (5 pixels wide) + 0xC0,// ## + 0x40, // # + 0x58, // # ## + 0x70, // ### + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @608 'l' (5 pixels wide) + 0x60,// ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @616 'm' (5 pixels wide) + 0x00,// + 0x00, // + 0xD0, // ## # + 0xA8, // # # # + 0xA8, // # # # + 0xA8, // # # # + 0x00, // + 0x00, // + + // @624 'n' (5 pixels wide) + 0x00,// + 0x00, // + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0xC8, // ## # + 0x00, // + 0x00, // + + // @632 'o' (5 pixels wide) + 0x00,// + 0x00, // + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @640 'p' (5 pixels wide) + 0x00,// + 0x00, // + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x40, // # + 0xE0, // ### + + // @648 'q' (5 pixels wide) + 0x00,// + 0x00, // + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x08, // # + 0x18, // ## + + // @656 'r' (5 pixels wide) + 0x00,// + 0x00, // + 0x78, // #### + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @664 's' (5 pixels wide) + 0x00,// + 0x00, // + 0x30, // ## + 0x20, // # + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @672 't' (5 pixels wide) + 0x00,// + 0x40, // # + 0xF0, // #### + 0x40, // # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @680 'u' (5 pixels wide) + 0x00,// + 0x00, // + 0xD8, // ## ## + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x00, // + 0x00, // + + // @688 'v' (5 pixels wide) + 0x00,// + 0x00, // + 0xC8, // ## # + 0x48, // # # + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + + // @696 'w' (5 pixels wide) + 0x00,// + 0x00, // + 0xD8, // ## ## + 0xA8, // # # # + 0xA8, // # # # + 0x50, // # # + 0x00, // + 0x00, // + + // @704 'x' (5 pixels wide) + 0x00,// + 0x00, // + 0x48, // # # + 0x30, // ## + 0x30, // ## + 0x48, // # # + 0x00, // + 0x00, // + + // @712 'y' (5 pixels wide) + 0x00,// + 0x00, // + 0xD8, // ## ## + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x60, // ## + + // @720 'z' (5 pixels wide) + 0x00,// + 0x00, // + 0x78, // #### + 0x50, // # # + 0x28, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @728 '{' (5 pixels wide) + 0x10,// # + 0x20, // # + 0x20, // # + 0x60, // ## + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @736 '|' (5 pixels wide) + 0x20,// # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + + // @744 '}' (5 pixels wide) + 0x40,// # + 0x20, // # + 0x20, // # + 0x30, // ## + 0x20, // # + 0x20, // # + 0x40, // # + 0x00, // + + // @752 '~' (5 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x28, // # # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + }; + +// Font data for Courier New 12pt + +const uint8_t Font12_Table[] = { +// @0 ' ' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @12 '!' (7 pixels wide) + 0x00,// + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @24 '"' (7 pixels wide) + 0x00,// + 0x6C, // ## ## + 0x48, // # # + 0x48, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @36 '#' (7 pixels wide) + 0x00,// + 0x14, // # # + 0x14, // # # + 0x28, // # # + 0x7C, // ##### + 0x28, // # # + 0x7C, // ##### + 0x28, // # # + 0x50, // # # + 0x50, // # # + 0x00, // + 0x00, // + + // @48 '$' (7 pixels wide) + 0x00,// + 0x10, // # + 0x38, // ### + 0x40, // # + 0x40, // # + 0x38, // ### + 0x48, // # # + 0x70, // ### + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + + // @60 '%' (7 pixels wide) + 0x00,// + 0x20, // # + 0x50, // # # + 0x20, // # + 0x0C, // ## + 0x70, // ### + 0x08, // # + 0x14, // # # + 0x08, // # + 0x00, // + 0x00, // + 0x00, // + + // @72 '&' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x18, // ## + 0x20, // # + 0x20, // # + 0x54, // # # # + 0x48, // # # + 0x34, // ## # + 0x00, // + 0x00, // + 0x00, // + + // @84 ''' (7 pixels wide) + 0x00,// + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @96 '(' (7 pixels wide) + 0x00,// + 0x08, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x08, // # + 0x00, // + + // @108 ')' (7 pixels wide) + 0x00,// + 0x20, // # + 0x20, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x20, // # + 0x00, // + + // @120 '*' (7 pixels wide) + 0x00,// + 0x10, // # + 0x7C, // ##### + 0x10, // # + 0x28, // # # + 0x28, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @132 '+' (7 pixels wide) + 0x00,// + 0x00, // + 0x10, // # + 0x10, // # + 0x10, // # + 0xFE, // ####### + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @144 ',' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x18, // ## + 0x10, // # + 0x30, // ## + 0x20, // # + 0x00, // + + // @156 '-' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @168 '.' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @180 '/' (7 pixels wide) + 0x00,// + 0x04, // # + 0x04, // # + 0x08, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x20, // # + 0x40, // # + 0x00, // + 0x00, // + + // @192 '0' (7 pixels wide) + 0x00,// + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @204 '1' (7 pixels wide) + 0x00,// + 0x30, // ## + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @216 '2' (7 pixels wide) + 0x00,// + 0x38, // ### + 0x44, // # # + 0x04, // # + 0x08, // # + 0x10, // # + 0x20, // # + 0x44, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @228 '3' (7 pixels wide) + 0x00,// + 0x38, // ### + 0x44, // # # + 0x04, // # + 0x18, // ## + 0x04, // # + 0x04, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @240 '4' (7 pixels wide) + 0x00,// + 0x0C, // ## + 0x14, // # # + 0x14, // # # + 0x24, // # # + 0x44, // # # + 0x7E, // ###### + 0x04, // # + 0x0E, // ### + 0x00, // + 0x00, // + 0x00, // + + // @252 '5' (7 pixels wide) + 0x00,// + 0x3C, // #### + 0x20, // # + 0x20, // # + 0x38, // ### + 0x04, // # + 0x04, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @264 '6' (7 pixels wide) + 0x00,// + 0x1C, // ### + 0x20, // # + 0x40, // # + 0x78, // #### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @276 '7' (7 pixels wide) + 0x00,// + 0x7C, // ##### + 0x44, // # # + 0x04, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @288 '8' (7 pixels wide) + 0x00,// + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @300 '9' (7 pixels wide) + 0x00,// + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3C, // #### + 0x04, // # + 0x08, // # + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + + // @312 ':' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @324 ';' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x18, // ## + 0x18, // ## + 0x00, // + 0x00, // + 0x18, // ## + 0x30, // ## + 0x20, // # + 0x00, // + 0x00, // + + // @336 '<' (7 pixels wide) + 0x00,// + 0x00, // + 0x0C, // ## + 0x10, // # + 0x60, // ## + 0x80, // # + 0x60, // ## + 0x10, // # + 0x0C, // ## + 0x00, // + 0x00, // + 0x00, // + + // @348 '=' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x00, // + 0x7C, // ##### + 0x00, // + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @360 '>' (7 pixels wide) + 0x00,// + 0x00, // + 0xC0, // ## + 0x20, // # + 0x18, // ## + 0x04, // # + 0x18, // ## + 0x20, // # + 0xC0, // ## + 0x00, // + 0x00, // + 0x00, // + + // @372 '?' (7 pixels wide) + 0x00,// + 0x00, // + 0x18, // ## + 0x24, // # # + 0x04, // # + 0x08, // # + 0x10, // # + 0x00, // + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @384 '@' (7 pixels wide) + 0x38,// ### + 0x44, // # # + 0x44, // # # + 0x4C, // # ## + 0x54, // # # # + 0x54, // # # # + 0x4C, // # ## + 0x40, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + + // @396 'A' (7 pixels wide) + 0x00,// + 0x30, // ## + 0x10, // # + 0x28, // # # + 0x28, // # # + 0x28, // # # + 0x7C, // ##### + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @408 'B' (7 pixels wide) + 0x00,// + 0xF8, // ##### + 0x44, // # # + 0x44, // # # + 0x78, // #### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @420 'C' (7 pixels wide) + 0x00,// + 0x3C, // #### + 0x44, // # # + 0x40, // # + 0x40, // # + 0x40, // # + 0x40, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @432 'D' (7 pixels wide) + 0x00,// + 0xF0, // #### + 0x48, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + 0x00, // + + // @444 'E' (7 pixels wide) + 0x00,// + 0xFC, // ###### + 0x44, // # # + 0x50, // # # + 0x70, // ### + 0x50, // # # + 0x40, // # + 0x44, // # # + 0xFC, // ###### + 0x00, // + 0x00, // + 0x00, // + + // @456 'F' (7 pixels wide) + 0x00,// + 0x7E, // ###### + 0x22, // # # + 0x28, // # # + 0x38, // ### + 0x28, // # # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + + // @468 'G' (7 pixels wide) + 0x00,// + 0x3C, // #### + 0x44, // # # + 0x40, // # + 0x40, // # + 0x4E, // # ### + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @480 'H' (7 pixels wide) + 0x00,// + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x7C, // ##### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @492 'I' (7 pixels wide) + 0x00,// + 0x7C, // ##### + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @504 'J' (7 pixels wide) + 0x00,// + 0x3C, // #### + 0x08, // # + 0x08, // # + 0x08, // # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @516 'K' (7 pixels wide) + 0x00,// + 0xEE, // ### ### + 0x44, // # # + 0x48, // # # + 0x50, // # # + 0x70, // ### + 0x48, // # # + 0x44, // # # + 0xE6, // ### ## + 0x00, // + 0x00, // + 0x00, // + + // @528 'L' (7 pixels wide) + 0x00,// + 0x70, // ### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x24, // # # + 0x24, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @540 'M' (7 pixels wide) + 0x00,// + 0xEE, // ### ### + 0x6C, // ## ## + 0x6C, // ## ## + 0x54, // # # # + 0x54, // # # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @552 'N' (7 pixels wide) + 0x00,// + 0xEE, // ### ### + 0x64, // ## # + 0x64, // ## # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x4C, // # ## + 0xEC, // ### ## + 0x00, // + 0x00, // + 0x00, // + + // @564 'O' (7 pixels wide) + 0x00,// + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @576 'P' (7 pixels wide) + 0x00,// + 0x78, // #### + 0x24, // # # + 0x24, // # # + 0x24, // # # + 0x38, // ### + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + + // @588 'Q' (7 pixels wide) + 0x00,// + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x1C, // ### + 0x00, // + 0x00, // + + // @600 'R' (7 pixels wide) + 0x00,// + 0xF8, // ##### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x78, // #### + 0x48, // # # + 0x44, // # # + 0xE2, // ### # + 0x00, // + 0x00, // + 0x00, // + + // @612 'S' (7 pixels wide) + 0x00,// + 0x34, // ## # + 0x4C, // # ## + 0x40, // # + 0x38, // ### + 0x04, // # + 0x04, // # + 0x64, // ## # + 0x58, // # ## + 0x00, // + 0x00, // + 0x00, // + + // @624 'T' (7 pixels wide) + 0x00,// + 0xFE, // ####### + 0x92, // # # # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @636 'U' (7 pixels wide) + 0x00,// + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @648 'V' (7 pixels wide) + 0x00,// + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x28, // # # + 0x28, // # # + 0x28, // # # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @660 'W' (7 pixels wide) + 0x00,// + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x28, // # # + 0x00, // + 0x00, // + 0x00, // + + // @672 'X' (7 pixels wide) + 0x00,// + 0xC6, // ## ## + 0x44, // # # + 0x28, // # # + 0x10, // # + 0x10, // # + 0x28, // # # + 0x44, // # # + 0xC6, // ## ## + 0x00, // + 0x00, // + 0x00, // + + // @684 'Y' (7 pixels wide) + 0x00,// + 0xEE, // ### ### + 0x44, // # # + 0x28, // # # + 0x28, // # # + 0x10, // # + 0x10, // # + 0x10, // # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @696 'Z' (7 pixels wide) + 0x00,// + 0x7C, // ##### + 0x44, // # # + 0x08, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x44, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @708 '[' (7 pixels wide) + 0x00,// + 0x38, // ### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x38, // ### + 0x00, // + + // @720 '\' (7 pixels wide) + 0x00,// + 0x40, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x00, // + 0x00, // + + // @732 ']' (7 pixels wide) + 0x00,// + 0x38, // ### + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x38, // ### + 0x00, // + + // @744 '^' (7 pixels wide) + 0x00,// + 0x10, // # + 0x10, // # + 0x28, // # # + 0x44, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @756 '_' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0xFE, // ####### + + // @768 '`' (7 pixels wide) + 0x00,// + 0x10, // # + 0x08, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @780 'a' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x38, // ### + 0x44, // # # + 0x3C, // #### + 0x44, // # # + 0x44, // # # + 0x3E, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @792 'b' (7 pixels wide) + 0x00,// + 0xC0, // ## + 0x40, // # + 0x58, // # ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @804 'c' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x3C, // #### + 0x44, // # # + 0x40, // # + 0x40, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @816 'd' (7 pixels wide) + 0x00,// + 0x0C, // ## + 0x04, // # + 0x34, // ## # + 0x4C, // # ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3E, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @828 'e' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x38, // ### + 0x44, // # # + 0x7C, // ##### + 0x40, // # + 0x40, // # + 0x3C, // #### + 0x00, // + 0x00, // + 0x00, // + + // @840 'f' (7 pixels wide) + 0x00,// + 0x1C, // ### + 0x20, // # + 0x7C, // ##### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @852 'g' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x36, // ## ## + 0x4C, // # ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3C, // #### + 0x04, // # + 0x38, // ### + 0x00, // + + // @864 'h' (7 pixels wide) + 0x00,// + 0xC0, // ## + 0x40, // # + 0x58, // # ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @876 'i' (7 pixels wide) + 0x00,// + 0x10, // # + 0x00, // + 0x70, // ### + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @888 'j' (7 pixels wide) + 0x00,// + 0x10, // # + 0x00, // + 0x78, // #### + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x70, // ### + 0x00, // + + // @900 'k' (7 pixels wide) + 0x00,// + 0xC0, // ## + 0x40, // # + 0x5C, // # ### + 0x48, // # # + 0x70, // ### + 0x50, // # # + 0x48, // # # + 0xDC, // ## ### + 0x00, // + 0x00, // + 0x00, // + + // @912 'l' (7 pixels wide) + 0x00,// + 0x30, // ## + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @924 'm' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0xE8, // ### # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0xFE, // ####### + 0x00, // + 0x00, // + 0x00, // + + // @936 'n' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @948 'o' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @960 'p' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x78, // #### + 0x40, // # + 0xE0, // ### + 0x00, // + + // @972 'q' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x36, // ## ## + 0x4C, // # ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3C, // #### + 0x04, // # + 0x0E, // ### + 0x00, // + + // @984 'r' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x6C, // ## ## + 0x30, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @996 's' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x3C, // #### + 0x44, // # # + 0x38, // ### + 0x04, // # + 0x44, // # # + 0x78, // #### + 0x00, // + 0x00, // + 0x00, // + + // @1008 't' (7 pixels wide) + 0x00,// + 0x00, // + 0x20, // # + 0x7C, // ##### + 0x20, // # + 0x20, // # + 0x20, // # + 0x22, // # # + 0x1C, // ### + 0x00, // + 0x00, // + 0x00, // + + // @1020 'u' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0xCC, // ## ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x4C, // # ## + 0x36, // ## ## + 0x00, // + 0x00, // + 0x00, // + + // @1032 'v' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x28, // # # + 0x28, // # # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @1044 'w' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x28, // # # + 0x00, // + 0x00, // + 0x00, // + + // @1056 'x' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0xCC, // ## ## + 0x48, // # # + 0x30, // ## + 0x30, // ## + 0x48, // # # + 0xCC, // ## ## + 0x00, // + 0x00, // + 0x00, // + + // @1068 'y' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x24, // # # + 0x28, // # # + 0x18, // ## + 0x10, // # + 0x10, // # + 0x78, // #### + 0x00, // + + // @1080 'z' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x7C, // ##### + 0x48, // # # + 0x10, // # + 0x20, // # + 0x44, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @1092 '{' (7 pixels wide) + 0x00,// + 0x08, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x00, // + + // @1104 '|' (7 pixels wide) + 0x00,// + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + + // @1116 '}' (7 pixels wide) + 0x00,// + 0x20, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x00, // + + // @1128 '~' (7 pixels wide) + 0x00,// + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x24, // # # + 0x58, // # ## + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + }; + +// Font data for Courier New 16pt + +const uint8_t Font16_Table[] = { +// @0 ' ' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @32 '!' (11 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @64 '"' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x1D, 0xC0, // ### ### + 0x08, 0x80, // # # + 0x08, 0x80, // # # + 0x08, 0x80, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @96 '#' (11 pixels wide) + 0x00, 0x00, // + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x3F, 0xC0, // ######## + 0x1B, 0x00, // ## ## + 0x3F, 0xC0, // ######## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @128 '$' (11 pixels wide) + 0x04, 0x00, // # + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x38, 0x00, // ### + 0x1E, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @160 '%' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x24, 0x00, // # # + 0x24, 0x00, // # # + 0x18, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x1E, 0x00, // #### + 0x31, 0x80, // ## ## + 0x02, 0x40, // # # + 0x02, 0x40, // # # + 0x01, 0x80, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @192 '&' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x1D, 0x80, // ### ## + 0x37, 0x00, // ## ### + 0x33, 0x00, // ## ## + 0x1D, 0x80, // ### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @224 ''' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @256 '(' (11 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0E, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0E, 0x00, // ### + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @288 ')' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x1C, 0x00, // ### + 0x18, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @320 '*' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x3F, 0xC0, // ######## + 0x0F, 0x00, // #### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @352 '+' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x3F, 0x80, // ####### + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @384 ',' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x0C, 0x00, // ## + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + + // @416 '-' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @448 '.' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @480 '/' (11 pixels wide) + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @512 '0' (11 pixels wide) + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @544 '1' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x3E, 0x00, // ##### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @576 '2' (11 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x19, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @608 '3' (11 pixels wide) + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x61, 0x80, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x61, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @640 '4' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x0F, 0x00, // #### + 0x0B, 0x00, // # ## + 0x1B, 0x00, // ## ## + 0x13, 0x00, // # ## + 0x33, 0x00, // ## ## + 0x3F, 0x80, // ####### + 0x03, 0x00, // ## + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @672 '5' (11 pixels wide) + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1F, 0x00, // ##### + 0x11, 0x80, // # ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x21, 0x80, // # ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @704 '6' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1C, 0x00, // ### + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @736 '7' (11 pixels wide) + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x43, 0x00, // # ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @768 '8' (11 pixels wide) + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @800 '9' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x07, 0x00, // ### + 0x3C, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @832 ':' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @864 ';' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @896 '<' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0xC0, // ## + 0x03, 0x00, // ## + 0x04, 0x00, // # + 0x18, 0x00, // ## + 0x60, 0x00, // ## + 0x18, 0x00, // ## + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @928 '=' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @960 '>' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x60, 0x00, // ## + 0x18, 0x00, // ## + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0xC0, // ## + 0x03, 0x00, // ## + 0x04, 0x00, // # + 0x18, 0x00, // ## + 0x60, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @992 '?' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x01, 0x80, // ## + 0x07, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1024 '@' (11 pixels wide) + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x11, 0x00, // # # + 0x21, 0x00, // # # + 0x21, 0x00, // # # + 0x27, 0x00, // # ### + 0x29, 0x00, // # # # + 0x29, 0x00, // # # # + 0x27, 0x00, // # ### + 0x20, 0x00, // # + 0x11, 0x00, // # # + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1056 'A' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x0F, 0x00, // #### + 0x09, 0x00, // # # + 0x19, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x79, 0xE0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1088 'B' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1120 'C' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x40, // ##### # + 0x30, 0xC0, // ## ## + 0x60, 0x40, // ## # + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x60, 0x40, // ## # + 0x30, 0x80, // ## # + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1152 'D' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1184 'E' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x30, 0x80, // ## # + 0x30, 0x80, // ## # + 0x32, 0x00, // ## # + 0x3E, 0x00, // ##### + 0x32, 0x00, // ## # + 0x30, 0x80, // ## # + 0x30, 0x80, // ## # + 0x7F, 0x80, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1216 'F' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x30, 0x40, // ## # + 0x30, 0x40, // ## # + 0x32, 0x00, // ## # + 0x3E, 0x00, // ##### + 0x32, 0x00, // ## # + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1248 'G' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1E, 0x80, // #### # + 0x31, 0x80, // ## ## + 0x60, 0x80, // ## # + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x67, 0xC0, // ## ##### + 0x61, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1280 'H' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x80, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1312 'I' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1344 'J' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x63, 0x00, // ## ## + 0x63, 0x00, // ## ## + 0x63, 0x00, // ## ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1376 'K' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x33, 0x00, // ## ## + 0x36, 0x00, // ## ## + 0x3C, 0x00, // #### + 0x3E, 0x00, // ##### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x79, 0xC0, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1408 'L' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7E, 0x00, // ###### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x40, // ## # + 0x18, 0x40, // ## # + 0x18, 0x40, // ## # + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1440 'M' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0xE0, 0xE0, // ### ### + 0x60, 0xC0, // ## ## + 0x71, 0xC0, // ### ### + 0x7B, 0xC0, // #### #### + 0x6A, 0xC0, // ## # # ## + 0x6E, 0xC0, // ## ### ## + 0x64, 0xC0, // ## # ## + 0x60, 0xC0, // ## ## + 0xFB, 0xE0, // ##### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1472 'N' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x73, 0xC0, // ### #### + 0x31, 0x80, // ## ## + 0x39, 0x80, // ### ## + 0x3D, 0x80, // #### ## + 0x35, 0x80, // ## # ## + 0x37, 0x80, // ## #### + 0x33, 0x80, // ## ### + 0x31, 0x80, // ## ## + 0x79, 0x80, // #### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1504 'O' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1536 'P' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7E, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1568 'Q' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x0C, 0xC0, // ## ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1600 'R' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3E, 0x00, // ##### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7C, 0xE0, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1632 'S' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x38, 0x00, // ### + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1664 'T' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x4C, 0x80, // # ## # + 0x4C, 0x80, // # ## # + 0x4C, 0x80, // # ## # + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1696 'U' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1728 'V' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x0A, 0x00, // # # + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1760 'W' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0xFB, 0xE0, // ##### ##### + 0x60, 0xC0, // ## ## + 0x64, 0xC0, // ## # ## + 0x6E, 0xC0, // ## ### ## + 0x6E, 0xC0, // ## ### ## + 0x2A, 0x80, // # # # # + 0x3B, 0x80, // ### ### + 0x3B, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1792 'X' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1824 'Y' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x79, 0xE0, // #### #### + 0x30, 0xC0, // ## ## + 0x19, 0x80, // ## ## + 0x0F, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1856 'Z' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x21, 0x80, // # ## + 0x23, 0x00, // # ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x0C, 0x00, // ## + 0x18, 0x80, // ## # + 0x30, 0x80, // ## # + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1888 '[' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1920 '\' (11 pixels wide) + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1952 ']' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1E, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1984 '^' (11 pixels wide) + 0x04, 0x00, // # + 0x0A, 0x00, // # # + 0x0A, 0x00, // # # + 0x11, 0x00, // # # + 0x20, 0x80, // # # + 0x20, 0x80, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2016 '_' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xFF, 0xE0, // ########### + + // @2048 '`' (11 pixels wide) + 0x08, 0x00, // # + 0x04, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2080 'a' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2112 'b' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x39, 0x80, // ### ## + 0x77, 0x00, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2144 'c' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1E, 0x80, // #### # + 0x31, 0x80, // ## ## + 0x60, 0x80, // ## # + 0x60, 0x00, // ## + 0x60, 0x80, // ## # + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2176 'd' (11 pixels wide) + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1D, 0x80, // ### ## + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2208 'e' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x7F, 0xC0, // ######### + 0x60, 0x00, // ## + 0x30, 0xC0, // ## ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2240 'f' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0xE0, // ###### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x80, // ####### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2272 'g' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2304 'h' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2336 'i' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2368 'j' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2400 'k' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x80, // ## #### + 0x36, 0x00, // ## ## + 0x3C, 0x00, // #### + 0x3C, 0x00, // #### + 0x36, 0x00, // ## ## + 0x33, 0x00, // ## ## + 0x77, 0xC0, // ### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2432 'l' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2464 'm' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x76, 0xE0, // ### ## ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2496 'n' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x00, // ### ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2528 'o' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2560 'p' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x00, // ### ### + 0x39, 0x80, // ### ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x39, 0x80, // ### ## + 0x37, 0x00, // ## ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2592 'q' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2624 'r' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0x80, // #### ### + 0x1C, 0xC0, // ### ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2656 's' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x3C, 0x00, // #### + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2688 't' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x7F, 0x00, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x80, // ## # + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2720 'u' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x73, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2752 'v' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2784 'w' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xF1, 0xE0, // #### #### + 0x60, 0xC0, // ## ## + 0x64, 0xC0, // ## # ## + 0x6E, 0xC0, // ## ### ## + 0x3B, 0x80, // ### ### + 0x3B, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2816 'x' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2848 'y' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x79, 0xE0, // #### #### + 0x30, 0xC0, // ## ## + 0x19, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x0B, 0x00, // # ## + 0x0F, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2880 'z' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x21, 0x80, // # ## + 0x03, 0x00, // ## + 0x0E, 0x00, // ### + 0x18, 0x00, // ## + 0x30, 0x80, // ## # + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2912 '{' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2944 '|' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2976 '}' (11 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3008 '~' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x24, 0x80, // # # # + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + }; + +// Font data for Courier New 20pt + +const uint8_t Font20_Table[] = { +// @0 ' ' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @40 '!' (14 pixels wide) + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @80 '"' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1C, 0xE0, // ### ### + 0x1C, 0xE0, // ### ### + 0x1C, 0xE0, // ### ### + 0x08, 0x40, // # # + 0x08, 0x40, // # # + 0x08, 0x40, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @120 '#' (14 pixels wide) + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @160 '$' (14 pixels wide) + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x07, 0xE0, // ###### + 0x0F, 0xE0, // ####### + 0x18, 0x60, // ## ## + 0x18, 0x00, // ## + 0x1F, 0x00, // ##### + 0x0F, 0xC0, // ###### + 0x00, 0xE0, // ### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xC0, // ####### + 0x1F, 0x80, // ###### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @200 '%' (14 pixels wide) + 0x00, 0x00, // + 0x1C, 0x00, // ### + 0x22, 0x00, // # # + 0x22, 0x00, // # # + 0x22, 0x00, // # # + 0x1C, 0x60, // ### ## + 0x01, 0xE0, // #### + 0x0F, 0x80, // ##### + 0x3C, 0x00, // #### + 0x31, 0xC0, // ## ### + 0x02, 0x20, // # # + 0x02, 0x20, // # # + 0x02, 0x20, // # # + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @240 '&' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0xE0, // ##### + 0x0F, 0xE0, // ####### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x0F, 0x30, // #### ## + 0x1F, 0xF0, // ######### + 0x19, 0xE0, // ## #### + 0x18, 0xC0, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @280 ''' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x01, 0x00, // # + 0x01, 0x00, // # + 0x01, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @320 '(' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @360 ')' (14 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @400 '*' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1B, 0x60, // ## ## ## + 0x1F, 0xE0, // ######## + 0x07, 0x80, // #### + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x0C, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @440 '+' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @480 ',' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @520 '-' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @560 '.' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @600 '/' (14 pixels wide) + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @640 '0' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x1F, 0xC0, // ####### + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @680 '1' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @720 '2' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @760 '3' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x3F, 0xC0, // ######## + 0x30, 0xE0, // ## ### + 0x00, 0x60, // ## + 0x00, 0xE0, // ### + 0x07, 0xC0, // ##### + 0x07, 0xC0, // ##### + 0x00, 0xE0, // ### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x60, 0xE0, // ## ### + 0x7F, 0xC0, // ######### + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @800 '4' (14 pixels wide) + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x06, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0xC0, // ## + 0x03, 0xE0, // ##### + 0x03, 0xE0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @840 '5' (14 pixels wide) + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1F, 0x80, // ###### + 0x1F, 0xC0, // ####### + 0x18, 0xE0, // ## ### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x30, 0xE0, // ## ### + 0x3F, 0xC0, // ######## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @880 '6' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xE0, // ##### + 0x0F, 0xE0, // ####### + 0x1E, 0x00, // #### + 0x18, 0x00, // ## + 0x38, 0x00, // ### + 0x37, 0x80, // ## #### + 0x3F, 0xC0, // ######## + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xC0, // ####### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @920 '7' (14 pixels wide) + 0x00, 0x00, // + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x30, 0x60, // ## ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @960 '8' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xC0, // ####### + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1000 '9' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x1F, 0xC0, // ####### + 0x38, 0xC0, // ### ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xE0, // ######## + 0x0F, 0x60, // #### ## + 0x00, 0xE0, // ### + 0x00, 0xC0, // ## + 0x03, 0xC0, // #### + 0x3F, 0x80, // ####### + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1040 ':' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1080 ';' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x01, 0xC0, // ### + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1120 '<' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x30, // ## + 0x00, 0xF0, // #### + 0x03, 0xC0, // #### + 0x07, 0x00, // ### + 0x1C, 0x00, // ### + 0x78, 0x00, // #### + 0x1C, 0x00, // ### + 0x07, 0x00, // ### + 0x03, 0xC0, // #### + 0x00, 0xF0, // #### + 0x00, 0x30, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1160 '=' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xF0, // ########### + 0x7F, 0xF0, // ########### + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xF0, // ########### + 0x7F, 0xF0, // ########### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1200 '>' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x30, 0x00, // ## + 0x3C, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x80, // ### + 0x00, 0xE0, // ### + 0x00, 0x78, // #### + 0x00, 0xE0, // ### + 0x03, 0x80, // ### + 0x0F, 0x00, // #### + 0x3C, 0x00, // #### + 0x30, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1240 '?' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x00, 0x60, // ## + 0x01, 0xC0, // ### + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1280 '@' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x0C, 0x80, // ## # + 0x08, 0x40, // # # + 0x10, 0x40, // # # + 0x10, 0x40, // # # + 0x11, 0xC0, // # ### + 0x12, 0x40, // # # # + 0x12, 0x40, // # # # + 0x12, 0x40, // # # # + 0x11, 0xC0, // # ### + 0x10, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x40, // # # + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1320 'A' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x03, 0x80, // ### + 0x06, 0xC0, // ## ## + 0x06, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x30, 0x30, // ## ## + 0x78, 0x78, // #### #### + 0x78, 0x78, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1360 'B' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x3F, 0xC0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xC0, // ####### + 0x1F, 0xE0, // ######## + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1400 'C' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x0F, 0xF0, // ######## + 0x1C, 0x70, // ### ### + 0x38, 0x30, // ### ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x38, 0x30, // ### ## + 0x1C, 0x70, // ### ### + 0x0F, 0xE0, // ####### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1440 'D' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x7F, 0xC0, // ######### + 0x30, 0xE0, // ## ### + 0x30, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x70, // ## ### + 0x30, 0xE0, // ## ### + 0x7F, 0xC0, // ######### + 0x7F, 0x80, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1480 'E' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1520 'F' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1560 'G' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x31, 0xF8, // ## ###### + 0x31, 0xF8, // ## ###### + 0x30, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1600 'H' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1640 'I' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1680 'J' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0xF8, // ####### + 0x03, 0xF8, // ####### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0xE0, // ## ### + 0x3F, 0xC0, // ######## + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1720 'K' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3E, 0xF8, // ##### ##### + 0x3E, 0xF8, // ##### ##### + 0x18, 0xE0, // ## ### + 0x19, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1F, 0x00, // ##### + 0x1D, 0x80, // ### ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0x60, // ## ## + 0x3E, 0x78, // ##### #### + 0x3E, 0x38, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1760 'L' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x30, // ## ## + 0x0C, 0x30, // ## ## + 0x0C, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1800 'M' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0x78, // #### #### + 0x78, 0x78, // #### #### + 0x38, 0x70, // ### ### + 0x3C, 0xF0, // #### #### + 0x34, 0xB0, // ## # # ## + 0x37, 0xB0, // ## #### ## + 0x37, 0xB0, // ## #### ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x30, 0x30, // ## ## + 0x7C, 0xF8, // ##### ##### + 0x7C, 0xF8, // ##### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1840 'N' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x39, 0xF0, // ### ##### + 0x3D, 0xF0, // #### ##### + 0x1C, 0x60, // ### ## + 0x1E, 0x60, // #### ## + 0x1E, 0x60, // #### ## + 0x1B, 0x60, // ## ## ## + 0x1B, 0x60, // ## ## ## + 0x19, 0xE0, // ## #### + 0x19, 0xE0, // ## #### + 0x18, 0xE0, // ## ### + 0x3E, 0xE0, // ##### ### + 0x3E, 0x60, // ##### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1880 'O' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x1C, 0xE0, // ### ### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1920 'P' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x3F, 0xE0, // ######### + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xE0, // ######## + 0x1F, 0xC0, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1960 'Q' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x1C, 0xE0, // ### ### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x07, 0xB0, // #### ## + 0x0F, 0xF0, // ######## + 0x0C, 0xE0, // ## ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2000 'R' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x3F, 0xE0, // ######### + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xE0, // ######## + 0x1F, 0xC0, // ####### + 0x18, 0xE0, // ## ### + 0x18, 0x60, // ## ## + 0x18, 0x70, // ## ### + 0x3E, 0x38, // ##### ### + 0x3E, 0x18, // ##### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2040 'S' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0xB0, // ##### ## + 0x1F, 0xF0, // ######### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x38, 0x00, // ### + 0x1F, 0x80, // ###### + 0x07, 0xE0, // ###### + 0x00, 0x70, // ### + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x3F, 0xE0, // ######### + 0x37, 0xC0, // ## ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2080 'T' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0xC0, // ###### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2120 'U' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2160 'V' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2200 'W' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7C, 0x7C, // ##### ##### + 0x7C, 0x7C, // ##### ##### + 0x30, 0x18, // ## ## + 0x33, 0x98, // ## ### ## + 0x33, 0x98, // ## ### ## + 0x33, 0x98, // ## ### ## + 0x36, 0xD8, // ## ## ## ## + 0x16, 0xD0, // # ## ## # + 0x1C, 0x70, // ### ### + 0x1C, 0x70, // ### ### + 0x1C, 0x70, // ### ### + 0x18, 0x30, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2240 'X' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x0D, 0x80, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2280 'Y' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x0C, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x07, 0x80, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0xC0, // ###### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2320 'Z' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2360 '[' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2400 '\' (14 pixels wide) + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2440 ']' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0x00, // #### + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2480 '^' (14 pixels wide) + 0x00, 0x00, // + 0x02, 0x00, // # + 0x07, 0x00, // ### + 0x0D, 0x80, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x20, 0x20, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2520 '_' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xFF, 0xFC, // ############## + 0xFF, 0xFC, // ############## + + // @2560 '`' (14 pixels wide) + 0x00, 0x00, // + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0x80, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2600 'a' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0xC0, // ###### + 0x1F, 0xE0, // ######## + 0x00, 0x60, // ## + 0x0F, 0xE0, // ####### + 0x1F, 0xE0, // ######## + 0x38, 0x60, // ### ## + 0x30, 0xE0, // ## ### + 0x3F, 0xF0, // ########## + 0x1F, 0x70, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2640 'b' (14 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x80, // ## #### + 0x3F, 0xE0, // ######### + 0x38, 0x60, // ### ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x60, // ### ## + 0x7F, 0xE0, // ########## + 0x77, 0x80, // ### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2680 'c' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x38, 0x30, // ### ## + 0x1F, 0xF0, // ######### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2720 'd' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x70, // ### + 0x00, 0x70, // ### + 0x00, 0x30, // ## + 0x00, 0x30, // ## + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1F, 0xF8, // ########## + 0x07, 0xB8, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2760 'e' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x30, 0x00, // ## + 0x18, 0x30, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2800 'f' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xF0, // ###### + 0x07, 0xF0, // ####### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2840 'g' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB8, // #### ### + 0x1F, 0xF8, // ########## + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x30, // ## + 0x00, 0x70, // ### + 0x0F, 0xE0, // ####### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2880 'h' (14 pixels wide) + 0x00, 0x00, // + 0x38, 0x00, // ### + 0x38, 0x00, // ### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1B, 0xC0, // ## #### + 0x1F, 0xE0, // ######## + 0x1C, 0x60, // ### ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2920 'i' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2960 'j' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0xC0, // ### + 0x3F, 0x80, // ####### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3000 'k' (14 pixels wide) + 0x00, 0x00, // + 0x38, 0x00, // ### + 0x38, 0x00, // ### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1B, 0xE0, // ## ##### + 0x1B, 0xE0, // ## ##### + 0x1B, 0x00, // ## ## + 0x1E, 0x00, // #### + 0x1E, 0x00, // #### + 0x1B, 0x00, // ## ## + 0x19, 0x80, // ## ## + 0x39, 0xF0, // ### ##### + 0x39, 0xF0, // ### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3040 'l' (14 pixels wide) + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3080 'm' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7E, 0xE0, // ###### ### + 0x7F, 0xF0, // ########### + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x7B, 0xB8, // #### ### ### + 0x7B, 0xB8, // #### ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3120 'n' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3B, 0xC0, // ### #### + 0x3F, 0xE0, // ######### + 0x1C, 0x60, // ### ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3160 'o' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3200 'p' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x80, // ### #### + 0x7F, 0xE0, // ########## + 0x38, 0x60, // ### ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x60, // ### ## + 0x3F, 0xE0, // ######### + 0x37, 0x80, // ## #### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3240 'q' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB8, // #### ### + 0x1F, 0xF8, // ########## + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x30, // ## + 0x00, 0x30, // ## + 0x00, 0xF8, // ##### + 0x00, 0xF8, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3280 'r' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xE0, // #### ### + 0x3D, 0xF0, // #### ##### + 0x0F, 0x30, // #### ## + 0x0E, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3320 's' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xE0, // ###### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x1E, 0x00, // #### + 0x0F, 0xC0, // ###### + 0x01, 0xE0, // #### + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3360 't' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x30, // ## ## + 0x0F, 0xF0, // ######## + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3400 'u' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x38, 0xE0, // ### ### + 0x38, 0xE0, // ### ### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xF0, // ######### + 0x0F, 0x70, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3440 'v' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3480 'w' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x32, 0x60, // ## # ## + 0x32, 0x60, // ## # ## + 0x37, 0xE0, // ## ###### + 0x1D, 0xC0, // ### ### + 0x1D, 0xC0, // ### ### + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3520 'x' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x0C, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x03, 0x00, // ## + 0x07, 0x80, // #### + 0x0C, 0xC0, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3560 'y' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0F, 0x80, // ##### + 0x07, 0x00, // ### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x7F, 0x00, // ####### + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3600 'z' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0xC0, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3640 '{' (14 pixels wide) + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x03, 0xC0, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x07, 0x00, // ### + 0x0E, 0x00, // ### + 0x07, 0x00, // ### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0xC0, // #### + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3680 '|' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3720 '}' (14 pixels wide) + 0x00, 0x00, // + 0x1C, 0x00, // ### + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x07, 0x00, // ### + 0x03, 0x80, // ### + 0x07, 0x00, // ### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1E, 0x00, // #### + 0x1C, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3760 '~' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x3F, 0x30, // ###### ## + 0x33, 0xF0, // ## ###### + 0x01, 0xE0, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + }; + +// Font data for Courier New 24pt + +const uint8_t Font24_Table[] = { +// @0 ' ' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @72 '!' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @144 '"' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0E, 0x70, 0x00, // ### ### + 0x0E, 0x70, 0x00, // ### ### + 0x0E, 0x70, 0x00, // ### ### + 0x04, 0x20, 0x00, // # # + 0x04, 0x20, 0x00, // # # + 0x04, 0x20, 0x00, // # # + 0x04, 0x20, 0x00, // # # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @216 '#' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @288 '$' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x07, 0xB0, 0x00, // #### ## + 0x0F, 0xF0, 0x00, // ######## + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x70, 0x00, // ## ### + 0x1C, 0x00, 0x00, // ### + 0x0F, 0x80, 0x00, // ##### + 0x07, 0xE0, 0x00, // ###### + 0x00, 0xF0, 0x00, // #### + 0x18, 0x30, 0x00, // ## ## + 0x1C, 0x30, 0x00, // ### ## + 0x1C, 0x70, 0x00, // ### ### + 0x1F, 0xE0, 0x00, // ######## + 0x1B, 0xC0, 0x00, // ## #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @360 '%' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0x80, 0x00, // #### + 0x0F, 0xC0, 0x00, // ###### + 0x1C, 0xE0, 0x00, // ### ### + 0x18, 0x60, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x1C, 0xE0, 0x00, // ### ### + 0x0F, 0xF8, 0x00, // ######### + 0x07, 0xE0, 0x00, // ###### + 0x1F, 0xF0, 0x00, // ######### + 0x07, 0x38, 0x00, // ### ### + 0x06, 0x18, 0x00, // ## ## + 0x06, 0x18, 0x00, // ## ## + 0x07, 0x38, 0x00, // ### ### + 0x03, 0xF0, 0x00, // ###### + 0x01, 0xE0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @432 '&' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xF0, 0x00, // ###### + 0x07, 0xF0, 0x00, // ####### + 0x0C, 0x60, 0x00, // ## ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x07, 0x00, 0x00, // ### + 0x0F, 0x9C, 0x00, // ##### ### + 0x1D, 0xFC, 0x00, // ### ####### + 0x18, 0xF0, 0x00, // ## #### + 0x18, 0x70, 0x00, // ## ### + 0x0F, 0xFC, 0x00, // ########## + 0x07, 0xDC, 0x00, // ##### ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @504 ''' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @576 '(' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x18, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x00, 0x70, 0x00, // ### + 0x00, 0xF0, 0x00, // #### + 0x00, 0xE0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x70, 0x00, // ### + 0x00, 0x70, 0x00, // ### + 0x00, 0x38, 0x00, // ### + 0x00, 0x18, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @648 ')' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x18, 0x00, 0x00, // ## + 0x1C, 0x00, 0x00, // ### + 0x0E, 0x00, 0x00, // ### + 0x0E, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x0F, 0x00, 0x00, // #### + 0x0E, 0x00, 0x00, // ### + 0x1C, 0x00, 0x00, // ### + 0x18, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @720 '*' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x1D, 0xB8, 0x00, // ### ## ### + 0x1F, 0xF8, 0x00, // ########## + 0x07, 0xE0, 0x00, // ###### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @792 '+' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @864 ',' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x00, 0xC0, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @936 '-' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1008 '.' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1080 '/' (17 pixels wide) + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0x60, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x0E, 0x00, 0x00, // ### + 0x0C, 0x00, 0x00, // ## + 0x1C, 0x00, 0x00, // ### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1152 '0' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x07, 0xE0, 0x00, // ###### + 0x0C, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x07, 0xE0, 0x00, // ###### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1224 '1' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x80, 0x00, // # + 0x07, 0x80, 0x00, // #### + 0x1F, 0x80, 0x00, // ###### + 0x1D, 0x80, 0x00, // ### ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1296 '2' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xC0, 0x00, // ##### + 0x1F, 0xF0, 0x00, // ######### + 0x38, 0x30, 0x00, // ### ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x06, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1368 '3' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xE0, 0x00, // ####### + 0x0C, 0x70, 0x00, // ## ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x03, 0xC0, 0x00, // #### + 0x03, 0xE0, 0x00, // ##### + 0x00, 0x70, 0x00, // ### + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x0F, 0xC0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1440 '4' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x01, 0xE0, 0x00, // #### + 0x01, 0xE0, 0x00, // #### + 0x03, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0x60, 0x00, // ## ## + 0x0C, 0x60, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x30, 0x60, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x00, 0x60, 0x00, // ## + 0x03, 0xF8, 0x00, // ####### + 0x03, 0xF8, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1512 '5' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xF0, 0x00, // ######### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xC0, 0x00, // ## #### + 0x1F, 0xF0, 0x00, // ######### + 0x1C, 0x30, 0x00, // ### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x30, 0x30, 0x00, // ## ## + 0x3F, 0xF0, 0x00, // ########## + 0x0F, 0xC0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1584 '6' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xF8, 0x00, // ##### + 0x03, 0xF8, 0x00, // ####### + 0x07, 0x00, 0x00, // ### + 0x0E, 0x00, 0x00, // ### + 0x0C, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xC0, 0x00, // ## #### + 0x1F, 0xF0, 0x00, // ######### + 0x1C, 0x30, 0x00, // ### ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x38, 0x00, // ## ### + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xE0, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1656 '7' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0x60, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0xE0, 0x00, // ### + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1728 '8' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xE0, 0x00, // ###### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x07, 0xE0, 0x00, // ###### + 0x07, 0xE0, 0x00, // ###### + 0x0C, 0x30, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x07, 0xE0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1800 '9' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xC0, 0x00, // ##### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x30, 0x00, // ### ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x38, 0x00, // ## ### + 0x0F, 0xF8, 0x00, // ######### + 0x03, 0xD8, 0x00, // #### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x1F, 0xC0, 0x00, // ####### + 0x1F, 0x00, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1872 ':' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1944 ';' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xF0, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x02, 0x00, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2016 '<' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x1C, 0x00, // ### + 0x00, 0x3C, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x0F, 0x00, 0x00, // #### + 0x3C, 0x00, 0x00, // #### + 0xF0, 0x00, 0x00, // #### + 0x3C, 0x00, 0x00, // #### + 0x0F, 0x00, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x00, 0x3C, 0x00, // #### + 0x00, 0x1C, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2088 '=' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xFC, 0x00, // ############# + 0x7F, 0xFC, 0x00, // ############# + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xFC, 0x00, // ############# + 0x7F, 0xFC, 0x00, // ############# + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2160 '>' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x70, 0x00, 0x00, // ### + 0x78, 0x00, 0x00, // #### + 0x1E, 0x00, 0x00, // #### + 0x07, 0x80, 0x00, // #### + 0x01, 0xE0, 0x00, // #### + 0x00, 0x78, 0x00, // #### + 0x00, 0x1E, 0x00, // #### + 0x00, 0x78, 0x00, // #### + 0x01, 0xE0, 0x00, // #### + 0x07, 0x80, 0x00, // #### + 0x1E, 0x00, 0x00, // #### + 0x78, 0x00, 0x00, // #### + 0x70, 0x00, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2232 '?' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xC0, 0x00, // ##### + 0x0F, 0xE0, 0x00, // ####### + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x30, 0x00, // ## ## + 0x00, 0x70, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x03, 0xC0, 0x00, // #### + 0x03, 0x80, 0x00, // ### + 0x03, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2304 '@' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xE0, 0x00, // ##### + 0x07, 0xF0, 0x00, // ####### + 0x0E, 0x38, 0x00, // ### ### + 0x0C, 0x18, 0x00, // ## ## + 0x18, 0x78, 0x00, // ## #### + 0x18, 0xF8, 0x00, // ## ##### + 0x19, 0xD8, 0x00, // ## ### ## + 0x19, 0x98, 0x00, // ## ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x18, 0xF8, 0x00, // ## ##### + 0x18, 0x78, 0x00, // ## #### + 0x18, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0E, 0x18, 0x00, // ### ## + 0x07, 0xF8, 0x00, // ######## + 0x03, 0xE0, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2376 'A' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0xC0, 0x00, // ####### + 0x01, 0xC0, 0x00, // ### + 0x03, 0x60, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0F, 0xF8, 0x00, // ######### + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0xFC, 0x7F, 0x00, // ###### ####### + 0xFC, 0x7F, 0x00, // ###### ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2448 'B' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xE0, 0x00, // ########## + 0x7F, 0xF0, 0x00, // ########### + 0x18, 0x38, 0x00, // ## ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x1C, 0x00, // ## ### + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x7F, 0xF8, 0x00, // ############ + 0x7F, 0xF0, 0x00, // ########### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2520 'C' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xEC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x1C, 0x1C, 0x00, // ### ### + 0x18, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x18, 0x0C, 0x00, // ## ## + 0x1C, 0x1C, 0x00, // ### ### + 0x0F, 0xF8, 0x00, // ######### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2592 'D' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xC0, 0x00, // ######### + 0x7F, 0xF0, 0x00, // ########### + 0x18, 0x38, 0x00, // ## ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0xF0, 0x00, // ########### + 0x7F, 0xE0, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2664 'E' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xF8, 0x00, // ############ + 0x7F, 0xF8, 0x00, // ############ + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x19, 0x80, 0x00, // ## ## + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0x80, 0x00, // ###### + 0x19, 0x80, 0x00, // ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7F, 0xF8, 0x00, // ############ + 0x7F, 0xF8, 0x00, // ############ + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2736 'F' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0xCC, 0x00, // ## ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0F, 0xC0, 0x00, // ###### + 0x0F, 0xC0, 0x00, // ###### + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x3F, 0xC0, 0x00, // ######## + 0x3F, 0xC0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2808 'G' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xEC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x1C, 0x1C, 0x00, // ### ### + 0x18, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0xFE, 0x00, // ## ####### + 0x30, 0xFE, 0x00, // ## ####### + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x0C, 0x00, // ### ## + 0x1C, 0x1C, 0x00, // ### ### + 0x0F, 0xFC, 0x00, // ########## + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2880 'H' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2952 'I' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3024 'J' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xFE, 0x00, // ########## + 0x07, 0xFE, 0x00, // ########## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x60, 0x00, // ## ## + 0x3F, 0xE0, 0x00, // ######### + 0x0F, 0x80, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3096 'K' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0x3E, 0x00, // ####### ##### + 0x7F, 0x3E, 0x00, // ####### ##### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x18, 0xC0, 0x00, // ## ## + 0x19, 0x80, 0x00, // ## ## + 0x1B, 0x80, 0x00, // ## ### + 0x1F, 0xC0, 0x00, // ####### + 0x1C, 0xE0, 0x00, // ### ### + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0x1F, 0x00, // ####### ##### + 0x7F, 0x1F, 0x00, // ####### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3168 'L' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0x80, 0x00, // ######## + 0x7F, 0x80, 0x00, // ######## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x7F, 0xFC, 0x00, // ############# + 0x7F, 0xFC, 0x00, // ############# + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3240 'M' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xF0, 0x0F, 0x00, // #### #### + 0xF8, 0x1F, 0x00, // ##### ##### + 0x38, 0x1C, 0x00, // ### ### + 0x3C, 0x3C, 0x00, // #### #### + 0x3C, 0x3C, 0x00, // #### #### + 0x36, 0x6C, 0x00, // ## ## ## ## + 0x36, 0x6C, 0x00, // ## ## ## ## + 0x33, 0xCC, 0x00, // ## #### ## + 0x33, 0xCC, 0x00, // ## #### ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0xFE, 0x7F, 0x00, // ####### ####### + 0xFE, 0x7F, 0x00, // ####### ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3312 'N' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0xFE, 0x00, // #### ####### + 0x78, 0xFE, 0x00, // #### ####### + 0x1C, 0x18, 0x00, // ### ## + 0x1E, 0x18, 0x00, // #### ## + 0x1F, 0x18, 0x00, // ##### ## + 0x1B, 0x18, 0x00, // ## ## ## + 0x1B, 0x98, 0x00, // ## ### ## + 0x19, 0xD8, 0x00, // ## ### ## + 0x18, 0xD8, 0x00, // ## ## ## + 0x18, 0xF8, 0x00, // ## ##### + 0x18, 0x78, 0x00, // ## #### + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0x18, 0x00, // ####### ## + 0x7F, 0x18, 0x00, // ####### ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3384 'O' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3456 'P' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF8, 0x00, // ########### + 0x0C, 0x1C, 0x00, // ## ### + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0F, 0xF8, 0x00, // ######### + 0x0F, 0xE0, 0x00, // ####### + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x3F, 0xC0, 0x00, // ######## + 0x3F, 0xC0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3528 'Q' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x07, 0xC0, 0x00, // ##### + 0x07, 0xCC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x0C, 0x38, 0x00, // ## ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3600 'R' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xE0, 0x00, // ########## + 0x7F, 0xF0, 0x00, // ########### + 0x18, 0x38, 0x00, // ## ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xC0, 0x00, // ####### + 0x18, 0xE0, 0x00, // ## ### + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0x1E, 0x00, // ####### #### + 0x7F, 0x0E, 0x00, // ####### ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3672 'S' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xD8, 0x00, // ##### ## + 0x0F, 0xF8, 0x00, // ######### + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1E, 0x00, 0x00, // #### + 0x0F, 0xC0, 0x00, // ###### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x78, 0x00, // #### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x1F, 0xF0, 0x00, // ######### + 0x1B, 0xE0, 0x00, // ## ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3744 'T' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x0F, 0xF0, 0x00, // ######## + 0x0F, 0xF0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3816 'U' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3888 'V' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0x7F, 0x00, // ####### ####### + 0x7F, 0x7F, 0x00, // ####### ####### + 0x18, 0x0C, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x00, 0x80, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3960 'W' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xFE, 0x3F, 0x80, // ####### ####### + 0xFE, 0x3F, 0x80, // ####### ####### + 0x30, 0x06, 0x00, // ## ## + 0x30, 0x06, 0x00, // ## ## + 0x30, 0x86, 0x00, // ## # ## + 0x19, 0xCC, 0x00, // ## ### ## + 0x19, 0xCC, 0x00, // ## ### ## + 0x1B, 0x6C, 0x00, // ## ## ## ## + 0x1B, 0x6C, 0x00, // ## ## ## ## + 0x1E, 0x7C, 0x00, // #### ##### + 0x0E, 0x38, 0x00, // ### ### + 0x0E, 0x38, 0x00, // ### ### + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4032 'X' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x03, 0xC0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0xC0, 0x00, // #### + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4104 'Y' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7C, 0x7E, 0x00, // ##### ###### + 0x7C, 0x7E, 0x00, // ##### ###### + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x03, 0xC0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x0F, 0xF0, 0x00, // ######## + 0x0F, 0xF0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4176 'Z' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x18, 0xC0, 0x00, // ## ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x06, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4248 '[' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0xF0, 0x00, // ##### + 0x01, 0xF0, 0x00, // ##### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0xF0, 0x00, // ##### + 0x01, 0xF0, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4320 '\' (17 pixels wide) + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1C, 0x00, 0x00, // ### + 0x0C, 0x00, 0x00, // ## + 0x0E, 0x00, 0x00, // ### + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4392 ']' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0F, 0x80, 0x00, // ##### + 0x0F, 0x80, 0x00, // ##### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x0F, 0x80, 0x00, // ##### + 0x0F, 0x80, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4464 '^' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x80, 0x00, // # + 0x01, 0xC0, 0x00, // ### + 0x03, 0xE0, 0x00, // ##### + 0x07, 0x70, 0x00, // ### ### + 0x06, 0x30, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x10, 0x04, 0x00, // # # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4536 '_' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xFF, 0xFF, 0x00, // ################ + 0xFF, 0xFF, 0x00, // ################ + + // @4608 '`' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x03, 0x00, 0x00, // ## + 0x03, 0x80, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x60, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4680 'a' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0F, 0xC0, 0x00, // ###### + 0x1F, 0xE0, 0x00, // ######## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x07, 0xF0, 0x00, // ####### + 0x1F, 0xF0, 0x00, // ######### + 0x38, 0x30, 0x00, // ### ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x70, 0x00, // ## ### + 0x1F, 0xFC, 0x00, // ########### + 0x0F, 0xBC, 0x00, // ##### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4752 'b' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x00, 0x00, // #### + 0x78, 0x00, 0x00, // #### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xE0, 0x00, // ## ##### + 0x1F, 0xF8, 0x00, // ########## + 0x1C, 0x18, 0x00, // ### ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x1C, 0x18, 0x00, // ### ## + 0x7F, 0xF8, 0x00, // ############ + 0x7B, 0xE0, 0x00, // #### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4824 'c' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xEC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x1C, 0x1C, 0x00, // ### ### + 0x38, 0x0C, 0x00, // ### ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x38, 0x0C, 0x00, // ### ## + 0x1C, 0x1C, 0x00, // ### ### + 0x0F, 0xF8, 0x00, // ######### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4896 'd' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x78, 0x00, // #### + 0x00, 0x78, 0x00, // #### + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x07, 0xD8, 0x00, // ##### ## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x38, 0x00, // ## ### + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xFE, 0x00, // ############ + 0x07, 0xDE, 0x00, // ##### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4968 'e' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xE0, 0x00, // ###### + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x18, 0x0C, 0x00, // ## ## + 0x1F, 0xFC, 0x00, // ########### + 0x07, 0xF0, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5040 'f' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0xFC, 0x00, // ####### + 0x03, 0xFC, 0x00, // ######## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF0, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5112 'g' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xDE, 0x00, // ##### #### + 0x1F, 0xFE, 0x00, // ############ + 0x18, 0x38, 0x00, // ## ### + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF8, 0x00, // ########## + 0x07, 0xD8, 0x00, // ##### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x0F, 0xF0, 0x00, // ######## + 0x0F, 0xC0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5184 'h' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x00, 0x00, // #### + 0x78, 0x00, 0x00, // #### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xE0, 0x00, // ## ##### + 0x1F, 0xF0, 0x00, // ######### + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5256 'i' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0x80, 0x00, // ###### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5328 'j' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xF0, 0x00, // ######### + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x1F, 0xE0, 0x00, // ######## + 0x1F, 0x80, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5400 'k' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3C, 0x00, 0x00, // #### + 0x3C, 0x00, 0x00, // #### + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0xF8, 0x00, // ## ##### + 0x0C, 0xF8, 0x00, // ## ##### + 0x0C, 0xC0, 0x00, // ## ## + 0x0D, 0x80, 0x00, // ## ## + 0x0F, 0x80, 0x00, // ##### + 0x0F, 0x00, 0x00, // #### + 0x0F, 0x80, 0x00, // ##### + 0x0D, 0xC0, 0x00, // ## ### + 0x0C, 0xE0, 0x00, // ## ### + 0x3C, 0x7C, 0x00, // #### ##### + 0x3C, 0x7C, 0x00, // #### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5472 'l' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0x80, 0x00, // ###### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5544 'm' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xF7, 0x78, 0x00, // #### ### #### + 0xFF, 0xFC, 0x00, // ############## + 0x39, 0xCC, 0x00, // ### ### ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0xFD, 0xEF, 0x00, // ###### #### #### + 0xFD, 0xEF, 0x00, // ###### #### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5616 'n' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7B, 0xE0, 0x00, // #### ##### + 0x7F, 0xF0, 0x00, // ########### + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5688 'o' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x38, 0x1C, 0x00, // ### ### + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5760 'p' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7B, 0xE0, 0x00, // #### ##### + 0x7F, 0xF8, 0x00, // ############ + 0x1C, 0x18, 0x00, // ### ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x1C, 0x18, 0x00, // ### ## + 0x1F, 0xF8, 0x00, // ########## + 0x1B, 0xE0, 0x00, // ## ##### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x7F, 0x00, 0x00, // ####### + 0x7F, 0x00, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5832 'q' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xDE, 0x00, // ##### #### + 0x1F, 0xFE, 0x00, // ############ + 0x18, 0x38, 0x00, // ## ### + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF8, 0x00, // ########## + 0x07, 0xD8, 0x00, // ##### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0xFE, 0x00, // ####### + 0x00, 0xFE, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5904 'r' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3E, 0x78, 0x00, // ##### #### + 0x3E, 0xFC, 0x00, // ##### ###### + 0x07, 0xCC, 0x00, // ##### ## + 0x07, 0x00, 0x00, // ### + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF0, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5976 's' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xF8, 0x00, // ######## + 0x0F, 0xF8, 0x00, // ######### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1F, 0x80, 0x00, // ###### + 0x0F, 0xF0, 0x00, // ######## + 0x00, 0xF8, 0x00, // ##### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xE0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6048 't' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF0, 0x00, // ########## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x1C, 0x00, // ## ### + 0x07, 0xFC, 0x00, // ######### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6120 'u' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x78, 0x00, // #### #### + 0x78, 0x78, 0x00, // #### #### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x0F, 0xFE, 0x00, // ########### + 0x07, 0xDE, 0x00, // ##### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6192 'v' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7C, 0x3E, 0x00, // ##### ##### + 0x7C, 0x3E, 0x00, // ##### ##### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x07, 0xE0, 0x00, // ###### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6264 'w' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x3C, 0x00, // #### #### + 0x78, 0x3C, 0x00, // #### #### + 0x31, 0x18, 0x00, // ## # ## + 0x33, 0x98, 0x00, // ## ### ## + 0x33, 0x98, 0x00, // ## ### ## + 0x1A, 0xB0, 0x00, // ## # # ## + 0x1E, 0xF0, 0x00, // #### #### + 0x1E, 0xF0, 0x00, // #### #### + 0x1C, 0x60, 0x00, // ### ## + 0x0C, 0x60, 0x00, // ## ## + 0x0C, 0x60, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6336 'x' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3E, 0x7C, 0x00, // ##### ##### + 0x3E, 0x7C, 0x00, // ##### ##### + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x03, 0xC0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x03, 0xC0, 0x00, // #### + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x3E, 0x7C, 0x00, // ##### ##### + 0x3E, 0x7C, 0x00, // ##### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6408 'y' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x1F, 0x00, // ###### ##### + 0x7E, 0x1F, 0x00, // ###### ##### + 0x18, 0x0C, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x03, 0xE0, 0x00, // ##### + 0x01, 0xC0, 0x00, // ### + 0x00, 0xC0, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x3F, 0xC0, 0x00, // ######## + 0x3F, 0xC0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6480 'z' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x00, 0xC0, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x06, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6552 '{' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x01, 0xE0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x80, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0xE0, 0x00, // #### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6624 '|' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6696 '}' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0x00, 0x00, // ### + 0x07, 0x80, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x07, 0x80, 0x00, // #### + 0x07, 0x00, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6768 '~' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0E, 0x00, 0x00, // ### + 0x1F, 0x18, 0x00, // ##### ## + 0x3B, 0xB8, 0x00, // ### ### ### + 0x31, 0xF0, 0x00, // ## ##### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + }; + +epaper_font_t epaper_font_8 = { + 5, /* width */ + 8, /* height */ + Font8_Table, +}; + +epaper_font_t epaper_font_12 = { + 7, /* width */ + 12, /* height */ + Font12_Table, +}; + +epaper_font_t epaper_font_16 = { + 11, /* width */ + 16, /* height */ + Font16_Table, +}; + +epaper_font_t epaper_font_20 = { + 14, /* width */ + 20, /* height */ + Font20_Table, +}; + +epaper_font_t epaper_font_24 = { + 17, /* width */ + 24, /* height */ + Font24_Table, +}; + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper_fonts.h b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper_fonts.h new file mode 100644 index 000000000..6cbdc4673 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/epaper_fonts.h @@ -0,0 +1,36 @@ +// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + + +#ifndef _IOT_EPAPER_FONTS_H_ +#define _IOT_EPAPER_FONTS_H_ + +#ifdef __cplusplus +extern "C" +{ +#endif +#include +#include "epaper-29-ws.h" + +extern epaper_font_t epaper_font_24; +extern epaper_font_t epaper_font_20; +extern epaper_font_t epaper_font_16; +extern epaper_font_t epaper_font_12; +extern epaper_font_t epaper_font_8; + +#ifdef __cplusplus +} +#endif +#endif + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/font16.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/font16.c new file mode 100644 index 000000000..e9276914d --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/font16.c @@ -0,0 +1,1765 @@ +/** + ****************************************************************************** + * @file font16.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text font16 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT(c) 2014 STMicroelectronics

+ * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" +#include + +// +// Font data for Courier New 12pt +// + +const uint8_t Font16_Table[] PROGMEM = +{ + // @0 ' ' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @32 '!' (11 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @64 '"' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x1D, 0xC0, // ### ### + 0x08, 0x80, // # # + 0x08, 0x80, // # # + 0x08, 0x80, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @96 '#' (11 pixels wide) + 0x00, 0x00, // + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x3F, 0xC0, // ######## + 0x1B, 0x00, // ## ## + 0x3F, 0xC0, // ######## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @128 '$' (11 pixels wide) + 0x04, 0x00, // # + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x38, 0x00, // ### + 0x1E, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @160 '%' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x24, 0x00, // # # + 0x24, 0x00, // # # + 0x18, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x1E, 0x00, // #### + 0x31, 0x80, // ## ## + 0x02, 0x40, // # # + 0x02, 0x40, // # # + 0x01, 0x80, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @192 '&' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x1D, 0x80, // ### ## + 0x37, 0x00, // ## ### + 0x33, 0x00, // ## ## + 0x1D, 0x80, // ### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @224 ''' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @256 '(' (11 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0E, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0E, 0x00, // ### + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @288 ')' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x1C, 0x00, // ### + 0x18, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @320 '*' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x3F, 0xC0, // ######## + 0x0F, 0x00, // #### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @352 '+' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x3F, 0x80, // ####### + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @384 ',' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x0C, 0x00, // ## + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + + // @416 '-' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @448 '.' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @480 '/' (11 pixels wide) + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @512 '0' (11 pixels wide) + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @544 '1' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x3E, 0x00, // ##### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @576 '2' (11 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x19, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @608 '3' (11 pixels wide) + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x61, 0x80, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x61, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @640 '4' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x0F, 0x00, // #### + 0x0B, 0x00, // # ## + 0x1B, 0x00, // ## ## + 0x13, 0x00, // # ## + 0x33, 0x00, // ## ## + 0x3F, 0x80, // ####### + 0x03, 0x00, // ## + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @672 '5' (11 pixels wide) + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1F, 0x00, // ##### + 0x11, 0x80, // # ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x21, 0x80, // # ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @704 '6' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1C, 0x00, // ### + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @736 '7' (11 pixels wide) + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x43, 0x00, // # ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @768 '8' (11 pixels wide) + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @800 '9' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x07, 0x00, // ### + 0x3C, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @832 ':' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @864 ';' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @896 '<' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0xC0, // ## + 0x03, 0x00, // ## + 0x04, 0x00, // # + 0x18, 0x00, // ## + 0x60, 0x00, // ## + 0x18, 0x00, // ## + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @928 '=' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @960 '>' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x60, 0x00, // ## + 0x18, 0x00, // ## + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0xC0, // ## + 0x03, 0x00, // ## + 0x04, 0x00, // # + 0x18, 0x00, // ## + 0x60, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @992 '?' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x01, 0x80, // ## + 0x07, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1024 '@' (11 pixels wide) + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x11, 0x00, // # # + 0x21, 0x00, // # # + 0x21, 0x00, // # # + 0x27, 0x00, // # ### + 0x29, 0x00, // # # # + 0x29, 0x00, // # # # + 0x27, 0x00, // # ### + 0x20, 0x00, // # + 0x11, 0x00, // # # + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1056 'A' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x0F, 0x00, // #### + 0x09, 0x00, // # # + 0x19, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x79, 0xE0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1088 'B' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1120 'C' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x40, // ##### # + 0x30, 0xC0, // ## ## + 0x60, 0x40, // ## # + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x60, 0x40, // ## # + 0x30, 0x80, // ## # + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1152 'D' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1184 'E' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x30, 0x80, // ## # + 0x30, 0x80, // ## # + 0x32, 0x00, // ## # + 0x3E, 0x00, // ##### + 0x32, 0x00, // ## # + 0x30, 0x80, // ## # + 0x30, 0x80, // ## # + 0x7F, 0x80, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1216 'F' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x30, 0x40, // ## # + 0x30, 0x40, // ## # + 0x32, 0x00, // ## # + 0x3E, 0x00, // ##### + 0x32, 0x00, // ## # + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1248 'G' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1E, 0x80, // #### # + 0x31, 0x80, // ## ## + 0x60, 0x80, // ## # + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x67, 0xC0, // ## ##### + 0x61, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1280 'H' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x80, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1312 'I' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1344 'J' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x63, 0x00, // ## ## + 0x63, 0x00, // ## ## + 0x63, 0x00, // ## ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1376 'K' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x33, 0x00, // ## ## + 0x36, 0x00, // ## ## + 0x3C, 0x00, // #### + 0x3E, 0x00, // ##### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x79, 0xC0, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1408 'L' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7E, 0x00, // ###### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x40, // ## # + 0x18, 0x40, // ## # + 0x18, 0x40, // ## # + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1440 'M' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0xE0, 0xE0, // ### ### + 0x60, 0xC0, // ## ## + 0x71, 0xC0, // ### ### + 0x7B, 0xC0, // #### #### + 0x6A, 0xC0, // ## # # ## + 0x6E, 0xC0, // ## ### ## + 0x64, 0xC0, // ## # ## + 0x60, 0xC0, // ## ## + 0xFB, 0xE0, // ##### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1472 'N' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x73, 0xC0, // ### #### + 0x31, 0x80, // ## ## + 0x39, 0x80, // ### ## + 0x3D, 0x80, // #### ## + 0x35, 0x80, // ## # ## + 0x37, 0x80, // ## #### + 0x33, 0x80, // ## ### + 0x31, 0x80, // ## ## + 0x79, 0x80, // #### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1504 'O' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1536 'P' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7E, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1568 'Q' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x0C, 0xC0, // ## ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1600 'R' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3E, 0x00, // ##### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7C, 0xE0, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1632 'S' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x38, 0x00, // ### + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1664 'T' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x4C, 0x80, // # ## # + 0x4C, 0x80, // # ## # + 0x4C, 0x80, // # ## # + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1696 'U' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1728 'V' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x0A, 0x00, // # # + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1760 'W' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0xFB, 0xE0, // ##### ##### + 0x60, 0xC0, // ## ## + 0x64, 0xC0, // ## # ## + 0x6E, 0xC0, // ## ### ## + 0x6E, 0xC0, // ## ### ## + 0x2A, 0x80, // # # # # + 0x3B, 0x80, // ### ### + 0x3B, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1792 'X' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1824 'Y' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x79, 0xE0, // #### #### + 0x30, 0xC0, // ## ## + 0x19, 0x80, // ## ## + 0x0F, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1856 'Z' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x21, 0x80, // # ## + 0x23, 0x00, // # ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x0C, 0x00, // ## + 0x18, 0x80, // ## # + 0x30, 0x80, // ## # + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1888 '[' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1920 '\' (11 pixels wide) + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1952 ']' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1E, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1984 '^' (11 pixels wide) + 0x04, 0x00, // # + 0x0A, 0x00, // # # + 0x0A, 0x00, // # # + 0x11, 0x00, // # # + 0x20, 0x80, // # # + 0x20, 0x80, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2016 '_' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xFF, 0xE0, // ########### + + // @2048 '`' (11 pixels wide) + 0x08, 0x00, // # + 0x04, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2080 'a' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2112 'b' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x39, 0x80, // ### ## + 0x77, 0x00, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2144 'c' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1E, 0x80, // #### # + 0x31, 0x80, // ## ## + 0x60, 0x80, // ## # + 0x60, 0x00, // ## + 0x60, 0x80, // ## # + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2176 'd' (11 pixels wide) + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1D, 0x80, // ### ## + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2208 'e' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x7F, 0xC0, // ######### + 0x60, 0x00, // ## + 0x30, 0xC0, // ## ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2240 'f' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0xE0, // ###### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x80, // ####### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2272 'g' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2304 'h' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2336 'i' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2368 'j' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2400 'k' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x80, // ## #### + 0x36, 0x00, // ## ## + 0x3C, 0x00, // #### + 0x3C, 0x00, // #### + 0x36, 0x00, // ## ## + 0x33, 0x00, // ## ## + 0x77, 0xC0, // ### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2432 'l' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2464 'm' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x76, 0xE0, // ### ## ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2496 'n' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x00, // ### ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2528 'o' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2560 'p' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x00, // ### ### + 0x39, 0x80, // ### ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x39, 0x80, // ### ## + 0x37, 0x00, // ## ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2592 'q' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2624 'r' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0x80, // #### ### + 0x1C, 0xC0, // ### ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2656 's' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x3C, 0x00, // #### + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2688 't' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x7F, 0x00, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x80, // ## # + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2720 'u' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x73, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2752 'v' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2784 'w' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xF1, 0xE0, // #### #### + 0x60, 0xC0, // ## ## + 0x64, 0xC0, // ## # ## + 0x6E, 0xC0, // ## ### ## + 0x3B, 0x80, // ### ### + 0x3B, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2816 'x' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2848 'y' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x79, 0xE0, // #### #### + 0x30, 0xC0, // ## ## + 0x19, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x0B, 0x00, // # ## + 0x0F, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2880 'z' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x21, 0x80, // # ## + 0x03, 0x00, // ## + 0x0E, 0x00, // ### + 0x18, 0x00, // ## + 0x30, 0x80, // ## # + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2912 '{' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2944 '|' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2976 '}' (11 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3008 '~' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x24, 0x80, // # # # + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // +}; + +sFONT Font16 = { + Font16_Table, + 11, /* Width */ + 16, /* Height */ +}; + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/font20.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/font20.c new file mode 100644 index 000000000..17329b06f --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/font20.c @@ -0,0 +1,2143 @@ +/** + ****************************************************************************** + * @file font20.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text font20 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT(c) 2014 STMicroelectronics

+ * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" +#include + +// Character bitmaps for Courier New 15pt +const uint8_t Font20_Table[] PROGMEM = +{ + // @0 ' ' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @40 '!' (14 pixels wide) + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @80 '"' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1C, 0xE0, // ### ### + 0x1C, 0xE0, // ### ### + 0x1C, 0xE0, // ### ### + 0x08, 0x40, // # # + 0x08, 0x40, // # # + 0x08, 0x40, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @120 '#' (14 pixels wide) + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @160 '$' (14 pixels wide) + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x07, 0xE0, // ###### + 0x0F, 0xE0, // ####### + 0x18, 0x60, // ## ## + 0x18, 0x00, // ## + 0x1F, 0x00, // ##### + 0x0F, 0xC0, // ###### + 0x00, 0xE0, // ### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xC0, // ####### + 0x1F, 0x80, // ###### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @200 '%' (14 pixels wide) + 0x00, 0x00, // + 0x1C, 0x00, // ### + 0x22, 0x00, // # # + 0x22, 0x00, // # # + 0x22, 0x00, // # # + 0x1C, 0x60, // ### ## + 0x01, 0xE0, // #### + 0x0F, 0x80, // ##### + 0x3C, 0x00, // #### + 0x31, 0xC0, // ## ### + 0x02, 0x20, // # # + 0x02, 0x20, // # # + 0x02, 0x20, // # # + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @240 '&' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0xE0, // ##### + 0x0F, 0xE0, // ####### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x0F, 0x30, // #### ## + 0x1F, 0xF0, // ######### + 0x19, 0xE0, // ## #### + 0x18, 0xC0, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @280 ''' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x01, 0x00, // # + 0x01, 0x00, // # + 0x01, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @320 '(' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @360 ')' (14 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @400 '*' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1B, 0x60, // ## ## ## + 0x1F, 0xE0, // ######## + 0x07, 0x80, // #### + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x0C, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @440 '+' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @480 ',' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @520 '-' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @560 '.' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @600 '/' (14 pixels wide) + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @640 '0' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x1F, 0xC0, // ####### + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @680 '1' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @720 '2' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @760 '3' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x3F, 0xC0, // ######## + 0x30, 0xE0, // ## ### + 0x00, 0x60, // ## + 0x00, 0xE0, // ### + 0x07, 0xC0, // ##### + 0x07, 0xC0, // ##### + 0x00, 0xE0, // ### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x60, 0xE0, // ## ### + 0x7F, 0xC0, // ######### + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @800 '4' (14 pixels wide) + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x06, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0xC0, // ## + 0x03, 0xE0, // ##### + 0x03, 0xE0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @840 '5' (14 pixels wide) + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1F, 0x80, // ###### + 0x1F, 0xC0, // ####### + 0x18, 0xE0, // ## ### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x30, 0xE0, // ## ### + 0x3F, 0xC0, // ######## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @880 '6' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xE0, // ##### + 0x0F, 0xE0, // ####### + 0x1E, 0x00, // #### + 0x18, 0x00, // ## + 0x38, 0x00, // ### + 0x37, 0x80, // ## #### + 0x3F, 0xC0, // ######## + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xC0, // ####### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @920 '7' (14 pixels wide) + 0x00, 0x00, // + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x30, 0x60, // ## ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @960 '8' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xC0, // ####### + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1000 '9' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x1F, 0xC0, // ####### + 0x38, 0xC0, // ### ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xE0, // ######## + 0x0F, 0x60, // #### ## + 0x00, 0xE0, // ### + 0x00, 0xC0, // ## + 0x03, 0xC0, // #### + 0x3F, 0x80, // ####### + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1040 ':' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1080 ';' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x01, 0xC0, // ### + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1120 '<' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x30, // ## + 0x00, 0xF0, // #### + 0x03, 0xC0, // #### + 0x07, 0x00, // ### + 0x1C, 0x00, // ### + 0x78, 0x00, // #### + 0x1C, 0x00, // ### + 0x07, 0x00, // ### + 0x03, 0xC0, // #### + 0x00, 0xF0, // #### + 0x00, 0x30, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1160 '=' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xF0, // ########### + 0x7F, 0xF0, // ########### + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xF0, // ########### + 0x7F, 0xF0, // ########### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1200 '>' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x30, 0x00, // ## + 0x3C, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x80, // ### + 0x00, 0xE0, // ### + 0x00, 0x78, // #### + 0x00, 0xE0, // ### + 0x03, 0x80, // ### + 0x0F, 0x00, // #### + 0x3C, 0x00, // #### + 0x30, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1240 '?' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x00, 0x60, // ## + 0x01, 0xC0, // ### + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1280 '@' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x0C, 0x80, // ## # + 0x08, 0x40, // # # + 0x10, 0x40, // # # + 0x10, 0x40, // # # + 0x11, 0xC0, // # ### + 0x12, 0x40, // # # # + 0x12, 0x40, // # # # + 0x12, 0x40, // # # # + 0x11, 0xC0, // # ### + 0x10, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x40, // # # + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1320 'A' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x03, 0x80, // ### + 0x06, 0xC0, // ## ## + 0x06, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x30, 0x30, // ## ## + 0x78, 0x78, // #### #### + 0x78, 0x78, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1360 'B' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x3F, 0xC0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xC0, // ####### + 0x1F, 0xE0, // ######## + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1400 'C' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x0F, 0xF0, // ######## + 0x1C, 0x70, // ### ### + 0x38, 0x30, // ### ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x38, 0x30, // ### ## + 0x1C, 0x70, // ### ### + 0x0F, 0xE0, // ####### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1440 'D' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x7F, 0xC0, // ######### + 0x30, 0xE0, // ## ### + 0x30, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x70, // ## ### + 0x30, 0xE0, // ## ### + 0x7F, 0xC0, // ######### + 0x7F, 0x80, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1480 'E' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1520 'F' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1560 'G' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x31, 0xF8, // ## ###### + 0x31, 0xF8, // ## ###### + 0x30, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1600 'H' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1640 'I' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1680 'J' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0xF8, // ####### + 0x03, 0xF8, // ####### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0xE0, // ## ### + 0x3F, 0xC0, // ######## + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1720 'K' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3E, 0xF8, // ##### ##### + 0x3E, 0xF8, // ##### ##### + 0x18, 0xE0, // ## ### + 0x19, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1F, 0x00, // ##### + 0x1D, 0x80, // ### ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0x60, // ## ## + 0x3E, 0x78, // ##### #### + 0x3E, 0x38, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1760 'L' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x30, // ## ## + 0x0C, 0x30, // ## ## + 0x0C, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1800 'M' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0x78, // #### #### + 0x78, 0x78, // #### #### + 0x38, 0x70, // ### ### + 0x3C, 0xF0, // #### #### + 0x34, 0xB0, // ## # # ## + 0x37, 0xB0, // ## #### ## + 0x37, 0xB0, // ## #### ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x30, 0x30, // ## ## + 0x7C, 0xF8, // ##### ##### + 0x7C, 0xF8, // ##### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1840 'N' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x39, 0xF0, // ### ##### + 0x3D, 0xF0, // #### ##### + 0x1C, 0x60, // ### ## + 0x1E, 0x60, // #### ## + 0x1E, 0x60, // #### ## + 0x1B, 0x60, // ## ## ## + 0x1B, 0x60, // ## ## ## + 0x19, 0xE0, // ## #### + 0x19, 0xE0, // ## #### + 0x18, 0xE0, // ## ### + 0x3E, 0xE0, // ##### ### + 0x3E, 0x60, // ##### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1880 'O' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x1C, 0xE0, // ### ### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1920 'P' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x3F, 0xE0, // ######### + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xE0, // ######## + 0x1F, 0xC0, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1960 'Q' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x1C, 0xE0, // ### ### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x07, 0xB0, // #### ## + 0x0F, 0xF0, // ######## + 0x0C, 0xE0, // ## ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2000 'R' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x3F, 0xE0, // ######### + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xE0, // ######## + 0x1F, 0xC0, // ####### + 0x18, 0xE0, // ## ### + 0x18, 0x60, // ## ## + 0x18, 0x70, // ## ### + 0x3E, 0x38, // ##### ### + 0x3E, 0x18, // ##### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2040 'S' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0xB0, // ##### ## + 0x1F, 0xF0, // ######### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x38, 0x00, // ### + 0x1F, 0x80, // ###### + 0x07, 0xE0, // ###### + 0x00, 0x70, // ### + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x3F, 0xE0, // ######### + 0x37, 0xC0, // ## ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2080 'T' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0xC0, // ###### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2120 'U' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2160 'V' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2200 'W' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7C, 0x7C, // ##### ##### + 0x7C, 0x7C, // ##### ##### + 0x30, 0x18, // ## ## + 0x33, 0x98, // ## ### ## + 0x33, 0x98, // ## ### ## + 0x33, 0x98, // ## ### ## + 0x36, 0xD8, // ## ## ## ## + 0x16, 0xD0, // # ## ## # + 0x1C, 0x70, // ### ### + 0x1C, 0x70, // ### ### + 0x1C, 0x70, // ### ### + 0x18, 0x30, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2240 'X' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x0D, 0x80, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2280 'Y' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x0C, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x07, 0x80, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0xC0, // ###### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2320 'Z' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2360 '[' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2400 '\' (14 pixels wide) + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2440 ']' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0x00, // #### + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2480 '^' (14 pixels wide) + 0x00, 0x00, // + 0x02, 0x00, // # + 0x07, 0x00, // ### + 0x0D, 0x80, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x20, 0x20, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2520 '_' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xFF, 0xFC, // ############## + 0xFF, 0xFC, // ############## + + // @2560 '`' (14 pixels wide) + 0x00, 0x00, // + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0x80, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2600 'a' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0xC0, // ###### + 0x1F, 0xE0, // ######## + 0x00, 0x60, // ## + 0x0F, 0xE0, // ####### + 0x1F, 0xE0, // ######## + 0x38, 0x60, // ### ## + 0x30, 0xE0, // ## ### + 0x3F, 0xF0, // ########## + 0x1F, 0x70, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2640 'b' (14 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x80, // ## #### + 0x3F, 0xE0, // ######### + 0x38, 0x60, // ### ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x60, // ### ## + 0x7F, 0xE0, // ########## + 0x77, 0x80, // ### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2680 'c' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x38, 0x30, // ### ## + 0x1F, 0xF0, // ######### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2720 'd' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x70, // ### + 0x00, 0x70, // ### + 0x00, 0x30, // ## + 0x00, 0x30, // ## + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1F, 0xF8, // ########## + 0x07, 0xB8, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2760 'e' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x30, 0x00, // ## + 0x18, 0x30, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2800 'f' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xF0, // ###### + 0x07, 0xF0, // ####### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2840 'g' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB8, // #### ### + 0x1F, 0xF8, // ########## + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x30, // ## + 0x00, 0x70, // ### + 0x0F, 0xE0, // ####### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2880 'h' (14 pixels wide) + 0x00, 0x00, // + 0x38, 0x00, // ### + 0x38, 0x00, // ### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1B, 0xC0, // ## #### + 0x1F, 0xE0, // ######## + 0x1C, 0x60, // ### ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2920 'i' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2960 'j' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0xC0, // ### + 0x3F, 0x80, // ####### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3000 'k' (14 pixels wide) + 0x00, 0x00, // + 0x38, 0x00, // ### + 0x38, 0x00, // ### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1B, 0xE0, // ## ##### + 0x1B, 0xE0, // ## ##### + 0x1B, 0x00, // ## ## + 0x1E, 0x00, // #### + 0x1E, 0x00, // #### + 0x1B, 0x00, // ## ## + 0x19, 0x80, // ## ## + 0x39, 0xF0, // ### ##### + 0x39, 0xF0, // ### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3040 'l' (14 pixels wide) + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3080 'm' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7E, 0xE0, // ###### ### + 0x7F, 0xF0, // ########### + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x7B, 0xB8, // #### ### ### + 0x7B, 0xB8, // #### ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3120 'n' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3B, 0xC0, // ### #### + 0x3F, 0xE0, // ######### + 0x1C, 0x60, // ### ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3160 'o' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3200 'p' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x80, // ### #### + 0x7F, 0xE0, // ########## + 0x38, 0x60, // ### ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x60, // ### ## + 0x3F, 0xE0, // ######### + 0x37, 0x80, // ## #### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3240 'q' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB8, // #### ### + 0x1F, 0xF8, // ########## + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x30, // ## + 0x00, 0x30, // ## + 0x00, 0xF8, // ##### + 0x00, 0xF8, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3280 'r' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xE0, // #### ### + 0x3D, 0xF0, // #### ##### + 0x0F, 0x30, // #### ## + 0x0E, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3320 's' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xE0, // ###### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x1E, 0x00, // #### + 0x0F, 0xC0, // ###### + 0x01, 0xE0, // #### + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3360 't' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x30, // ## ## + 0x0F, 0xF0, // ######## + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3400 'u' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x38, 0xE0, // ### ### + 0x38, 0xE0, // ### ### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xF0, // ######### + 0x0F, 0x70, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3440 'v' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3480 'w' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x32, 0x60, // ## # ## + 0x32, 0x60, // ## # ## + 0x37, 0xE0, // ## ###### + 0x1D, 0xC0, // ### ### + 0x1D, 0xC0, // ### ### + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3520 'x' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x0C, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x03, 0x00, // ## + 0x07, 0x80, // #### + 0x0C, 0xC0, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3560 'y' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0F, 0x80, // ##### + 0x07, 0x00, // ### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x7F, 0x00, // ####### + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3600 'z' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0xC0, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3640 '{' (14 pixels wide) + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x03, 0xC0, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x07, 0x00, // ### + 0x0E, 0x00, // ### + 0x07, 0x00, // ### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0xC0, // #### + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3680 '|' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3720 '}' (14 pixels wide) + 0x00, 0x00, // + 0x1C, 0x00, // ### + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x07, 0x00, // ### + 0x03, 0x80, // ### + 0x07, 0x00, // ### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1E, 0x00, // #### + 0x1C, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3760 '~' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x3F, 0x30, // ###### ## + 0x33, 0xF0, // ## ###### + 0x01, 0xE0, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // +}; + + +sFONT Font20 = { + Font20_Table, + 14, /* Width */ + 20, /* Height */ +}; + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/font8.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/font8.c new file mode 100644 index 000000000..f1d5b4dfc --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/font8.c @@ -0,0 +1,1005 @@ +/** + ****************************************************************************** + * @file Font8.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text Font8 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT(c) 2014 STMicroelectronics

+ * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" +#include + +// +// Font data for Courier New 12pt +// + +const uint8_t Font8_Table[] PROGMEM = +{ + // @0 ' ' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @8 '!' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @16 '"' (5 pixels wide) + 0x50, // # # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @24 '#' (5 pixels wide) + 0x28, // # # + 0x50, // # # + 0xF8, // ##### + 0x50, // # # + 0xF8, // ##### + 0x50, // # # + 0xA0, // # # + 0x00, // + + // @32 '$' (5 pixels wide) + 0x20, // # + 0x30, // ## + 0x60, // ## + 0x30, // ## + 0x10, // # + 0x60, // ## + 0x20, // # + 0x00, // + + // @40 '%' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x18, // ## + 0x60, // ## + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + + // @48 '&' (5 pixels wide) + 0x00, // + 0x38, // ### + 0x20, // # + 0x60, // ## + 0x50, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @56 ''' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @64 '(' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @72 ')' (5 pixels wide) + 0x40, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x40, // # + 0x00, // + + // @80 '*' (5 pixels wide) + 0x20, // # + 0x70, // ### + 0x20, // # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @88 '+' (5 pixels wide) + 0x00, // + 0x20, // # + 0x20, // # + 0xF8, // ##### + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + + // @96 ',' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x10, // # + 0x20, // # + 0x20, // # + 0x00, // + + // @104 '-' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @112 '.' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @120 '/' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x40, // # + 0x40, // # + 0x80, // # + 0x00, // + + // @128 '0' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x50, // # # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @136 '1' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @144 '2' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x40, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @152 '3' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x10, // # + 0x20, // # + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @160 '4' (5 pixels wide) + 0x10, // # + 0x30, // ## + 0x50, // # # + 0x78, // #### + 0x10, // # + 0x38, // ### + 0x00, // + 0x00, // + + // @168 '5' (5 pixels wide) + 0x70, // ### + 0x40, // # + 0x60, // ## + 0x10, // # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @176 '6' (5 pixels wide) + 0x30, // ## + 0x40, // # + 0x60, // ## + 0x50, // # # + 0x50, // # # + 0x60, // ## + 0x00, // + 0x00, // + + // @184 '7' (5 pixels wide) + 0x70, // ### + 0x50, // # # + 0x10, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + + // @192 '8' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x20, // # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @200 '9' (5 pixels wide) + 0x30, // ## + 0x50, // # # + 0x50, // # # + 0x30, // ## + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @208 ':' (5 pixels wide) + 0x00, // + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @216 ';' (5 pixels wide) + 0x00, // + 0x00, // + 0x10, // # + 0x00, // + 0x10, // # + 0x20, // # + 0x00, // + 0x00, // + + // @224 '<' (5 pixels wide) + 0x00, // + 0x10, // # + 0x20, // # + 0xC0, // ## + 0x20, // # + 0x10, // # + 0x00, // + 0x00, // + + // @232 '=' (5 pixels wide) + 0x00, // + 0x70, // ### + 0x00, // + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @240 '>' (5 pixels wide) + 0x00, // + 0x40, // # + 0x20, // # + 0x18, // ## + 0x20, // # + 0x40, // # + 0x00, // + 0x00, // + + // @248 '?' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x10, // # + 0x20, // # + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @256 '@' (5 pixels wide) + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x58, // # ## + 0x48, // # # + 0x40, // # + 0x38, // ### + 0x00, // + + // @264 'A' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x50, // # # + 0x70, // ### + 0x88, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @272 'B' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @280 'C' (5 pixels wide) + 0x70, // ### + 0x50, // # # + 0x40, // # + 0x40, // # + 0x40, // # + 0x30, // ## + 0x00, // + 0x00, // + + // @288 'D' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @296 'E' (5 pixels wide) + 0xF8, // ##### + 0x48, // # # + 0x60, // ## + 0x40, // # + 0x48, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @304 'F' (5 pixels wide) + 0xF8, // ##### + 0x48, // # # + 0x60, // ## + 0x40, // # + 0x40, // # + 0xE0, // ### + 0x00, // + 0x00, // + + // @312 'G' (5 pixels wide) + 0x70, // ### + 0x40, // # + 0x40, // # + 0x58, // # ## + 0x50, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @320 'H' (5 pixels wide) + 0xE8, // ### # + 0x48, // # # + 0x78, // #### + 0x48, // # # + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @328 'I' (5 pixels wide) + 0x70, // ### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @336 'J' (5 pixels wide) + 0x38, // ### + 0x10, // # + 0x10, // # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @344 'K' (5 pixels wide) + 0xD8, // ## ## + 0x50, // # # + 0x60, // ## + 0x70, // ### + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @352 'L' (5 pixels wide) + 0xE0, // ### + 0x40, // # + 0x40, // # + 0x40, // # + 0x48, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @360 'M' (5 pixels wide) + 0xD8, // ## ## + 0xD8, // ## ## + 0xD8, // ## ## + 0xA8, // # # # + 0x88, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @368 'N' (5 pixels wide) + 0xD8, // ## ## + 0x68, // ## # + 0x68, // ## # + 0x58, // # ## + 0x58, // # ## + 0xE8, // ### # + 0x00, // + 0x00, // + + // @376 'O' (5 pixels wide) + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @384 'P' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x40, // # + 0xE0, // ### + 0x00, // + 0x00, // + + // @392 'Q' (5 pixels wide) + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x18, // ## + 0x00, // + + // @400 'R' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @408 'S' (5 pixels wide) + 0x70, // ### + 0x50, // # # + 0x20, // # + 0x10, // # + 0x50, // # # + 0x70, // ### + 0x00, // + 0x00, // + + // @416 'T' (5 pixels wide) + 0xF8, // ##### + 0xA8, // # # # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @424 'U' (5 pixels wide) + 0xD8, // ## ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @432 'V' (5 pixels wide) + 0xD8, // ## ## + 0x88, // # # + 0x48, // # # + 0x50, // # # + 0x50, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @440 'W' (5 pixels wide) + 0xD8, // ## ## + 0x88, // # # + 0xA8, // # # # + 0xA8, // # # # + 0xA8, // # # # + 0x50, // # # + 0x00, // + 0x00, // + + // @448 'X' (5 pixels wide) + 0xD8, // ## ## + 0x50, // # # + 0x20, // # + 0x20, // # + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @456 'Y' (5 pixels wide) + 0xD8, // ## ## + 0x88, // # # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @464 'Z' (5 pixels wide) + 0x78, // #### + 0x48, // # # + 0x10, // # + 0x20, // # + 0x48, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @472 '[' (5 pixels wide) + 0x30, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x30, // ## + 0x00, // + + // @480 '\' (5 pixels wide) + 0x80, // # + 0x40, // # + 0x40, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @488 ']' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x60, // ## + 0x00, // + + // @496 '^' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @504 '_' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0xF8, // ##### + + // @512 '`' (5 pixels wide) + 0x20, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @520 'a' (5 pixels wide) + 0x00, // + 0x00, // + 0x30, // ## + 0x10, // # + 0x70, // ### + 0x78, // #### + 0x00, // + 0x00, // + + // @528 'b' (5 pixels wide) + 0xC0, // ## + 0x40, // # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @536 'c' (5 pixels wide) + 0x00, // + 0x00, // + 0x70, // ### + 0x40, // # + 0x40, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @544 'd' (5 pixels wide) + 0x18, // ## + 0x08, // # + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x00, // + 0x00, // + + // @552 'e' (5 pixels wide) + 0x00, // + 0x00, // + 0x70, // ### + 0x70, // ### + 0x40, // # + 0x30, // ## + 0x00, // + 0x00, // + + // @560 'f' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x70, // ### + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @568 'g' (5 pixels wide) + 0x00, // + 0x00, // + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x08, // # + 0x30, // ## + + // @576 'h' (5 pixels wide) + 0xC0, // ## + 0x40, // # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @584 'i' (5 pixels wide) + 0x20, // # + 0x00, // + 0x60, // ## + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @592 'j' (5 pixels wide) + 0x20, // # + 0x00, // + 0x70, // ### + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x70, // ### + + // @600 'k' (5 pixels wide) + 0xC0, // ## + 0x40, // # + 0x58, // # ## + 0x70, // ### + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @608 'l' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @616 'm' (5 pixels wide) + 0x00, // + 0x00, // + 0xD0, // ## # + 0xA8, // # # # + 0xA8, // # # # + 0xA8, // # # # + 0x00, // + 0x00, // + + // @624 'n' (5 pixels wide) + 0x00, // + 0x00, // + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0xC8, // ## # + 0x00, // + 0x00, // + + // @632 'o' (5 pixels wide) + 0x00, // + 0x00, // + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @640 'p' (5 pixels wide) + 0x00, // + 0x00, // + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x40, // # + 0xE0, // ### + + // @648 'q' (5 pixels wide) + 0x00, // + 0x00, // + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x08, // # + 0x18, // ## + + // @656 'r' (5 pixels wide) + 0x00, // + 0x00, // + 0x78, // #### + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @664 's' (5 pixels wide) + 0x00, // + 0x00, // + 0x30, // ## + 0x20, // # + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @672 't' (5 pixels wide) + 0x00, // + 0x40, // # + 0xF0, // #### + 0x40, // # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @680 'u' (5 pixels wide) + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x00, // + 0x00, // + + // @688 'v' (5 pixels wide) + 0x00, // + 0x00, // + 0xC8, // ## # + 0x48, // # # + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + + // @696 'w' (5 pixels wide) + 0x00, // + 0x00, // + 0xD8, // ## ## + 0xA8, // # # # + 0xA8, // # # # + 0x50, // # # + 0x00, // + 0x00, // + + // @704 'x' (5 pixels wide) + 0x00, // + 0x00, // + 0x48, // # # + 0x30, // ## + 0x30, // ## + 0x48, // # # + 0x00, // + 0x00, // + + // @712 'y' (5 pixels wide) + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x60, // ## + + // @720 'z' (5 pixels wide) + 0x00, // + 0x00, // + 0x78, // #### + 0x50, // # # + 0x28, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @728 '{' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x20, // # + 0x60, // ## + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @736 '|' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + + // @744 '}' (5 pixels wide) + 0x40, // # + 0x20, // # + 0x20, // # + 0x30, // ## + 0x20, // # + 0x20, // # + 0x40, // # + 0x00, // + + // @752 '~' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x28, // # # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // +}; + +sFONT Font8 = { + Font8_Table, + 5, /* Width */ + 8, /* Height */ +}; + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/imagedata.cpp b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/imagedata.cpp new file mode 100644 index 000000000..db8e7fa49 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/imagedata.cpp @@ -0,0 +1,327 @@ +/** + * @filename : imagedata.cpp + * @brief : data file for epd demo + * + * Copyright (C) Waveshare September 5 2017 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documnetation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "imagedata.h" +#include + +const unsigned char IMAGE_DATA[] PROGMEM = { +/* 0x00,0x01,0x80,0x00,0x28,0x01, */ +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,0x00,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x03,0xF0,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x00,0x03,0xF0,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x00,0x38,0x03,0xF0,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x01,0xF8,0x03,0xF0,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x0F,0xF8,0x03,0xF0,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x7F,0xF8,0x03,0xF0,0x1F,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x03,0xFF,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x1F,0xFF,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xFF,0xF0,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xFF,0x80,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xFC,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xF8,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x3F,0xFE,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x07,0xFF,0xC0,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0xFF,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x1F,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x1F,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x7F,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x03,0xFF,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x1F,0xFF,0xE0,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xFF,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xFC,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xF0,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xFC,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x1F,0xFF,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x03,0xFF,0xE0,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0xFF,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x3F,0xFF,0x80,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x07,0xFF,0xC0,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x00,0x01,0xFF,0xE0,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7C,0x00,0x7F,0xF0,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0x00,0x0F,0xF8,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xC0,0x07,0xFC,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xE0,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x7F,0xF8,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x3F,0xFE,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x07,0xFF,0xC0,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x00,0x01,0xFF,0xF0,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x83,0xFF,0x00,0x7F,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x81,0xFE,0x00,0x1F,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0xFF,0x00,0x1F,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x7F,0xC0,0x7F,0xF8,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0x80,0x3F,0xF9,0xFF,0xF0,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0x1F,0xFF,0xFF,0x80,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x3F,0x0B,0xFF,0xFE,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x3F,0x00,0xFF,0xF8,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x3F,0x00,0x3F,0xE0,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x3F,0x00,0x0F,0x80,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x3F,0x00,0x02,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x3F,0x00,0x00,0x00,0x00,0x00,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x18,0xFF,0xFF,0xFE,0x7F,0xF9,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x01,0xF8,0xFF,0xFF,0xF8,0x1F,0xF0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x3F,0xF8,0xFF,0xFF,0xE0,0x0F,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xE0,0xFF,0xFF,0xE0,0x07,0x80,0x7F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFC,0x00,0xFF,0xFF,0xF0,0x03,0xC0,0x1F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x00,0xFF,0xFF,0xF8,0x00,0xE0,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x3F,0xF0,0xC0,0x00,0x00,0x00,0x70,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x03,0xF8,0xC0,0x00,0x00,0x00,0x18,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x07,0xF8,0xC0,0x00,0x00,0x00,0x04,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0xE0,0xC0,0x00,0x00,0x00,0x06,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x00,0xC0,0x00,0x00,0x00,0x07,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFC,0x00,0xFF,0xFF,0xFF,0xFC,0x07,0xC3,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xE0,0xF8,0xFF,0xFF,0xFE,0x0F,0xE3,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x1F,0xF8,0xF8,0x3F,0xFF,0x06,0x00,0x13,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x01,0xF8,0xE0,0x03,0xFF,0x06,0x00,0x1F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x18,0xE0,0x00,0x01,0x06,0x00,0x1F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xE0,0x00,0x01,0x06,0x00,0x1F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x70,0x00,0xF8,0x00,0x01,0x06,0x00,0x1F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xF9,0x80,0xFE,0x00,0x01,0x06,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xF9,0xC0,0xFF,0xC0,0x01,0x06,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xFF,0xFF,0xC1,0x06,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xFF,0xFF,0xC1,0x06,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xFF,0x8F,0xC1,0x06,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x80,0xFC,0x00,0x01,0x06,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x00,0xFE,0x00,0x01,0x06,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFE,0x00,0x01,0x06,0x00,0x1F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x40,0xFD,0x00,0x01,0x06,0x00,0x1F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x03,0xC0,0xF8,0x80,0x01,0x06,0x00,0x1F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x1F,0xC0,0xE0,0x40,0xFF,0x02,0x00,0x1F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x80,0xC0,0x40,0xFF,0x00,0x00,0x1F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFC,0x00,0xC0,0x20,0x7E,0x00,0x0F,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFC,0x00,0xE0,0x00,0x7E,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x80,0xF0,0x07,0xF0,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x1F,0xC0,0xF8,0x03,0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x03,0xC0,0xFC,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x40,0xFE,0x00,0x00,0x01,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x1E,0x00,0xFF,0x00,0x00,0x7F,0x80,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xFF,0x00,0x00,0x7F,0x83,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xFC,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xED,0xC0,0xF8,0x00,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xF0,0x03,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xE0,0x07,0xE0,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCF,0xC0,0xE0,0x1F,0xFC,0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCF,0x80,0xE0,0x3F,0xFF,0xE0,0x03,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x0E,0x00,0xF8,0x7F,0xFF,0xFF,0x83,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFC,0xFF,0xFF,0xFF,0x83,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x43,0x00,0xFE,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC7,0x80,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCF,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFC,0xC0,0xFF,0xFF,0xFF,0xE0,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x78,0xC0,0xFF,0xFF,0xFF,0xE0,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x30,0x40,0xFF,0xFF,0xFF,0xE0,0x00,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xF0,0x7F,0xFF,0xE0,0x00,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xFC,0xF0,0x7F,0x83,0xE0,0x00,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xFC,0xF0,0x60,0x83,0xFF,0xE0,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xFC,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x01,0xC0,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0xC0,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0xC0,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x80,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x00,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x70,0x00,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xF9,0x80,0xF0,0x60,0x83,0xFF,0xE0,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xF9,0xC0,0xF0,0x60,0x83,0xFF,0xE0,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xF0,0x60,0x83,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xF0,0x60,0x83,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xF0,0x60,0x83,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x80,0xF0,0x60,0x83,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x00,0xF0,0x60,0x83,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xF0,0x60,0x83,0x00,0x00,0x03,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xF0,0x60,0x83,0xFF,0xE0,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x01,0xC0,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0xC0,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0xC0,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xF0,0x60,0x83,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x1E,0x00,0xC0,0x00,0x03,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xC0,0x00,0x03,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xC0,0x00,0x03,0x84,0x20,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xED,0xC0,0xC0,0x00,0x03,0xFF,0xE0,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xC0,0x00,0x03,0xE0,0x00,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xC0,0x00,0x03,0xE0,0x00,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCF,0xC0,0xFF,0xFF,0xFF,0xE0,0x00,0x83,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCF,0x80,0xFF,0xFF,0xFF,0xE0,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x0E,0x00,0xFF,0xFF,0xFF,0xE0,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xE0,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xF8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xF8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xF8,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC3,0x18,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC3,0x18,0xFF,0xF0,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC3,0x18,0xFF,0xF0,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC3,0x18,0xFF,0xF0,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC0,0x18,0xFF,0xF0,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xF0,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xF0,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xFC,0xFF,0xFE,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xFC,0xFF,0xFE,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xFC,0xFF,0xFE,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFE,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFE,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x1E,0x00,0xFF,0xFE,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xFF,0xFE,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xFF,0xFE,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xED,0xC0,0xFF,0xFE,0x07,0x03,0xC0,0x7F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xFC,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xF8,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCF,0xC0,0xF0,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCF,0x80,0xE0,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x0E,0x00,0xE0,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xE0,0x00,0x00,0x00,0x00,0x01,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x1E,0x00,0xE0,0x3E,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xE0,0x7E,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xE0,0x7E,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xE1,0xC0,0xE0,0x7E,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC0,0xC0,0xE0,0x7E,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC0,0xC0,0xE0,0x7E,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC0,0xC0,0xE0,0x7E,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x40,0xC0,0xE0,0x7E,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xE0,0x7E,0x07,0x83,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0xC0,0xE0,0x7E,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0xF0,0xE0,0x7E,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xF0,0xE0,0x7E,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xF0,0xE0,0x3E,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC0,0xC0,0xE0,0x02,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC0,0xC0,0xE0,0x00,0x00,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xE0,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xF0,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xF8,0x01,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xFE,0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x01,0xC0,0xFF,0xC3,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0xC0,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x1E,0x00,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x80,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xE1,0xC0,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC0,0xC0,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xE1,0xC0,0xFF,0xFF,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0xC0,0xFF,0xFF,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xFF,0xFF,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x1E,0x00,0xFF,0xFF,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0x7F,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xFC,0x7F,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xE0,0x7F,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xC0,0x7F,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x01,0x80,0xC0,0x7F,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0xC0,0xC0,0x7F,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0xC0,0xC0,0x7F,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xC0,0xC0,0x7F,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x80,0xE0,0x7F,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0x00,0xE0,0x7F,0xF8,0x1F,0xFC,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xE0,0x00,0x00,0x00,0x3C,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xE0,0x00,0x00,0x00,0x3C,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xD8,0xE0,0x00,0x00,0x00,0x1C,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xD8,0xF0,0x00,0x00,0x00,0x1C,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFF,0xD8,0xF0,0x00,0x00,0x00,0x0C,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xF8,0x00,0x00,0x00,0x04,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xF8,0x1C,0x04,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x1E,0x00,0xFF,0xFF,0xF8,0x1E,0x00,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xFF,0xFF,0xF8,0x1E,0x00,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x7F,0x80,0xFF,0xFF,0xF8,0x1F,0x00,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xE1,0xC0,0xFF,0xFF,0xF8,0x1F,0x00,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC0,0xC0,0xFF,0xFF,0xF8,0x1F,0x80,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC0,0xC0,0xFF,0xFF,0xF8,0x1F,0xC0,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC0,0xC0,0xFF,0xFF,0xF8,0x1F,0xC0,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x40,0xC0,0xFF,0xFF,0xF8,0x1F,0xE0,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xF8,0x1F,0xF0,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x43,0x00,0xFF,0xFF,0xF8,0x1F,0xF8,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xC7,0x80,0xFF,0xFF,0xF8,0x1F,0xF8,0x07,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCF,0xC0,0xFF,0xFF,0xF8,0x1F,0xFC,0x0F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xCC,0xC0,0xFF,0xFF,0xF8,0x1F,0xFE,0x1F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0xFC,0xC0,0xFF,0xFF,0xF8,0x1F,0xFF,0x3F,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x78,0xC0,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x30,0x40,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xF8,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xF0,0x00,0x00,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, +}; diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/imagedata.h b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/imagedata.h new file mode 100644 index 000000000..2234ead4e --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/components/epaper-29-ws/imagedata.h @@ -0,0 +1,30 @@ +/** + * @filename : imagedata.h + * @brief : head file for imagedata.cpp + * + * Copyright (C) Waveshare September 5 2017 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documnetation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +extern const unsigned char IMAGE_DATA[]; + +/* FILE END */ + + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/Doxyfile b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/Doxyfile new file mode 100644 index 000000000..590893a4e --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/Doxyfile @@ -0,0 +1,58 @@ +# This is Doxygen configuration file +# +# Doxygen provides over 260 configuration statements +# To make this file easier to follow, +# it contains only statements that are non-default +# +# NOTE: +# It is recommended not to change defaults unless specifically required +# Test any changes how they affect generated documentation +# Make sure that correct warnings are generated to flag issues with documented code +# +# For the complete list of configuration statements see: +# https://www.stack.nl/~dimitri/doxygen/manual/config.html + + +PROJECT_NAME = "esp-epaper-29-ws" + +## The 'INPUT' statement below is used as input by script 'gen-df-input.py' +## to automatically generate API reference list files heder_file.inc +## These files are placed in '_inc' directory +## and used to include in API reference documentation + +INPUT = \ + ../components/epaper-29-ws/epaper-29-ws.h + +## Get warnings for functions that have no documentation for their parameters or return value +## +WARN_NO_PARAMDOC = YES + +## Enable preprocessing and remove __attribute__(...) expressions from the INPUT files +## +ENABLE_PREPROCESSING = YES +MACRO_EXPANSION = YES +EXPAND_ONLY_PREDEF = YES +PREDEFINED = __attribute__(x)= + +## Do not complain about not having dot +## +HAVE_DOT = NO + +## Generate XML that is required for Breathe +## +GENERATE_XML = YES +XML_OUTPUT = xml + +GENERATE_HTML = NO +HAVE_DOT = NO +GENERATE_LATEX = NO +GENERATE_MAN = YES +GENERATE_RTF = NO + +## Skip distracting progress messages +## +QUIET = YES +## Log warnings in a file for further review +## +WARN_LOGFILE = "doxygen-warning-log.txt" + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/Makefile b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/Makefile new file mode 100644 index 000000000..cc32abbd5 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/Makefile @@ -0,0 +1,201 @@ +# Makefile for Sphinx documentation +# + +# You can set these variables from the command line. +SPHINXOPTS = +SPHINXBUILD = sphinx-build +PAPER = +BUILDDIR = _build + +# User-friendly check for sphinx-build +ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1) +$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/) +endif + +# Internal variables. +PAPEROPT_a4 = -D latex_paper_size=a4 +PAPEROPT_letter = -D latex_paper_size=letter +ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) -w sphinx-warning-log.txt . +# the i18n builder cannot share the environment and doctrees with the others +I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . + +.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext + +help: + @echo "Please use \`make ' where is one of" + @echo " html to make standalone HTML files" + @echo " dirhtml to make HTML files named index.html in directories" + @echo " singlehtml to make a single large HTML file" + @echo " pickle to make pickle files" + @echo " json to make JSON files" + @echo " htmlhelp to make HTML files and a HTML help project" + @echo " qthelp to make HTML files and a qthelp project" + @echo " devhelp to make HTML files and a Devhelp project" + @echo " epub to make an epub" + @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" + @echo " latexpdf to make LaTeX files and run them through pdflatex" + @echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx" + @echo " text to make text files" + @echo " man to make manual pages" + @echo " texinfo to make Texinfo files" + @echo " info to make Texinfo files and run them through makeinfo" + @echo " gettext to make PO message catalogs" + @echo " changes to make an overview of all changed/added/deprecated items" + @echo " xml to make Docutils-native XML files" + @echo " pseudoxml to make pseudoxml-XML files for display purposes" + @echo " linkcheck to check all external links for integrity" + @echo " doctest to run all doctests embedded in the documentation (if enabled)" + +clean: + rm -rf $(BUILDDIR)/* + +html: + $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/html." + +dirhtml: + $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml + @echo + @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml." + +singlehtml: + $(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml + @echo + @echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml." + +pickle: + $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle + @echo + @echo "Build finished; now you can process the pickle files." + +json: + $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json + @echo + @echo "Build finished; now you can process the JSON files." + +htmlhelp: + $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp + @echo + @echo "Build finished; now you can run HTML Help Workshop with the" \ + ".hhp project file in $(BUILDDIR)/htmlhelp." + +qthelp: + $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp + @echo + @echo "Build finished; now you can run "qcollectiongenerator" with the" \ + ".qhcp project file in $(BUILDDIR)/qthelp, like this:" + @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ReadtheDocsTemplate.qhcp" + @echo "To view the help file:" + @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ReadtheDocsTemplate.qhc" + +devhelp: + $(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp + @echo + @echo "Build finished." + @echo "To view the help file:" + @echo "# mkdir -p $$HOME/.local/share/devhelp/ReadtheDocsTemplate" + @echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ReadtheDocsTemplate" + @echo "# devhelp" + +epub: + $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub + @echo + @echo "Build finished. The epub file is in $(BUILDDIR)/epub." + +latex: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo + @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex." + @echo "Run \`make' in that directory to run these through (pdf)latex" \ + "(use \`make latexpdf' here to do that automatically)." + +latexpdf: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through pdflatex..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +latexpdfja: + $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex + @echo "Running LaTeX files through platex and dvipdfmx..." + $(MAKE) -C $(BUILDDIR)/latex all-pdf-ja + @echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex." + +text: + $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text + @echo + @echo "Build finished. The text files are in $(BUILDDIR)/text." + +man: + $(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man + @echo + @echo "Build finished. The manual pages are in $(BUILDDIR)/man." + +texinfo: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo + @echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo." + @echo "Run \`make' in that directory to run these through makeinfo" \ + "(use \`make info' here to do that automatically)." + +info: + $(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo + @echo "Running Texinfo files through makeinfo..." + make -C $(BUILDDIR)/texinfo info + @echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo." + +gettext: + $(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale + @echo + @echo "Build finished. The message catalogs are in $(BUILDDIR)/locale." + +changes: + $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes + @echo + @echo "The overview file is in $(BUILDDIR)/changes." + +linkcheck: + $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck + @echo + @echo "Link check complete; look for any errors in the above output " \ + "or in $(BUILDDIR)/linkcheck/output.txt." + +gh-linkcheck: + @echo "Checking for hardcoded GitHub links" + @if (find ../ -name '*.rst' | xargs grep \ + 'https://github.com/espressif/esp-idf/tree\|https://github.com/espressif/esp-idf/blob\|https://github.com/espressif/esp-idf/raw'\ + ); \ + then \ + echo "WARNINIG: Some .rst files contain hardcoded Github links."; \ + echo "Please check above output and replace links with one of the following:"; \ + echo "- :idf:\`dir\` - points to directory inside ESP-IDF"; \ + echo "- :idf_file:\`file\` - points to file inside ESP-IDF"; \ + echo "- :idf_raw:\`file\` - points to raw view of the file inside ESP-IDF"; \ + echo "- :component:\`dir\` - points to directory inside ESP-IDF components dir"; \ + echo "- :component_file:\`file\` - points to file inside ESP-IDF components dir"; \ + echo "- :component_raw:\`file\` - points to raw view of the file inside ESP-IDF"; \ + echo " components dir"; \ + echo "- :example:\`dir\` - points to directory inside ESP-IDF examples dir"; \ + echo "- :example_file:\`file\` - points to file inside ESP-IDF examples dir"; \ + echo "- :example_raw:\`file\` - points to raw view of the file inside ESP-IDF"; \ + echo " examples dir"; \ + echo "These link types will point to the correct GitHub version automatically"; \ + exit 1; \ + fi + @echo "No hardcoded links found" + +doctest: + $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest + @echo "Testing of doctests in the sources finished, look at the " \ + "results in $(BUILDDIR)/doctest/output.txt." + +xml: + $(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml + @echo + @echo "Build finished. The XML files are in $(BUILDDIR)/xml." + +pseudoxml: + $(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml + @echo + @echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml." diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/README.md b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/README.md new file mode 100644 index 000000000..b451469ce --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/README.md @@ -0,0 +1,8 @@ +# Documentation Source Folder + +This folder contains source files of [documentation](https://esp-epaper-29-ws.readthedocs.io/). + +The sources do not render well in GitHub and some information is not visible at all. + +Use actual the link above to access documentation generated instantly on each commit: + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/conf.py b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/conf.py new file mode 100644 index 000000000..9ad6d6924 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/conf.py @@ -0,0 +1,298 @@ +# -*- coding: utf-8 -*- +# +# Read the Docs Template documentation build configuration file, created by +# sphinx-quickstart on Tue Aug 26 14:19:49 2014. +# +# This file is execfile()d with the current directory set to its +# containing dir. +# +# Note that not all possible configuration values are present in this +# autogenerated file. +# +# All configuration values have a default; values that are commented out +# serve to show the default. + +import sys, os +import re +from subprocess import call, Popen, PIPE +import shlex + +# If extensions (or modules to document with autodoc) are in another directory, +# add these directories to sys.path here. If the directory is relative to the +# documentation root, use os.path.abspath to make it absolute, like shown here. +sys.path.insert(0, os.path.abspath('.')) + +from repo_util import run_cmd_get_output + +# Call Doxygen to get XML files from the header files +print "Calling Doxygen to generate latest XML files" +call('doxygen') +# Generate 'api_name.inc' files using the XML files by Doxygen +os.system("python gen-dxd.py") + +# http://stackoverflow.com/questions/12772927/specifying-an-online-image-in-sphinx-restructuredtext-format +# +suppress_warnings = ['image.nonlocal_uri'] + +# -- General configuration ------------------------------------------------ + +# If your documentation needs a minimal Sphinx version, state it here. +#needs_sphinx = '1.0' + +# Add any Sphinx extension module names here, as strings. They can be +# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom +# ones. +extensions = ['breathe', 'link-roles' ] + +# Breathe extension variables +breathe_projects = { "epaper-29-ws": "xml/" } +breathe_default_project = "epaper-29-ws" + +# Add any paths that contain templates here, relative to this directory. +templates_path = ['_templates'] + +# The suffix of source filenames. +source_suffix = '.rst' + +# The encoding of source files. +#source_encoding = 'utf-8-sig' + +# The master toctree document. +master_doc = 'index' + +# General information about the project. +project = u'epaper-29-ws' +copyright = u'2016 - 2017, Espressif' + +# The version info for the project you're documenting, acts as replacement for +# |version| and |release|, also used in various other places throughout the +# built documents. +# + +# Readthedocs largely ignores 'version' and 'release', and displays one of +# 'latest', tag name, or branch name, depending on the build type. +# Still, this is useful for non-RTD builds. +# This is supposed to be "the short X.Y version", but it's the only version +# visible when you open index.html. +# Display full version to make things less confusing. +version = run_cmd_get_output('git describe') +# The full version, including alpha/beta/rc tags. +# If needed, nearest tag is returned by 'git describe --abbrev=0'. +release = version +print 'Version: {0} Release: {1}'.format(version, release) + +# The language for content autogenerated by Sphinx. Refer to documentation +# for a list of supported languages. +#language = None + +# There are two options for replacing |today|: either, you set today to some +# non-false value, then it is used: +#today = '' +# Else, today_fmt is used as the format for a strftime call. +#today_fmt = '%B %d, %Y' + +# List of patterns, relative to source directory, that match files and +# directories to ignore when looking for source files. +exclude_patterns = ['_build'] + +# The reST default role (used for this markup: `text`) to use for all +# documents. +#default_role = None + +# If true, '()' will be appended to :func: etc. cross-reference text. +#add_function_parentheses = True + +# If true, the current module name will be prepended to all description +# unit titles (such as .. function::). +#add_module_names = True + +# If true, sectionauthor and moduleauthor directives will be shown in the +# output. They are ignored by default. +#show_authors = False + +# The name of the Pygments (syntax highlighting) style to use. +pygments_style = 'sphinx' + +# A list of ignored prefixes for module index sorting. +#modindex_common_prefix = [] + +# If true, keep warnings as "system message" paragraphs in the built documents. +#keep_warnings = False + + +# -- Options for HTML output ---------------------------------------------- + +# The theme to use for HTML and HTML Help pages. See the documentation for +# a list of builtin themes. +html_theme = 'default' + +# Theme options are theme-specific and customize the look and feel of a theme +# further. For a list of options available for each theme, see the +# documentation. +#html_theme_options = {} + +# Add any paths that contain custom themes here, relative to this directory. +#html_theme_path = [] + +# The name for this set of Sphinx documents. If None, it defaults to +# " v documentation". +#html_title = None + +# A shorter title for the navigation bar. Default is the same as html_title. +#html_short_title = None + +# The name of an image file (relative to this directory) to place at the top +# of the sidebar. +#html_logo = None + +# The name of an image file (within the static path) to use as favicon of the +# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32 +# pixels large. +#html_favicon = None + +# Add any paths that contain custom static files (such as style sheets) here, +# relative to this directory. They are copied after the builtin static files, +# so a file named "default.css" will overwrite the builtin "default.css". +html_static_path = [] + +# Add any extra paths that contain custom files (such as robots.txt or +# .htaccess) here, relative to this directory. These files are copied +# directly to the root of the documentation. +#html_extra_path = [] + +# If not '', a 'Last updated on:' timestamp is inserted at every page bottom, +# using the given strftime format. +#html_last_updated_fmt = '%b %d, %Y' + +# If true, SmartyPants will be used to convert quotes and dashes to +# typographically correct entities. +#html_use_smartypants = True + +# Custom sidebar templates, maps document names to template names. +#html_sidebars = {} + +# Additional templates that should be rendered to pages, maps page names to +# template names. +#html_additional_pages = {} + +# If false, no module index is generated. +#html_domain_indices = True + +# If false, no index is generated. +#html_use_index = True + +# If true, the index is split into individual pages for each letter. +#html_split_index = False + +# If true, links to the reST sources are added to the pages. +#html_show_sourcelink = True + +# If true, "Created using Sphinx" is shown in the HTML footer. Default is True. +#html_show_sphinx = True + +# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True. +#html_show_copyright = True + +# If true, an OpenSearch description file will be output, and all pages will +# contain a tag referring to it. The value of this option must be the +# base URL from which the finished HTML is served. +#html_use_opensearch = '' + +# This is the file name suffix for HTML files (e.g. ".xhtml"). +#html_file_suffix = None + +# Output file base name for HTML help builder. +htmlhelp_basename = 'ReadtheDocsTemplatedoc' + + +# -- Options for LaTeX output --------------------------------------------- + +latex_elements = { +# The paper size ('letterpaper' or 'a4paper'). +#'papersize': 'letterpaper', + +# The font size ('10pt', '11pt' or '12pt'). +#'pointsize': '10pt', + +# Additional stuff for the LaTeX preamble. +#'preamble': '', +} + +# Grouping the document tree into LaTeX files. List of tuples +# (source start file, target name, title, +# author, documentclass [howto, manual, or own class]). +latex_documents = [ + ('index', 'ReadtheDocsTemplate.tex', u'Read the Docs Template Documentation', + u'Read the Docs', 'manual'), +] + +# The name of an image file (relative to this directory) to place at the top of +# the title page. +#latex_logo = None + +# For "manual" documents, if this is true, then toplevel headings are parts, +# not chapters. +#latex_use_parts = False + +# If true, show page references after internal links. +#latex_show_pagerefs = False + +# If true, show URL addresses after external links. +#latex_show_urls = False + +# Documents to append as an appendix to all manuals. +#latex_appendices = [] + +# If false, no module index is generated. +#latex_domain_indices = True + + +# -- Options for manual page output --------------------------------------- + +# One entry per manual page. List of tuples +# (source start file, name, description, authors, manual section). +man_pages = [ + ('index', 'readthedocstemplate', u'Read the Docs Template Documentation', + [u'Read the Docs'], 1) +] + +# If true, show URL addresses after external links. +#man_show_urls = False + + +# -- Options for Texinfo output ------------------------------------------- + +# Grouping the document tree into Texinfo files. List of tuples +# (source start file, target name, title, author, +# dir menu entry, description, category) +texinfo_documents = [ + ('index', 'ReadtheDocsTemplate', u'Read the Docs Template Documentation', + u'Read the Docs', 'ReadtheDocsTemplate', 'One line description of project.', + 'Miscellaneous'), +] + +# Documents to append as an appendix to all manuals. +#texinfo_appendices = [] + +# If false, no module index is generated. +#texinfo_domain_indices = True + +# How to display URL addresses: 'footnote', 'no', or 'inline'. +#texinfo_show_urls = 'footnote' + +# If true, do not generate a @detailmenu in the "Top" node's menu. +#texinfo_no_detailmenu = False + +# -- Use sphinx_rtd_theme for local builds -------------------------------- +# ref. https://github.com/snide/sphinx_rtd_theme#using-this-theme-locally-then-building-on-read-the-docs +# +# on_rtd is whether we are on readthedocs.org +on_rtd = os.environ.get('READTHEDOCS', None) == 'True' + +if not on_rtd: # only import and set the theme if we're building docs locally + import sphinx_rtd_theme + html_theme = 'sphinx_rtd_theme' + html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] + +# otherwise, readthedocs.org uses their theme by default, so no need to specify it + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/gen-dxd.py b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/gen-dxd.py new file mode 100644 index 000000000..4be75915b --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/gen-dxd.py @@ -0,0 +1,301 @@ +# gen-dxd.py - Generate Doxygen Directives +# +# This code is in the Public Domain (or CC0 licensed, at your option.) +# Unless required by applicable law or agreed to in writing, this +# software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR +# CONDITIONS OF ANY KIND, either express or implied. +# + +import sys +import os +import re + +# Script configuration +header_file_path_prefix = "../components/" +"""string: path prefix for header files. +""" +doxyfile_path = "Doxyfile" +"""string: path to a file containing header files to processs. +""" +xml_directory_path = "xml" +"""string: path to directory with XML files by Doxygen. +""" +inc_directory_path = "_build/inc" +"""string: path prefix for header files. +""" +all_kinds = [ + ("function", "Functions"), + ("union", "Unions"), + ("struct", "Structures"), + ("define", "Macros"), + ("typedef", "Type Definitions"), + ("enum", "Enumerations") + ] +"""list of items that will be generated for a single API file +""" + + +def get_doxyfile_input(): + """Get contents of Doxyfile's INPUT statement. + + Returns: + Contents of Doxyfile's INPUT. + + """ + if not os.path.isfile(doxyfile_path): + print "Doxyfile '%s' does not exist!" % doxyfile_path + sys.exit() + + print "Getting Doxyfile's INPUT" + + input_file = open(doxyfile_path, "r") + + line = input_file.readline() + # read contents of Doxyfile until 'INPUT' statement + while line: + if line.find("INPUT") == 0: + break + line = input_file.readline() + + doxyfile_INPUT = "" + line = input_file.readline() + # skip input_file contents until end of 'INPUT' statement + while line: + if line.isspace(): + # we have reached the end of 'INPUT' statement + break + # process only lines that are not comments + if line.find("#") == -1: + # extract header file path inside components folder + m = re.search(header_file_path_prefix + "(.*\.h)", line) + header_file_path = m.group(1) + doxyfile_INPUT += header_file_path + "\n" + # proceed reading next line + line = input_file.readline() + + input_file.close() + return doxyfile_INPUT + + +def get_api_name(header_file_path): + """Get name of API from header file path. + + Args: + header_file_path: path to the header file. + + Returns: + The name of API. + + """ + api_name = "" + regex = r".*/(.*)\.h" + m = re.search(regex, header_file_path) + if m: + api_name = m.group(1) + + return api_name + + +def get_rst_header(header_name): + """Get rst formatted code with a header. + + Args: + header_name: name of header. + + Returns: + Formatted rst code with the header. + + """ + + rst_output = "" + rst_output += header_name + "\n" + rst_output += "^" * len(header_name) + "\n" + rst_output += "\n" + + return rst_output + + +def select_unions(innerclass_list): + """Select unions from innerclass list. + + Args: + innerclass_list: raw list with unions and structures + extracted from Dogygen's xml file. + + Returns: + Doxygen directives with unions selected from the list. + + """ + + rst_output = "" + for line in innerclass_list.splitlines(): + # union is denoted by "union" at the beginning of line + if line.find("union") == 0: + union_id, union_name = re.split(r"\t+", line) + rst_output += ".. doxygenunion:: " + rst_output += union_name + rst_output += "\n" + + return rst_output + + +def select_structs(innerclass_list): + """Select structures from innerclass list. + + Args: + innerclass_list: raw list with unions and structures + extracted from Dogygen's xml file. + + Returns: + Doxygen directives with structures selected from the list. + Note: some structures are excluded as described on code below. + + """ + + rst_output = "" + for line in innerclass_list.splitlines(): + # structure is denoted by "struct" at the beginning of line + if line.find("struct") == 0: + # skip structures that are part of union + # they are documented by 'doxygenunion' directive + if line.find("::") > 0: + continue + struct_id, struct_name = re.split(r"\t+", line) + rst_output += ".. doxygenstruct:: " + rst_output += struct_name + rst_output += "\n" + rst_output += " :members:\n" + rst_output += "\n" + + return rst_output + + +def get_directives(tree, kind): + """Get directives for specific 'kind'. + + Args: + tree: the ElementTree 'tree' of XML by Doxygen + kind: name of API "kind" to be generated + + Returns: + Doxygen directives for selected 'kind'. + Note: the header with "kind" name is included. + + """ + + rst_output = "" + if kind in ["union", "struct"]: + innerclass_list = "" + for elem in tree.iterfind('compounddef/innerclass'): + innerclass_list += elem.attrib["refid"] + "\t" + elem.text + "\n" + if kind == "union": + rst_output += select_unions(innerclass_list) + else: + rst_output += select_structs(innerclass_list) + else: + for elem in tree.iterfind( + 'compounddef/sectiondef/memberdef[@kind="%s"]' % kind): + name = elem.find('name') + rst_output += ".. doxygen%s:: " % kind + rst_output += name.text + "\n" + if rst_output: + all_kinds_dict = dict(all_kinds) + rst_output = get_rst_header(all_kinds_dict[kind]) + rst_output + "\n" + + return rst_output + + +def generate_directives(header_file_path): + """Generate API reference with Doxygen directives for a header file. + + Args: + header_file_path: a path to the header file with API. + + Returns: + Doxygen directives for the header file. + + """ + + api_name = get_api_name(header_file_path) + + # in XLT file name each "_" in the api name is expanded by Doxygen to "__" + xlt_api_name = api_name.replace("_", "__") + xml_file_path = "%s/%s_8h.xml" % (xml_directory_path, xlt_api_name) + + rst_output = "" + rst_output = ".. File automatically generated by 'gen-dxd.py'\n" + rst_output += "\n" + rst_output += get_rst_header("Header File") + rst_output += "* :component_file:`" + header_file_path + "`\n" + rst_output += "\n" + + try: + import xml.etree.cElementTree as ET + except ImportError: + import xml.etree.ElementTree as ET + + tree = ET.ElementTree(file=xml_file_path) + for i in range(len(all_kinds)): + kind = all_kinds[i][0] + rst_output += get_directives(tree, kind) + + return rst_output + + +def generate_api_inc_files(): + """Generate header_file.inc files + with API reference made of doxygen directives + for each header file + specified in the 'INPUT' statement of Doxyfile. + + """ + + if not os.path.isdir(xml_directory_path): + print "Directory %s does not exist!" % xml_directory_path + sys.exit() + + if not os.path.exists(inc_directory_path): + os.makedirs(inc_directory_path) + + list_to_generate = get_doxyfile_input() + print "Generating 'api_name.inc' files with Doxygen directives" + for header_file_path in list_to_generate.splitlines(): + api_name = get_api_name(header_file_path) + inc_file_path = inc_directory_path + "/" + api_name + ".inc" + rst_output = generate_directives(header_file_path) + inc_file = open(inc_file_path, "w") + inc_file.write(rst_output) + inc_file.close() + + +if __name__ == "__main__": + """The main script that generates + Doxygen directives. + + """ + + # Process command line arguments, if any + if len(sys.argv) > 1: + if not os.path.isdir(xml_directory_path): + print "Directory %s does not exist!" % xml_directory_path + sys.exit() + header_file_path = sys.argv[1] + api_name = get_api_name(header_file_path) + if api_name: + rst_output = generate_directives(header_file_path) + print "Doxygen directives for '%s'" % header_file_path + print + print rst_output + else: + print "Options to execute 'gen-dxd.py' application:" + print "1: $ python gen-dxd.py" + print " Generate API 'header_file.inc' files for headers defined in '%s'" % doxyfile_path + print "2: $ python gen-dxd.py header_file_path" + print " Print out Doxygen directives for a single header file" + print " example: $ python gen-dxd.py mdns/include/mdns.h" + print " NOTE: Run Doxygen first to get XML files for the header file" + + sys.exit() + + # No command line arguments given + generate_api_inc_files() diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/index.rst b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/index.rst new file mode 100644 index 000000000..f2c6c58f8 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/index.rst @@ -0,0 +1,9 @@ +ESP-IDF Component Documentation +=============================== + +Component: epaper-29-ws +----------------------- + +This component and documentation is based almost entirely on `epaper `_ component for another type of display developed by `esp-iot-solution `_ team. + +.. include:: _build/inc/epaper-29-ws.inc diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/link-roles.py b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/link-roles.py new file mode 100644 index 000000000..4ba8ff896 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/link-roles.py @@ -0,0 +1,34 @@ +# based on http://protips.readthedocs.io/link-roles.html + +from docutils import nodes +from repo_util import run_cmd_get_output + +def get_github_rev(): + path = run_cmd_get_output('git rev-parse --short HEAD') + tag = run_cmd_get_output('git describe --exact-match') + print 'Git commit ID: ', path + if len(tag): + print 'Git tag: ', tag + path = tag + return path + + +def setup(app): + baseurl = 'https://github.com/krzychb/esp-epaper-29-ws' + rev = get_github_rev() + app.add_role('idf', autolink('{}/tree/{}/%s'.format(baseurl, rev))) + app.add_role('idf_file', autolink('{}/blob/{}/%s'.format(baseurl, rev))) + app.add_role('idf_raw', autolink('{}/raw/{}/%s'.format(baseurl, rev))) + app.add_role('component', autolink('{}/tree/{}/components/%s'.format(baseurl, rev))) + app.add_role('component_file', autolink('{}/blob/{}/components/%s'.format(baseurl, rev))) + app.add_role('component_raw', autolink('{}/raw/{}/components/%s'.format(baseurl, rev))) + app.add_role('example', autolink('{}/tree/{}/examples/%s'.format(baseurl, rev))) + app.add_role('example_file', autolink('{}/blob/{}/examples/%s'.format(baseurl, rev))) + app.add_role('example_raw', autolink('{}/raw/{}/examples/%s'.format(baseurl, rev))) + +def autolink(pattern): + def role(name, rawtext, text, lineno, inliner, options={}, content=[]): + url = pattern % (text,) + node = nodes.reference(rawtext, text, refuri=url, **options) + return [node], [] + return role diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/repo_util.py b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/repo_util.py new file mode 100644 index 000000000..6249c11df --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/repo_util.py @@ -0,0 +1,5 @@ +import re +import os + +def run_cmd_get_output(cmd): + return os.popen(cmd).read().strip() diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/requirements.txt b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/requirements.txt new file mode 100644 index 000000000..642f0147f --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/docs/requirements.txt @@ -0,0 +1,6 @@ +# This is a list of python packages used to generate documentation. This file is used with pip: +# pip install -r requirements.txt +# +sphinx==1.6.5 +sphinx-rtd-theme +breathe==4.7.3 diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/library.properties b/lib/esp-epaper-29-ws-20171230-gemu-1.0/library.properties new file mode 100644 index 000000000..07a9e0a07 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/library.properties @@ -0,0 +1,9 @@ +name=Waveshare esp 2.9 inch e-paper display driver +version=1.0 +author=Gerhard Muntz +maintainer=Gerhard Muntz +sentence=ESP8266 library for Waveshare e-paper display. +paragraph= +category=Display +url=https://github.com/gemu2015/Sonoff-Tasmota/tree/displays/lib/esp-epaper-29-ws-20171230-gemu-1.0# +architectures=esp8266 diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/README.md b/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/README.md new file mode 100644 index 000000000..599bb4009 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/README.md @@ -0,0 +1,55 @@ +# Example: e-paper dispalys + +### This test code shows how to use ESP32 driver e-Paper displays +* Support for **Waveshare 2.7inch e-Paper HAT** based ePaper modules in 4-wire SPI mode + +#### e-paper functions: + + * **Graphics drawing functions**: + * **Paint_Clear** Clear all screen memery + * **Paint_DrawAbsolutePixel** This draws a pixel by absolute coordinates + * **Paint_GetImage** Getters and Setters + * **Paint_SetRotate** Setup displays rotate + * **Paint_DrawPixel** Draws a pixel by the coordinates + * **Paint_DrawCharAt** Draw a charactor on the frame buffer but not refresh + * **Paint_DrawStringAt** Displays a string on the frame buffer but not refresh + * **Paint_DrawLine** Draws a line on the frame buffer + * **Paint_DrawHorizontalLine** Draw a horizontal line on the frame buffer + * **Paint_DrawVerticalLine** Draw a vertical line on the frame buffer + * **Paint_DrawRectangle** Draws a rectangle + * **Paint_DrawFilledRectangle** Draws a filled rectangle + * **Paint_DrawCircle** Draws a circle + * **Paint_DrawFilledCircle** Draws a filled circle + +* **Fonts**: + * Support for **font8**,**font12**,**font16**,**font20**,**font24**, fonts embeded + +* **String write function**: + * **EPD_print** Write text to display. +* **Images**: + * Can display the image form C array + +#### Connecting the display + * mosi: 23 (display DIN) + * sck: 18 + * CS: 5 (display CS) + * DC: 26 (display DC) + * RST: 27 (display RESET) + * BUSY: 32 (display BUSY output) + +#### How to build + + `make menuconfig` + + Make and flash the example. + + `make all && make flash` + +#### Test: + * Dispaly espressif logo for 2s + * display the random value on e-paper, refresh 5s + + + + + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/component.mk b/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/component.mk new file mode 100644 index 000000000..a98f634ea --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/component.mk @@ -0,0 +1,4 @@ +# +# "main" pseudo-component makefile. +# +# (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/esp-epaper-29-ws.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/esp-epaper-29-ws.c new file mode 100644 index 000000000..196ca2423 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/esp-epaper-29-ws.c @@ -0,0 +1,105 @@ +/* 2.9" Waveshare ePaper Driver Example + + This example code is in the Public Domain (or CC0 licensed, at your option.) + + Unless required by applicable law or agreed to in writing, this + software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR + CONDITIONS OF ANY KIND, either express or implied. +*/ + +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" +#include +#include "esp_log.h" + +#include "imagedata.h" +#include "epaper-29-ws.h" +#include "epaper_fonts.h" + +static const char *TAG = "ePaper Example"; + +// Pin definition of the ePaper module +#define MOSI_PIN 5 +#define MISO_PIN -1 +#define SCK_PIN 18 +#define BUSY_PIN 22 +#define DC_PIN 21 +#define RST_PIN 23 +#define CS_PIN 19 + +// Color inverse. 1 or 0 = set or reset a bit if set a colored pixel +#define IF_INVERT_COLOR 1 + +void e_paper_task(void *pvParameter) +{ + epaper_handle_t device = NULL; + + epaper_conf_t epaper_conf = { + .busy_pin = BUSY_PIN, + .cs_pin = CS_PIN, + .dc_pin = DC_PIN, + .miso_pin = MISO_PIN, + .mosi_pin = MOSI_PIN, + .reset_pin = RST_PIN, + .sck_pin = SCK_PIN, + + .rst_active_level = 0, + .busy_active_level = 1, + + .dc_lev_data = 1, + .dc_lev_cmd = 0, + + .clk_freq_hz = 20 * 1000 * 1000, + .spi_host = HSPI_HOST, + + .width = EPD_WIDTH, + .height = EPD_HEIGHT, + .color_inv = 1, + }; + + uint32_t cnt = 0; + char hum_str[7]; + char tsens_str[7]; + + while(1){ + ESP_LOGI(TAG, "Before ePaper driver init, heap: %d", esp_get_free_heap_size()); + device = iot_epaper_create(NULL, &epaper_conf); + iot_epaper_set_rotate(device, E_PAPER_ROTATE_270); + ESP_LOGI(TAG, "e-Paper Display Espressif logo"); + iot_epaper_display_frame(device, IMAGE_DATA); // display IMAGE_DATA + vTaskDelay(5000 / portTICK_PERIOD_MS); + + ESP_LOGI(TAG, "e-Paper Display sample graphics"); + iot_epaper_clean_paint(device, UNCOLORED); + iot_epaper_draw_string(device, 200, 0, "@espressif", &epaper_font_12, COLORED); + iot_epaper_draw_string(device, 10, 10, "e-Paper Demo ", &epaper_font_16, COLORED); + + iot_epaper_draw_string(device, 15, 50, "Humidity", &epaper_font_16, COLORED); + iot_epaper_draw_string(device, 15, 80, "Temperature", &epaper_font_16, COLORED); + memset(hum_str, 0x00, sizeof(hum_str)); + memset(tsens_str, 0x00, sizeof(tsens_str)); + sprintf(hum_str, "%4d %%", (uint8_t) (esp_random() * 100.0 / UINT32_MAX)); + sprintf(tsens_str, "%4d C", (int8_t) (esp_random() * 100.0 / UINT32_MAX - 50)); + iot_epaper_draw_string(device, 170, 50, hum_str, &epaper_font_16, COLORED); + iot_epaper_draw_string(device, 170, 80, tsens_str, &epaper_font_16, COLORED); + + iot_epaper_draw_horizontal_line(device, 10, 27, 140, COLORED); + iot_epaper_draw_horizontal_line(device, 10, 73, 240, COLORED); + iot_epaper_draw_vertical_line(device, 150, 43, 60, COLORED); + iot_epaper_draw_rectangle(device, 10, 43, 250, 103, COLORED); + iot_epaper_display_frame(device, NULL); // display internal frame buffer + iot_epaper_delete(device, true); + + ESP_LOGI(TAG, "EPD Display update count: %d", cnt++); + ESP_LOGI(TAG, "After ePaper driver delete, heap: %d", esp_get_free_heap_size()); + + vTaskDelay(5000 / portTICK_PERIOD_MS); + } +} + + +void app_main() +{ + ESP_LOGI(TAG, "Starting example"); + xTaskCreate(&e_paper_task, "epaper_task", 4 * 1024, NULL, 5, NULL); +} diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/imagedata.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/imagedata.c new file mode 100644 index 000000000..bcd4c064a --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/imagedata.c @@ -0,0 +1,315 @@ +// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "imagedata.h" + + +const unsigned char IMAGE_DATA[4736] = { /* 0X01,0X01,0X28,0X01,0X7F,0X00, */ + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF9,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF1,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XC7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE1,0XF1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF0,0X00,0X00,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF8,0X00,0X00,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE,0X00,0X00,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0X00,0X00,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0X00,0X00,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X8F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE,0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFB,0XFE,0X01,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF1,0XFC,0X70,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF3,0XFC,0X78,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF8,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF8,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF8,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFE,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFE,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF1,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF1,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XE3,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE1,0XE3,0XF8,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF0,0XC3,0XF8,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF8,0X07,0XF0,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFC,0X0F,0XF1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE,0X3F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X07,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE,0X01,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF1,0XFC,0X20,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF3,0XFC,0X78,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF8,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF8,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF8,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFE,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFE,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF1,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF1,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF1,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XE3,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF1,0XC3,0XF8,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF0,0X07,0XF8,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF8,0X07,0XF1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE,0X1F,0XFB,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFD,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF3,0XF9,0XF8,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFE,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFE,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XF8,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF1,0XF9,0XF8,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF8,0X79,0XE1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFC,0X10,0X83,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE,0X00,0X07,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X80,0X1F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF8,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X7F,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF8,0X0F,0X80,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF0,0X06,0X00,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE1,0XC0,0X1F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XE0,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF0,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF0,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0X00,0X03,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0X00,0X00,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0X00,0X00,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF8,0X0F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF0,0X07,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0XC3,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XE3,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0X00,0X00,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0X00,0X00,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE0,0X00,0X00,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X07,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE,0X01,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF1,0XFC,0X20,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF1,0XFC,0X78,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF8,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF8,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF8,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFE,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFE,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF1,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF1,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF1,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XE3,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF1,0XE3,0XF8,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF0,0X07,0XF8,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF8,0X07,0XF1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE,0X1F,0XFB,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFD,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF3,0XF9,0XF8,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFE,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE7,0XF9,0XFE,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XFC,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XE3,0XF9,0XF8,0X7F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF1,0XF9,0XF8,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF8,0X79,0XE1,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFC,0X10,0X83,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE,0X00,0X07,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0X80,0X1F,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF0,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF8,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XF9,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X3E,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X0F,0XFF,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X7F,0XFF,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X03,0XFF,0XFC,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X07,0XFF,0XE0,0X01,0XF8,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X1F,0XFF,0X80,0X1F,0XFC,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X7F,0XFE,0X00,0XFF,0XFF,0X03,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0XFF,0XF8,0X03,0XFF,0XFF,0X87,0X80,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X01,0XFF,0XF0,0X1F,0XFF,0XFF,0X83,0XC0,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X03,0XFF,0XE0,0X3F,0XFF,0XFF,0XC3,0XE0,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X07,0XFF,0X80,0XFF,0XFF,0XFF,0XC1,0XE0,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X0F,0XFF,0X03,0XFF,0XFF,0XFF,0XC0,0XF0,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X1F,0XFE,0X07,0XFF,0XFF,0XFF,0XC0,0X78,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X1F,0XFC,0X1F,0XFF,0XFF,0XFF,0X80,0X38,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X3F,0XF8,0X3F,0XFF,0XFF,0XE0,0X00,0X3C,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X3F,0XF0,0X7F,0XFF,0XFC,0X00,0X00,0X1C,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X7F,0XE0,0XFF,0XFF,0XE0,0X00,0X00,0X0E,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0XFF,0XC1,0XFF,0XFF,0X80,0X00,0X00,0X0E,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0XFF,0X83,0XFF,0XFE,0X00,0X7F,0XFF,0X8F,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0XFF,0X07,0XFF,0XF8,0X07,0XFF,0XFF,0XC7,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X01,0XFE,0X0F,0XFF,0XE0,0X1F,0XFF,0XFF,0XC7,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X01,0XFC,0X1F,0XFF,0XC0,0X7F,0XFF,0XFF,0XE3,0X81,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X03,0XF8,0X3F,0XFF,0X01,0XFF,0XFF,0XFF,0XE3,0X81,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X03,0XF8,0X3F,0XFE,0X07,0XFF,0XFF,0XFF,0XE3,0X81,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X03,0XF0,0X7F,0XFC,0X0F,0XFF,0XFF,0XFF,0XF3,0X81,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X03,0XF0,0XFF,0XF8,0X1F,0XFF,0XFF,0XFF,0XE3,0X81,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X07,0XE1,0XFF,0XF0,0X3F,0XFF,0XFF,0XFF,0XE1,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X07,0XE1,0XFF,0XF0,0X7F,0XFF,0XFF,0XFF,0XE1,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X07,0XC3,0XFF,0XE0,0XFF,0XFF,0XF0,0X07,0XC1,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X07,0XC3,0XFF,0XC1,0XFF,0XFF,0X80,0X00,0X01,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X07,0X87,0XFF,0X83,0XFF,0XFC,0X00,0X00,0X01,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X07,0X87,0XFF,0X87,0XFF,0XF0,0X00,0X00,0X01,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X07,0X0F,0XFF,0X0F,0XFF,0XC0,0X1F,0XFE,0X01,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X07,0X0F,0XFE,0X1F,0XFF,0X80,0XFF,0XFF,0XC1,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X07,0X1F,0XFE,0X1F,0XFF,0X03,0XFF,0XFF,0XF1,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X1F,0XFC,0X3F,0XFE,0X0F,0XFF,0XFF,0XF1,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X1F,0XFC,0X3F,0XFC,0X1F,0XFF,0XFF,0XF1,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X3F,0XF8,0X7F,0XFC,0X3F,0XFF,0XFF,0XF1,0XC1,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X3F,0XF8,0X7F,0XF8,0X7F,0XFF,0XFF,0XF1,0X81,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X3F,0XF8,0X7F,0XF0,0X7F,0XFF,0XFF,0XF3,0X81,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X3F,0XF0,0XFF,0XF0,0XFF,0XFF,0XFF,0XE3,0X81,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X7F,0XF0,0XFF,0XE1,0XFF,0XFF,0XFF,0XE3,0X81,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X7F,0XF0,0XFF,0XC1,0XFF,0XFC,0X0F,0XC3,0X81,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X7F,0XF1,0XFF,0XC3,0XFF,0XF0,0X03,0X87,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X7F,0XE1,0XFF,0X83,0XFF,0XC0,0X00,0X07,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X7F,0XE1,0XFF,0X87,0XFF,0X80,0X00,0X07,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X7F,0XE1,0XFF,0X87,0XFF,0X00,0X00,0X0E,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X7F,0XE3,0XFF,0X87,0XFE,0X01,0XE0,0X0E,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X7F,0XE3,0XFF,0X07,0XFE,0X07,0XF0,0X1C,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X3F,0XE3,0XFF,0X0F,0XFE,0X0F,0XF8,0X1C,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X3F,0XE3,0XFF,0X0F,0XFC,0X0F,0XFC,0X38,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X1F,0XC3,0XFF,0X0F,0XFC,0X0F,0XFC,0X78,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X0F,0XC3,0XFF,0X0F,0XFC,0X1F,0XFC,0X70,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X04,0X03,0XFF,0X9F,0XFC,0X0F,0XFC,0XF0,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X03,0XFF,0XFF,0XFC,0X0F,0XFD,0XE0,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X01,0XFF,0XFF,0XF8,0X0F,0XFF,0XC0,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X01,0XFF,0XFF,0XF8,0X07,0XFF,0X80,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X18,0X01,0XFF,0XFF,0XF8,0X03,0XFF,0X80,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X3C,0X00,0XFF,0XFF,0XF0,0X00,0X1E,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X3E,0X00,0X7F,0XFF,0XE0,0X00,0X3C,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X0F,0X00,0X7F,0XFF,0XE0,0X00,0X78,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X07,0XC0,0X1F,0XFF,0X80,0X01,0XF0,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X03,0XF0,0X0F,0XFF,0X00,0X07,0XE0,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0XFC,0X01,0XFC,0X00,0X1F,0X80,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X7F,0X00,0X00,0X00,0X7F,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X1F,0XE0,0X00,0X03,0XFC,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X07,0XFE,0X00,0X7F,0XF0,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X01,0XFF,0XFF,0XFF,0XC0,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X7F,0XFF,0XFF,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X07,0XFF,0XF0,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XF0,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X00,0X01,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + 0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFF,0XFE, + }; diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/imagedata.h b/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/imagedata.h new file mode 100644 index 000000000..f7d0b2f72 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/main/imagedata.h @@ -0,0 +1,18 @@ +// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at + +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +extern const unsigned char IMAGE_DATA[]; + +/* FILE END */ + diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/2.9inch_e-Paper_Datasheet.pdf b/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/2.9inch_e-Paper_Datasheet.pdf new file mode 100644 index 000000000..fd88de07b Binary files /dev/null and b/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/2.9inch_e-Paper_Datasheet.pdf differ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/e-paper-and-esp-sample-image.jpg b/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/e-paper-and-esp-sample-image.jpg new file mode 100644 index 000000000..35df45ede Binary files /dev/null and b/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/e-paper-and-esp-sample-image.jpg differ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/e-paper-and-esp-sample-text.jpg b/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/e-paper-and-esp-sample-text.jpg new file mode 100644 index 000000000..8ad36bd29 Binary files /dev/null and b/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/e-paper-and-esp-sample-text.jpg differ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/espresif-logo.bmp b/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/espresif-logo.bmp new file mode 100644 index 000000000..f74a31539 Binary files /dev/null and b/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/espresif-logo.bmp differ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/image-conversion-setup.png b/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/image-conversion-setup.png new file mode 100644 index 000000000..3a0e86598 Binary files /dev/null and b/lib/esp-epaper-29-ws-20171230-gemu-1.0/pictures/image-conversion-setup.png differ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epd2in9.cpp b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epd2in9.cpp new file mode 100644 index 000000000..3e9168db3 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epd2in9.cpp @@ -0,0 +1,317 @@ +/** + * @filename : epd2in9.cpp + * @brief : Implements for e-paper library + * @author : Yehui from Waveshare + * + * Copyright (C) Waveshare September 9 2017 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documnetation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include +#include "epd2in9.h" + +Epd::~Epd() { +}; + + +Epd::Epd() { + //reset_pin = RST_PIN; + //dc_pin = DC_PIN; + cs_pin = CS_PIN; + mosi_pin = MOSI_PIN; + sclk_pin = SCLK_PIN; + //busy_pin = BUSY_PIN; + width = EPD_WIDTH; + height = EPD_HEIGHT; +}; + +int Epd::Init(const unsigned char* lut) { + /* this calls the peripheral hardware interface, see epdif */ + /*if (IfInit() != 0) { + return -1; + }*/ +/* + cs_pin=pin[GPIO_SSPI_CS]; + mosi_pin=pin[GPIO_SSPI_MOSI]; + sclk_pin=pin[GPIO_SSPI_SCLK]; +*/ + pinMode(cs_pin, OUTPUT); + pinMode(mosi_pin, OUTPUT); + pinMode(sclk_pin, OUTPUT); + + /* EPD hardware init start */ + this->lut = lut; + Reset(); + SendCommand(DRIVER_OUTPUT_CONTROL); + SendData((EPD_HEIGHT - 1) & 0xFF); + SendData(((EPD_HEIGHT - 1) >> 8) & 0xFF); + SendData(0x00); // GD = 0; SM = 0; TB = 0; + SendCommand(BOOSTER_SOFT_START_CONTROL); + SendData(0xD7); + SendData(0xD6); + SendData(0x9D); + SendCommand(WRITE_VCOM_REGISTER); + SendData(0xA8); // VCOM 7C + SendCommand(SET_DUMMY_LINE_PERIOD); + SendData(0x1A); // 4 dummy lines per gate + SendCommand(SET_GATE_TIME); + SendData(0x08); // 2us per line + SendCommand(DATA_ENTRY_MODE_SETTING); + SendData(0x03); // X increment; Y increment + SetLut(this->lut); + /* EPD hardware init end */ + return 0; +} + +/** + * @brief: basic function for sending commands + */ +void Epd::SendCommand(unsigned char command) { + //DigitalWrite(dc_pin, LOW); + //SpiTransfer(command); + fastSPIwrite(command,0); +} + +/** + * @brief: basic function for sending data + */ +void Epd::SendData(unsigned char data) { + fastSPIwrite(data,1); + // DigitalWrite(dc_pin, HIGH); + // SpiTransfer(data); +} + +/** + * @brief: Wait until the busy_pin goes LOW + */ +void Epd::WaitUntilIdle(void) { + return; + while(DigitalRead(busy_pin) == HIGH) { //LOW: idle, HIGH: busy + DelayMs(100); + } +} + +/** + * @brief: module reset. + * often used to awaken the module in deep sleep, + * see Epd::Sleep(); + */ +void Epd::Reset(void) { + //DigitalWrite(reset_pin, LOW); //module reset + DelayMs(200); + //DigitalWrite(reset_pin, HIGH); + DelayMs(200); +} + +/** + * @brief: set the look-up table register + */ +void Epd::SetLut(const unsigned char* lut) { + this->lut = lut; + SendCommand(WRITE_LUT_REGISTER); + /* the length of look-up table is 30 bytes */ + for (int i = 0; i < 30; i++) { + SendData(this->lut[i]); + } +} + +/** + * @brief: put an image buffer to the frame memory. + * this won't update the display. + */ +void Epd::SetFrameMemory( + const unsigned char* image_buffer, + uint16_t x, + uint16_t y, + uint16_t image_width, + uint16_t image_height +) { + uint16_t x_end; + uint16_t y_end; + + if ( + image_buffer == NULL || + x < 0 || image_width < 0 || + y < 0 || image_height < 0 + ) { + return; + } + + /* x point must be the multiple of 8 or the last 3 bits will be ignored */ + x &= 0xFFF8; + image_width &= 0xFFF8; + if (x + image_width >= this->width) { + x_end = this->width - 1; + } else { + x_end = x + image_width - 1; + } + if (y + image_height >= this->height) { + y_end = this->height - 1; + } else { + y_end = y + image_height - 1; + } + + if (!x && !y && image_width==this->width && image_height==this->height) { + SetFrameMemory(image_buffer); + return; + } + + SetMemoryArea(x, y, x_end, y_end); + SetMemoryPointer(x, y); + SendCommand(WRITE_RAM); + /* send the image data */ + for (uint16_t j = 0; j < y_end - y + 1; j++) { + for (uint16_t i = 0; i < (x_end - x + 1) / 8; i++) { + SendData(image_buffer[i + j * (image_width / 8)]); + } + } +} + +/** + * @brief: put an image buffer to the frame memory. + * this won't update the display. + * + * Question: When do you use this function instead of + * void SetFrameMemory( + * const unsigned char* image_buffer, + * int x, + * int y, + * int image_width, + * int image_height + * ); + * Answer: SetFrameMemory with parameters only reads image data + * from the RAM but not from the flash in AVR chips (for AVR chips, + * you have to use the function pgm_read_byte to read buffers + * from the flash). + */ +void Epd::SetFrameMemory(const unsigned char* image_buffer) { + SetMemoryArea(0, 0, this->width - 1, this->height - 1); + SetMemoryPointer(0, 0); + SendCommand(WRITE_RAM); + /* send the image data */ + for (int i = 0; i < this->width / 8 * this->height; i++) { + SendData(pgm_read_byte(&image_buffer[i])); + } +} + +/** + * @brief: clear the frame memory with the specified color. + * this won't update the display. + */ +void Epd::ClearFrameMemory(unsigned char color) { + SetMemoryArea(0, 0, this->width - 1, this->height - 1); + SetMemoryPointer(0, 0); + SendCommand(WRITE_RAM); + /* send the color data */ + for (int i = 0; i < this->width / 8 * this->height; i++) { + SendData(color); + } +} + +/** + * @brief: update the display + * there are 2 memory areas embedded in the e-paper display + * but once this function is called, + * the the next action of SetFrameMemory or ClearFrame will + * set the other memory area. + */ +void Epd::DisplayFrame(void) { + SendCommand(DISPLAY_UPDATE_CONTROL_2); + SendData(0xC4); + SendCommand(MASTER_ACTIVATION); + SendCommand(TERMINATE_FRAME_READ_WRITE); + WaitUntilIdle(); +} + +/** + * @brief: private function to specify the memory area for data R/W + */ +void Epd::SetMemoryArea(int x_start, int y_start, int x_end, int y_end) { + SendCommand(SET_RAM_X_ADDRESS_START_END_POSITION); + /* x point must be the multiple of 8 or the last 3 bits will be ignored */ + SendData((x_start >> 3) & 0xFF); + SendData((x_end >> 3) & 0xFF); + SendCommand(SET_RAM_Y_ADDRESS_START_END_POSITION); + SendData(y_start & 0xFF); + SendData((y_start >> 8) & 0xFF); + SendData(y_end & 0xFF); + SendData((y_end >> 8) & 0xFF); +} + +/** + * @brief: private function to specify the start point for data R/W + */ +void Epd::SetMemoryPointer(int x, int y) { + SendCommand(SET_RAM_X_ADDRESS_COUNTER); + /* x point must be the multiple of 8 or the last 3 bits will be ignored */ + SendData((x >> 3) & 0xFF); + SendCommand(SET_RAM_Y_ADDRESS_COUNTER); + SendData(y & 0xFF); + SendData((y >> 8) & 0xFF); + WaitUntilIdle(); +} + +/** + * @brief: After this command is transmitted, the chip would enter the + * deep-sleep mode to save power. + * The deep sleep mode would return to standby by hardware reset. + * You can use Epd::Init() to awaken + */ +void Epd::Sleep() { + SendCommand(DEEP_SLEEP_MODE); + WaitUntilIdle(); +} + +const unsigned char lut_full_update[] = +{ + 0x02, 0x02, 0x01, 0x11, 0x12, 0x12, 0x22, 0x22, + 0x66, 0x69, 0x69, 0x59, 0x58, 0x99, 0x99, 0x88, + 0x00, 0x00, 0x00, 0x00, 0xF8, 0xB4, 0x13, 0x51, + 0x35, 0x51, 0x51, 0x19, 0x01, 0x00 +}; + +const unsigned char lut_partial_update[] = +{ + 0x10, 0x18, 0x18, 0x08, 0x18, 0x18, 0x08, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x13, 0x14, 0x44, 0x12, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; + +void Epd::fastSPIwrite(uint8_t d,uint8_t dc) { + + digitalWrite(cs_pin, LOW); + + // transfer dc + digitalWrite(sclk_pin, LOW); + if(dc) digitalWrite(mosi_pin, HIGH); + else digitalWrite(mosi_pin, LOW); + digitalWrite(sclk_pin, HIGH); + + for(uint8_t bit = 0x80; bit; bit >>= 1) { + digitalWrite(sclk_pin, LOW); + if(d & bit) digitalWrite(mosi_pin, HIGH); + else digitalWrite(mosi_pin, LOW); + digitalWrite(sclk_pin, HIGH); + } + + digitalWrite(cs_pin, HIGH); +} +/* END OF FILE */ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epd2in9.h b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epd2in9.h new file mode 100644 index 000000000..464fcfab8 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epd2in9.h @@ -0,0 +1,106 @@ +/** + * @filename : epd2in9.h + * @brief : Header file for e-paper display library epd2in9.cpp + * @author : Yehui from Waveshare + * + * Copyright (C) Waveshare September 5 2017 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documnetation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef EPD2IN9_H +#define EPD2IN9_H + +#include "epdif.h" + +// Display resolution +#define EPD_WIDTH 128 +#define EPD_HEIGHT 296 + +// EPD2IN9 commands +#define DRIVER_OUTPUT_CONTROL 0x01 +#define BOOSTER_SOFT_START_CONTROL 0x0C +#define GATE_SCAN_START_POSITION 0x0F +#define DEEP_SLEEP_MODE 0x10 +#define DATA_ENTRY_MODE_SETTING 0x11 +#define SW_RESET 0x12 +#define TEMPERATURE_SENSOR_CONTROL 0x1A +#define MASTER_ACTIVATION 0x20 +#define DISPLAY_UPDATE_CONTROL_1 0x21 +#define DISPLAY_UPDATE_CONTROL_2 0x22 +#define WRITE_RAM 0x24 +#define WRITE_VCOM_REGISTER 0x2C +#define WRITE_LUT_REGISTER 0x32 +#define SET_DUMMY_LINE_PERIOD 0x3A +#define SET_GATE_TIME 0x3B +#define BORDER_WAVEFORM_CONTROL 0x3C +#define SET_RAM_X_ADDRESS_START_END_POSITION 0x44 +#define SET_RAM_Y_ADDRESS_START_END_POSITION 0x45 +#define SET_RAM_X_ADDRESS_COUNTER 0x4E +#define SET_RAM_Y_ADDRESS_COUNTER 0x4F +#define TERMINATE_FRAME_READ_WRITE 0xFF + +extern const unsigned char lut_full_update[]; +extern const unsigned char lut_partial_update[]; + +class Epd : EpdIf { +public: + unsigned long width; + unsigned long height; + + Epd(); + ~Epd(); + int Init(const unsigned char* lut); + void SendCommand(unsigned char command); + void SendData(unsigned char data); + void WaitUntilIdle(void); + void Reset(void); + void SetFrameMemory( + const unsigned char* image_buffer, + uint16_t x, + uint16_t y, + uint16_t image_width, + uint16_t image_height + ); + void SetFrameMemory(const unsigned char* image_buffer); + void ClearFrameMemory(unsigned char color); + void DisplayFrame(void); + void Sleep(void); + + unsigned int cs_pin; + unsigned int mosi_pin; + unsigned int sclk_pin; + +private: + unsigned int reset_pin; + unsigned int dc_pin; + unsigned int busy_pin; + const unsigned char* lut; + + + + void SetLut(const unsigned char* lut); + void SetMemoryArea(int x_start, int y_start, int x_end, int y_end); + void SetMemoryPointer(int x, int y); + void fastSPIwrite(uint8_t d,uint8_t dc); +}; + +#endif /* EPD2IN9_H */ + +/* END OF FILE */ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdif.cpp b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdif.cpp new file mode 100644 index 000000000..5f1816127 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdif.cpp @@ -0,0 +1,96 @@ +/** + * @filename : epdif.cpp + * @brief : Implements EPD interface functions + * Users have to implement all the functions in epdif.cpp + * @author : Yehui from Waveshare + * + * Copyright (C) Waveshare August 10 2017 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documnetation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "epdif.h" +#include + +EpdIf::EpdIf() { +}; + +EpdIf::~EpdIf() { +}; + +void EpdIf::DelayMs(unsigned int delaytime) { + delay(delaytime); +} + +int EpdIf::DigitalRead(int pin) { + return digitalRead(pin); +} + +/* +void EpdIf::DigitalWrite(int pin, int value) { + digitalWrite(pin, value); +} + + + + + +void EpdIf::SpiTransfer(unsigned char data) { + digitalWrite(cs_pin, LOW); + //SPI.transfer(data); + digitalWrite(cs_pin, HIGH); +} + + + +int EpdIf::IfInit(void) { + + + pinMode(cs_pin, OUTPUT); + pinMode(mosi_pin, OUTPUT); + pinMode(mosi_pin, OUTPUT); + //pinMode(RST_PIN, OUTPUT); + //pinMode(DC_PIN, OUTPUT); + //pinMode(BUSY_PIN, INPUT); + //SPI.beginTransaction(SPISettings(2000000, MSBFIRST, SPI_MODE0)); + //SPI.begin(SCK_PIN, MISO_PIN, MOSI_PIN, SS_PIN); + return 0; +} + + +void EpdIf::fastSPIwrite(uint8_t d,uint8_t dc) { + + digitalWrite(cs_pin, LOW); + + // transfer dc + digitalWrite(sclk_pin, LOW); + if(dc) digitalWrite(mosi_pin, HIGH); + else digitalWrite(mosi_pin, LOW); + digitalWrite(sclk_pin, HIGH); + + for(uint8_t bit = 0x80; bit; bit >>= 1) { + digitalWrite(sclk_pin, LOW); + if(d & bit) digitalWrite(mosi_pin, HIGH); + else digitalWrite(mosi_pin, LOW); + digitalWrite(sclk_pin, HIGH); + } + + digitalWrite(cs_pin, HIGH); +} +*/ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdif.h b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdif.h new file mode 100644 index 000000000..9babaf6b4 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdif.h @@ -0,0 +1,76 @@ +/** + * @filename : epdif.h + * @brief : Header file of epdif.cpp providing EPD interface functions + * Users have to implement all the functions in epdif.cpp + * @author : Yehui from Waveshare + * + * Copyright (C) Waveshare August 10 2017 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documnetation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef EPDIF_H +#define EPDIF_H + +#include + +/* +SPI Pin definition +Default pins: + SCK 18 + MISO 19 + MOSI 23 + SS 5 + Use default pin -1 +*/ +/* +#define SCK_PIN -1 +#define MISO_PIN 4 +#define MOSI_PIN 5 +#define SS_PIN 2 + +// EPD Pin definition +#define RST_PIN 23 +#define DC_PIN 21 +#define CS_PIN 19 +#define BUSY_PIN 22 +*/ + +#define CS_PIN 5 +#define MOSI_PIN 0 +#define SCLK_PIN 4 + + +class EpdIf { +public: + EpdIf(void); + ~EpdIf(void); + static void DelayMs(unsigned int delaytime); + static int DigitalRead(int pin); + /* + static int IfInit(void); + static void DigitalWrite(int pin, int value); + + + static void SpiTransfer(unsigned char data); + */ + //static void fastSPIwrite(uint8_t d,uint8_t dc); +}; + +#endif diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdpaint.cpp b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdpaint.cpp new file mode 100644 index 000000000..cd04dc8db --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdpaint.cpp @@ -0,0 +1,322 @@ +/** + * @filename : epdpaint.cpp + * @brief : Paint tools + * @author : Yehui from Waveshare + * + * Copyright (C) Waveshare September 9 2017 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documnetation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include +#include "epdpaint.h" + +Paint::Paint(unsigned char* image, int width, int height) { + this->rotate = ROTATE_0; + this->image = image; + /* 1 byte = 8 pixels, so the width should be the multiple of 8 */ + this->width = width % 8 ? width + 8 - (width % 8) : width; + this->height = height; +} + +Paint::~Paint() { +} + +/** + * @brief: clear the image + */ +void Paint::Clear(int colored) { + for (int x = 0; x < this->width; x++) { + for (int y = 0; y < this->height; y++) { + DrawAbsolutePixel(x, y, colored); + } + } +} + +/** + * @brief: this draws a pixel by absolute coordinates. + * this function won't be affected by the rotate parameter. + */ +void Paint::DrawAbsolutePixel(int x, int y, int colored) { + if (x < 0 || x >= this->width || y < 0 || y >= this->height) { + return; + } + if (IF_INVERT_COLOR) { + if (colored) { + image[(x + y * this->width) / 8] |= 0x80 >> (x % 8); + } else { + image[(x + y * this->width) / 8] &= ~(0x80 >> (x % 8)); + } + } else { + if (colored) { + image[(x + y * this->width) / 8] &= ~(0x80 >> (x % 8)); + } else { + image[(x + y * this->width) / 8] |= 0x80 >> (x % 8); + } + } +} + +/** + * @brief: Getters and Setters + */ +unsigned char* Paint::GetImage(void) { + return this->image; +} + +int Paint::GetWidth(void) { + return this->width; +} + +void Paint::SetWidth(int width) { + this->width = width % 8 ? width + 8 - (width % 8) : width; +} + +int Paint::GetHeight(void) { + return this->height; +} + +void Paint::SetHeight(int height) { + this->height = height; +} + +int Paint::GetRotate(void) { + return this->rotate; +} + +void Paint::SetRotate(int rotate){ + this->rotate = rotate; +} + +/** + * @brief: this draws a pixel by the coordinates + */ +void Paint::DrawPixel(int x, int y, int colored) { + int point_temp; + if (this->rotate == ROTATE_0) { + if(x < 0 || x >= this->width || y < 0 || y >= this->height) { + return; + } + DrawAbsolutePixel(x, y, colored); + } else if (this->rotate == ROTATE_90) { + if(x < 0 || x >= this->height || y < 0 || y >= this->width) { + return; + } + point_temp = x; + x = this->width - y; + y = point_temp; + DrawAbsolutePixel(x, y, colored); + } else if (this->rotate == ROTATE_180) { + if(x < 0 || x >= this->width || y < 0 || y >= this->height) { + return; + } + x = this->width - x; + y = this->height - y; + DrawAbsolutePixel(x, y, colored); + } else if (this->rotate == ROTATE_270) { + if(x < 0 || x >= this->height || y < 0 || y >= this->width) { + return; + } + point_temp = x; + x = y; + y = this->height - point_temp; + DrawAbsolutePixel(x, y, colored); + } +} + +/** + * @brief: this draws a charactor on the frame buffer but not refresh + */ +void Paint::DrawCharAt(int x, int y, char ascii_char, sFONT* font, int colored) { + int i, j; + unsigned int char_offset = (ascii_char - ' ') * font->Height * (font->Width / 8 + (font->Width % 8 ? 1 : 0)); + const unsigned char* ptr = &font->table[char_offset]; + + for (j = 0; j < font->Height; j++) { + for (i = 0; i < font->Width; i++) { + if (pgm_read_byte(ptr) & (0x80 >> (i % 8))) { + DrawPixel(x + i, y + j, colored); + } else { + // fill background + DrawPixel(x + i, y + j, 1); + } + if (i % 8 == 7) { + ptr++; + } + } + if (font->Width % 8 != 0) { + ptr++; + } + } +} + +/** +* @brief: this displays a string on the frame buffer but not refresh +*/ +void Paint::DrawStringAt(int x, int y, const char* text, sFONT* font, int colored) { + const char* p_text = text; + unsigned int counter = 0; + int refcolumn = x; + + /* Send the string character by character on EPD */ + while (*p_text != 0) { + /* Display one character on EPD */ + DrawCharAt(refcolumn, y, *p_text, font, colored); + /* Decrement the column position by 16 */ + refcolumn += font->Width; + /* Point on the next character */ + p_text++; + counter++; + } +} + +/** +* @brief: this draws a line on the frame buffer +*/ +void Paint::DrawLine(int x0, int y0, int x1, int y1, int colored) { + /* Bresenham algorithm */ + int dx = x1 - x0 >= 0 ? x1 - x0 : x0 - x1; + int sx = x0 < x1 ? 1 : -1; + int dy = y1 - y0 <= 0 ? y1 - y0 : y0 - y1; + int sy = y0 < y1 ? 1 : -1; + int err = dx + dy; + + while((x0 != x1) && (y0 != y1)) { + DrawPixel(x0, y0 , colored); + if (2 * err >= dy) { + err += dy; + x0 += sx; + } + if (2 * err <= dx) { + err += dx; + y0 += sy; + } + } +} + +/** +* @brief: this draws a horizontal line on the frame buffer +*/ +void Paint::DrawHorizontalLine(int x, int y, int line_width, int colored) { + int i; + for (i = x; i < x + line_width; i++) { + DrawPixel(i, y, colored); + } +} + +/** +* @brief: this draws a vertical line on the frame buffer +*/ +void Paint::DrawVerticalLine(int x, int y, int line_height, int colored) { + int i; + for (i = y; i < y + line_height; i++) { + DrawPixel(x, i, colored); + } +} + +/** +* @brief: this draws a rectangle +*/ +void Paint::DrawRectangle(int x0, int y0, int x1, int y1, int colored) { + int min_x, min_y, max_x, max_y; + min_x = x1 > x0 ? x0 : x1; + max_x = x1 > x0 ? x1 : x0; + min_y = y1 > y0 ? y0 : y1; + max_y = y1 > y0 ? y1 : y0; + + DrawHorizontalLine(min_x, min_y, max_x - min_x + 1, colored); + DrawHorizontalLine(min_x, max_y, max_x - min_x + 1, colored); + DrawVerticalLine(min_x, min_y, max_y - min_y + 1, colored); + DrawVerticalLine(max_x, min_y, max_y - min_y + 1, colored); +} + +/** +* @brief: this draws a filled rectangle +*/ +void Paint::DrawFilledRectangle(int x0, int y0, int x1, int y1, int colored) { + int min_x, min_y, max_x, max_y; + int i; + min_x = x1 > x0 ? x0 : x1; + max_x = x1 > x0 ? x1 : x0; + min_y = y1 > y0 ? y0 : y1; + max_y = y1 > y0 ? y1 : y0; + + for (i = min_x; i <= max_x; i++) { + DrawVerticalLine(i, min_y, max_y - min_y + 1, colored); + } +} + +/** +* @brief: this draws a circle +*/ +void Paint::DrawCircle(int x, int y, int radius, int colored) { + /* Bresenham algorithm */ + int x_pos = -radius; + int y_pos = 0; + int err = 2 - 2 * radius; + int e2; + + do { + DrawPixel(x - x_pos, y + y_pos, colored); + DrawPixel(x + x_pos, y + y_pos, colored); + DrawPixel(x + x_pos, y - y_pos, colored); + DrawPixel(x - x_pos, y - y_pos, colored); + e2 = err; + if (e2 <= y_pos) { + err += ++y_pos * 2 + 1; + if(-x_pos == y_pos && e2 <= x_pos) { + e2 = 0; + } + } + if (e2 > x_pos) { + err += ++x_pos * 2 + 1; + } + } while (x_pos <= 0); +} + +/** +* @brief: this draws a filled circle +*/ +void Paint::DrawFilledCircle(int x, int y, int radius, int colored) { + /* Bresenham algorithm */ + int x_pos = -radius; + int y_pos = 0; + int err = 2 - 2 * radius; + int e2; + + do { + DrawPixel(x - x_pos, y + y_pos, colored); + DrawPixel(x + x_pos, y + y_pos, colored); + DrawPixel(x + x_pos, y - y_pos, colored); + DrawPixel(x - x_pos, y - y_pos, colored); + DrawHorizontalLine(x + x_pos, y + y_pos, 2 * (-x_pos) + 1, colored); + DrawHorizontalLine(x + x_pos, y - y_pos, 2 * (-x_pos) + 1, colored); + e2 = err; + if (e2 <= y_pos) { + err += ++y_pos * 2 + 1; + if(-x_pos == y_pos && e2 <= x_pos) { + e2 = 0; + } + } + if(e2 > x_pos) { + err += ++x_pos * 2 + 1; + } + } while(x_pos <= 0); +} + +/* END OF FILE */ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdpaint.h b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdpaint.h new file mode 100644 index 000000000..77a3b190c --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/epdpaint.h @@ -0,0 +1,74 @@ +/** + * @filename : epdpaint.h + * @brief : Header file for epdpaint.cpp + * @author : Yehui from Waveshare + * + * Copyright (C) Waveshare July 28 2017 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documnetation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS OR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef EPDPAINT_H +#define EPDPAINT_H + +// Display orientation +#define ROTATE_0 0 +#define ROTATE_90 1 +#define ROTATE_180 2 +#define ROTATE_270 3 + +// Color inverse. 1 or 0 = set or reset a bit if set a colored pixel +#define IF_INVERT_COLOR 1 + +#include "fonts.h" + +class Paint { +public: + Paint(unsigned char* image, int width, int height); + ~Paint(); + void Clear(int colored); + int GetWidth(void); + void SetWidth(int width); + int GetHeight(void); + void SetHeight(int height); + int GetRotate(void); + void SetRotate(int rotate); + unsigned char* GetImage(void); + void DrawAbsolutePixel(int x, int y, int colored); + void DrawPixel(int x, int y, int colored); + void DrawCharAt(int x, int y, char ascii_char, sFONT* font, int colored); + void DrawStringAt(int x, int y, const char* text, sFONT* font, int colored); + void DrawLine(int x0, int y0, int x1, int y1, int colored); + void DrawHorizontalLine(int x, int y, int width, int colored); + void DrawVerticalLine(int x, int y, int height, int colored); + void DrawRectangle(int x0, int y0, int x1, int y1, int colored); + void DrawFilledRectangle(int x0, int y0, int x1, int y1, int colored); + void DrawCircle(int x, int y, int radius, int colored); + void DrawFilledCircle(int x, int y, int radius, int colored); + +private: + unsigned char* image; + uint16_t width; + uint16_t height; + uint8_t rotate; +}; + +#endif + +/* END OF FILE */ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font12.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font12.c new file mode 100644 index 000000000..dfaed8be9 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font12.c @@ -0,0 +1,1385 @@ +/** + ****************************************************************************** + * @file Font12.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text Font12 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT(c) 2014 STMicroelectronics

+ * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" +#include + +// +// Font data for Courier New 12pt +// + +const uint8_t Font12_Table[] PROGMEM = +{ + // @0 ' ' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @12 '!' (7 pixels wide) + 0x00, // + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @24 '"' (7 pixels wide) + 0x00, // + 0x6C, // ## ## + 0x48, // # # + 0x48, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @36 '#' (7 pixels wide) + 0x00, // + 0x14, // # # + 0x14, // # # + 0x28, // # # + 0x7C, // ##### + 0x28, // # # + 0x7C, // ##### + 0x28, // # # + 0x50, // # # + 0x50, // # # + 0x00, // + 0x00, // + + // @48 '$' (7 pixels wide) + 0x00, // + 0x10, // # + 0x38, // ### + 0x40, // # + 0x40, // # + 0x38, // ### + 0x48, // # # + 0x70, // ### + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + + // @60 '%' (7 pixels wide) + 0x00, // + 0x20, // # + 0x50, // # # + 0x20, // # + 0x0C, // ## + 0x70, // ### + 0x08, // # + 0x14, // # # + 0x08, // # + 0x00, // + 0x00, // + 0x00, // + + // @72 '&' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x18, // ## + 0x20, // # + 0x20, // # + 0x54, // # # # + 0x48, // # # + 0x34, // ## # + 0x00, // + 0x00, // + 0x00, // + + // @84 ''' (7 pixels wide) + 0x00, // + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @96 '(' (7 pixels wide) + 0x00, // + 0x08, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x08, // # + 0x00, // + + // @108 ')' (7 pixels wide) + 0x00, // + 0x20, // # + 0x20, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x20, // # + 0x00, // + + // @120 '*' (7 pixels wide) + 0x00, // + 0x10, // # + 0x7C, // ##### + 0x10, // # + 0x28, // # # + 0x28, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @132 '+' (7 pixels wide) + 0x00, // + 0x00, // + 0x10, // # + 0x10, // # + 0x10, // # + 0xFE, // ####### + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @144 ',' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x18, // ## + 0x10, // # + 0x30, // ## + 0x20, // # + 0x00, // + + // @156 '-' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @168 '.' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @180 '/' (7 pixels wide) + 0x00, // + 0x04, // # + 0x04, // # + 0x08, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x20, // # + 0x40, // # + 0x00, // + 0x00, // + + // @192 '0' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @204 '1' (7 pixels wide) + 0x00, // + 0x30, // ## + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @216 '2' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x04, // # + 0x08, // # + 0x10, // # + 0x20, // # + 0x44, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @228 '3' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x04, // # + 0x18, // ## + 0x04, // # + 0x04, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @240 '4' (7 pixels wide) + 0x00, // + 0x0C, // ## + 0x14, // # # + 0x14, // # # + 0x24, // # # + 0x44, // # # + 0x7E, // ###### + 0x04, // # + 0x0E, // ### + 0x00, // + 0x00, // + 0x00, // + + // @252 '5' (7 pixels wide) + 0x00, // + 0x3C, // #### + 0x20, // # + 0x20, // # + 0x38, // ### + 0x04, // # + 0x04, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @264 '6' (7 pixels wide) + 0x00, // + 0x1C, // ### + 0x20, // # + 0x40, // # + 0x78, // #### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @276 '7' (7 pixels wide) + 0x00, // + 0x7C, // ##### + 0x44, // # # + 0x04, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @288 '8' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @300 '9' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3C, // #### + 0x04, // # + 0x08, // # + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + + // @312 ':' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @324 ';' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x18, // ## + 0x18, // ## + 0x00, // + 0x00, // + 0x18, // ## + 0x30, // ## + 0x20, // # + 0x00, // + 0x00, // + + // @336 '<' (7 pixels wide) + 0x00, // + 0x00, // + 0x0C, // ## + 0x10, // # + 0x60, // ## + 0x80, // # + 0x60, // ## + 0x10, // # + 0x0C, // ## + 0x00, // + 0x00, // + 0x00, // + + // @348 '=' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x7C, // ##### + 0x00, // + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @360 '>' (7 pixels wide) + 0x00, // + 0x00, // + 0xC0, // ## + 0x20, // # + 0x18, // ## + 0x04, // # + 0x18, // ## + 0x20, // # + 0xC0, // ## + 0x00, // + 0x00, // + 0x00, // + + // @372 '?' (7 pixels wide) + 0x00, // + 0x00, // + 0x18, // ## + 0x24, // # # + 0x04, // # + 0x08, // # + 0x10, // # + 0x00, // + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @384 '@' (7 pixels wide) + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x4C, // # ## + 0x54, // # # # + 0x54, // # # # + 0x4C, // # ## + 0x40, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + + // @396 'A' (7 pixels wide) + 0x00, // + 0x30, // ## + 0x10, // # + 0x28, // # # + 0x28, // # # + 0x28, // # # + 0x7C, // ##### + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @408 'B' (7 pixels wide) + 0x00, // + 0xF8, // ##### + 0x44, // # # + 0x44, // # # + 0x78, // #### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @420 'C' (7 pixels wide) + 0x00, // + 0x3C, // #### + 0x44, // # # + 0x40, // # + 0x40, // # + 0x40, // # + 0x40, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @432 'D' (7 pixels wide) + 0x00, // + 0xF0, // #### + 0x48, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + 0x00, // + + // @444 'E' (7 pixels wide) + 0x00, // + 0xFC, // ###### + 0x44, // # # + 0x50, // # # + 0x70, // ### + 0x50, // # # + 0x40, // # + 0x44, // # # + 0xFC, // ###### + 0x00, // + 0x00, // + 0x00, // + + // @456 'F' (7 pixels wide) + 0x00, // + 0x7E, // ###### + 0x22, // # # + 0x28, // # # + 0x38, // ### + 0x28, // # # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + + // @468 'G' (7 pixels wide) + 0x00, // + 0x3C, // #### + 0x44, // # # + 0x40, // # + 0x40, // # + 0x4E, // # ### + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @480 'H' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x7C, // ##### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @492 'I' (7 pixels wide) + 0x00, // + 0x7C, // ##### + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @504 'J' (7 pixels wide) + 0x00, // + 0x3C, // #### + 0x08, // # + 0x08, // # + 0x08, // # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + 0x00, // + + // @516 'K' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x48, // # # + 0x50, // # # + 0x70, // ### + 0x48, // # # + 0x44, // # # + 0xE6, // ### ## + 0x00, // + 0x00, // + 0x00, // + + // @528 'L' (7 pixels wide) + 0x00, // + 0x70, // ### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x24, // # # + 0x24, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @540 'M' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x6C, // ## ## + 0x6C, // ## ## + 0x54, // # # # + 0x54, // # # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @552 'N' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x64, // ## # + 0x64, // ## # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x4C, // # ## + 0xEC, // ### ## + 0x00, // + 0x00, // + 0x00, // + + // @564 'O' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @576 'P' (7 pixels wide) + 0x00, // + 0x78, // #### + 0x24, // # # + 0x24, // # # + 0x24, // # # + 0x38, // ### + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + + // @588 'Q' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x1C, // ### + 0x00, // + 0x00, // + + // @600 'R' (7 pixels wide) + 0x00, // + 0xF8, // ##### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x78, // #### + 0x48, // # # + 0x44, // # # + 0xE2, // ### # + 0x00, // + 0x00, // + 0x00, // + + // @612 'S' (7 pixels wide) + 0x00, // + 0x34, // ## # + 0x4C, // # ## + 0x40, // # + 0x38, // ### + 0x04, // # + 0x04, // # + 0x64, // ## # + 0x58, // # ## + 0x00, // + 0x00, // + 0x00, // + + // @624 'T' (7 pixels wide) + 0x00, // + 0xFE, // ####### + 0x92, // # # # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @636 'U' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @648 'V' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x28, // # # + 0x28, // # # + 0x28, // # # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @660 'W' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x28, // # # + 0x00, // + 0x00, // + 0x00, // + + // @672 'X' (7 pixels wide) + 0x00, // + 0xC6, // ## ## + 0x44, // # # + 0x28, // # # + 0x10, // # + 0x10, // # + 0x28, // # # + 0x44, // # # + 0xC6, // ## ## + 0x00, // + 0x00, // + 0x00, // + + // @684 'Y' (7 pixels wide) + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x28, // # # + 0x28, // # # + 0x10, // # + 0x10, // # + 0x10, // # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @696 'Z' (7 pixels wide) + 0x00, // + 0x7C, // ##### + 0x44, // # # + 0x08, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x44, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @708 '[' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x38, // ### + 0x00, // + + // @720 '\' (7 pixels wide) + 0x00, // + 0x40, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x00, // + 0x00, // + + // @732 ']' (7 pixels wide) + 0x00, // + 0x38, // ### + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x38, // ### + 0x00, // + + // @744 '^' (7 pixels wide) + 0x00, // + 0x10, // # + 0x10, // # + 0x28, // # # + 0x44, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @756 '_' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0xFE, // ####### + + // @768 '`' (7 pixels wide) + 0x00, // + 0x10, // # + 0x08, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @780 'a' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x38, // ### + 0x44, // # # + 0x3C, // #### + 0x44, // # # + 0x44, // # # + 0x3E, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @792 'b' (7 pixels wide) + 0x00, // + 0xC0, // ## + 0x40, // # + 0x58, // # ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @804 'c' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x3C, // #### + 0x44, // # # + 0x40, // # + 0x40, // # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @816 'd' (7 pixels wide) + 0x00, // + 0x0C, // ## + 0x04, // # + 0x34, // ## # + 0x4C, // # ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3E, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @828 'e' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x38, // ### + 0x44, // # # + 0x7C, // ##### + 0x40, // # + 0x40, // # + 0x3C, // #### + 0x00, // + 0x00, // + 0x00, // + + // @840 'f' (7 pixels wide) + 0x00, // + 0x1C, // ### + 0x20, // # + 0x7C, // ##### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @852 'g' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x36, // ## ## + 0x4C, // # ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3C, // #### + 0x04, // # + 0x38, // ### + 0x00, // + + // @864 'h' (7 pixels wide) + 0x00, // + 0xC0, // ## + 0x40, // # + 0x58, // # ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @876 'i' (7 pixels wide) + 0x00, // + 0x10, // # + 0x00, // + 0x70, // ### + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @888 'j' (7 pixels wide) + 0x00, // + 0x10, // # + 0x00, // + 0x78, // #### + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x08, // # + 0x70, // ### + 0x00, // + + // @900 'k' (7 pixels wide) + 0x00, // + 0xC0, // ## + 0x40, // # + 0x5C, // # ### + 0x48, // # # + 0x70, // ### + 0x50, // # # + 0x48, // # # + 0xDC, // ## ### + 0x00, // + 0x00, // + 0x00, // + + // @912 'l' (7 pixels wide) + 0x00, // + 0x30, // ## + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @924 'm' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xE8, // ### # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0xFE, // ####### + 0x00, // + 0x00, // + 0x00, // + + // @936 'n' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0xEE, // ### ### + 0x00, // + 0x00, // + 0x00, // + + // @948 'o' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x38, // ### + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x38, // ### + 0x00, // + 0x00, // + 0x00, // + + // @960 'p' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x64, // ## # + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x78, // #### + 0x40, // # + 0xE0, // ### + 0x00, // + + // @972 'q' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x36, // ## ## + 0x4C, // # ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x3C, // #### + 0x04, // # + 0x0E, // ### + 0x00, // + + // @984 'r' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x6C, // ## ## + 0x30, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @996 's' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x3C, // #### + 0x44, // # # + 0x38, // ### + 0x04, // # + 0x44, // # # + 0x78, // #### + 0x00, // + 0x00, // + 0x00, // + + // @1008 't' (7 pixels wide) + 0x00, // + 0x00, // + 0x20, // # + 0x7C, // ##### + 0x20, // # + 0x20, // # + 0x20, // # + 0x22, // # # + 0x1C, // ### + 0x00, // + 0x00, // + 0x00, // + + // @1020 'u' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xCC, // ## ## + 0x44, // # # + 0x44, // # # + 0x44, // # # + 0x4C, // # ## + 0x36, // ## ## + 0x00, // + 0x00, // + 0x00, // + + // @1032 'v' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x44, // # # + 0x28, // # # + 0x28, // # # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + + // @1044 'w' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x54, // # # # + 0x54, // # # # + 0x54, // # # # + 0x28, // # # + 0x00, // + 0x00, // + 0x00, // + + // @1056 'x' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xCC, // ## ## + 0x48, // # # + 0x30, // ## + 0x30, // ## + 0x48, // # # + 0xCC, // ## ## + 0x00, // + 0x00, // + 0x00, // + + // @1068 'y' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0xEE, // ### ### + 0x44, // # # + 0x24, // # # + 0x28, // # # + 0x18, // ## + 0x10, // # + 0x10, // # + 0x78, // #### + 0x00, // + + // @1080 'z' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x7C, // ##### + 0x48, // # # + 0x10, // # + 0x20, // # + 0x44, // # # + 0x7C, // ##### + 0x00, // + 0x00, // + 0x00, // + + // @1092 '{' (7 pixels wide) + 0x00, // + 0x08, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x00, // + + // @1104 '|' (7 pixels wide) + 0x00, // + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + + // @1116 '}' (7 pixels wide) + 0x00, // + 0x20, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x08, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x20, // # + 0x00, // + + // @1128 '~' (7 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x24, // # # + 0x58, // # ## + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // +}; + +sFONT Font12 = { + Font12_Table, + 7, /* Width */ + 12, /* Height */ +}; + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font16.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font16.c new file mode 100644 index 000000000..e9276914d --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font16.c @@ -0,0 +1,1765 @@ +/** + ****************************************************************************** + * @file font16.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text font16 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT(c) 2014 STMicroelectronics

+ * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" +#include + +// +// Font data for Courier New 12pt +// + +const uint8_t Font16_Table[] PROGMEM = +{ + // @0 ' ' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @32 '!' (11 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @64 '"' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x1D, 0xC0, // ### ### + 0x08, 0x80, // # # + 0x08, 0x80, // # # + 0x08, 0x80, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @96 '#' (11 pixels wide) + 0x00, 0x00, // + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x3F, 0xC0, // ######## + 0x1B, 0x00, // ## ## + 0x3F, 0xC0, // ######## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @128 '$' (11 pixels wide) + 0x04, 0x00, // # + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x38, 0x00, // ### + 0x1E, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @160 '%' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x24, 0x00, // # # + 0x24, 0x00, // # # + 0x18, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x1E, 0x00, // #### + 0x31, 0x80, // ## ## + 0x02, 0x40, // # # + 0x02, 0x40, // # # + 0x01, 0x80, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @192 '&' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x1D, 0x80, // ### ## + 0x37, 0x00, // ## ### + 0x33, 0x00, // ## ## + 0x1D, 0x80, // ### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @224 ''' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @256 '(' (11 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0E, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0E, 0x00, // ### + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @288 ')' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x1C, 0x00, // ### + 0x18, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @320 '*' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x3F, 0xC0, // ######## + 0x0F, 0x00, // #### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @352 '+' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x3F, 0x80, // ####### + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @384 ',' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x0C, 0x00, // ## + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + + // @416 '-' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @448 '.' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @480 '/' (11 pixels wide) + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @512 '0' (11 pixels wide) + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @544 '1' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x3E, 0x00, // ##### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @576 '2' (11 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x19, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @608 '3' (11 pixels wide) + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x61, 0x80, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x61, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @640 '4' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x0F, 0x00, // #### + 0x0B, 0x00, // # ## + 0x1B, 0x00, // ## ## + 0x13, 0x00, // # ## + 0x33, 0x00, // ## ## + 0x3F, 0x80, // ####### + 0x03, 0x00, // ## + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @672 '5' (11 pixels wide) + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1F, 0x00, // ##### + 0x11, 0x80, // # ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x21, 0x80, // # ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @704 '6' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1C, 0x00, // ### + 0x18, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @736 '7' (11 pixels wide) + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x43, 0x00, // # ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @768 '8' (11 pixels wide) + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @800 '9' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x07, 0x00, // ### + 0x3C, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @832 ':' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @864 ';' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @896 '<' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0xC0, // ## + 0x03, 0x00, // ## + 0x04, 0x00, // # + 0x18, 0x00, // ## + 0x60, 0x00, // ## + 0x18, 0x00, // ## + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @928 '=' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @960 '>' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x60, 0x00, // ## + 0x18, 0x00, // ## + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0xC0, // ## + 0x03, 0x00, // ## + 0x04, 0x00, // # + 0x18, 0x00, // ## + 0x60, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @992 '?' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x01, 0x80, // ## + 0x07, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1024 '@' (11 pixels wide) + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x11, 0x00, // # # + 0x21, 0x00, // # # + 0x21, 0x00, // # # + 0x27, 0x00, // # ### + 0x29, 0x00, // # # # + 0x29, 0x00, // # # # + 0x27, 0x00, // # ### + 0x20, 0x00, // # + 0x11, 0x00, // # # + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1056 'A' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x0F, 0x00, // #### + 0x09, 0x00, // # # + 0x19, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x79, 0xE0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1088 'B' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1120 'C' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x40, // ##### # + 0x30, 0xC0, // ## ## + 0x60, 0x40, // ## # + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x60, 0x40, // ## # + 0x30, 0x80, // ## # + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1152 'D' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1184 'E' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x30, 0x80, // ## # + 0x30, 0x80, // ## # + 0x32, 0x00, // ## # + 0x3E, 0x00, // ##### + 0x32, 0x00, // ## # + 0x30, 0x80, // ## # + 0x30, 0x80, // ## # + 0x7F, 0x80, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1216 'F' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xC0, // ######### + 0x30, 0x40, // ## # + 0x30, 0x40, // ## # + 0x32, 0x00, // ## # + 0x3E, 0x00, // ##### + 0x32, 0x00, // ## # + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1248 'G' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1E, 0x80, // #### # + 0x31, 0x80, // ## ## + 0x60, 0x80, // ## # + 0x60, 0x00, // ## + 0x60, 0x00, // ## + 0x67, 0xC0, // ## ##### + 0x61, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1280 'H' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x80, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1312 'I' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1344 'J' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x63, 0x00, // ## ## + 0x63, 0x00, // ## ## + 0x63, 0x00, // ## ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1376 'K' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x33, 0x00, // ## ## + 0x36, 0x00, // ## ## + 0x3C, 0x00, // #### + 0x3E, 0x00, // ##### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x79, 0xC0, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1408 'L' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7E, 0x00, // ###### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x40, // ## # + 0x18, 0x40, // ## # + 0x18, 0x40, // ## # + 0x7F, 0xC0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1440 'M' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0xE0, 0xE0, // ### ### + 0x60, 0xC0, // ## ## + 0x71, 0xC0, // ### ### + 0x7B, 0xC0, // #### #### + 0x6A, 0xC0, // ## # # ## + 0x6E, 0xC0, // ## ### ## + 0x64, 0xC0, // ## # ## + 0x60, 0xC0, // ## ## + 0xFB, 0xE0, // ##### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1472 'N' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x73, 0xC0, // ### #### + 0x31, 0x80, // ## ## + 0x39, 0x80, // ### ## + 0x3D, 0x80, // #### ## + 0x35, 0x80, // ## # ## + 0x37, 0x80, // ## #### + 0x33, 0x80, // ## ### + 0x31, 0x80, // ## ## + 0x79, 0x80, // #### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1504 'O' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1536 'P' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7E, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1568 'Q' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x0C, 0xC0, // ## ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1600 'R' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x00, // ####### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3E, 0x00, // ##### + 0x33, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7C, 0xE0, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1632 'S' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x38, 0x00, // ### + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1664 'T' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x4C, 0x80, // # ## # + 0x4C, 0x80, // # ## # + 0x4C, 0x80, // # ## # + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1696 'U' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1728 'V' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x0A, 0x00, // # # + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1760 'W' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0xFB, 0xE0, // ##### ##### + 0x60, 0xC0, // ## ## + 0x64, 0xC0, // ## # ## + 0x6E, 0xC0, // ## ### ## + 0x6E, 0xC0, // ## ### ## + 0x2A, 0x80, // # # # # + 0x3B, 0x80, // ### ### + 0x3B, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1792 'X' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1824 'Y' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x79, 0xE0, // #### #### + 0x30, 0xC0, // ## ## + 0x19, 0x80, // ## ## + 0x0F, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1856 'Z' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x21, 0x80, // # ## + 0x23, 0x00, // # ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x0C, 0x00, // ## + 0x18, 0x80, // ## # + 0x30, 0x80, // ## # + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1888 '[' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1920 '\' (11 pixels wide) + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1952 ']' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1E, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1984 '^' (11 pixels wide) + 0x04, 0x00, // # + 0x0A, 0x00, // # # + 0x0A, 0x00, // # # + 0x11, 0x00, // # # + 0x20, 0x80, // # # + 0x20, 0x80, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2016 '_' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xFF, 0xE0, // ########### + + // @2048 '`' (11 pixels wide) + 0x08, 0x00, // # + 0x04, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2080 'a' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2112 'b' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x39, 0x80, // ### ## + 0x77, 0x00, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2144 'c' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1E, 0x80, // #### # + 0x31, 0x80, // ## ## + 0x60, 0x80, // ## # + 0x60, 0x00, // ## + 0x60, 0x80, // ## # + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2176 'd' (11 pixels wide) + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1D, 0x80, // ### ## + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2208 'e' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x7F, 0xC0, // ######### + 0x60, 0x00, // ## + 0x30, 0xC0, // ## ## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2240 'f' (11 pixels wide) + 0x00, 0x00, // + 0x07, 0xE0, // ###### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x80, // ####### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2272 'g' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2304 'h' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x00, // ## ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2336 'i' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2368 'j' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2400 'k' (11 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x80, // ## #### + 0x36, 0x00, // ## ## + 0x3C, 0x00, // #### + 0x3C, 0x00, // #### + 0x36, 0x00, // ## ## + 0x33, 0x00, // ## ## + 0x77, 0xC0, // ### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2432 'l' (11 pixels wide) + 0x00, 0x00, // + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2464 'm' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x36, 0xC0, // ## ## ## + 0x76, 0xE0, // ### ## ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2496 'n' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x00, // ### ### + 0x39, 0x80, // ### ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2528 'o' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x31, 0x80, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x60, 0xC0, // ## ## + 0x31, 0x80, // ## ## + 0x1F, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2560 'p' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x00, // ### ### + 0x39, 0x80, // ### ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x39, 0x80, // ### ## + 0x37, 0x00, // ## ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2592 'q' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1D, 0xC0, // ### ### + 0x33, 0x80, // ## ### + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x61, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0x80, // ### ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2624 'r' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0x80, // #### ### + 0x1C, 0xC0, // ### ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2656 's' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x31, 0x80, // ## ## + 0x3C, 0x00, // #### + 0x1F, 0x00, // ##### + 0x03, 0x80, // ### + 0x31, 0x80, // ## ## + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2688 't' (11 pixels wide) + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x7F, 0x00, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x80, // ## # + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2720 'u' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x73, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x33, 0x80, // ## ### + 0x1D, 0xC0, // ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2752 'v' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x31, 0x80, // ## ## + 0x31, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2784 'w' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xF1, 0xE0, // #### #### + 0x60, 0xC0, // ## ## + 0x64, 0xC0, // ## # ## + 0x6E, 0xC0, // ## ### ## + 0x3B, 0x80, // ### ### + 0x3B, 0x80, // ### ### + 0x31, 0x80, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2816 'x' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7B, 0xC0, // #### #### + 0x1B, 0x00, // ## ## + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x0E, 0x00, // ### + 0x1B, 0x00, // ## ## + 0x7B, 0xC0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2848 'y' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x79, 0xE0, // #### #### + 0x30, 0xC0, // ## ## + 0x19, 0x80, // ## ## + 0x19, 0x80, // ## ## + 0x0B, 0x00, // # ## + 0x0F, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2880 'z' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x21, 0x80, // # ## + 0x03, 0x00, // ## + 0x0E, 0x00, // ### + 0x18, 0x00, // ## + 0x30, 0x80, // ## # + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2912 '{' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2944 '|' (11 pixels wide) + 0x00, 0x00, // + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2976 '}' (11 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3008 '~' (11 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x18, 0x00, // ## + 0x24, 0x80, // # # # + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // +}; + +sFONT Font16 = { + Font16_Table, + 11, /* Width */ + 16, /* Height */ +}; + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font20.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font20.c new file mode 100644 index 000000000..17329b06f --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font20.c @@ -0,0 +1,2143 @@ +/** + ****************************************************************************** + * @file font20.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text font20 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT(c) 2014 STMicroelectronics

+ * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" +#include + +// Character bitmaps for Courier New 15pt +const uint8_t Font20_Table[] PROGMEM = +{ + // @0 ' ' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @40 '!' (14 pixels wide) + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x02, 0x00, // # + 0x02, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @80 '"' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1C, 0xE0, // ### ### + 0x1C, 0xE0, // ### ### + 0x1C, 0xE0, // ### ### + 0x08, 0x40, // # # + 0x08, 0x40, // # # + 0x08, 0x40, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @120 '#' (14 pixels wide) + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @160 '$' (14 pixels wide) + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x07, 0xE0, // ###### + 0x0F, 0xE0, // ####### + 0x18, 0x60, // ## ## + 0x18, 0x00, // ## + 0x1F, 0x00, // ##### + 0x0F, 0xC0, // ###### + 0x00, 0xE0, // ### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xC0, // ####### + 0x1F, 0x80, // ###### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @200 '%' (14 pixels wide) + 0x00, 0x00, // + 0x1C, 0x00, // ### + 0x22, 0x00, // # # + 0x22, 0x00, // # # + 0x22, 0x00, // # # + 0x1C, 0x60, // ### ## + 0x01, 0xE0, // #### + 0x0F, 0x80, // ##### + 0x3C, 0x00, // #### + 0x31, 0xC0, // ## ### + 0x02, 0x20, // # # + 0x02, 0x20, // # # + 0x02, 0x20, // # # + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @240 '&' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0xE0, // ##### + 0x0F, 0xE0, // ####### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x0F, 0x30, // #### ## + 0x1F, 0xF0, // ######### + 0x19, 0xE0, // ## #### + 0x18, 0xC0, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @280 ''' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x01, 0x00, // # + 0x01, 0x00, // # + 0x01, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @320 '(' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @360 ')' (14 pixels wide) + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @400 '*' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1B, 0x60, // ## ## ## + 0x1F, 0xE0, // ######## + 0x07, 0x80, // #### + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x0C, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @440 '+' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @480 ',' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @520 '-' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @560 '.' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @600 '/' (14 pixels wide) + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @640 '0' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x1F, 0xC0, // ####### + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @680 '1' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @720 '2' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @760 '3' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x3F, 0xC0, // ######## + 0x30, 0xE0, // ## ### + 0x00, 0x60, // ## + 0x00, 0xE0, // ### + 0x07, 0xC0, // ##### + 0x07, 0xC0, // ##### + 0x00, 0xE0, // ### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x60, 0xE0, // ## ### + 0x7F, 0xC0, // ######### + 0x3F, 0x80, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @800 '4' (14 pixels wide) + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x06, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0xC0, // ## ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x00, 0xC0, // ## + 0x03, 0xE0, // ##### + 0x03, 0xE0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @840 '5' (14 pixels wide) + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1F, 0x80, // ###### + 0x1F, 0xC0, // ####### + 0x18, 0xE0, // ## ### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x30, 0xE0, // ## ### + 0x3F, 0xC0, // ######## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @880 '6' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xE0, // ##### + 0x0F, 0xE0, // ####### + 0x1E, 0x00, // #### + 0x18, 0x00, // ## + 0x38, 0x00, // ### + 0x37, 0x80, // ## #### + 0x3F, 0xC0, // ######## + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xC0, // ####### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @920 '7' (14 pixels wide) + 0x00, 0x00, // + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x30, 0x60, // ## ## + 0x00, 0x60, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @960 '8' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x38, 0xE0, // ### ### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xC0, // ####### + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1000 '9' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x1F, 0xC0, // ####### + 0x38, 0xC0, // ### ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x38, 0xE0, // ### ### + 0x1F, 0xE0, // ######## + 0x0F, 0x60, // #### ## + 0x00, 0xE0, // ### + 0x00, 0xC0, // ## + 0x03, 0xC0, // #### + 0x3F, 0x80, // ####### + 0x3E, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1040 ':' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x03, 0x80, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1080 ';' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x01, 0xC0, // ### + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x04, 0x00, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1120 '<' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x30, // ## + 0x00, 0xF0, // #### + 0x03, 0xC0, // #### + 0x07, 0x00, // ### + 0x1C, 0x00, // ### + 0x78, 0x00, // #### + 0x1C, 0x00, // ### + 0x07, 0x00, // ### + 0x03, 0xC0, // #### + 0x00, 0xF0, // #### + 0x00, 0x30, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1160 '=' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xF0, // ########### + 0x7F, 0xF0, // ########### + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0xF0, // ########### + 0x7F, 0xF0, // ########### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1200 '>' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x30, 0x00, // ## + 0x3C, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x80, // ### + 0x00, 0xE0, // ### + 0x00, 0x78, // #### + 0x00, 0xE0, // ### + 0x03, 0x80, // ### + 0x0F, 0x00, // #### + 0x3C, 0x00, // #### + 0x30, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1240 '?' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0x80, // ##### + 0x1F, 0xC0, // ####### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x00, 0x60, // ## + 0x01, 0xC0, // ### + 0x03, 0x80, // ### + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1280 '@' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x80, // ### + 0x0C, 0x80, // ## # + 0x08, 0x40, // # # + 0x10, 0x40, // # # + 0x10, 0x40, // # # + 0x11, 0xC0, // # ### + 0x12, 0x40, // # # # + 0x12, 0x40, // # # # + 0x12, 0x40, // # # # + 0x11, 0xC0, // # ### + 0x10, 0x00, // # + 0x08, 0x00, // # + 0x08, 0x40, // # # + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1320 'A' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x03, 0x80, // ### + 0x06, 0xC0, // ## ## + 0x06, 0xC0, // ## ## + 0x0C, 0xC0, // ## ## + 0x0C, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x30, 0x30, // ## ## + 0x78, 0x78, // #### #### + 0x78, 0x78, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1360 'B' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x80, // ####### + 0x3F, 0xC0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xC0, // ####### + 0x1F, 0xE0, // ######## + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xE0, // ######### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1400 'C' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x0F, 0xF0, // ######## + 0x1C, 0x70, // ### ### + 0x38, 0x30, // ### ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x38, 0x30, // ### ## + 0x1C, 0x70, // ### ### + 0x0F, 0xE0, // ####### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1440 'D' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7F, 0x80, // ######## + 0x7F, 0xC0, // ######### + 0x30, 0xE0, // ## ### + 0x30, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x70, // ## ### + 0x30, 0xE0, // ## ### + 0x7F, 0xC0, // ######### + 0x7F, 0x80, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1480 'E' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1520 'F' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x19, 0x80, // ## ## + 0x1F, 0x80, // ###### + 0x1F, 0x80, // ###### + 0x19, 0x80, // ## ## + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1560 'G' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x31, 0xF8, // ## ###### + 0x31, 0xF8, // ## ###### + 0x30, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1600 'H' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1640 'I' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1680 'J' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x03, 0xF8, // ####### + 0x03, 0xF8, // ####### + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x30, 0xE0, // ## ### + 0x3F, 0xC0, // ######## + 0x0F, 0x80, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1720 'K' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3E, 0xF8, // ##### ##### + 0x3E, 0xF8, // ##### ##### + 0x18, 0xE0, // ## ### + 0x19, 0x80, // ## ## + 0x1B, 0x00, // ## ## + 0x1F, 0x00, // ##### + 0x1D, 0x80, // ### ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0x60, // ## ## + 0x3E, 0x78, // ##### #### + 0x3E, 0x38, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1760 'L' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x30, // ## ## + 0x0C, 0x30, // ## ## + 0x0C, 0x30, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1800 'M' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0x78, // #### #### + 0x78, 0x78, // #### #### + 0x38, 0x70, // ### ### + 0x3C, 0xF0, // #### #### + 0x34, 0xB0, // ## # # ## + 0x37, 0xB0, // ## #### ## + 0x37, 0xB0, // ## #### ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x30, 0x30, // ## ## + 0x7C, 0xF8, // ##### ##### + 0x7C, 0xF8, // ##### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1840 'N' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x39, 0xF0, // ### ##### + 0x3D, 0xF0, // #### ##### + 0x1C, 0x60, // ### ## + 0x1E, 0x60, // #### ## + 0x1E, 0x60, // #### ## + 0x1B, 0x60, // ## ## ## + 0x1B, 0x60, // ## ## ## + 0x19, 0xE0, // ## #### + 0x19, 0xE0, // ## #### + 0x18, 0xE0, // ## ### + 0x3E, 0xE0, // ##### ### + 0x3E, 0x60, // ##### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1880 'O' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x1C, 0xE0, // ### ### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1920 'P' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x3F, 0xE0, // ######### + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xE0, // ######## + 0x1F, 0xC0, // ####### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x3F, 0x00, // ###### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @1960 'Q' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x0F, 0xC0, // ###### + 0x1C, 0xE0, // ### ### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x07, 0xB0, // #### ## + 0x0F, 0xF0, // ######## + 0x0C, 0xE0, // ## ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2000 'R' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xC0, // ######## + 0x3F, 0xE0, // ######### + 0x18, 0x70, // ## ### + 0x18, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xE0, // ######## + 0x1F, 0xC0, // ####### + 0x18, 0xE0, // ## ### + 0x18, 0x60, // ## ## + 0x18, 0x70, // ## ### + 0x3E, 0x38, // ##### ### + 0x3E, 0x18, // ##### ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2040 'S' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0xB0, // ##### ## + 0x1F, 0xF0, // ######### + 0x38, 0x70, // ### ### + 0x30, 0x30, // ## ## + 0x38, 0x00, // ### + 0x1F, 0x80, // ###### + 0x07, 0xE0, // ###### + 0x00, 0x70, // ### + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x3F, 0xE0, // ######### + 0x37, 0xC0, // ## ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2080 'T' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0xC0, // ###### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2120 'U' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1C, 0xE0, // ### ### + 0x0F, 0xC0, // ###### + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2160 'V' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2200 'W' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x7C, 0x7C, // ##### ##### + 0x7C, 0x7C, // ##### ##### + 0x30, 0x18, // ## ## + 0x33, 0x98, // ## ### ## + 0x33, 0x98, // ## ### ## + 0x33, 0x98, // ## ### ## + 0x36, 0xD8, // ## ## ## ## + 0x16, 0xD0, // # ## ## # + 0x1C, 0x70, // ### ### + 0x1C, 0x70, // ### ### + 0x1C, 0x70, // ### ### + 0x18, 0x30, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2240 'X' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x0D, 0x80, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2280 'Y' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x18, 0x60, // ## ## + 0x0C, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x07, 0x80, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0xC0, // ###### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2320 'Z' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2360 '[' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0xC0, // #### + 0x03, 0xC0, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2400 '\' (14 pixels wide) + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x01, 0x80, // ## + 0x01, 0x80, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0x60, // ## + 0x00, 0x60, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2440 ']' (14 pixels wide) + 0x00, 0x00, // + 0x0F, 0x00, // #### + 0x0F, 0x00, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x0F, 0x00, // #### + 0x0F, 0x00, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2480 '^' (14 pixels wide) + 0x00, 0x00, // + 0x02, 0x00, // # + 0x07, 0x00, // ### + 0x0D, 0x80, // ## ## + 0x18, 0xC0, // ## ## + 0x30, 0x60, // ## ## + 0x20, 0x20, // # # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2520 '_' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0xFF, 0xFC, // ############## + 0xFF, 0xFC, // ############## + + // @2560 '`' (14 pixels wide) + 0x00, 0x00, // + 0x04, 0x00, // # + 0x03, 0x00, // ## + 0x00, 0x80, // # + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2600 'a' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0F, 0xC0, // ###### + 0x1F, 0xE0, // ######## + 0x00, 0x60, // ## + 0x0F, 0xE0, // ####### + 0x1F, 0xE0, // ######## + 0x38, 0x60, // ### ## + 0x30, 0xE0, // ## ### + 0x3F, 0xF0, // ########## + 0x1F, 0x70, // ##### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2640 'b' (14 pixels wide) + 0x00, 0x00, // + 0x70, 0x00, // ### + 0x70, 0x00, // ### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x37, 0x80, // ## #### + 0x3F, 0xE0, // ######### + 0x38, 0x60, // ### ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x60, // ### ## + 0x7F, 0xE0, // ########## + 0x77, 0x80, // ### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2680 'c' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x38, 0x30, // ### ## + 0x1F, 0xF0, // ######### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2720 'd' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x70, // ### + 0x00, 0x70, // ### + 0x00, 0x30, // ## + 0x00, 0x30, // ## + 0x07, 0xB0, // #### ## + 0x1F, 0xF0, // ######### + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x70, // ### ### + 0x1F, 0xF8, // ########## + 0x07, 0xB8, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2760 'e' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x3F, 0xF0, // ########## + 0x3F, 0xF0, // ########## + 0x30, 0x00, // ## + 0x18, 0x30, // ## ## + 0x1F, 0xF0, // ######### + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2800 'f' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0xF0, // ###### + 0x07, 0xF0, // ####### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2840 'g' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB8, // #### ### + 0x1F, 0xF8, // ########## + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x30, // ## + 0x00, 0x70, // ### + 0x0F, 0xE0, // ####### + 0x0F, 0xC0, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + + // @2880 'h' (14 pixels wide) + 0x00, 0x00, // + 0x38, 0x00, // ### + 0x38, 0x00, // ### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1B, 0xC0, // ## #### + 0x1F, 0xE0, // ######## + 0x1C, 0x60, // ### ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2920 'i' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @2960 'j' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xC0, // ####### + 0x1F, 0xC0, // ####### + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x00, 0xC0, // ## + 0x01, 0xC0, // ### + 0x3F, 0x80, // ####### + 0x3F, 0x00, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3000 'k' (14 pixels wide) + 0x00, 0x00, // + 0x38, 0x00, // ### + 0x38, 0x00, // ### + 0x18, 0x00, // ## + 0x18, 0x00, // ## + 0x1B, 0xE0, // ## ##### + 0x1B, 0xE0, // ## ##### + 0x1B, 0x00, // ## ## + 0x1E, 0x00, // #### + 0x1E, 0x00, // #### + 0x1B, 0x00, // ## ## + 0x19, 0x80, // ## ## + 0x39, 0xF0, // ### ##### + 0x39, 0xF0, // ### ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3040 'l' (14 pixels wide) + 0x00, 0x00, // + 0x1F, 0x00, // ##### + 0x1F, 0x00, // ##### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3080 'm' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x7E, 0xE0, // ###### ### + 0x7F, 0xF0, // ########### + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x33, 0x30, // ## ## ## + 0x7B, 0xB8, // #### ### ### + 0x7B, 0xB8, // #### ### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3120 'n' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3B, 0xC0, // ### #### + 0x3F, 0xE0, // ######### + 0x1C, 0x60, // ### ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3160 'o' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0x80, // #### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x07, 0x80, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3200 'p' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x77, 0x80, // ### #### + 0x7F, 0xE0, // ########## + 0x38, 0x60, // ### ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x38, 0x60, // ### ## + 0x3F, 0xE0, // ######### + 0x37, 0x80, // ## #### + 0x30, 0x00, // ## + 0x30, 0x00, // ## + 0x7C, 0x00, // ##### + 0x7C, 0x00, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3240 'q' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xB8, // #### ### + 0x1F, 0xF8, // ########## + 0x18, 0x70, // ## ### + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x30, 0x30, // ## ## + 0x18, 0x70, // ## ### + 0x1F, 0xF0, // ######### + 0x07, 0xB0, // #### ## + 0x00, 0x30, // ## + 0x00, 0x30, // ## + 0x00, 0xF8, // ##### + 0x00, 0xF8, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3280 'r' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xE0, // #### ### + 0x3D, 0xF0, // #### ##### + 0x0F, 0x30, // #### ## + 0x0E, 0x00, // ### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0xC0, // ######## + 0x3F, 0xC0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3320 's' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x07, 0xE0, // ###### + 0x1F, 0xE0, // ######## + 0x18, 0x60, // ## ## + 0x1E, 0x00, // #### + 0x0F, 0xC0, // ###### + 0x01, 0xE0, // #### + 0x18, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0x80, // ###### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3360 't' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x3F, 0xE0, // ######### + 0x3F, 0xE0, // ######### + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x00, // ## + 0x0C, 0x30, // ## ## + 0x0F, 0xF0, // ######## + 0x07, 0xC0, // ##### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3400 'u' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x38, 0xE0, // ### ### + 0x38, 0xE0, // ### ### + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0x60, // ## ## + 0x18, 0xE0, // ## ### + 0x1F, 0xF0, // ######### + 0x0F, 0x70, // #### ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3440 'v' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0D, 0x80, // ## ## + 0x07, 0x00, // ### + 0x07, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3480 'w' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x32, 0x60, // ## # ## + 0x32, 0x60, // ## # ## + 0x37, 0xE0, // ## ###### + 0x1D, 0xC0, // ### ### + 0x1D, 0xC0, // ### ### + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3520 'x' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x0C, 0xC0, // ## ## + 0x07, 0x80, // #### + 0x03, 0x00, // ## + 0x07, 0x80, // #### + 0x0C, 0xC0, // ## ## + 0x3C, 0xF0, // #### #### + 0x3C, 0xF0, // #### #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3560 'y' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x78, 0xF0, // #### #### + 0x78, 0xF0, // #### #### + 0x30, 0x60, // ## ## + 0x18, 0xC0, // ## ## + 0x18, 0xC0, // ## ## + 0x0D, 0x80, // ## ## + 0x0F, 0x80, // ##### + 0x07, 0x00, // ### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x00, // ## + 0x7F, 0x00, // ####### + 0x7F, 0x00, // ####### + 0x00, 0x00, // + 0x00, 0x00, // + + // @3600 'z' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x18, 0xC0, // ## ## + 0x01, 0x80, // ## + 0x03, 0x00, // ## + 0x06, 0x00, // ## + 0x0C, 0x60, // ## ## + 0x1F, 0xE0, // ######## + 0x1F, 0xE0, // ######## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3640 '{' (14 pixels wide) + 0x00, 0x00, // + 0x01, 0xC0, // ### + 0x03, 0xC0, // #### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x07, 0x00, // ### + 0x0E, 0x00, // ### + 0x07, 0x00, // ### + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0xC0, // #### + 0x01, 0xC0, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3680 '|' (14 pixels wide) + 0x00, 0x00, // + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x03, 0x00, // ## + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3720 '}' (14 pixels wide) + 0x00, 0x00, // + 0x1C, 0x00, // ### + 0x1E, 0x00, // #### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x07, 0x00, // ### + 0x03, 0x80, // ### + 0x07, 0x00, // ### + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x06, 0x00, // ## + 0x1E, 0x00, // #### + 0x1C, 0x00, // ### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + + // @3760 '~' (14 pixels wide) + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x0E, 0x00, // ### + 0x3F, 0x30, // ###### ## + 0x33, 0xF0, // ## ###### + 0x01, 0xE0, // #### + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // + 0x00, 0x00, // +}; + + +sFONT Font20 = { + Font20_Table, + 14, /* Width */ + 20, /* Height */ +}; + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font24.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font24.c new file mode 100644 index 000000000..360a204c5 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font24.c @@ -0,0 +1,2521 @@ +/** + ****************************************************************************** + * @file font24.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text font24 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT(c) 2014 STMicroelectronics

+ * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" +#include + +const uint8_t Font24_Table [] PROGMEM = +{ + // @0 ' ' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @72 '!' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @144 '"' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0E, 0x70, 0x00, // ### ### + 0x0E, 0x70, 0x00, // ### ### + 0x0E, 0x70, 0x00, // ### ### + 0x04, 0x20, 0x00, // # # + 0x04, 0x20, 0x00, // # # + 0x04, 0x20, 0x00, // # # + 0x04, 0x20, 0x00, // # # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @216 '#' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @288 '$' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x07, 0xB0, 0x00, // #### ## + 0x0F, 0xF0, 0x00, // ######## + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x70, 0x00, // ## ### + 0x1C, 0x00, 0x00, // ### + 0x0F, 0x80, 0x00, // ##### + 0x07, 0xE0, 0x00, // ###### + 0x00, 0xF0, 0x00, // #### + 0x18, 0x30, 0x00, // ## ## + 0x1C, 0x30, 0x00, // ### ## + 0x1C, 0x70, 0x00, // ### ### + 0x1F, 0xE0, 0x00, // ######## + 0x1B, 0xC0, 0x00, // ## #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @360 '%' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0x80, 0x00, // #### + 0x0F, 0xC0, 0x00, // ###### + 0x1C, 0xE0, 0x00, // ### ### + 0x18, 0x60, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x1C, 0xE0, 0x00, // ### ### + 0x0F, 0xF8, 0x00, // ######### + 0x07, 0xE0, 0x00, // ###### + 0x1F, 0xF0, 0x00, // ######### + 0x07, 0x38, 0x00, // ### ### + 0x06, 0x18, 0x00, // ## ## + 0x06, 0x18, 0x00, // ## ## + 0x07, 0x38, 0x00, // ### ### + 0x03, 0xF0, 0x00, // ###### + 0x01, 0xE0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @432 '&' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xF0, 0x00, // ###### + 0x07, 0xF0, 0x00, // ####### + 0x0C, 0x60, 0x00, // ## ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x07, 0x00, 0x00, // ### + 0x0F, 0x9C, 0x00, // ##### ### + 0x1D, 0xFC, 0x00, // ### ####### + 0x18, 0xF0, 0x00, // ## #### + 0x18, 0x70, 0x00, // ## ### + 0x0F, 0xFC, 0x00, // ########## + 0x07, 0xDC, 0x00, // ##### ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @504 ''' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x01, 0x00, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @576 '(' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x18, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x00, 0x70, 0x00, // ### + 0x00, 0xF0, 0x00, // #### + 0x00, 0xE0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x70, 0x00, // ### + 0x00, 0x70, 0x00, // ### + 0x00, 0x38, 0x00, // ### + 0x00, 0x18, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @648 ')' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x18, 0x00, 0x00, // ## + 0x1C, 0x00, 0x00, // ### + 0x0E, 0x00, 0x00, // ### + 0x0E, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x0F, 0x00, 0x00, // #### + 0x0E, 0x00, 0x00, // ### + 0x1C, 0x00, 0x00, // ### + 0x18, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @720 '*' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x1D, 0xB8, 0x00, // ### ## ### + 0x1F, 0xF8, 0x00, // ########## + 0x07, 0xE0, 0x00, // ###### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @792 '+' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @864 ',' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x00, 0xC0, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @936 '-' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1008 '.' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1080 '/' (17 pixels wide) + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0x60, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x0E, 0x00, 0x00, // ### + 0x0C, 0x00, 0x00, // ## + 0x1C, 0x00, 0x00, // ### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1152 '0' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x07, 0xE0, 0x00, // ###### + 0x0C, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x07, 0xE0, 0x00, // ###### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1224 '1' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x80, 0x00, // # + 0x07, 0x80, 0x00, // #### + 0x1F, 0x80, 0x00, // ###### + 0x1D, 0x80, 0x00, // ### ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1296 '2' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xC0, 0x00, // ##### + 0x1F, 0xF0, 0x00, // ######### + 0x38, 0x30, 0x00, // ### ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x06, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1368 '3' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xE0, 0x00, // ####### + 0x0C, 0x70, 0x00, // ## ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x03, 0xC0, 0x00, // #### + 0x03, 0xE0, 0x00, // ##### + 0x00, 0x70, 0x00, // ### + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x0F, 0xC0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1440 '4' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x01, 0xE0, 0x00, // #### + 0x01, 0xE0, 0x00, // #### + 0x03, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0x60, 0x00, // ## ## + 0x0C, 0x60, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x30, 0x60, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x00, 0x60, 0x00, // ## + 0x03, 0xF8, 0x00, // ####### + 0x03, 0xF8, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1512 '5' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xF0, 0x00, // ######### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xC0, 0x00, // ## #### + 0x1F, 0xF0, 0x00, // ######### + 0x1C, 0x30, 0x00, // ### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x30, 0x30, 0x00, // ## ## + 0x3F, 0xF0, 0x00, // ########## + 0x0F, 0xC0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1584 '6' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xF8, 0x00, // ##### + 0x03, 0xF8, 0x00, // ####### + 0x07, 0x00, 0x00, // ### + 0x0E, 0x00, 0x00, // ### + 0x0C, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xC0, 0x00, // ## #### + 0x1F, 0xF0, 0x00, // ######### + 0x1C, 0x30, 0x00, // ### ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x38, 0x00, // ## ### + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xE0, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1656 '7' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0x60, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0xE0, 0x00, // ### + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1728 '8' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xE0, 0x00, // ###### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x07, 0xE0, 0x00, // ###### + 0x07, 0xE0, 0x00, // ###### + 0x0C, 0x30, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x07, 0xE0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1800 '9' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xC0, 0x00, // ##### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x30, 0x00, // ### ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x38, 0x00, // ## ### + 0x0F, 0xF8, 0x00, // ######### + 0x03, 0xD8, 0x00, // #### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x1F, 0xC0, 0x00, // ####### + 0x1F, 0x00, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1872 ':' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @1944 ';' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xF0, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x02, 0x00, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2016 '<' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x1C, 0x00, // ### + 0x00, 0x3C, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x0F, 0x00, 0x00, // #### + 0x3C, 0x00, 0x00, // #### + 0xF0, 0x00, 0x00, // #### + 0x3C, 0x00, 0x00, // #### + 0x0F, 0x00, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0xF0, 0x00, // #### + 0x00, 0x3C, 0x00, // #### + 0x00, 0x1C, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2088 '=' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xFC, 0x00, // ############# + 0x7F, 0xFC, 0x00, // ############# + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xFC, 0x00, // ############# + 0x7F, 0xFC, 0x00, // ############# + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2160 '>' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x70, 0x00, 0x00, // ### + 0x78, 0x00, 0x00, // #### + 0x1E, 0x00, 0x00, // #### + 0x07, 0x80, 0x00, // #### + 0x01, 0xE0, 0x00, // #### + 0x00, 0x78, 0x00, // #### + 0x00, 0x1E, 0x00, // #### + 0x00, 0x78, 0x00, // #### + 0x01, 0xE0, 0x00, // #### + 0x07, 0x80, 0x00, // #### + 0x1E, 0x00, 0x00, // #### + 0x78, 0x00, 0x00, // #### + 0x70, 0x00, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2232 '?' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xC0, 0x00, // ##### + 0x0F, 0xE0, 0x00, // ####### + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x30, 0x00, // ## ## + 0x00, 0x70, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x03, 0xC0, 0x00, // #### + 0x03, 0x80, 0x00, // ### + 0x03, 0x00, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0x00, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2304 '@' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xE0, 0x00, // ##### + 0x07, 0xF0, 0x00, // ####### + 0x0E, 0x38, 0x00, // ### ### + 0x0C, 0x18, 0x00, // ## ## + 0x18, 0x78, 0x00, // ## #### + 0x18, 0xF8, 0x00, // ## ##### + 0x19, 0xD8, 0x00, // ## ### ## + 0x19, 0x98, 0x00, // ## ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x18, 0xF8, 0x00, // ## ##### + 0x18, 0x78, 0x00, // ## #### + 0x18, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0E, 0x18, 0x00, // ### ## + 0x07, 0xF8, 0x00, // ######## + 0x03, 0xE0, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2376 'A' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0xC0, 0x00, // ####### + 0x01, 0xC0, 0x00, // ### + 0x03, 0x60, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0F, 0xF8, 0x00, // ######### + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0xFC, 0x7F, 0x00, // ###### ####### + 0xFC, 0x7F, 0x00, // ###### ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2448 'B' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xE0, 0x00, // ########## + 0x7F, 0xF0, 0x00, // ########### + 0x18, 0x38, 0x00, // ## ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x1C, 0x00, // ## ### + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x7F, 0xF8, 0x00, // ############ + 0x7F, 0xF0, 0x00, // ########### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2520 'C' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xEC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x1C, 0x1C, 0x00, // ### ### + 0x18, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x18, 0x0C, 0x00, // ## ## + 0x1C, 0x1C, 0x00, // ### ### + 0x0F, 0xF8, 0x00, // ######### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2592 'D' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xC0, 0x00, // ######### + 0x7F, 0xF0, 0x00, // ########### + 0x18, 0x38, 0x00, // ## ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0xF0, 0x00, // ########### + 0x7F, 0xE0, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2664 'E' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xF8, 0x00, // ############ + 0x7F, 0xF8, 0x00, // ############ + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x19, 0x80, 0x00, // ## ## + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0x80, 0x00, // ###### + 0x19, 0x80, 0x00, // ## ## + 0x19, 0x98, 0x00, // ## ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7F, 0xF8, 0x00, // ############ + 0x7F, 0xF8, 0x00, // ############ + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2736 'F' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0xCC, 0x00, // ## ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0F, 0xC0, 0x00, // ###### + 0x0F, 0xC0, 0x00, // ###### + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0xC0, 0x00, // ## ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x3F, 0xC0, 0x00, // ######## + 0x3F, 0xC0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2808 'G' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xEC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x1C, 0x1C, 0x00, // ### ### + 0x18, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x30, 0xFE, 0x00, // ## ####### + 0x30, 0xFE, 0x00, // ## ####### + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x0C, 0x00, // ### ## + 0x1C, 0x1C, 0x00, // ### ### + 0x0F, 0xFC, 0x00, // ########## + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2880 'H' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @2952 'I' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3024 'J' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xFE, 0x00, // ########## + 0x07, 0xFE, 0x00, // ########## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x60, 0x00, // ## ## + 0x3F, 0xE0, 0x00, // ######### + 0x0F, 0x80, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3096 'K' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0x3E, 0x00, // ####### ##### + 0x7F, 0x3E, 0x00, // ####### ##### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x18, 0xC0, 0x00, // ## ## + 0x19, 0x80, 0x00, // ## ## + 0x1B, 0x80, 0x00, // ## ### + 0x1F, 0xC0, 0x00, // ####### + 0x1C, 0xE0, 0x00, // ### ### + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0x1F, 0x00, // ####### ##### + 0x7F, 0x1F, 0x00, // ####### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3168 'L' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0x80, 0x00, // ######## + 0x7F, 0x80, 0x00, // ######## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x7F, 0xFC, 0x00, // ############# + 0x7F, 0xFC, 0x00, // ############# + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3240 'M' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xF0, 0x0F, 0x00, // #### #### + 0xF8, 0x1F, 0x00, // ##### ##### + 0x38, 0x1C, 0x00, // ### ### + 0x3C, 0x3C, 0x00, // #### #### + 0x3C, 0x3C, 0x00, // #### #### + 0x36, 0x6C, 0x00, // ## ## ## ## + 0x36, 0x6C, 0x00, // ## ## ## ## + 0x33, 0xCC, 0x00, // ## #### ## + 0x33, 0xCC, 0x00, // ## #### ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0xFE, 0x7F, 0x00, // ####### ####### + 0xFE, 0x7F, 0x00, // ####### ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3312 'N' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0xFE, 0x00, // #### ####### + 0x78, 0xFE, 0x00, // #### ####### + 0x1C, 0x18, 0x00, // ### ## + 0x1E, 0x18, 0x00, // #### ## + 0x1F, 0x18, 0x00, // ##### ## + 0x1B, 0x18, 0x00, // ## ## ## + 0x1B, 0x98, 0x00, // ## ### ## + 0x19, 0xD8, 0x00, // ## ### ## + 0x18, 0xD8, 0x00, // ## ## ## + 0x18, 0xF8, 0x00, // ## ##### + 0x18, 0x78, 0x00, // ## #### + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0x18, 0x00, // ####### ## + 0x7F, 0x18, 0x00, // ####### ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3384 'O' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3456 'P' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF8, 0x00, // ########### + 0x0C, 0x1C, 0x00, // ## ### + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x0C, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0F, 0xF8, 0x00, // ######### + 0x0F, 0xE0, 0x00, // ####### + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x3F, 0xC0, 0x00, // ######## + 0x3F, 0xC0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3528 'Q' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x07, 0xC0, 0x00, // ##### + 0x07, 0xCC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x0C, 0x38, 0x00, // ## ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3600 'R' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0xE0, 0x00, // ########## + 0x7F, 0xF0, 0x00, // ########### + 0x18, 0x38, 0x00, // ## ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xC0, 0x00, // ####### + 0x18, 0xE0, 0x00, // ## ### + 0x18, 0x70, 0x00, // ## ### + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x7F, 0x1E, 0x00, // ####### #### + 0x7F, 0x0E, 0x00, // ####### ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3672 'S' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xD8, 0x00, // ##### ## + 0x0F, 0xF8, 0x00, // ######### + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1E, 0x00, 0x00, // #### + 0x0F, 0xC0, 0x00, // ###### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x78, 0x00, // #### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1C, 0x38, 0x00, // ### ### + 0x1F, 0xF0, 0x00, // ######### + 0x1B, 0xE0, 0x00, // ## ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3744 'T' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x0F, 0xF0, 0x00, // ######## + 0x0F, 0xF0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3816 'U' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3888 'V' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7F, 0x7F, 0x00, // ####### ####### + 0x7F, 0x7F, 0x00, // ####### ####### + 0x18, 0x0C, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x01, 0xC0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x00, 0x80, 0x00, // # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @3960 'W' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xFE, 0x3F, 0x80, // ####### ####### + 0xFE, 0x3F, 0x80, // ####### ####### + 0x30, 0x06, 0x00, // ## ## + 0x30, 0x06, 0x00, // ## ## + 0x30, 0x86, 0x00, // ## # ## + 0x19, 0xCC, 0x00, // ## ### ## + 0x19, 0xCC, 0x00, // ## ### ## + 0x1B, 0x6C, 0x00, // ## ## ## ## + 0x1B, 0x6C, 0x00, // ## ## ## ## + 0x1E, 0x7C, 0x00, // #### ##### + 0x0E, 0x38, 0x00, // ### ### + 0x0E, 0x38, 0x00, // ### ### + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4032 'X' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x03, 0xC0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0xC0, 0x00, // #### + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4104 'Y' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7C, 0x7E, 0x00, // ##### ###### + 0x7C, 0x7E, 0x00, // ##### ###### + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x03, 0xC0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x0F, 0xF0, 0x00, // ######## + 0x0F, 0xF0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4176 'Z' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x18, 0xC0, 0x00, // ## ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x06, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4248 '[' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0xF0, 0x00, // ##### + 0x01, 0xF0, 0x00, // ##### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0xF0, 0x00, // ##### + 0x01, 0xF0, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4320 '\' (17 pixels wide) + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1C, 0x00, 0x00, // ### + 0x0C, 0x00, 0x00, // ## + 0x0E, 0x00, 0x00, // ### + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0x60, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x00, 0x30, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4392 ']' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0F, 0x80, 0x00, // ##### + 0x0F, 0x80, 0x00, // ##### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x0F, 0x80, 0x00, // ##### + 0x0F, 0x80, 0x00, // ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4464 '^' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x80, 0x00, // # + 0x01, 0xC0, 0x00, // ### + 0x03, 0xE0, 0x00, // ##### + 0x07, 0x70, 0x00, // ### ### + 0x06, 0x30, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x10, 0x04, 0x00, // # # + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4536 '_' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xFF, 0xFF, 0x00, // ################ + 0xFF, 0xFF, 0x00, // ################ + + // @4608 '`' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x03, 0x00, 0x00, // ## + 0x03, 0x80, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x60, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4680 'a' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0F, 0xC0, 0x00, // ###### + 0x1F, 0xE0, 0x00, // ######## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x07, 0xF0, 0x00, // ####### + 0x1F, 0xF0, 0x00, // ######### + 0x38, 0x30, 0x00, // ### ## + 0x30, 0x30, 0x00, // ## ## + 0x30, 0x70, 0x00, // ## ### + 0x1F, 0xFC, 0x00, // ########### + 0x0F, 0xBC, 0x00, // ##### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4752 'b' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x00, 0x00, // #### + 0x78, 0x00, 0x00, // #### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xE0, 0x00, // ## ##### + 0x1F, 0xF8, 0x00, // ########## + 0x1C, 0x18, 0x00, // ### ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x1C, 0x18, 0x00, // ### ## + 0x7F, 0xF8, 0x00, // ############ + 0x7B, 0xE0, 0x00, // #### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4824 'c' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xEC, 0x00, // ##### ## + 0x0F, 0xFC, 0x00, // ########## + 0x1C, 0x1C, 0x00, // ### ### + 0x38, 0x0C, 0x00, // ### ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x38, 0x0C, 0x00, // ### ## + 0x1C, 0x1C, 0x00, // ### ### + 0x0F, 0xF8, 0x00, // ######### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4896 'd' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x78, 0x00, // #### + 0x00, 0x78, 0x00, // #### + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x07, 0xD8, 0x00, // ##### ## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x38, 0x00, // ## ### + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xFE, 0x00, // ############ + 0x07, 0xDE, 0x00, // ##### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @4968 'e' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xE0, 0x00, // ###### + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x18, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x30, 0x00, 0x00, // ## + 0x30, 0x00, 0x00, // ## + 0x18, 0x0C, 0x00, // ## ## + 0x1F, 0xFC, 0x00, // ########### + 0x07, 0xF0, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5040 'f' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0xFC, 0x00, // ####### + 0x03, 0xFC, 0x00, // ######## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x3F, 0xF8, 0x00, // ########### + 0x3F, 0xF8, 0x00, // ########### + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF0, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5112 'g' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xDE, 0x00, // ##### #### + 0x1F, 0xFE, 0x00, // ############ + 0x18, 0x38, 0x00, // ## ### + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF8, 0x00, // ########## + 0x07, 0xD8, 0x00, // ##### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x38, 0x00, // ### + 0x0F, 0xF0, 0x00, // ######## + 0x0F, 0xC0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5184 'h' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x00, 0x00, // #### + 0x78, 0x00, 0x00, // #### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x1B, 0xE0, 0x00, // ## ##### + 0x1F, 0xF0, 0x00, // ######### + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5256 'i' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0x80, 0x00, // ###### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5328 'j' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xC0, 0x00, // ## + 0x00, 0xC0, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xF0, 0x00, // ######### + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x30, 0x00, // ## + 0x00, 0x70, 0x00, // ### + 0x1F, 0xE0, 0x00, // ######## + 0x1F, 0x80, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5400 'k' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3C, 0x00, 0x00, // #### + 0x3C, 0x00, 0x00, // #### + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0xF8, 0x00, // ## ##### + 0x0C, 0xF8, 0x00, // ## ##### + 0x0C, 0xC0, 0x00, // ## ## + 0x0D, 0x80, 0x00, // ## ## + 0x0F, 0x80, 0x00, // ##### + 0x0F, 0x00, 0x00, // #### + 0x0F, 0x80, 0x00, // ##### + 0x0D, 0xC0, 0x00, // ## ### + 0x0C, 0xE0, 0x00, // ## ### + 0x3C, 0x7C, 0x00, // #### ##### + 0x3C, 0x7C, 0x00, // #### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5472 'l' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0x80, 0x00, // ###### + 0x1F, 0x80, 0x00, // ###### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x3F, 0xFC, 0x00, // ############ + 0x3F, 0xFC, 0x00, // ############ + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5544 'm' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0xF7, 0x78, 0x00, // #### ### #### + 0xFF, 0xFC, 0x00, // ############## + 0x39, 0xCC, 0x00, // ### ### ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0x31, 0x8C, 0x00, // ## ## ## + 0xFD, 0xEF, 0x00, // ###### #### #### + 0xFD, 0xEF, 0x00, // ###### #### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5616 'n' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7B, 0xE0, 0x00, // #### ##### + 0x7F, 0xF0, 0x00, // ########### + 0x1C, 0x38, 0x00, // ### ### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x7E, 0x7E, 0x00, // ###### ###### + 0x7E, 0x7E, 0x00, // ###### ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5688 'o' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x03, 0xC0, 0x00, // #### + 0x0F, 0xF0, 0x00, // ######## + 0x1C, 0x38, 0x00, // ### ### + 0x38, 0x1C, 0x00, // ### ### + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x30, 0x0C, 0x00, // ## ## + 0x38, 0x1C, 0x00, // ### ### + 0x1C, 0x38, 0x00, // ### ### + 0x0F, 0xF0, 0x00, // ######## + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5760 'p' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7B, 0xE0, 0x00, // #### ##### + 0x7F, 0xF8, 0x00, // ############ + 0x1C, 0x18, 0x00, // ### ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x18, 0x0C, 0x00, // ## ## + 0x1C, 0x18, 0x00, // ### ## + 0x1F, 0xF8, 0x00, // ########## + 0x1B, 0xE0, 0x00, // ## ##### + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x18, 0x00, 0x00, // ## + 0x7F, 0x00, 0x00, // ####### + 0x7F, 0x00, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5832 'q' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xDE, 0x00, // ##### #### + 0x1F, 0xFE, 0x00, // ############ + 0x18, 0x38, 0x00, // ## ### + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x30, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF8, 0x00, // ########## + 0x07, 0xD8, 0x00, // ##### ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0x18, 0x00, // ## + 0x00, 0xFE, 0x00, // ####### + 0x00, 0xFE, 0x00, // ####### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5904 'r' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3E, 0x78, 0x00, // ##### #### + 0x3E, 0xFC, 0x00, // ##### ###### + 0x07, 0xCC, 0x00, // ##### ## + 0x07, 0x00, 0x00, // ### + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x06, 0x00, 0x00, // ## + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF0, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @5976 's' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0xF8, 0x00, // ######## + 0x0F, 0xF8, 0x00, // ######### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x1F, 0x80, 0x00, // ###### + 0x0F, 0xF0, 0x00, // ######## + 0x00, 0xF8, 0x00, // ##### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x1F, 0xF0, 0x00, // ######### + 0x1F, 0xE0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6048 't' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x3F, 0xF0, 0x00, // ########## + 0x3F, 0xF0, 0x00, // ########## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x00, 0x00, // ## + 0x0C, 0x1C, 0x00, // ## ### + 0x07, 0xFC, 0x00, // ######### + 0x03, 0xF0, 0x00, // ###### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6120 'u' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x78, 0x00, // #### #### + 0x78, 0x78, 0x00, // #### #### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x38, 0x00, // ## ### + 0x0F, 0xFE, 0x00, // ########### + 0x07, 0xDE, 0x00, // ##### #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6192 'v' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7C, 0x3E, 0x00, // ##### ##### + 0x7C, 0x3E, 0x00, // ##### ##### + 0x18, 0x18, 0x00, // ## ## + 0x18, 0x18, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x07, 0xE0, 0x00, // ###### + 0x03, 0xC0, 0x00, // #### + 0x03, 0xC0, 0x00, // #### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6264 'w' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x78, 0x3C, 0x00, // #### #### + 0x78, 0x3C, 0x00, // #### #### + 0x31, 0x18, 0x00, // ## # ## + 0x33, 0x98, 0x00, // ## ### ## + 0x33, 0x98, 0x00, // ## ### ## + 0x1A, 0xB0, 0x00, // ## # # ## + 0x1E, 0xF0, 0x00, // #### #### + 0x1E, 0xF0, 0x00, // #### #### + 0x1C, 0x60, 0x00, // ### ## + 0x0C, 0x60, 0x00, // ## ## + 0x0C, 0x60, 0x00, // ## ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6336 'x' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x3E, 0x7C, 0x00, // ##### ##### + 0x3E, 0x7C, 0x00, // ##### ##### + 0x0C, 0x30, 0x00, // ## ## + 0x06, 0x60, 0x00, // ## ## + 0x03, 0xC0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x03, 0xC0, 0x00, // #### + 0x06, 0x60, 0x00, // ## ## + 0x0C, 0x30, 0x00, // ## ## + 0x3E, 0x7C, 0x00, // ##### ##### + 0x3E, 0x7C, 0x00, // ##### ##### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6408 'y' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x7E, 0x1F, 0x00, // ###### ##### + 0x7E, 0x1F, 0x00, // ###### ##### + 0x18, 0x0C, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x06, 0x30, 0x00, // ## ## + 0x03, 0x60, 0x00, // ## ## + 0x03, 0xE0, 0x00, // ##### + 0x01, 0xC0, 0x00, // ### + 0x00, 0xC0, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x3F, 0xC0, 0x00, // ######## + 0x3F, 0xC0, 0x00, // ######## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6480 'z' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x18, 0x30, 0x00, // ## ## + 0x18, 0x60, 0x00, // ## ## + 0x00, 0xC0, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x00, 0x00, // ## + 0x06, 0x18, 0x00, // ## ## + 0x0C, 0x18, 0x00, // ## ## + 0x1F, 0xF8, 0x00, // ########## + 0x1F, 0xF8, 0x00, // ########## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6552 '{' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0xE0, 0x00, // ### + 0x01, 0xE0, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x03, 0x80, 0x00, // ### + 0x07, 0x00, 0x00, // ### + 0x03, 0x80, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0xE0, 0x00, // #### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6624 '|' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6696 '}' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x07, 0x00, 0x00, // ### + 0x07, 0x80, 0x00, // #### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0xC0, 0x00, // ### + 0x00, 0xE0, 0x00, // ### + 0x01, 0xC0, 0x00, // ### + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x01, 0x80, 0x00, // ## + 0x07, 0x80, 0x00, // #### + 0x07, 0x00, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + + // @6768 '~' (17 pixels wide) + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x0E, 0x00, 0x00, // ### + 0x1F, 0x18, 0x00, // ##### ## + 0x3B, 0xB8, 0x00, // ### ### ### + 0x31, 0xF0, 0x00, // ## ##### + 0x00, 0xE0, 0x00, // ### + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // + 0x00, 0x00, 0x00, // +}; + +sFONT Font24 = { + Font24_Table, + 17, /* Width */ + 24, /* Height */ +}; + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font8.c b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font8.c new file mode 100644 index 000000000..f1d5b4dfc --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/font8.c @@ -0,0 +1,1005 @@ +/** + ****************************************************************************** + * @file Font8.c + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief This file provides text Font8 for STM32xx-EVAL's LCD driver. + ****************************************************************************** + * @attention + * + *

© COPYRIGHT(c) 2014 STMicroelectronics

+ * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "fonts.h" +#include + +// +// Font data for Courier New 12pt +// + +const uint8_t Font8_Table[] PROGMEM = +{ + // @0 ' ' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @8 '!' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @16 '"' (5 pixels wide) + 0x50, // # # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @24 '#' (5 pixels wide) + 0x28, // # # + 0x50, // # # + 0xF8, // ##### + 0x50, // # # + 0xF8, // ##### + 0x50, // # # + 0xA0, // # # + 0x00, // + + // @32 '$' (5 pixels wide) + 0x20, // # + 0x30, // ## + 0x60, // ## + 0x30, // ## + 0x10, // # + 0x60, // ## + 0x20, // # + 0x00, // + + // @40 '%' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x18, // ## + 0x60, // ## + 0x10, // # + 0x10, // # + 0x00, // + 0x00, // + + // @48 '&' (5 pixels wide) + 0x00, // + 0x38, // ### + 0x20, // # + 0x60, // ## + 0x50, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @56 ''' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @64 '(' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @72 ')' (5 pixels wide) + 0x40, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x40, // # + 0x00, // + + // @80 '*' (5 pixels wide) + 0x20, // # + 0x70, // ### + 0x20, // # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @88 '+' (5 pixels wide) + 0x00, // + 0x20, // # + 0x20, // # + 0xF8, // ##### + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + + // @96 ',' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x10, // # + 0x20, // # + 0x20, // # + 0x00, // + + // @104 '-' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @112 '.' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @120 '/' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x40, // # + 0x40, // # + 0x80, // # + 0x00, // + + // @128 '0' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x50, // # # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @136 '1' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @144 '2' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x40, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @152 '3' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x10, // # + 0x20, // # + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @160 '4' (5 pixels wide) + 0x10, // # + 0x30, // ## + 0x50, // # # + 0x78, // #### + 0x10, // # + 0x38, // ### + 0x00, // + 0x00, // + + // @168 '5' (5 pixels wide) + 0x70, // ### + 0x40, // # + 0x60, // ## + 0x10, // # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @176 '6' (5 pixels wide) + 0x30, // ## + 0x40, // # + 0x60, // ## + 0x50, // # # + 0x50, // # # + 0x60, // ## + 0x00, // + 0x00, // + + // @184 '7' (5 pixels wide) + 0x70, // ### + 0x50, // # # + 0x10, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + 0x00, // + + // @192 '8' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x20, // # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @200 '9' (5 pixels wide) + 0x30, // ## + 0x50, // # # + 0x50, // # # + 0x30, // ## + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @208 ':' (5 pixels wide) + 0x00, // + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @216 ';' (5 pixels wide) + 0x00, // + 0x00, // + 0x10, // # + 0x00, // + 0x10, // # + 0x20, // # + 0x00, // + 0x00, // + + // @224 '<' (5 pixels wide) + 0x00, // + 0x10, // # + 0x20, // # + 0xC0, // ## + 0x20, // # + 0x10, // # + 0x00, // + 0x00, // + + // @232 '=' (5 pixels wide) + 0x00, // + 0x70, // ### + 0x00, // + 0x70, // ### + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @240 '>' (5 pixels wide) + 0x00, // + 0x40, // # + 0x20, // # + 0x18, // ## + 0x20, // # + 0x40, // # + 0x00, // + 0x00, // + + // @248 '?' (5 pixels wide) + 0x20, // # + 0x50, // # # + 0x10, // # + 0x20, // # + 0x00, // + 0x20, // # + 0x00, // + 0x00, // + + // @256 '@' (5 pixels wide) + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x58, // # ## + 0x48, // # # + 0x40, // # + 0x38, // ### + 0x00, // + + // @264 'A' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x50, // # # + 0x70, // ### + 0x88, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @272 'B' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @280 'C' (5 pixels wide) + 0x70, // ### + 0x50, // # # + 0x40, // # + 0x40, // # + 0x40, // # + 0x30, // ## + 0x00, // + 0x00, // + + // @288 'D' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @296 'E' (5 pixels wide) + 0xF8, // ##### + 0x48, // # # + 0x60, // ## + 0x40, // # + 0x48, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @304 'F' (5 pixels wide) + 0xF8, // ##### + 0x48, // # # + 0x60, // ## + 0x40, // # + 0x40, // # + 0xE0, // ### + 0x00, // + 0x00, // + + // @312 'G' (5 pixels wide) + 0x70, // ### + 0x40, // # + 0x40, // # + 0x58, // # ## + 0x50, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @320 'H' (5 pixels wide) + 0xE8, // ### # + 0x48, // # # + 0x78, // #### + 0x48, // # # + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @328 'I' (5 pixels wide) + 0x70, // ### + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @336 'J' (5 pixels wide) + 0x38, // ### + 0x10, // # + 0x10, // # + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x00, // + 0x00, // + + // @344 'K' (5 pixels wide) + 0xD8, // ## ## + 0x50, // # # + 0x60, // ## + 0x70, // ### + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @352 'L' (5 pixels wide) + 0xE0, // ### + 0x40, // # + 0x40, // # + 0x40, // # + 0x48, // # # + 0xF8, // ##### + 0x00, // + 0x00, // + + // @360 'M' (5 pixels wide) + 0xD8, // ## ## + 0xD8, // ## ## + 0xD8, // ## ## + 0xA8, // # # # + 0x88, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @368 'N' (5 pixels wide) + 0xD8, // ## ## + 0x68, // ## # + 0x68, // ## # + 0x58, // # ## + 0x58, // # ## + 0xE8, // ### # + 0x00, // + 0x00, // + + // @376 'O' (5 pixels wide) + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @384 'P' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x40, // # + 0xE0, // ### + 0x00, // + 0x00, // + + // @392 'Q' (5 pixels wide) + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x18, // ## + 0x00, // + + // @400 'R' (5 pixels wide) + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @408 'S' (5 pixels wide) + 0x70, // ### + 0x50, // # # + 0x20, // # + 0x10, // # + 0x50, // # # + 0x70, // ### + 0x00, // + 0x00, // + + // @416 'T' (5 pixels wide) + 0xF8, // ##### + 0xA8, // # # # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @424 'U' (5 pixels wide) + 0xD8, // ## ## + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @432 'V' (5 pixels wide) + 0xD8, // ## ## + 0x88, // # # + 0x48, // # # + 0x50, // # # + 0x50, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @440 'W' (5 pixels wide) + 0xD8, // ## ## + 0x88, // # # + 0xA8, // # # # + 0xA8, // # # # + 0xA8, // # # # + 0x50, // # # + 0x00, // + 0x00, // + + // @448 'X' (5 pixels wide) + 0xD8, // ## ## + 0x50, // # # + 0x20, // # + 0x20, // # + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @456 'Y' (5 pixels wide) + 0xD8, // ## ## + 0x88, // # # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @464 'Z' (5 pixels wide) + 0x78, // #### + 0x48, // # # + 0x10, // # + 0x20, // # + 0x48, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @472 '[' (5 pixels wide) + 0x30, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x30, // ## + 0x00, // + + // @480 '\' (5 pixels wide) + 0x80, // # + 0x40, // # + 0x40, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @488 ']' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x60, // ## + 0x00, // + + // @496 '^' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @504 '_' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0xF8, // ##### + + // @512 '`' (5 pixels wide) + 0x20, // # + 0x10, // # + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + 0x00, // + + // @520 'a' (5 pixels wide) + 0x00, // + 0x00, // + 0x30, // ## + 0x10, // # + 0x70, // ### + 0x78, // #### + 0x00, // + 0x00, // + + // @528 'b' (5 pixels wide) + 0xC0, // ## + 0x40, // # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xF0, // #### + 0x00, // + 0x00, // + + // @536 'c' (5 pixels wide) + 0x00, // + 0x00, // + 0x70, // ### + 0x40, // # + 0x40, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @544 'd' (5 pixels wide) + 0x18, // ## + 0x08, // # + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x00, // + 0x00, // + + // @552 'e' (5 pixels wide) + 0x00, // + 0x00, // + 0x70, // ### + 0x70, // ### + 0x40, // # + 0x30, // ## + 0x00, // + 0x00, // + + // @560 'f' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x70, // ### + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @568 'g' (5 pixels wide) + 0x00, // + 0x00, // + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x08, // # + 0x30, // ## + + // @576 'h' (5 pixels wide) + 0xC0, // ## + 0x40, // # + 0x70, // ### + 0x48, // # # + 0x48, // # # + 0xE8, // ### # + 0x00, // + 0x00, // + + // @584 'i' (5 pixels wide) + 0x20, // # + 0x00, // + 0x60, // ## + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @592 'j' (5 pixels wide) + 0x20, // # + 0x00, // + 0x70, // ### + 0x10, // # + 0x10, // # + 0x10, // # + 0x10, // # + 0x70, // ### + + // @600 'k' (5 pixels wide) + 0xC0, // ## + 0x40, // # + 0x58, // # ## + 0x70, // ### + 0x50, // # # + 0xD8, // ## ## + 0x00, // + 0x00, // + + // @608 'l' (5 pixels wide) + 0x60, // ## + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @616 'm' (5 pixels wide) + 0x00, // + 0x00, // + 0xD0, // ## # + 0xA8, // # # # + 0xA8, // # # # + 0xA8, // # # # + 0x00, // + 0x00, // + + // @624 'n' (5 pixels wide) + 0x00, // + 0x00, // + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0xC8, // ## # + 0x00, // + 0x00, // + + // @632 'o' (5 pixels wide) + 0x00, // + 0x00, // + 0x30, // ## + 0x48, // # # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @640 'p' (5 pixels wide) + 0x00, // + 0x00, // + 0xF0, // #### + 0x48, // # # + 0x48, // # # + 0x70, // ### + 0x40, // # + 0xE0, // ### + + // @648 'q' (5 pixels wide) + 0x00, // + 0x00, // + 0x38, // ### + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x08, // # + 0x18, // ## + + // @656 'r' (5 pixels wide) + 0x00, // + 0x00, // + 0x78, // #### + 0x20, // # + 0x20, // # + 0x70, // ### + 0x00, // + 0x00, // + + // @664 's' (5 pixels wide) + 0x00, // + 0x00, // + 0x30, // ## + 0x20, // # + 0x10, // # + 0x60, // ## + 0x00, // + 0x00, // + + // @672 't' (5 pixels wide) + 0x00, // + 0x40, // # + 0xF0, // #### + 0x40, // # + 0x48, // # # + 0x30, // ## + 0x00, // + 0x00, // + + // @680 'u' (5 pixels wide) + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x48, // # # + 0x48, // # # + 0x38, // ### + 0x00, // + 0x00, // + + // @688 'v' (5 pixels wide) + 0x00, // + 0x00, // + 0xC8, // ## # + 0x48, // # # + 0x30, // ## + 0x30, // ## + 0x00, // + 0x00, // + + // @696 'w' (5 pixels wide) + 0x00, // + 0x00, // + 0xD8, // ## ## + 0xA8, // # # # + 0xA8, // # # # + 0x50, // # # + 0x00, // + 0x00, // + + // @704 'x' (5 pixels wide) + 0x00, // + 0x00, // + 0x48, // # # + 0x30, // ## + 0x30, // ## + 0x48, // # # + 0x00, // + 0x00, // + + // @712 'y' (5 pixels wide) + 0x00, // + 0x00, // + 0xD8, // ## ## + 0x50, // # # + 0x50, // # # + 0x20, // # + 0x20, // # + 0x60, // ## + + // @720 'z' (5 pixels wide) + 0x00, // + 0x00, // + 0x78, // #### + 0x50, // # # + 0x28, // # # + 0x78, // #### + 0x00, // + 0x00, // + + // @728 '{' (5 pixels wide) + 0x10, // # + 0x20, // # + 0x20, // # + 0x60, // ## + 0x20, // # + 0x20, // # + 0x10, // # + 0x00, // + + // @736 '|' (5 pixels wide) + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x20, // # + 0x00, // + + // @744 '}' (5 pixels wide) + 0x40, // # + 0x20, // # + 0x20, // # + 0x30, // ## + 0x20, // # + 0x20, // # + 0x40, // # + 0x00, // + + // @752 '~' (5 pixels wide) + 0x00, // + 0x00, // + 0x00, // + 0x28, // # # + 0x50, // # # + 0x00, // + 0x00, // + 0x00, // +}; + +sFONT Font8 = { + Font8_Table, + 5, /* Width */ + 8, /* Height */ +}; + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/fonts.h b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/fonts.h new file mode 100644 index 000000000..4530308b8 --- /dev/null +++ b/lib/esp-epaper-29-ws-20171230-gemu-1.0/src/fonts.h @@ -0,0 +1,75 @@ +/** + ****************************************************************************** + * @file fonts.h + * @author MCD Application Team + * @version V1.0.0 + * @date 18-February-2014 + * @brief Header for fonts.c file + ****************************************************************************** + * @attention + * + *

© COPYRIGHT(c) 2014 STMicroelectronics

+ * + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. Neither the name of STMicroelectronics nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR + * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER + * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + ****************************************************************************** + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __FONTS_H +#define __FONTS_H + +/* Max size of bitmap will based on a font24 (17x24) */ +#define MAX_HEIGHT_FONT 24 +#define MAX_WIDTH_FONT 17 +#define OFFSET_BITMAP 54 + +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include + +typedef struct _tFont +{ + const uint8_t *table; + uint16_t Width; + uint16_t Height; + +} sFONT; + +extern sFONT Font24; +extern sFONT Font20; +extern sFONT Font16; +extern sFONT Font12; +extern sFONT Font8; + +#ifdef __cplusplus +} +#endif + +#endif /* __FONTS_H */ + + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/sonoff/_changelog.ino b/sonoff/_changelog.ino index 91bbd83a8..ec5606065 100644 --- a/sonoff/_changelog.ino +++ b/sonoff/_changelog.ino @@ -1,4 +1,65 @@ -/* 6.3.0 20181030 +/* 6.4.0 20181217 + * Change GUI Configure Module by using AJAX for data fetch to cut page size (and memory use) by 40% + In case of web page errors clear your browser cache or do Page Reload (F5 or Ctrl+R) + * Change enforcing flashmode dout but it is still mandatory + * Change bootcount update (being first) flash write to 10 seconds after restart + * Change display and epaper drivers + * Change command WebSend Host header field from IP address to hostname (#4331) + * Change log buffer size from 512 to 520 to accommodate http sensor data (#4354) + * Change default WIFI_CONFIG_TOOL from WIFI_WAIT to WIFI_RETRY in my_user_config.h (#4400) + * Change webgui refresh time delay for Save Settings and local OTA Upload (#4423) + * Change SR-04 driver to use NewPing library (#4488) + * Change MCP230xx driver to support interrupt retention over teleperiod (#4547) + * Change support for MPU6050 using DMP (#4581) + * Fix unintended function overload of WifiState + * Fix wifi connection errors using wifi disconnect and ESP.reset instead of ESP.restart + * Fix Sonoff Pow R2 and Sonoff S31 Serial interface hang caused by Sonoff Basic R2 driver delay implementation (and possibly core bug) + * Fix MQTT connection error after restart + * Fix wifi re-scan connection baseline + * Fix possible strncat buffer overflows + * Fix intermittent Pzem sensor energy overflow calculation error + * Fix shelly2 ghost switching caused by lack of pull-up inputs (#4255) + * Fix hardware serial pin configuration. To keep using hardware serial swap current Rx/Tx pin configuration only (#4280) + * Fix MqttRetry values above 255 seconds (#4424) + * Fix WifiManager functionality on initial installation (#4433) + * Fix ArduinoOTA for Core 2.5.0 (#4620) + * Add minutes to commands Timezone to allow all possible world timezones + * Add more strict checks for GPIO selections + * Add code image and optional commit number to version + * Add dynamic delay to main loop providing time for wifi background tasks + * Add additional start-up delay during initial wifi connection + * Add support for decoding Theo V2 sensors as documented on https://sidweb.nl using 434MHz RF sensor receiver + * Add support for decoding Alecto V2 sensors like ACH2010, WS3000 and DKW2012 weather stations using 868MHz RF sensor receiver + * Add user definition of defines WIFI_RSSI_THRESHOLD (default 10) and WIFI_RESCAN_MINUTES (default 44) + * Add command SetOption58 0/1 to enable IR raw data info in JSON message (#2116) + * Add command IRSend |0,,,.. to allow raw data transmission (#2116) + * Add command SetOption56 0/1 to enable wifi network scan and select highest RSSI (#3173) + * Add command SetOption57 0/1 to enable wifi network re-scan every 44 minutes with a rssi threshold of 10 to select highest RSSI (#3173) + * Add default sleep 1 to sonoff-basic to lower energy consumption (#4217) + * Add wifi status to Tuya (#4221) + * Add delays to reduce CPU usage at boot time (#4233) + * Add command SetOption24 0/1 to select pressure unit as hPa or mmHg (#4241) + * Add optional hardware serial when GPIO13(Rx) and GPIO15(Tx) are selected removing hardware serial from GPIO01(Tx) and GPIO03(Rx) (#4288) + * Add support for Gosund SP1 v2.3 Power Socket with Energy Monitoring (#4297) + * Add support for Armtronix dimmers. See wiki for info (#4321) + * Add to command WebSend option to send a direct path when command starts with a slash (#4329) + * Add support for LG HVac and IrRemote (#4377) + * Add initial support for Hass sensor discovery (#4380) + * Add support for Fujitsu HVac and IrRemote (#4387) + * Add support for I2C MGC3130 Electric Field Effect sensor by Christian Baars (#3774, #4404) + * Add command CalcRes to set number of decimals (0 - 7) used in commands ADD, SUB, MULT and SCALE (#4420) + * Add CPU average load to state message (#4431) + * Add command SetOption59 0/1 to change state topic from tele/STATE to stat/RESULT (#4450) + * Add support for SM Smart Wifi Dimmer PS-16-DZ (#4465) + * Add support for Teckin US Power Socket with Energy Monitoring (#4481) + * Add command SetOption60 0/1 to select dynamic sleep (0) or sleep (1) (#4497) + * Add support for iFan02 Fanspeed in Domoticz using a selector (#4517) + * Add support for GPIO02 for newer Sonoff Basic (#4518) + * Add Announce Switches to MQTT Discovery (#4531) + * Add support for SDM220 (#3610) + * Add support for Manzoku Power Strip (#4590) + * + * 6.3.0 20181030 * Change web Configure Module GPIO drop down list order for better readability * Change status JSON message providing more switch and retain information * Change xsns_17_senseair.ino to use TasmotaModbus library diff --git a/sonoff/core_esp8266_timer.c b/sonoff/core_esp8266_timer.c index 478471a36..fdc7342e5 100644 --- a/sonoff/core_esp8266_timer.c +++ b/sonoff/core_esp8266_timer.c @@ -46,7 +46,7 @@ void ICACHE_RAM_ATTR timer1_isr_handler(void *para){ } } -void ICACHE_RAM_ATTR timer1_isr_init(){ +void ICACHE_RAM_ATTR timer1_isr_init(void){ ETS_FRC_TIMER1_INTR_ATTACH(timer1_isr_handler, NULL); } @@ -55,7 +55,7 @@ void timer1_attachInterrupt(timercallback userFunc) { ETS_FRC1_INTR_ENABLE(); } -void ICACHE_RAM_ATTR timer1_detachInterrupt() { +void ICACHE_RAM_ATTR timer1_detachInterrupt(void) { timer1_user_cb = 0; TEIE &= ~TEIE1;//edge int disable ETS_FRC1_INTR_DISABLE(); @@ -71,7 +71,7 @@ void ICACHE_RAM_ATTR timer1_write(uint32_t ticks){ if ((T1C & (1 << TCIT)) == 0) TEIE |= TEIE1;//edge int enable } -void ICACHE_RAM_ATTR timer1_disable(){ +void ICACHE_RAM_ATTR timer1_disable(void){ T1C = 0; T1I = 0; } @@ -92,7 +92,7 @@ void ICACHE_RAM_ATTR timer0_isr_handler(void* para){ } } -void timer0_isr_init(){ +void timer0_isr_init(void){ ETS_CCOMPARE0_INTR_ATTACH(timer0_isr_handler, NULL); } @@ -101,7 +101,7 @@ void timer0_attachInterrupt(timercallback userFunc) { ETS_CCOMPARE0_ENABLE(); } -void ICACHE_RAM_ATTR timer0_detachInterrupt() { +void ICACHE_RAM_ATTR timer0_detachInterrupt(void) { timer0_user_cb = NULL; ETS_CCOMPARE0_DISABLE(); } diff --git a/sonoff/core_esp8266_wiring_digital.c b/sonoff/core_esp8266_wiring_digital.c index 06323c1ce..b51a85aad 100644 --- a/sonoff/core_esp8266_wiring_digital.c +++ b/sonoff/core_esp8266_wiring_digital.c @@ -188,7 +188,7 @@ extern void ICACHE_RAM_ATTR __detachInterrupt(uint8_t pin) { } } -void initPins() { +void initPins(void) { //Disable UART interrupts system_set_os_print(0); U0IE = 0; diff --git a/sonoff/core_esp8266_wiring_pwm.c b/sonoff/core_esp8266_wiring_pwm.c index 0ef8cb67f..92d73a4b7 100644 --- a/sonoff/core_esp8266_wiring_pwm.c +++ b/sonoff/core_esp8266_wiring_pwm.c @@ -84,7 +84,7 @@ uint32_t pwm_get_mask(uint16_t value) return mask; } -void prep_pwm_steps() +void prep_pwm_steps(void) { if(pwm_mask == 0) { return; @@ -123,7 +123,7 @@ void prep_pwm_steps() pwm_steps_changed = 1; } -void ICACHE_RAM_ATTR pwm_timer_isr() //103-138 +void ICACHE_RAM_ATTR pwm_timer_isr(void) //103-138 { struct pwm_isr_table *table = &(_pwm_isr_data.tables[_pwm_isr_data.active]); static uint8_t current_step = 0; @@ -160,7 +160,7 @@ void ICACHE_RAM_ATTR pwm_timer_isr() //103-138 TEIE |= TEIE1;//13 } -void pwm_start_timer() +void pwm_start_timer(void) { timer1_disable(); ETS_FRC_TIMER1_INTR_ATTACH(NULL, NULL); diff --git a/sonoff/i18n.h b/sonoff/i18n.h index 3067271e9..b1bec3289 100644 --- a/sonoff/i18n.h +++ b/sonoff/i18n.h @@ -59,9 +59,12 @@ #define D_JSON_ERASE "Erase" #define D_JSON_ERROR "Error" #define D_JSON_EVERY "Every" +#define D_JSON_EXPORT_ACTIVE "ExportActivePower" +#define D_JSON_EXPORT_REACTIVE "ExportReactivePower" #define D_JSON_FAILED "Failed" #define D_JSON_FALLBACKTOPIC "FallbackTopic" #define D_JSON_FEATURES "Features" +#define D_JSON_FLASHCHIPID "FlashChipId" #define D_JSON_FLASHMODE "FlashMode" #define D_JSON_FLASHSIZE "FlashSize" #define D_JSON_FREEMEMORY "Free" @@ -79,6 +82,8 @@ #define D_JSON_I2CSCAN_NO_DEVICES_FOUND "No devices found" #define D_JSON_ID "Id" #define D_JSON_ILLUMINANCE "Illuminance" +#define D_JSON_IMPORT_ACTIVE "ImportActivePower" +#define D_JSON_IMPORT_REACTIVE "ImportReactivePower" #define D_JSON_INFRARED "Infrared" #define D_JSON_UNKNOWN "Unknown" #define D_JSON_LIGHT "Light" @@ -92,6 +97,7 @@ #define D_JSON_NONE "None" #define D_JSON_OR "or" #define D_JSON_PERIOD "Period" +#define D_JSON_PHASE_ANGLE "PhaseAngle" #define D_JSON_POWERFACTOR "Factor" #define D_JSON_POWERUSAGE "Power" #define D_JSON_ACTIVE_POWERUSAGE "ActivePower" @@ -99,6 +105,7 @@ #define D_JSON_REACTIVE_POWERUSAGE "ReactivePower" #define D_JSON_PRESSURE "Pressure" #define D_JSON_PRESSUREATSEALEVEL "SeaPressure" +#define D_JSON_PRESSURE_UNIT "PressureUnit" #define D_JSON_PROGRAMFLASHSIZE "ProgramFlashSize" #define D_JSON_PROGRAMSIZE "ProgramSize" #define D_JSON_RESET "Reset" @@ -127,6 +134,7 @@ #define D_JSON_TIME "Time" #define D_JSON_TODAY "Today" #define D_JSON_TOTAL "Total" +#define D_JSON_TOTAL_REACTIVE "TotalReactivePower" #define D_JSON_TOTAL_START_TIME "TotalStartTime" #define D_JSON_TVOC "TVOC" #define D_JSON_TYPE "Type" @@ -328,15 +336,19 @@ #define D_CMND_SPEED "Speed" #define D_CMND_WAKEUP "Wakeup" #define D_CMND_WAKEUPDURATION "WakeUpDuration" +#define D_CMND_WHITE "White" #define D_CMND_WIDTH "Width" // Commands xdrv_05_irremote.ino #define D_CMND_IRSEND "IRSend" #define D_JSON_INVALID_JSON "Invalid JSON" + #define D_JSON_INVALID_RAWDATA "Invalid RawData" + #define D_JSON_NO_BUFFER_SPACE "No buffer space" #define D_JSON_PROTOCOL_NOT_SUPPORTED "Protocol not supported" #define D_JSON_IR_PROTOCOL "Protocol" #define D_JSON_IR_BITS "Bits" #define D_JSON_IR_DATA "Data" + #define D_JSON_IR_RAWDATA "RawData" #define D_CMND_IRHVAC "IRHVAC" #define D_JSON_IRHVAC_VENDOR "VENDOR" #define D_JSON_IRHVAC_POWER "POWER" @@ -415,6 +427,7 @@ enum UnitNames { UNIT_LUX, UNIT_MICROSECOND, UNIT_MILLIAMPERE, + UNIT_MILLIMETER_MERCURY, UNIT_MILLISECOND, UNIT_MINUTE, UNIT_PPB, @@ -436,6 +449,7 @@ const char kUnitNames[] PROGMEM = D_UNIT_LUX "|" D_UNIT_MICROSECOND "|" D_UNIT_MILLIAMPERE "|" + D_UNIT_MILLIMETER_MERCURY "|" D_UNIT_MILLISECOND "|" D_UNIT_MINUTE "|" D_UNIT_PARTS_PER_BILLION "|" @@ -514,6 +528,8 @@ const char kPrefixes[3][PRFX_MAX_STRING_LENGTH] PROGMEM = { D_STAT, D_TELE }; +const char kCodeImage[] PROGMEM = "sonoff|minimal|classic|sensors|knx|basic|display"; + // support.ino static const char kMonthNames[] = D_MONTH3LIST; @@ -527,9 +543,10 @@ const char kOptionBlinkOff[] PROGMEM = "BLINKOFF|" D_BLINKOFF ; #ifdef USE_WEBSERVER const char HTTP_SNS_TEMP[] PROGMEM = "%s{s}%s " D_TEMPERATURE "{m}%s°%c{e}"; // {s} = , {m} = , {e} = const char HTTP_SNS_HUM[] PROGMEM = "%s{s}%s " D_HUMIDITY "{m}%s%%{e}"; // {s} = , {m} = , {e} = -const char HTTP_SNS_PRESSURE[] PROGMEM = "%s{s}%s " D_PRESSURE "{m}%s " D_UNIT_PRESSURE "{e}"; // {s} = , {m} = , {e} = -const char HTTP_SNS_SEAPRESSURE[] PROGMEM = "%s{s}%s " D_PRESSUREATSEALEVEL "{m}%s " D_UNIT_PRESSURE "{e}"; // {s} = , {m} = , {e} = +const char HTTP_SNS_PRESSURE[] PROGMEM = "%s{s}%s " D_PRESSURE "{m}%s %s{e}"; // {s} = , {m} = , {e} = +const char HTTP_SNS_SEAPRESSURE[] PROGMEM = "%s{s}%s " D_PRESSUREATSEALEVEL "{m}%s %s{e}"; // {s} = , {m} = , {e} = const char HTTP_SNS_ANALOG[] PROGMEM = "%s{s}%s " D_ANALOG_INPUT "%d{m}%d{e}"; // {s} = , {m} = , {e} = +const char HTTP_SNS_ILLUMINANCE[] PROGMEM = "%s{s}%s " D_ILLUMINANCE "{m}%d " D_UNIT_LUX "{e}"; // {s} = , {m} = , {e} = #if defined(USE_MHZ19) || defined(USE_SENSEAIR) const char HTTP_SNS_CO2[] PROGMEM = "%s{s}%s " D_CO2 "{m}%d " D_UNIT_PARTS_PER_MILLION "{e}"; // {s} = , {m} = , {e} = diff --git a/sonoff/language/bg-BG.h b/sonoff/language/bg-BG.h index d91c66bda..621a0fdb7 100644 --- a/sonoff/language/bg-BG.h +++ b/sonoff/language/bg-BG.h @@ -28,7 +28,7 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v6.2.1.8 + * Updated until v6.2.1.20 \*********************************************************************/ //#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Размер на флаш паметта за програми" #define D_PROGRAM_SIZE "Размер на програмата" #define D_PROJECT "Проект" +#define D_RAIN "Rain" #define D_RECEIVED "Получено" #define D_RESTART "Рестарт" #define D_RESTARTING "Рестартиране" @@ -174,7 +175,7 @@ #define D_UV_POWER "UV мощност" #define D_VERSION "Версия" #define D_VOLTAGE "Напрежение" -#define D_WEIGHT "Weight" +#define D_WEIGHT "Тегло" #define D_WARMLIGHT "Топла" #define D_WEB_SERVER "Уеб сървър" @@ -457,27 +458,27 @@ #define D_GZ_AXIS "Жироскоп - ос Z" // xsns_34_hx711.ino -#define D_HX_CAL_REMOVE "Remove weigth" -#define D_HX_CAL_REFERENCE "Load reference weigth" -#define D_HX_CAL_DONE "Calibrated" -#define D_HX_CAL_FAIL "Calibration failed" -#define D_RESET_HX711 "Reset Scale" -#define D_CONFIGURE_HX711 "Configure Scale" -#define D_HX711_PARAMETERS "Scale parameters" -#define D_ITEM_WEIGHT "Item weight" -#define D_REFERENCE_WEIGHT "Reference weigth" -#define D_CALIBRATE "Calibrate" -#define D_CALIBRATION "Calibration" +#define D_HX_CAL_REMOVE "Премахване на тегло" +#define D_HX_CAL_REFERENCE "Зареждане на референтно тегло" +#define D_HX_CAL_DONE "Калибриран" +#define D_HX_CAL_FAIL "Неуспешно калибриране" +#define D_RESET_HX711 "Нулиране на кантара" +#define D_CONFIGURE_HX711 "Конфигуриране на кантара" +#define D_HX711_PARAMETERS "Параметри на кантара" +#define D_ITEM_WEIGHT "Тегло" +#define D_REFERENCE_WEIGHT "Референтно тегло" +#define D_CALIBRATE "Калибриране" +#define D_CALIBRATION "Калибровка" //xsns_35_tx20.ino -#define D_TX20_WIND_DIRECTION "Wind Direction" -#define D_TX20_WIND_SPEED "Wind Speed" -#define D_TX20_WIND_SPEED_AVG "Wind Speed Avg" -#define D_TX20_WIND_SPEED_MAX "Wind Speed Max" -#define D_TX20_NORTH "N" -#define D_TX20_EAST "E" -#define D_TX20_SOUTH "S" -#define D_TX20_WEST "W" +#define D_TX20_WIND_DIRECTION "Посока на вятъра" +#define D_TX20_WIND_SPEED "Скорост на вятъра" +#define D_TX20_WIND_SPEED_AVG "Средна скорост на вятъра" +#define D_TX20_WIND_SPEED_MAX "Макс. скорост на вятъра" +#define D_TX20_NORTH "С" +#define D_TX20_EAST "И" +#define D_TX20_SOUTH "Ю" +#define D_TX20_WEST "З" // sonoff_template.h #define D_SENSOR_NONE "Няма" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -537,7 +546,7 @@ #define D_UNIT_HOUR "h" #define D_UNIT_KILOGRAM "kg" #define D_UNIT_INCREMENTS "inc" -#define D_UNIT_KILOMETER_PER_HOUR "km/h" // or "km/h" +#define D_UNIT_KILOMETER_PER_HOUR "km/h" #define D_UNIT_KILOOHM "kΩ" #define D_UNIT_KILOWATTHOUR "kWh" #define D_UNIT_LUX "lx" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "µm" #define D_UNIT_MICROSECOND "µs" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_BG_BG_H_ diff --git a/sonoff/language/cs-CZ.h b/sonoff/language/cs-CZ.h index 0cf34043b..461de3a4d 100644 --- a/sonoff/language/cs-CZ.h +++ b/sonoff/language/cs-CZ.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Velikost paměti flash" #define D_PROGRAM_SIZE "Velikost programu" #define D_PROJECT "Projekt" +#define D_RAIN "Rain" #define D_RECEIVED "Přijatý" #define D_RESTART "Restart" #define D_RESTARTING "Restartování" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_CS_CZ_H_ diff --git a/sonoff/language/de-DE.h b/sonoff/language/de-DE.h index 0c2ab9f6a..293de0830 100644 --- a/sonoff/language/de-DE.h +++ b/sonoff/language/de-DE.h @@ -28,7 +28,7 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v5.12.0l + * Updated until v6.3.0.17 \*********************************************************************/ //#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) @@ -94,7 +94,7 @@ #define D_FALSE "falsch" #define D_FILE "Datei" #define D_FREE_MEMORY "Freier Arbeitsspeicher" -#define D_FREQUENCY "Frequency" +#define D_FREQUENCY "Frequenz" #define D_GAS "Gas" #define D_GATEWAY "Gateway" #define D_GROUP "Gruppe" @@ -116,10 +116,10 @@ #define D_NOISE "Lautstärke" #define D_NONE "keine" #define D_OFF "aus" -#define D_OFFLINE "offline" +#define D_OFFLINE "Offline" #define D_OK "OK" #define D_ON "an" -#define D_ONLINE "online" +#define D_ONLINE "Online" #define D_PASSWORD "Passwort" #define D_PORT "Port" #define D_POWER_FACTOR "Leistungsfaktor" @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Ges. Flash Speicher" #define D_PROGRAM_SIZE "Ben. Flash Speicher" #define D_PROJECT "Projekt" +#define D_RAIN "Regen" #define D_RECEIVED "erhalten" #define D_RESTART "Neustart" #define D_RESTARTING "starte neu" @@ -174,7 +175,7 @@ #define D_UV_POWER "UV Intensität" #define D_VERSION "Version" #define D_VOLTAGE "Spannung" -#define D_WEIGHT "Weight" +#define D_WEIGHT "Gewicht" #define D_WARMLIGHT "warm" #define D_WEB_SERVER "Web-Server" @@ -436,7 +437,7 @@ #define D_TIMEOUT_WAITING_FOR "Timeout während Warten auf" #define D_START_SIGNAL_LOW "Startausschlag niedrig" #define D_START_SIGNAL_HIGH "Startausschlag hoch" -#define D_PULSE "pulse" +#define D_PULSE "Puls" #define D_CHECKSUM_FAILURE "Checksum-Fehler" // xsns_07_sht1x.ino @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -537,7 +546,7 @@ #define D_UNIT_HOUR "h" #define D_UNIT_INCREMENTS "inc" #define D_UNIT_KILOGRAM "kg" -#define D_UNIT_KILOMETER_PER_HOUR "km/h" // or "km/h" +#define D_UNIT_KILOMETER_PER_HOUR "km/h" #define D_UNIT_KILOOHM "kOhm" #define D_UNIT_KILOWATTHOUR "kWh" #define D_UNIT_LUX "lx" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "µm" #define D_UNIT_MICROSECOND "µs" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phasenwinkel" +#define D_IMPORT_ACTIVE "Importiere Wirk" +#define D_EXPORT_ACTIVE "Exportiere Wirk" +#define D_IMPORT_REACTIVE "Importiere Blind" +#define D_EXPORT_REACTIVE "Exportiere Blind" +#define D_TOTAL_REACTIVE "Total Blind" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Grad" + #endif // _LANGUAGE_DE_DE_H_ diff --git a/sonoff/language/el-GR.h b/sonoff/language/el-GR.h index c5a3db324..2148baf42 100644 --- a/sonoff/language/el-GR.h +++ b/sonoff/language/el-GR.h @@ -1,8 +1,7 @@ - /* el-GR.h - localization for Greek - Greece for Sonoff-Tasmota - Copyright (C) 2018 Kan3Nas + Copyright (C) 2018 Theo Arends (translated by Nick Galfas) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,10 +28,10 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v5.12.0n + * Updated until v6.3.0 \*********************************************************************/ -//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) +#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) #define LANGUAGE_LCID 1032 // HTML (ISO 639-1) Language Code @@ -52,218 +51,219 @@ #define D_DECIMAL_SEPARATOR "," // Common -#define D_ADMIN "Admin" -#define D_AIR_QUALITY "Ποιότητα Αέρα" +#define D_ADMIN "Διαχειριστής" +#define D_AIR_QUALITY "Ποιότητα αέρα" #define D_AP "AP" // Access Point -#define D_AS "as" +#define D_AS "ως" #define D_AUTO "ΑΥΤΟΜΑΤΟ" -#define D_BLINK "Αναβοσβήνει" -#define D_BLINKOFF "Δεν αναβοσβήνει" -#define D_BOOT_COUNT "Αριθμός εκκινήσεων" -#define D_BRIGHTLIGHT "Λαμπερό" +#define D_BLINK "Blink" +#define D_BLINKOFF "BlinkOff" +#define D_BOOT_COUNT "Καταμέτρηση εκκινήσεων" +#define D_BRIGHTLIGHT "Φωτεινό" #define D_BSSID "BSSId" -#define D_BUTTON "Κουμπί" +#define D_BUTTON "Πλήκτρο" #define D_BY "από" // Written by me #define D_BYTES "Bytes" #define D_CELSIUS "Κελσίου" -#define D_CHANNEL "Channel" +#define D_CHANNEL "Κανάλι" #define D_CO2 "Διοξείδιο του άνθρακα" #define D_CODE "κώδικας" // Button code -#define D_COLDLIGHT "Ψυχρός" +#define D_COLDLIGHT "Ψυχρό" #define D_COMMAND "Εντολή" #define D_CONNECTED "Συνδεδεμένο" -#define D_COUNT "Μέτρημα" +#define D_COUNT "Μέτρηση" #define D_COUNTER "Μετρητής" -#define D_CURRENT "Τάση ρεύματος" // As in Voltage and Current +#define D_CURRENT "Τάση" // As in Voltage and Current #define D_DATA "Δεδομένα" -#define D_DARKLIGHT "Σκούρο" +#define D_DARKLIGHT "Σκοτεινό" #define D_DEBUG "Debug" -#define D_DISABLED "Απενεργοποιημένο" -#define D_DISTANCE "Distance" +#define D_DISABLED "Ανενεργό" +#define D_DISTANCE "Απόσταση" #define D_DNS_SERVER "Διακομιστής DNS" -#define D_DONE "Εγινε" +#define D_DONE "Ολοκληρώθηκε" #define D_DST_TIME "DST" #define D_ECO2 "eCO2" -#define D_EMULATION "Emulation" +#define D_EMULATION "Εξομoίωση" #define D_ENABLED "Ενεργό" -#define D_ERASE "Σβήσιμο" +#define D_ERASE "Διαγραφή" #define D_ERROR "Σφάλμα" #define D_FAHRENHEIT "Φαρενάιτ" -#define D_FAILED "Αποτυχία" -#define D_FALLBACK "Εφεδρικό" -#define D_FALLBACK_TOPIC "Εφεδρικό θέμα" -#define D_FALSE "Λάθος" +#define D_FAILED "Απέτυχε" +#define D_FALLBACK "Fallback" +#define D_FALLBACK_TOPIC "Fallback Topic" +#define D_FALSE "Ψευδές" #define D_FILE "Αρχείο" -#define D_FREE_MEMORY "Ελεύθερη Μνήμη" -#define D_FREQUENCY "Frequency" -#define D_GAS "Γκάζι" +#define D_FREE_MEMORY "Ελεύθερη μνήμη" +#define D_FREQUENCY "Συχνότητα" +#define D_GAS "Αέριο" #define D_GATEWAY "Πύλη" #define D_GROUP "Ομάδα" #define D_HOST "Host" #define D_HOSTNAME "Hostname" #define D_HUMIDITY "Υγρασία" -#define D_ILLUMINANCE "Illuminance" -#define D_IMMEDIATE "Φωτεινότητα" // Button immediate +#define D_ILLUMINANCE "Φωτεινότητα" +#define D_IMMEDIATE "άμεσο" // Button immediate #define D_INDEX "Κατάλογος" #define D_INFO "Πληροφορίες" -#define D_INFRARED "Infrared" -#define D_INITIALIZED "Αρχικό" -#define D_IP_ADDRESS "IP Address" -#define D_LIGHT "Light" +#define D_INFRARED "Υπέρυθρο" +#define D_INITIALIZED "Αρχικοποιήθηκε" +#define D_IP_ADDRESS "Διεύθυνση IP" +#define D_LIGHT "Φως" #define D_LWT "LWT" -#define D_MODULE "Module" +#define D_MODULE "Μονάδα" #define D_MQTT "MQTT" -#define D_MULTI_PRESS "πολλαπλή πίεση" -#define D_NOISE "θόρυβος" +#define D_MULTI_PRESS "ανίχνευση για πολλαπλά πατήματα" +#define D_NOISE "Θόρυβος" #define D_NONE "Κανένα" -#define D_OFF "Κλειστό" +#define D_OFF "Off" #define D_OFFLINE "Offline" #define D_OK "Ok" -#define D_ON "Ανοιχτό" +#define D_ON "On" #define D_ONLINE "Online" -#define D_PASSWORD "ΚωδικόςPassword" -#define D_PORT "Πόρτα" -#define D_POWER_FACTOR "Παράγοντας ισχύος" -#define D_POWERUSAGE "Ισχύης" -#define D_POWERUSAGE_ACTIVE "Active Power" -#define D_POWERUSAGE_APPARENT "Apparent Power" -#define D_POWERUSAGE_REACTIVE "Reactive Power" +#define D_PASSWORD "Κωδικός" +#define D_PORT "Θύρα" +#define D_POWER_FACTOR "Συντελεστής Ισχύος" +#define D_POWERUSAGE "Ισχύς" +#define D_POWERUSAGE_ACTIVE "Ενεργός ισχύς" +#define D_POWERUSAGE_APPARENT "Φαινόμενη ισχύς" +#define D_POWERUSAGE_REACTIVE "Άεργη ισχύς" #define D_PRESSURE "Πίεση" -#define D_PRESSUREATSEALEVEL "Πίεση στην επιφάνεια της Θάλασσας" -#define D_PROGRAM_FLASH_SIZE "Μέγεθος Προγράμματος Flash" -#define D_PROGRAM_SIZE "Μέγεθος Προγράμματος" +#define D_PRESSUREATSEALEVEL "Πίεση στo επίπεδο θάλασσας" +#define D_PROGRAM_FLASH_SIZE "Μέγεθος προγράμματος στη Flash" +#define D_PROGRAM_SIZE "Μέγεθος προγράμματος" #define D_PROJECT "Έργο" -#define D_RECEIVED "Λήψη" +#define D_RAIN "Rain" +#define D_RECEIVED "Ελήφθη" #define D_RESTART "Επανεκκίνηση" -#define D_RESTARTING "Επανεκκίνηση" -#define D_RESTART_REASON "Λόγος Επανεκκίνησης" +#define D_RESTARTING "Επανεκκινεί" +#define D_RESTART_REASON "Αιτία επανεκκίνησης" #define D_RESTORE "επαναφορά" -#define D_RETAINED "διατηρούνται" +#define D_RETAINED "διακράτηση" #define D_RULE "Κανόνας" #define D_SAVE "Αποθήκευση" -#define D_SENSOR "Σένσορας" +#define D_SENSOR "Αισθητήρας" #define D_SSID "SSId" -#define D_START "Έναρξη" +#define D_START "Εκκίνηση" #define D_STD_TIME "STD" -#define D_STOP "Στοπ" +#define D_STOP "Τερματισμός" #define D_SUBNET_MASK "Μάσκα υποδικτύου" #define D_SUBSCRIBE_TO "Εγγραφή στο" -#define D_SUCCESSFUL "Επιτυχής" +#define D_SUCCESSFUL "Επιτυχές" #define D_SUNRISE "Σούρουπο" #define D_SUNSET "Ηλιοβασίλεμα" #define D_TEMPERATURE "Θερμοκρασία" -#define D_TO "στο" +#define D_TO "έως" #define D_TOGGLE "Εναλλαγή" -#define D_TOPIC "Θέμα" +#define D_TOPIC "Topic" #define D_TRANSMIT "Μετάδοση" -#define D_TRUE "Σωστό" +#define D_TRUE "Αληθές" #define D_TVOC "TVOC" #define D_UPGRADE "αναβάθμιση" #define D_UPLOAD "Ανέβασμα" -#define D_UPTIME "Uptime" +#define D_UPTIME "Χρόνος λειτουργίας" #define D_USER "Χρήστης" #define D_UTC_TIME "UTC" -#define D_UV_INDEX "UV Index" -#define D_UV_INDEX_1 "Low" -#define D_UV_INDEX_2 "Mid" -#define D_UV_INDEX_3 "High" -#define D_UV_INDEX_4 "Danger" -#define D_UV_INDEX_5 "BurnL1/2" -#define D_UV_INDEX_6 "BurnL3" +#define D_UV_INDEX "Δείκτης UV" +#define D_UV_INDEX_1 "Χαμηλό" +#define D_UV_INDEX_2 "Μέτριο" +#define D_UV_INDEX_3 "Υψηλό" +#define D_UV_INDEX_4 "Κίνδυνος" +#define D_UV_INDEX_5 "Έγκαυμα L1/2" +#define D_UV_INDEX_6 "Έγκαυμα L3" #define D_UV_INDEX_7 "OoR" #define D_UV_LEVEL "Επίπεδο UV" -#define D_UV_POWER "UV Power" +#define D_UV_POWER "Ένταση UV" #define D_VERSION "Έκδοση" #define D_VOLTAGE "Τάση" -#define D_WEIGHT "Weight" -#define D_WARMLIGHT "Ζεστό" -#define D_WEB_SERVER "Web διακομιστής" +#define D_WEIGHT "Βάρος" +#define D_WARMLIGHT "Θερμό" +#define D_WEB_SERVER "Διακομιστής Web" // sonoff.ino #define D_WARNING_MINIMAL_VERSION "ΠΡΟΕΙΔΟΠΟΙΗΣΗ Αυτή η έκδοση δεν αποθηκεύει τις ρυθμίσεις" #define D_LEVEL_10 "επίπεδο 1-0" #define D_LEVEL_01 "επίπεδο 0-1" -#define D_SERIAL_LOGGING_DISABLED "Η σειριακής καταγραφή απενεργοποιήθηκε" -#define D_SYSLOG_LOGGING_REENABLED "Η καταγραφή Syslog είναι ενεργοποιημένη" +#define D_SERIAL_LOGGING_DISABLED "Η καταγραφή σειριακής θύρας είναι απενεργοποιημένη" +#define D_SYSLOG_LOGGING_REENABLED "Η καταγραφή Syslog επαναενεργοποιήθηκε" -#define D_SET_BAUDRATE_TO "Ρύθμιση Baudrate σε" -#define D_RECEIVED_TOPIC "Λήψη θεμάτων" +#define D_SET_BAUDRATE_TO "Ορισμός Baudrate σε" +#define D_RECEIVED_TOPIC "Received Topic" #define D_DATA_SIZE "Μέγεθος δεδομένων" #define D_ANALOG_INPUT "Αναλογικό" // support.ino #define D_OSWATCH "osWatch" #define D_BLOCKED_LOOP "Blocked Loop" -#define D_WPS_FAILED_WITH_STATUS "WPSconfig FAILED with status" -#define D_ACTIVE_FOR_3_MINUTES "active for 3 minutes" -#define D_FAILED_TO_START "failed to start" +#define D_WPS_FAILED_WITH_STATUS "Το WPSconfig ΑΠΕΤΥΧΕ με status" +#define D_ACTIVE_FOR_3_MINUTES "ενεργό για 3 λεπτά" +#define D_FAILED_TO_START "απέτυχε να εκκινήσει" #define D_PATCH_ISSUE_2186 "Patch issue 2186" -#define D_CONNECTING_TO_AP "Connecting to AP" -#define D_IN_MODE "in mode" -#define D_CONNECT_FAILED_NO_IP_ADDRESS "Connect failed as no IP address received" -#define D_CONNECT_FAILED_AP_NOT_REACHED "Connect failed as AP cannot be reached" -#define D_CONNECT_FAILED_WRONG_PASSWORD "Connect failed with AP incorrect password" -#define D_CONNECT_FAILED_AP_TIMEOUT "Connect failed with AP timeout" -#define D_ATTEMPTING_CONNECTION "Attempting connection..." -#define D_CHECKING_CONNECTION "Checking connection..." -#define D_QUERY_DONE "Query done. MQTT services found" -#define D_MQTT_SERVICE_FOUND "MQTT service found on" -#define D_FOUND_AT "found at" -#define D_SYSLOG_HOST_NOT_FOUND "Syslog Host not found" +#define D_CONNECTING_TO_AP "Συνδέεται στο AP" +#define D_IN_MODE "σε mode" +#define D_CONNECT_FAILED_NO_IP_ADDRESS "Αποτυχία σύνδεσης, δεν απονεμήθηκε διεύθυνση IP" +#define D_CONNECT_FAILED_AP_NOT_REACHED "Αποτυχία σύνδεσης, δεν ανταποκρίνεται το AP" +#define D_CONNECT_FAILED_WRONG_PASSWORD "Αποτυχία σύνδεσης, λάθος κωδικός για το AP" +#define D_CONNECT_FAILED_AP_TIMEOUT "Αποτυχία σύνδεσης, λήξη ορίου απόκρισης από το AP" +#define D_ATTEMPTING_CONNECTION "Προσπάθεια για σύνδεση..." +#define D_CHECKING_CONNECTION "Έλεγχος σύνδεσης..." +#define D_QUERY_DONE "Ολοκλήρωση ερωτήματος. Βρέθηκε υπηρεσία MQTT" +#define D_MQTT_SERVICE_FOUND "Βρέθηκε υπηρεσία MQTT στο" +#define D_FOUND_AT "βρέθηκε στο" +#define D_SYSLOG_HOST_NOT_FOUND "Δε βρέθηκε Syslog Host" // settings.ino -#define D_SAVED_TO_FLASH_AT "Εγινε flash στην θέση" -#define D_LOADED_FROM_FLASH_AT "Φορτώθηκε από την flash στην θέση" +#define D_SAVED_TO_FLASH_AT "Αποθηκεύτηκε από τη Flash στο" +#define D_LOADED_FROM_FLASH_AT "Φορτώθηκε από τη Flash στο" #define D_USE_DEFAULTS "Χρήση προεπιλογών" -#define D_ERASED_SECTOR "Διαγραμμένος τομέας" +#define D_ERASED_SECTOR "Διαγραφή τομέα" -// xdrv_02_webserver.ino +// webserver.ino #define D_NOSCRIPT "To use Tasmota, please enable JavaScript" -#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - παρακαλώ αναβαθμήστε" -#define D_WEBSERVER_ACTIVE_ON "Web διακομιστής ενεργός" +#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - παρακαλώ αναβαθμίστε" +#define D_WEBSERVER_ACTIVE_ON "Ενεργός διακομιστής Web στο" #define D_WITH_IP_ADDRESS "με διεύθυνση IP" -#define D_WEBSERVER_STOPPED "Web διακομιστής σταμάτησε" -#define D_FILE_NOT_FOUND "Το αρχείο δεν βρέθηκε" -#define D_REDIRECTED "Ανακατεύθυνση σε captive portal" +#define D_WEBSERVER_STOPPED "Ο διακομιστής Web σταμάτησε" +#define D_FILE_NOT_FOUND "Δε βρέθηκε το αρχείο" +#define D_REDIRECTED "Ανακατεύθυνση στο captive portal" #define D_WIFIMANAGER_SET_ACCESSPOINT_AND_STATION "Wifimanager set AccessPoint and keep Station" #define D_WIFIMANAGER_SET_ACCESSPOINT "Wifimanager set AccessPoint" -#define D_TRYING_TO_CONNECT "Προσπάθεια σύνδεσης της συσκευής στο δίκτυο" +#define D_TRYING_TO_CONNECT "Προσπάθεια σύνδεσης της συσκευής σε ασύρματο δίκτυο" #define D_RESTART_IN "Επανεκκίνηση σε" #define D_SECONDS "δευτερόλεπτα" -#define D_DEVICE_WILL_RESTART "Η συσκευή θα ξεκινήσει ξανά σε λίγα δευτερόλεπτα" +#define D_DEVICE_WILL_RESTART "Η συσκευή θα επανεκκινήσει σε λίγα δευτερόλεπτα" #define D_BUTTON_TOGGLE "Εναλλαγή" -#define D_CONFIGURATION "Ρύθμιση" +#define D_CONFIGURATION "Ρυθμίσεις" #define D_INFORMATION "Πληροφορίες" #define D_FIRMWARE_UPGRADE "Αναβάθμιση Firmware" #define D_CONSOLE "Κονσόλα" -#define D_CONFIRM_RESTART "Επιβεβαίωση Επανεκκίνησης" +#define D_CONFIRM_RESTART "Επιβεβαίωση επανεκκίνησης" -#define D_CONFIGURE_MODULE "Ρύθμιση Module" -#define D_CONFIGURE_WIFI "Ρύθμιση WiFi" -#define D_CONFIGURE_MQTT "Ρύθμιση MQTT" -#define D_CONFIGURE_DOMOTICZ "Ρύθμιση Domoticz" -#define D_CONFIGURE_LOGGING "Ρύθμιση καταγραφής" -#define D_CONFIGURE_OTHER "Άλλες Ρυθμίσεις" -#define D_CONFIRM_RESET_CONFIGURATION "Confirm Reset Configuration" -#define D_RESET_CONFIGURATION "Επαναφορά Ρυθμίσεων" -#define D_BACKUP_CONFIGURATION "Αντίγραφα Ασφαλείας Ρυθμίσεων" -#define D_RESTORE_CONFIGURATION "Επαναφορά Ρυθμίσεων" -#define D_MAIN_MENU "Κεντρικό Μενού" +#define D_CONFIGURE_MODULE "Ρυθμίσεις μονάδας" +#define D_CONFIGURE_WIFI "Ρυθμίσεις WiFi" +#define D_CONFIGURE_MQTT "Ρυθμίσεις MQTT" +#define D_CONFIGURE_DOMOTICZ "Ρυθμίσεις Domoticz" +#define D_CONFIGURE_LOGGING "Ρυθμίσεις καταγραφής" +#define D_CONFIGURE_OTHER "Άλλες ρυθμίσεις" +#define D_CONFIRM_RESET_CONFIGURATION "Επιβεβαίωση αρχικοποίησης στις προεπιλεγμένες ρυθμίσεις" +#define D_RESET_CONFIGURATION "Αρχικοποίηση-reset ρυθμίσεων" +#define D_BACKUP_CONFIGURATION "Αποθήκευση ρυθμίσεων" +#define D_RESTORE_CONFIGURATION "Επαναφορά ρυθμίσεων" +#define D_MAIN_MENU "Κεντρικό μενού" -#define D_MODULE_PARAMETERS "Παράμετροι Module" -#define D_MODULE_TYPE "Είδος Module" +#define D_MODULE_PARAMETERS "Παράμετροι μονάδας" +#define D_MODULE_TYPE "Τύπος μονάδας" #define D_GPIO "GPIO" #define D_SERIAL_IN "Serial In" #define D_SERIAL_OUT "Serial Out" #define D_WIFI_PARAMETERS "Παράμετροι Wifi" -#define D_SCAN_FOR_WIFI_NETWORKS "Σάρωση για δίκτυα wifi" -#define D_SCAN_DONE "Ολοκλήρωση σάρωσης" -#define D_NO_NETWORKS_FOUND "Δεν βρέθηκαν δίκτυα" -#define D_REFRESH_TO_SCAN_AGAIN "Ανανέωση για επανάληψη σάρωσης" -#define D_DUPLICATE_ACCESSPOINT "Duplicate AccessPoint" -#define D_SKIPPING_LOW_QUALITY "Παράλειψη λόγω χαμηλού σήματος" +#define D_SCAN_FOR_WIFI_NETWORKS "Σάρωση για δίκτυα Wifi" +#define D_SCAN_DONE "Η σάρωση ολοκληρώθηκε" +#define D_NO_NETWORKS_FOUND "Δε βρέθηκαν δίκτυα" +#define D_REFRESH_TO_SCAN_AGAIN "Πατήστε ανανέωση για μια νέα σάρωση" +#define D_DUPLICATE_ACCESSPOINT "Διπλότυπο AccessPoint" +#define D_SKIPPING_LOW_QUALITY "Παράκαμψη λόγω χαμηλής ποιότητας" #define D_RSSI "RSSI" #define D_WEP "WEP" #define D_WPA_PSK "WPA PSK" @@ -273,41 +273,41 @@ #define D_AP2_SSID "AP2 SSId" #define D_AP2_PASSWORD "AP2 Κωδικός" -#define D_MQTT_PARAMETERS "MQTT Παράμετροι" +#define D_MQTT_PARAMETERS "Παράμετροι MQTT" #define D_CLIENT "Πελάτης" #define D_FULL_TOPIC "Full Topic" #define D_LOGGING_PARAMETERS "Παράμετροι καταγραφής" -#define D_SERIAL_LOG_LEVEL "Επίπεδο καταγραφής Serial" +#define D_SERIAL_LOG_LEVEL "Επίπεδο καταγραφής Σειριακής" #define D_WEB_LOG_LEVEL "Επίπεδο καταγραφής Web" #define D_SYS_LOG_LEVEL "Επίπεδο καταγραφής Syslog" -#define D_MORE_DEBUG "Επιπλέον debug" -#define D_SYSLOG_HOST "Υπολογιστής Syslog" -#define D_SYSLOG_PORT "Πόρτα Syslog" -#define D_TELEMETRY_PERIOD "Χρόνος τηλεμετρίας" +#define D_MORE_DEBUG "More debug" +#define D_SYSLOG_HOST "Εξυπηρετητής Syslog" +#define D_SYSLOG_PORT "Θύρα Syslog" +#define D_TELEMETRY_PERIOD "Περίοδος τηλεμετρίας" -#define D_OTHER_PARAMETERS "Άλλες Παράμετροι" -#define D_WEB_ADMIN_PASSWORD "Web Admin Κωδικός" -#define D_MQTT_ENABLE "MQTT Ενεργό" -#define D_FRIENDLY_NAME "Φιλικό Όνομα" +#define D_OTHER_PARAMETERS "Άλλες παράμετροι" +#define D_WEB_ADMIN_PASSWORD "Κωδικός διαχειριστή" +#define D_MQTT_ENABLE "Ενεργοποίηση MQTT" +#define D_FRIENDLY_NAME "Φιλική ονομασία" #define D_BELKIN_WEMO "Belkin WeMo" #define D_HUE_BRIDGE "Hue Bridge" #define D_SINGLE_DEVICE "μονή συσκευή" -#define D_MULTI_DEVICE "πολλαπλή συσκευή" +#define D_MULTI_DEVICE "πολλαπλές συσκευές" -#define D_SAVE_CONFIGURATION "Αποθήκευση Ρυθμίσεων" +#define D_SAVE_CONFIGURATION "Αποθήκευση ρυθμίσεων" #define D_CONFIGURATION_SAVED "Οι ρυθμίσεις αποθηκεύτηκαν" #define D_CONFIGURATION_RESET "Επαναφορά ρυθμίσεων" -#define D_PROGRAM_VERSION "Εκδοση προγράμματος" -#define D_BUILD_DATE_AND_TIME "Ημερομηνία και Ώρα Build" -#define D_CORE_AND_SDK_VERSION "Core/SDK Version" -#define D_FLASH_WRITE_COUNT "Μετρητής εγγραφών Flash" +#define D_PROGRAM_VERSION "Έκδοση προγράμματος" +#define D_BUILD_DATE_AND_TIME "Ημερομηνία έκδοσης" +#define D_CORE_AND_SDK_VERSION "Έκδοση Core/SDK" +#define D_FLASH_WRITE_COUNT "Καταμέτρηση εγγραφών στη Flash" #define D_MAC_ADDRESS "MAC Address" -#define D_MQTT_HOST "MQTT Host" -#define D_MQTT_PORT "MQTT Port" -#define D_MQTT_CLIENT "MQTT Client" -#define D_MQTT_USER "MQTT User" +#define D_MQTT_HOST "MQTT Διακομιστής" +#define D_MQTT_PORT "MQTT Θύρα" +#define D_MQTT_CLIENT "MQTT Πελάτης" +#define D_MQTT_USER "MQTT Χρήστης" #define D_MQTT_TOPIC "MQTT Topic" #define D_MQTT_GROUP_TOPIC "MQTT Group Topic" #define D_MQTT_FULL_TOPIC "MQTT Full Topic" @@ -316,47 +316,47 @@ #define D_ESP_CHIP_ID "ESP Chip Id" #define D_FLASH_CHIP_ID "Flash Chip Id" #define D_FLASH_CHIP_SIZE "Μέγεθος Flash" -#define D_FREE_PROGRAM_SPACE "Ελεύθερος Χώρος Προγράμματος" +#define D_FREE_PROGRAM_SPACE "Ελεύθερος χώρος προγράμματος" -#define D_UPGRADE_BY_WEBSERVER "αναβάθμιση από τον διακομιστή web" -#define D_OTA_URL "OTA Url" +#define D_UPGRADE_BY_WEBSERVER "Αναβάθμιση μέσω web server" +#define D_OTA_URL "OTA URL" #define D_START_UPGRADE "Εκκίνηση αναβάθμισης" -#define D_UPGRADE_BY_FILE_UPLOAD "Αναβάθμιση με ανέβασμα αρχείου" -#define D_UPLOAD_STARTED "Το ανέβασμα ξεκίνησε" +#define D_UPGRADE_BY_FILE_UPLOAD "Αναβάθμιση μέσω μεταφόρτωσης αρχείου" +#define D_UPLOAD_STARTED "Η μεταφόρτωση ξεκίνησε" #define D_UPGRADE_STARTED "Η αναβάθμιση ξεκίνησε" -#define D_UPLOAD_DONE "Το ανέβασμα ολοκληρώθηκε" +#define D_UPLOAD_DONE "Η μεταφόρτωση ολοκληρώθηκε" #define D_UPLOAD_ERR_1 "Δεν έχει επιλεγεί αρχείο" -#define D_UPLOAD_ERR_2 "Δεν υπάρχει αρκετός χώρος" -#define D_UPLOAD_ERR_3 "Magic byte δεν είναι 0xE9" -#define D_UPLOAD_ERR_4 "Το μέγεθος του προγράμματος flash είναι μεγαλύτερο από το πραγματικό μέγεθος του flash" +#define D_UPLOAD_ERR_2 "Δεν υπάρχει επαρκής χώρος" +#define D_UPLOAD_ERR_3 "Magic byte is not 0xE9" +#define D_UPLOAD_ERR_4 "Το μέγεθος προγράμματος είναι μεγαλύτερο από την πραγματική μνήμη Flash" #define D_UPLOAD_ERR_5 "Upload buffer miscompare" -#define D_UPLOAD_ERR_6 "Το ανέβασμα απέτυχε. Επιλέξτε επίπεδο καταγραφής 3" -#define D_UPLOAD_ERR_7 "Το ανεβάσμα διακόπηκε" +#define D_UPLOAD_ERR_6 "Η μεταφόρτωση απέτυχε. Επιλέξτε επίπεδο καταγραφής 3" +#define D_UPLOAD_ERR_7 "Η μεταφόρτωση ματαιώθηκε" #define D_UPLOAD_ERR_8 "Μη έγκυρο αρχείο" -#define D_UPLOAD_ERR_9 "Το αρχείο είναι πολύ μεγάλο" -#define D_UPLOAD_ERR_10 "Failed to init RF chip" -#define D_UPLOAD_ERR_11 "Failed to erase RF chip" -#define D_UPLOAD_ERR_12 "Failed to write to RF chip" +#define D_UPLOAD_ERR_9 "Πολύ μεγάλο αρχείο" +#define D_UPLOAD_ERR_10 "Αποτυχία αρχικοποίησης RF chip" +#define D_UPLOAD_ERR_11 "Αποτυχία σβησίματος στο RF chip" +#define D_UPLOAD_ERR_12 "Αποτυχία εγγραφής στο RF chip" #define D_UPLOAD_ERR_13 "Failed to decode RF firmware" -#define D_UPLOAD_ERROR_CODE "Κωδικός λάθους ανεβάσματος" +#define D_UPLOAD_ERROR_CODE "Κωδικός λάθους στη μεταφόρτωση" #define D_ENTER_COMMAND "Εισαγωγή εντολής" -#define D_ENABLE_WEBLOG_FOR_RESPONSE "Ενεργοποιήστε το weblog 2 αν περιμένετε απάντηση" -#define D_NEED_USER_AND_PASSWORD "Χρειάζεστε user=<όνομα χρήστη>&password=<κωδικό χρήστη>" +#define D_ENABLE_WEBLOG_FOR_RESPONSE "Ενεργοποιήστε το weblog 2 εαν περιμένετε απόκριση" +#define D_NEED_USER_AND_PASSWORD "Χρειάζεται user=&password=" // xdrv_01_mqtt.ino -#define D_FINGERPRINT "Επαλήθευση TLS fingerprint..." -#define D_TLS_CONNECT_FAILED_TO "Αποτυχία TLS σύνδεσης" -#define D_RETRY_IN "Επανάληψη σε" -#define D_VERIFIED "Επαλήθευση με Fingerprint" -#define D_INSECURE "Μη ασφαλής σύνδεση λόγο ακατάλληλου Fingerprint" +#define D_FINGERPRINT "Επιβεβαίωση αποτυπώματος TLS..." +#define D_TLS_CONNECT_FAILED_TO "Αποτυχία σύνδεσης TLS στο" +#define D_RETRY_IN "Νέα προσπάθεια σε" +#define D_VERIFIED "Επιβεβαιώθηκε με χρήση αποτυπώματος TLS" +#define D_INSECURE "Επισφαλής σύνδεση λόγω άκυρου αποτυπώματος TLS" #define D_CONNECT_FAILED_TO "Αποτυχία σύνδεσης στο" // xplg_wemohue.ino -#define D_MULTICAST_DISABLED "Multicast απενεργοποιημένο" -#define D_MULTICAST_REJOINED "Multicast επανασύνδεση" +#define D_MULTICAST_DISABLED "Απενεργοποιημένο Multicast" +#define D_MULTICAST_REJOINED "Επανασύνδεση Multicast" #define D_MULTICAST_JOIN_FAILED "Αποτυχία σύνδεσης Multicast" -#define D_FAILED_TO_SEND_RESPONSE "Αποτυχία αποστολής απάντησης" +#define D_FAILED_TO_SEND_RESPONSE "Αποτυχία αποστολής απόκρισης" #define D_WEMO "WeMo" #define D_WEMO_BASIC_EVENT "WeMo βασικό event" @@ -367,13 +367,13 @@ #define D_HUE "Hue" #define D_HUE_BRIDGE_SETUP "Hue ρυθμίσεις" -#define D_HUE_API_NOT_IMPLEMENTED "Hue API δεν έχει υλοποιηθεί" +#define D_HUE_API_NOT_IMPLEMENTED "Δε βρέθηκε εφαρμογή Hue API" #define D_HUE_API "Hue API" #define D_HUE_POST_ARGS "Hue POST args" -#define D_3_RESPONSE_PACKETS_SENT "3πλο πακέτο απάντησεης στάλθηκε" +#define D_3_RESPONSE_PACKETS_SENT "Στάλθηκαν 3 πακέτα απόκρισης" // xdrv_07_domoticz.ino -#define D_DOMOTICZ_PARAMETERS "Domoticz παράμετροι" +#define D_DOMOTICZ_PARAMETERS "Ρυθμίσεις Domoticz" #define D_DOMOTICZ_IDX "Idx" #define D_DOMOTICZ_KEY_IDX "Key idx" #define D_DOMOTICZ_SWITCH_IDX "Switch idx" @@ -386,27 +386,27 @@ #define D_DOMOTICZ_COUNT "Count/PM1" #define D_DOMOTICZ_VOLTAGE "Voltage/PM2.5" #define D_DOMOTICZ_CURRENT "Current/PM10" - #define D_DOMOTICZ_AIRQUALITY "Ποιότητα Αέρα" -#define D_DOMOTICZ_UPDATE_TIMER "Ενημέρωση" + #define D_DOMOTICZ_AIRQUALITY "AirQuality" +#define D_DOMOTICZ_UPDATE_TIMER "Update timer" // xdrv_09_timers.ino -#define D_CONFIGURE_TIMER "Ρυθμίσεις Χρόνου" -#define D_TIMER_PARAMETERS "Χρονικοί παράμετροι" -#define D_TIMER_ENABLE "Ενεργοποιημένο Χρονικοί" -#define D_TIMER_ARM "Arm" -#define D_TIMER_TIME "Ωρα" +#define D_CONFIGURE_TIMER "Ρυθμίσεις Χρονικών" +#define D_TIMER_PARAMETERS "Παράμετροι χρονικών" +#define D_TIMER_ENABLE "Ενεργοποίηση χρονικών" +#define D_TIMER_ARM "Οπλισμένο" +#define D_TIMER_TIME "Ώρα" #define D_TIMER_DAYS "Μέρες" #define D_TIMER_REPEAT "Επανάληψη" -#define D_TIMER_OUTPUT "Αποτέλεσμα" -#define D_TIMER_ACTION "Εντολή" +#define D_TIMER_OUTPUT "Έξοδος" +#define D_TIMER_ACTION "Λειτουργία" // xdrv_10_knx.ino #define D_CONFIGURE_KNX "Ρυθμίσεις KNX" -#define D_KNX_PARAMETERS "KNX Παράμετροι" +#define D_KNX_PARAMETERS "Παράμετροι KNX" #define D_KNX_GENERAL_CONFIG "Γενικά" #define D_KNX_PHYSICAL_ADDRESS "Διεύθυνση Μνήμης" #define D_KNX_PHYSICAL_ADDRESS_NOTE "( Πρέπει να είναι μοναδική στο KNX δίκτυο )" -#define D_KNX_ENABLE "Ενεργοποιημένο KNX" +#define D_KNX_ENABLE "Ενεργοποίηση KNX" #define D_KNX_GROUP_ADDRESS_TO_WRITE "Αποστολή δεδομένων σε Ομάδα Διευθύνσεων" #define D_ADD "Προσθήκη" #define D_DELETE "Διαγραφή" @@ -416,32 +416,32 @@ #define D_RECEIVED_FROM "Στάλθηκε από" #define D_KNX_COMMAND_WRITE "Εγγραφή" #define D_KNX_COMMAND_READ "Ανάγνωση" -#define D_KNX_COMMAND_OTHER "Αλλο" +#define D_KNX_COMMAND_OTHER "Άλλο" #define D_SENT_TO "αποστολή σε" #define D_KNX_WARNING "Η Ομάδα Διευθύνσεων ( 0 / 0 / 0 ) είναι δεσμευμένη και δεν μπορεί να χρησιμοποιηθεί." -#define D_KNX_ENHANCEMENT "Communication Enhancement" +#define D_KNX_ENHANCEMENT "Βελτίωση επικοινωνίας" #define D_KNX_TX_SLOT "KNX TX" #define D_KNX_RX_SLOT "KNX RX" // xdrv_03_energy.ino -#define D_ENERGY_TODAY "Energy Σήμερα" -#define D_ENERGY_YESTERDAY "Energy Χτες" -#define D_ENERGY_TOTAL "Energy Συνολικά" +#define D_ENERGY_TODAY "Ενέργεια σήμερα" +#define D_ENERGY_YESTERDAY "Ενέργεια χθες" +#define D_ENERGY_TOTAL "Ενέργεια συνολικά" // xsns_05_ds18b20.ino -#define D_SENSOR_BUSY "Απασχολημένος Σένσορας" -#define D_SENSOR_CRC_ERROR "CRC λάθος σένσορα" -#define D_SENSORS_FOUND "Βρέθηκε σένσορας" +#define D_SENSOR_BUSY "Ο αισθητήρας είναι απασχολημένος" +#define D_SENSOR_CRC_ERROR "Σφάλμα CRC αισθητήρα" +#define D_SENSORS_FOUND "Βρέθηκαν αισθητήρες" // xsns_06_dht.ino -#define D_TIMEOUT_WAITING_FOR "Timeout περιμένετε για" -#define D_START_SIGNAL_LOW "εκκίνηση με χαμηλό σήμα" -#define D_START_SIGNAL_HIGH "εκκίνηση με υψηλό σήμα" +#define D_TIMEOUT_WAITING_FOR "Αναμονή Timeout για" +#define D_START_SIGNAL_LOW "χαμηλό αρχικό σήμα" +#define D_START_SIGNAL_HIGH "υψηλό αρχικό σήμα" #define D_PULSE "παλμός" #define D_CHECKSUM_FAILURE "Αποτυχία Checksum" // xsns_07_sht1x.ino -#define D_SENSOR_DID_NOT_ACK_COMMAND "Ο σένσορας δεν έλαβε την εντολή ACK" +#define D_SENSOR_DID_NOT_ACK_COMMAND "Ο αισθητήρας δεν έστειλε εντολή ACK" #define D_SHT1X_FOUND "Βρέθηκε SHT1X" // xsns_18_pms5003.ino @@ -458,30 +458,30 @@ #define D_GZ_AXIS "Gyro Z-Axis" // xsns_34_hx711.ino -#define D_HX_CAL_REMOVE "Remove weigth" -#define D_HX_CAL_REFERENCE "Load reference weigth" -#define D_HX_CAL_DONE "Calibrated" -#define D_HX_CAL_FAIL "Calibration failed" -#define D_RESET_HX711 "Reset Scale" -#define D_CONFIGURE_HX711 "Configure Scale" -#define D_HX711_PARAMETERS "Scale parameters" -#define D_ITEM_WEIGHT "Item weight" -#define D_REFERENCE_WEIGHT "Reference weigth" -#define D_CALIBRATE "Calibrate" -#define D_CALIBRATION "Calibration" +#define D_HX_CAL_REMOVE "Απομακρύνετε το βαρίδιο" +#define D_HX_CAL_REFERENCE "Τοποθετήστε το βαρίδιο αναφοράς" +#define D_HX_CAL_DONE "Βαθμονομήθηκε" +#define D_HX_CAL_FAIL "Αποτυχία βαθμονόμησης" +#define D_RESET_HX711 "Αρχικοποίηση ζυγαριάς" +#define D_CONFIGURE_HX711 "Ρύθμιση ζυγαριάς" +#define D_HX711_PARAMETERS "Παράμετροι ζυγαριάς" +#define D_ITEM_WEIGHT "Βάρος αντικειμένου" +#define D_REFERENCE_WEIGHT "Βάρος αναφοράς" +#define D_CALIBRATE "Βαθμονόμησε" +#define D_CALIBRATION "Βαθμονόμηση" //xsns_35_tx20.ino -#define D_TX20_WIND_DIRECTION "Wind Direction" -#define D_TX20_WIND_SPEED "Wind Speed" -#define D_TX20_WIND_SPEED_AVG "Wind Speed Avg" -#define D_TX20_WIND_SPEED_MAX "Wind Speed Max" -#define D_TX20_NORTH "N" -#define D_TX20_EAST "E" -#define D_TX20_SOUTH "S" -#define D_TX20_WEST "W" +#define D_TX20_WIND_DIRECTION "Κατεύθυνση ανέμου" +#define D_TX20_WIND_SPEED "Ταχύτητα ανέμου" +#define D_TX20_WIND_SPEED_AVG "Μέση ταχύτητα ανέμου" +#define D_TX20_WIND_SPEED_MAX "Μέγιστη ταχύτητα ανέμου" +#define D_TX20_NORTH "Β" +#define D_TX20_EAST "Α" +#define D_TX20_SOUTH "Ν" +#define D_TX20_WEST "Δ" // sonoff_template.h -#define D_SENSOR_NONE "Κανένας" +#define D_SENSOR_NONE "Κανένα" #define D_SENSOR_DHT11 "DHT11" #define D_SENSOR_AM2301 "AM2301" #define D_SENSOR_SI7021 "SI7021" @@ -491,11 +491,11 @@ #define D_SENSOR_WS2812 "WS2812" #define D_SENSOR_DFR562 "MP3 Player" #define D_SENSOR_IRSEND "IRsend" -#define D_SENSOR_SWITCH "Διακόπτης" // Suffix "1" -#define D_SENSOR_BUTTON "Κουμπί" // Suffix "1" -#define D_SENSOR_RELAY "Ρελέ" // Suffix "1i" -#define D_SENSOR_LED "Led" // Suffix "1i" -#define D_SENSOR_PWM "PWM" // Suffix "1" +#define D_SENSOR_SWITCH "Διακόπτης" // Suffix "1" +#define D_SENSOR_BUTTON "Κουμπί" // Suffix "1" +#define D_SENSOR_RELAY "Ρελέ" // Suffix "1i" +#define D_SENSOR_LED "Led" // Suffix "1i" +#define D_SENSOR_PWM "PWM" // Suffix "1" #define D_SENSOR_COUNTER "Μετρητής" // Suffix "1" #define D_SENSOR_IRRECV "IRrecv" #define D_SENSOR_MHZ_RX "MHZ Rx" @@ -516,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -530,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -546,6 +554,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "Min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -586,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi -#endif // _LANGUAGE_EN_GB_H_ +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + +#endif // _LANGUAGE_EL_GR_H_ diff --git a/sonoff/language/en-GB.h b/sonoff/language/en-GB.h index 48641d0ff..70825c5e3 100644 --- a/sonoff/language/en-GB.h +++ b/sonoff/language/en-GB.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Program Flash Size" #define D_PROGRAM_SIZE "Program Size" #define D_PROJECT "Project" +#define D_RAIN "Rain" #define D_RECEIVED "Received" #define D_RESTART "Restart" #define D_RESTARTING "Restarting" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "Min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_EN_GB_H_ diff --git a/sonoff/language/es-AR.h b/sonoff/language/es-AR.h index a5d044985..011c7a248 100644 --- a/sonoff/language/es-AR.h +++ b/sonoff/language/es-AR.h @@ -28,7 +28,7 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v6.2.1.11 + * Updated until v6.3.0.17 \*********************************************************************/ #define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Tamaño de Flash de Programa" #define D_PROGRAM_SIZE "Tamaño Programa" #define D_PROJECT "Proyecto" +#define D_RAIN "Lluvia" #define D_RECEIVED "Recibido" #define D_RESTART "Reiniciar" #define D_RESTARTING "Reiniciando" @@ -437,7 +438,7 @@ #define D_START_SIGNAL_LOW "iniciar señal baja" #define D_START_SIGNAL_HIGH "iniciar señal alta" #define D_PULSE "pulso" -#define D_CHECKSUM_FAILURE "Checksum fallido" +#define D_CHECKSUM_FAILURE "Falló Checksum" // xsns_07_sht1x.ino #define D_SENSOR_DID_NOT_ACK_COMMAND "Sensor no ha enviado el comando ACK" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "Min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Ángulo de Fase" +#define D_IMPORT_ACTIVE "P. Activa Entrante" +#define D_EXPORT_ACTIVE "P. Activa Saliente" +#define D_IMPORT_REACTIVE "P. Reactiva Entrante" +#define D_EXPORT_REACTIVE "P. Reactiva Saliente" +#define D_TOTAL_REACTIVE "P. Reactiva Total" +#define D_UNIT_KWARH "kVArH" +#define D_UNIT_ANGLE "Grados" + #endif // _LANGUAGE_ES_AR_H_ diff --git a/sonoff/language/fr-FR.h b/sonoff/language/fr-FR.h index 0e37d9990..642b4686d 100644 --- a/sonoff/language/fr-FR.h +++ b/sonoff/language/fr-FR.h @@ -28,7 +28,7 @@ * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. * Use online command Prefix to translate cmnd, stat and tele. * - * Updated until v6.2.1.7 + * Updated until v6.3.0.17 \*********************************************************************/ #define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) @@ -122,16 +122,17 @@ #define D_ONLINE "Connecté" #define D_PASSWORD "Mot de passe" #define D_PORT "Port" -#define D_POWER_FACTOR "Facteur de puissance" +#define D_POWER_FACTOR "Fact de puiss" #define D_POWERUSAGE "Puissance" -#define D_POWERUSAGE_ACTIVE "Puissance Active" -#define D_POWERUSAGE_APPARENT "Puissance Apparente" -#define D_POWERUSAGE_REACTIVE "Puissance Réactive" +#define D_POWERUSAGE_ACTIVE "Puiss act" +#define D_POWERUSAGE_APPARENT "Puiss app" +#define D_POWERUSAGE_REACTIVE "Puiss réactive" #define D_PRESSURE "Pression" #define D_PRESSUREATSEALEVEL "PressionMer" #define D_PROGRAM_FLASH_SIZE "Taille Flash Programme" #define D_PROGRAM_SIZE "Taille programme" #define D_PROJECT "Projet" +#define D_RAIN "Pluie" #define D_RECEIVED "Reçu" #define D_RESTART "Redémarrage" #define D_RESTARTING "Redémarre" @@ -174,7 +175,7 @@ #define D_UV_POWER "Puissance UV" #define D_VERSION "Version" #define D_VOLTAGE "Tension" -#define D_WEIGHT "Weight" +#define D_WEIGHT "Poids" #define D_WARMLIGHT "Chaud" #define D_WEB_SERVER "Serveur web" @@ -244,7 +245,7 @@ #define D_CONFIGURE_DOMOTICZ "Configuration Domoticz" #define D_CONFIGURE_LOGGING "Configuration du journal" #define D_CONFIGURE_OTHER "Autre configuration" -#define D_CONFIRM_RESET_CONFIGURATION "Confirmer réinitialisation configuration" +#define D_CONFIRM_RESET_CONFIGURATION "Confirmer la réinit. de la config." #define D_RESET_CONFIGURATION "Configuration par défaut" #define D_BACKUP_CONFIGURATION "Sauvegarde de la config." #define D_RESTORE_CONFIGURATION "Restauration de la config." @@ -457,27 +458,27 @@ #define D_GZ_AXIS "Gyro Axe-Z" // xsns_34_hx711.ino -#define D_HX_CAL_REMOVE "Remove weigth" -#define D_HX_CAL_REFERENCE "Load reference weigth" -#define D_HX_CAL_DONE "Calibrated" -#define D_HX_CAL_FAIL "Calibration failed" -#define D_RESET_HX711 "Reset Scale" -#define D_CONFIGURE_HX711 "Configure Scale" -#define D_HX711_PARAMETERS "Scale parameters" -#define D_ITEM_WEIGHT "Item weight" -#define D_REFERENCE_WEIGHT "Reference weigth" -#define D_CALIBRATE "Calibrate" -#define D_CALIBRATION "Calibration" +#define D_HX_CAL_REMOVE "Retirer la charge" +#define D_HX_CAL_REFERENCE "Charger l'étalon de poids" +#define D_HX_CAL_DONE "Étalonné" +#define D_HX_CAL_FAIL "L'étalonnage a échoué" +#define D_RESET_HX711 "Réinitialiser le capteur" +#define D_CONFIGURE_HX711 "Configurer le capteur" +#define D_HX711_PARAMETERS "Paramètres capteur" +#define D_ITEM_WEIGHT "Poids de l'objet" +#define D_REFERENCE_WEIGHT "Poids de référence" +#define D_CALIBRATE "Étalonner" +#define D_CALIBRATION "Étalonnage" //xsns_35_tx20.ino -#define D_TX20_WIND_DIRECTION "Wind Direction" -#define D_TX20_WIND_SPEED "Wind Speed" -#define D_TX20_WIND_SPEED_AVG "Wind Speed Avg" -#define D_TX20_WIND_SPEED_MAX "Wind Speed Max" +#define D_TX20_WIND_DIRECTION "Direction du vent" +#define D_TX20_WIND_SPEED "Vitesse du vent" +#define D_TX20_WIND_SPEED_AVG "Vitesse Moy." +#define D_TX20_WIND_SPEED_MAX "Vitesse Max" #define D_TX20_NORTH "N" #define D_TX20_EAST "E" #define D_TX20_SOUTH "S" -#define D_TX20_WEST "W" +#define D_TX20_WEST "O" // sonoff_template.h #define D_SENSOR_NONE "Aucun" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -537,7 +546,7 @@ #define D_UNIT_HOUR "h" #define D_UNIT_INCREMENTS "inc" #define D_UNIT_KILOGRAM "kg" -#define D_UNIT_KILOMETER_PER_HOUR "km/h" // or "km/h" +#define D_UNIT_KILOMETER_PER_HOUR "km/h" #define D_UNIT_KILOOHM "kΩ" #define D_UNIT_KILOWATTHOUR "kWh" #define D_UNIT_LUX "lx" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "µm" #define D_UNIT_MICROSECOND "µs" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "Min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Angle de phase" +#define D_IMPORT_ACTIVE "Puiss act conso" +#define D_EXPORT_ACTIVE "Puiss act fournie" +#define D_IMPORT_REACTIVE "Puiss réa conso" +#define D_EXPORT_REACTIVE "Puiss réa fournie" +#define D_TOTAL_REACTIVE "Puiss réa totale" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "°" + #endif // _LANGUAGE_FR_FR_H_ diff --git a/sonoff/language/he-HE.h b/sonoff/language/he-HE.h index 355fe8231..7dc8585db 100644 --- a/sonoff/language/he-HE.h +++ b/sonoff/language/he-HE.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "גודל תוכנית פלאש" #define D_PROGRAM_SIZE "גודל תוכנית" #define D_PROJECT "פרויקט" +#define D_RAIN "Rain" #define D_RECEIVED "התקבל" #define D_RESTART "איתחול" #define D_RESTARTING "הפעלה מחדש" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "Min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_HE_HE_H_ diff --git a/sonoff/language/hu-HU.h b/sonoff/language/hu-HU.h index cbe52378d..707bb24ec 100644 --- a/sonoff/language/hu-HU.h +++ b/sonoff/language/hu-HU.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Program Flash Méret" #define D_PROGRAM_SIZE "Program Méret" #define D_PROJECT "Projekt" +#define D_RAIN "Rain" #define D_RECEIVED "Érkezett" #define D_RESTART "Újraindítás" #define D_RESTARTING "Újraindítás" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "µs" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "p" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_HU_HU_H_ diff --git a/sonoff/language/it-IT.h b/sonoff/language/it-IT.h index 8449d250d..4e1481cec 100644 --- a/sonoff/language/it-IT.h +++ b/sonoff/language/it-IT.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Dimensione Flash Programma" #define D_PROGRAM_SIZE "Dimensione Programma" #define D_PROJECT "Progetto" +#define D_RAIN "Rain" #define D_RECEIVED "Ricevuto" #define D_RESTART "Riavvio" #define D_RESTARTING "Riavviando" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "Min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_IT_IT_H_ diff --git a/sonoff/language/nl-NL.h b/sonoff/language/nl-NL.h index afaf9d08a..3383228ed 100644 --- a/sonoff/language/nl-NL.h +++ b/sonoff/language/nl-NL.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Programma Flash Grootte" #define D_PROGRAM_SIZE "Programma Grootte" #define D_PROJECT "Project" +#define D_RAIN "Regen" #define D_RECEIVED "Ontvangen" #define D_RESTART "Herstart" #define D_RESTARTING "Herstarten" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "Min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_NL_NL_H_ diff --git a/sonoff/language/pl-PL.h b/sonoff/language/pl-PL.h index 686f5cc76..0019c8d53 100644 --- a/sonoff/language/pl-PL.h +++ b/sonoff/language/pl-PL.h @@ -62,10 +62,10 @@ #define D_BRIGHTLIGHT "Jasny" #define D_BSSID "BSSId" #define D_BUTTON "Przycisk" -#define D_BY "by" // Written by me +#define D_BY "przez" // Written by me #define D_BYTES "Bajtow" #define D_CELSIUS "Celsiusza" -#define D_CHANNEL "Channel" +#define D_CHANNEL "Kanał" #define D_CO2 "Dwutlenku węgla" #define D_CODE "kod" // Button code #define D_COLDLIGHT "Zimny" @@ -78,8 +78,8 @@ #define D_DARKLIGHT "Ciemny" #define D_DEBUG "Debug" #define D_DISABLED "Zablokowany" -#define D_DISTANCE "Distance" -#define D_DNS_SERVER "Server DNS" +#define D_DISTANCE "Odległość" +#define D_DNS_SERVER "Serwer DNS" #define D_DONE "Wykonane" #define D_DST_TIME "DST" #define D_ECO2 "eCO2" @@ -105,7 +105,7 @@ #define D_IMMEDIATE "Natychmiastowe" // Button immediate #define D_INDEX "Indeks" #define D_INFO "Informacja" -#define D_INFRARED "Infrared" +#define D_INFRARED "Podczerwień" #define D_INITIALIZED "Zainicjowany" #define D_IP_ADDRESS "Adres IP" #define D_LIGHT "Światło" @@ -124,14 +124,15 @@ #define D_PORT "Port" #define D_POWER_FACTOR "Współczynik mocy" #define D_POWERUSAGE "Moc" -#define D_POWERUSAGE_ACTIVE "Active Power" -#define D_POWERUSAGE_APPARENT "Apparent Power" -#define D_POWERUSAGE_REACTIVE "Reactive Power" +#define D_POWERUSAGE_ACTIVE "Czynna Moc" +#define D_POWERUSAGE_APPARENT "Pozorna Moc" +#define D_POWERUSAGE_REACTIVE "Reaktywna Moc" #define D_PRESSURE "Ciśnienie" #define D_PRESSUREATSEALEVEL "Ciśnienie na poziomie morza" #define D_PROGRAM_FLASH_SIZE "Wielkość programu flash" #define D_PROGRAM_SIZE "Wielkość programu" #define D_PROJECT "Projekt" +#define D_RAIN "Rain" #define D_RECEIVED "Otrzymany" #define D_RESTART "Restart" #define D_RESTARTING "Restartowanie" @@ -148,8 +149,8 @@ #define D_SUBNET_MASK "Maska podsieci" #define D_SUBSCRIBE_TO "Subskrybuj do" #define D_SUCCESSFUL "Powodzenie" -#define D_SUNRISE "Sunrise" -#define D_SUNSET "Sunset" +#define D_SUNRISE "Wschód słońca" +#define D_SUNSET "Zachód słońca" #define D_TEMPERATURE "Temperatura" #define D_TO "do" #define D_TOGGLE "Przełącz" @@ -159,14 +160,14 @@ #define D_TVOC "TVOC" #define D_UPGRADE "aktualizacji" #define D_UPLOAD "Wgraj" -#define D_UPTIME "Uptime" +#define D_UPTIME "Czas pracy" #define D_USER "Użytkownik" #define D_UTC_TIME "UTC" #define D_UV_INDEX "UV Index" -#define D_UV_INDEX_1 "Low" -#define D_UV_INDEX_2 "Mid" -#define D_UV_INDEX_3 "High" -#define D_UV_INDEX_4 "Danger" +#define D_UV_INDEX_1 "Niski" +#define D_UV_INDEX_2 "Średni" +#define D_UV_INDEX_3 "Wysoki" +#define D_UV_INDEX_4 "Niebezpieczny" #define D_UV_INDEX_5 "BurnL1/2" #define D_UV_INDEX_6 "BurnL3" #define D_UV_INDEX_7 "OoR" @@ -176,10 +177,10 @@ #define D_VOLTAGE "Napięcie" #define D_WEIGHT "Weight" #define D_WARMLIGHT "Nagrzanie" -#define D_WEB_SERVER "Web Server" +#define D_WEB_SERVER "Web Serwer" // sonoff.ino -#define D_WARNING_MINIMAL_VERSION "WARNING This version does not support persistent settings" +#define D_WARNING_MINIMAL_VERSION "UWAGA Ta wersja nie obsługuje zapisu ustawień" #define D_LEVEL_10 "poziom 1-0" #define D_LEVEL_01 "poziom 0-1" #define D_SERIAL_LOGGING_DISABLED "Wyłączony dziennik na porcie szeregowym" @@ -217,7 +218,7 @@ #define D_ERASED_SECTOR "Wymazany sektor" // xdrv_02_webserver.ino -#define D_NOSCRIPT "To use Tasmota, please enable JavaScript" +#define D_NOSCRIPT "Aby korzystać z Tasmota, włącz obsługę JavaScript" #define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "Oprogramowanie MINIMAL - proszę uaktualnić" #define D_WEBSERVER_ACTIVE_ON "Aktywny serwer Web" #define D_WITH_IP_ADDRESS "z adresem IP" @@ -333,10 +334,10 @@ #define D_UPLOAD_ERR_7 "Wgrywanie przerwane" #define D_UPLOAD_ERR_8 "Błędny plik" #define D_UPLOAD_ERR_9 "Plik jest za duży" -#define D_UPLOAD_ERR_10 "Failed to init RF chip" -#define D_UPLOAD_ERR_11 "Failed to erase RF chip" -#define D_UPLOAD_ERR_12 "Failed to write to RF chip" -#define D_UPLOAD_ERR_13 "Failed to decode RF firmware" +#define D_UPLOAD_ERR_10 "Błąd inicjacji układu RF" +#define D_UPLOAD_ERR_11 "Błąd kasowania układu RF" +#define D_UPLOAD_ERR_12 "Błąd zapisu układu RF" +#define D_UPLOAD_ERR_13 "Błąd dekodowania oprrogramowania układu RF" #define D_UPLOAD_ERROR_CODE "Błąd wgrywania" #define D_ENTER_COMMAND "Wprowadź polecenie" @@ -389,36 +390,36 @@ #define D_DOMOTICZ_UPDATE_TIMER "Zaktualizuj czasomierz" // xdrv_09_timers.ino -#define D_CONFIGURE_TIMER "Configure Timer" -#define D_TIMER_PARAMETERS "Timer parameters" -#define D_TIMER_ENABLE "Enable Timers" -#define D_TIMER_ARM "Arm" -#define D_TIMER_TIME "Time" -#define D_TIMER_DAYS "Days" -#define D_TIMER_REPEAT "Repeat" -#define D_TIMER_OUTPUT "Output" -#define D_TIMER_ACTION "Action" +#define D_CONFIGURE_TIMER "Skonfiguruj harmonogram" +#define D_TIMER_PARAMETERS "Parametry harmonogramów" +#define D_TIMER_ENABLE "Włącz Harmonogramy" +#define D_TIMER_ARM "Włącz" +#define D_TIMER_TIME "Czas" +#define D_TIMER_DAYS "Dni" +#define D_TIMER_REPEAT "Powtarzaj" +#define D_TIMER_OUTPUT "Wyjście" +#define D_TIMER_ACTION "Akcja" // xdrv_10_knx.ino -#define D_CONFIGURE_KNX "Configure KNX" -#define D_KNX_PARAMETERS "KNX Parameters" -#define D_KNX_GENERAL_CONFIG "General" -#define D_KNX_PHYSICAL_ADDRESS "Physical Address" -#define D_KNX_PHYSICAL_ADDRESS_NOTE "( Must be unique on the KNX network )" -#define D_KNX_ENABLE "Enable KNX" -#define D_KNX_GROUP_ADDRESS_TO_WRITE "Data to Send to Group Addresses" -#define D_ADD "Add" -#define D_DELETE "Delete" -#define D_REPLY "Reply" -#define D_KNX_GROUP_ADDRESS_TO_READ "Group Addresses to Receive Data from" +#define D_CONFIGURE_KNX "Skonfiguruj KNX" +#define D_KNX_PARAMETERS "Parametry KNX" +#define D_KNX_GENERAL_CONFIG "Ogólne" +#define D_KNX_PHYSICAL_ADDRESS "Adres Fizyczny" +#define D_KNX_PHYSICAL_ADDRESS_NOTE "( Musi być unikalny w sieci KNX )" +#define D_KNX_ENABLE "Włącz KNX" +#define D_KNX_GROUP_ADDRESS_TO_WRITE "Dane do wysłania do adresów grupowych" +#define D_ADD "Dodaj" +#define D_DELETE "Usuń" +#define D_REPLY "Odpowiedz" +#define D_KNX_GROUP_ADDRESS_TO_READ "Adresy grupowe do odbioru danych z" #define D_LOG_KNX "KNX: " -#define D_RECEIVED_FROM "Received from" -#define D_KNX_COMMAND_WRITE "Write" -#define D_KNX_COMMAND_READ "Read" -#define D_KNX_COMMAND_OTHER "Other" -#define D_SENT_TO "sent to" -#define D_KNX_WARNING "The group address ( 0 / 0 / 0 ) is reserved and can not be used." -#define D_KNX_ENHANCEMENT "Communication Enhancement" +#define D_RECEIVED_FROM "Otrzymane od" +#define D_KNX_COMMAND_WRITE "Zapisz" +#define D_KNX_COMMAND_READ "Czytaj" +#define D_KNX_COMMAND_OTHER "Inne" +#define D_SENT_TO "wysłane do" +#define D_KNX_WARNING "Adres grupy (0/0/0) jest zarezerwowany i nie można go użyć." +#define D_KNX_ENHANCEMENT "Usprawnienie Komunikacji" #define D_KNX_TX_SLOT "KNX TX" #define D_KNX_RX_SLOT "KNX RX" @@ -446,7 +447,7 @@ // xsns_18_pms5003.ino #define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter #define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter -#define D_PARTICALS_BEYOND "Particals" +#define D_PARTICALS_BEYOND "Cząstki" // xsns_32_mpu6050.ino #define D_AX_AXIS "Accel. X-Axis" @@ -457,23 +458,23 @@ #define D_GZ_AXIS "Gyro Z-Axis" // xsns_34_hx711.ino -#define D_HX_CAL_REMOVE "Remove weigth" -#define D_HX_CAL_REFERENCE "Load reference weigth" -#define D_HX_CAL_DONE "Calibrated" -#define D_HX_CAL_FAIL "Calibration failed" -#define D_RESET_HX711 "Reset Scale" -#define D_CONFIGURE_HX711 "Configure Scale" -#define D_HX711_PARAMETERS "Scale parameters" -#define D_ITEM_WEIGHT "Item weight" -#define D_REFERENCE_WEIGHT "Reference weigth" -#define D_CALIBRATE "Calibrate" -#define D_CALIBRATION "Calibration" +#define D_HX_CAL_REMOVE "Usuń wagę" +#define D_HX_CAL_REFERENCE "Załaduj masę referencyjną" +#define D_HX_CAL_DONE "Skalibrowany" +#define D_HX_CAL_FAIL "Błąd Kalibracji" +#define D_RESET_HX711 "Zresetuj Skalę" +#define D_CONFIGURE_HX711 "Skonfiguruj Skalę" +#define D_HX711_PARAMETERS "Parametry Skali" +#define D_ITEM_WEIGHT "Waga przedmiotu" +#define D_REFERENCE_WEIGHT "Waga referencyjna" +#define D_CALIBRATE "Skalibruj" +#define D_CALIBRATION "Kalibrowanie" //xsns_35_tx20.ino -#define D_TX20_WIND_DIRECTION "Wind Direction" -#define D_TX20_WIND_SPEED "Wind Speed" -#define D_TX20_WIND_SPEED_AVG "Wind Speed Avg" -#define D_TX20_WIND_SPEED_MAX "Wind Speed Max" +#define D_TX20_WIND_DIRECTION "Kierunek wiatru" +#define D_TX20_WIND_SPEED "Prędkość wiatru" +#define D_TX20_WIND_SPEED_AVG "Średnia prędkość wiatru" +#define D_TX20_WIND_SPEED_MAX "Maksymalna prędkość wiatru" #define D_TX20_NORTH "N" #define D_TX20_EAST "E" #define D_TX20_SOUTH "S" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "Min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_PL_PL_D_H_ diff --git a/sonoff/language/pt-BR.h b/sonoff/language/pt-BR.h index ef5104fdb..e8e536606 100644 --- a/sonoff/language/pt-BR.h +++ b/sonoff/language/pt-BR.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Tamanho do programa na memória" #define D_PROGRAM_SIZE "Tamanho do programa" #define D_PROJECT "Projeto" +#define D_RAIN "Rain" #define D_RECEIVED "Recebido" #define D_RESTART "Reiniciar" #define D_RESTARTING "Reiniciando" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "M" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_PT_BR_H_ diff --git a/sonoff/language/pt-PT.h b/sonoff/language/pt-PT.h index 97750f38c..58a39fff0 100644 --- a/sonoff/language/pt-PT.h +++ b/sonoff/language/pt-PT.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Tamanho do Programa na Flash" #define D_PROGRAM_SIZE "Tamanho do Programa" #define D_PROJECT "Projeto" +#define D_RAIN "Rain" #define D_RECEIVED "Recebido" #define D_RESTART "Reiniciar" #define D_RESTARTING "A reiniciar" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "Min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_PT_PT_H_ diff --git a/sonoff/language/ru-RU.h b/sonoff/language/ru-RU.h index 28aa1d7f2..85813373a 100644 --- a/sonoff/language/ru-RU.h +++ b/sonoff/language/ru-RU.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Размер Flash для программ" #define D_PROGRAM_SIZE "Размер программы " #define D_PROJECT "Проект" +#define D_RAIN "Rain" #define D_RECEIVED "Получено" #define D_RESTART "Перезапуск" #define D_RESTARTING "Перезапуск" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "А" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "мкм" #define D_UNIT_MICROSECOND "мкс" #define D_UNIT_MILLIAMPERE "мА" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "мм рт.ст." #define D_UNIT_MILLISECOND "мс" #define D_UNIT_MINUTE "мин" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Угол фазы" +#define D_IMPORT_ACTIVE "Импорт активной мощности" +#define D_EXPORT_ACTIVE "Экспорт активной мощности" +#define D_IMPORT_REACTIVE "Импорт реактивной мощности" +#define D_EXPORT_REACTIVE "Экспорт реактивной мощности" +#define D_TOTAL_REACTIVE "Итого реактивная мощность" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Град" + #endif // _LANGUAGE_RU_RU_H_ diff --git a/sonoff/language/sv-SE.h b/sonoff/language/sv-SE.h new file mode 100644 index 000000000..4ae68e78c --- /dev/null +++ b/sonoff/language/sv-SE.h @@ -0,0 +1,609 @@ +/* + sv-SE.h - localization for Swedish - Svenska for Sonoff-Tasmota + + Copyright (C) 2018 Gunnar Norin + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +#ifndef _LANGUAGE_SV_SE_H_ +#define _LANGUAGE_SV_SE_H_ + +/*************************** ATTENTION *******************************\ + * + * Due to memory constraints only UTF-8 is supported. + * To save code space keep text as short as possible. + * Time and Date provided by SDK can not be localized (yet). + * Use online command StateText to translate ON, OFF, HOLD and TOGGLE. + * Use online command Prefix to translate cmnd, stat and tele. + * + * Updated until v6.2.1.11 +\*********************************************************************/ + +//#define LANGUAGE_MODULE_NAME // Enable to display "Module Generic" (ie Spanish), Disable to display "Generic Module" (ie English) +// https://www.science.co.il/language/Locale-codes.php +#define LANGUAGE_LCID 1053 +// HTML (ISO 639-1) Language Code +#define D_HTML_LANGUAGE "sv" + +// "2017-03-07T11:08:02" - ISO8601:2004 +#define D_YEAR_MONTH_SEPARATOR "-" +#define D_MONTH_DAY_SEPARATOR "-" +#define D_DATE_TIME_SEPARATOR "T" +#define D_HOUR_MINUTE_SEPARATOR ":" +#define D_MINUTE_SECOND_SEPARATOR ":" + +#define D_DAY3LIST "SönMånTisOnsTorFreLör" +#define D_MONTH3LIST "JanFebMarAprMajJunJulAugSepOktNovDec" + +// Non JSON decimal separator +#define D_DECIMAL_SEPARATOR "," + +// Common +#define D_ADMIN "Admin" +#define D_AIR_QUALITY "Luftkvalitet" +#define D_AP "AP" // Access Point +#define D_AS "som" +#define D_AUTO "AUTO" +#define D_BLINK "Blinka" +#define D_BLINKOFF "BlinkaAv" +#define D_BOOT_COUNT "Uppstartsräknare" +#define D_BRIGHTLIGHT "Ljust" +#define D_BSSID "BSSId" +#define D_BUTTON "Knapp" +#define D_BY "av" // Written by me +#define D_BYTES "Bytes" +#define D_CELSIUS "Celsius" +#define D_CHANNEL "Kanal" +#define D_CO2 "Koldioxid" +#define D_CODE "kod" // Button code +#define D_COLDLIGHT "Kallt" +#define D_COMMAND "Kommando" +#define D_CONNECTED "Ansluten" +#define D_COUNT "Räkna" +#define D_COUNTER "Räknare" +#define D_CURRENT "Ström" // As in Voltage and Current +#define D_DATA "Data" +#define D_DARKLIGHT "Mörkt" +#define D_DEBUG "Debug" +#define D_DISABLED "Inaktiverad" +#define D_DISTANCE "Distans" +#define D_DNS_SERVER "DNS-server" +#define D_DONE "Gjort" +#define D_DST_TIME "DST" +#define D_ECO2 "eCO2" +#define D_EMULATION "Emulation" +#define D_ENABLED "Aktiverad" +#define D_ERASE "Ta bort" +#define D_ERROR "Fel" +#define D_FAHRENHEIT "Fahrenheit" +#define D_FAILED "Misslyckades" +#define D_FALLBACK "Reserv" +#define D_FALLBACK_TOPIC "Reservämne" +#define D_FALSE "Falskt" +#define D_FILE "Fil" +#define D_FREE_MEMORY "Ledigt minne" +#define D_FREQUENCY "Frekvens" +#define D_GAS "Gas" +#define D_GATEWAY "Gateway" +#define D_GROUP "Grupp" +#define D_HOST "Värd" +#define D_HOSTNAME "Värdnamn" +#define D_HUMIDITY "Fuktighet" +#define D_ILLUMINANCE "Belysnings" +#define D_IMMEDIATE "Omedelbar" // Button immediate +#define D_INDEX "Index" +#define D_INFO "Info" +#define D_INFRARED "Infraröd" +#define D_INITIALIZED "Initialiserad" +#define D_IP_ADDRESS "IP-adress" +#define D_LIGHT "Ljus" +#define D_LWT "LWT" +#define D_MODULE "Modul" +#define D_MQTT "MQTT" +#define D_MULTI_PRESS "fler tryck" +#define D_NOISE "Oväsen" +#define D_NONE "Ingen" +#define D_OFF "Av" +#define D_OFFLINE "Off-line" +#define D_OK "Ok" +#define D_ON "På" +#define D_ONLINE "Ansluten" +#define D_PASSWORD "Lösenord" +#define D_PORT "Port" +#define D_POWER_FACTOR "Spänningsfaktor" +#define D_POWERUSAGE "Spänning" +#define D_POWERUSAGE_ACTIVE "Aktiv spänning" +#define D_POWERUSAGE_APPARENT "Skenbar spänning" +#define D_POWERUSAGE_REACTIVE "Responsiv spänning" +#define D_PRESSURE "Tryck" +#define D_PRESSUREATSEALEVEL "Havstryck" +#define D_PROGRAM_FLASH_SIZE "Program-flashstorlek" +#define D_PROGRAM_SIZE "Programstorlek" +#define D_PROJECT "Projekt" +#define D_RAIN "Rain" +#define D_RECEIVED "Mottagen" +#define D_RESTART "Omstart" +#define D_RESTARTING "Startar om" +#define D_RESTART_REASON "Restart Reason" +#define D_RESTORE "återställ" +#define D_RETAINED "bevarad" +#define D_RULE "Regel" +#define D_SAVE "Spara" +#define D_SENSOR "Sensor" +#define D_SSID "SSId" +#define D_START "Starta" +#define D_STD_TIME "STD" +#define D_STOP "Stoppa" +#define D_SUBNET_MASK "Nätmask" +#define D_SUBSCRIBE_TO "Prenumera på" +#define D_SUCCESSFUL "Lyckat" +#define D_SUNRISE "Soluppgång" +#define D_SUNSET "Solnedgång" +#define D_TEMPERATURE "Temperatur" +#define D_TO "till" +#define D_TOGGLE "Växla" +#define D_TOPIC "Ämne" +#define D_TRANSMIT "Sänd" +#define D_TRUE "Sant" +#define D_TVOC "TVOC" +#define D_UPGRADE "uppgradera" +#define D_UPLOAD "Ladda upp" +#define D_UPTIME "Upptid" +#define D_USER "Användare" +#define D_UTC_TIME "UTC" +#define D_UV_INDEX "UV Index" +#define D_UV_INDEX_1 "Låg" +#define D_UV_INDEX_2 "Med" +#define D_UV_INDEX_3 "Hög" +#define D_UV_INDEX_4 "Farligt" +#define D_UV_INDEX_5 "BurnL1/2" +#define D_UV_INDEX_6 "BurnL3" +#define D_UV_INDEX_7 "OoR" // Out of Range +#define D_UV_LEVEL "UV nivå" +#define D_UV_POWER "UV kraft" +#define D_VERSION "Version" +#define D_VOLTAGE "Voltage" +#define D_WEIGHT "Vikt" +#define D_WARMLIGHT "Varm" +#define D_WEB_SERVER "Webbserver" + +// sonoff.ino +#define D_WARNING_MINIMAL_VERSION "VARNING Denna version supporterar inte beständiga inställningar" +#define D_LEVEL_10 "nivå 1-0" +#define D_LEVEL_01 "nivå 0-1" +#define D_SERIAL_LOGGING_DISABLED "Seriell loggning inaktiverad" +#define D_SYSLOG_LOGGING_REENABLED "Syslog återaktiverad" + +#define D_SET_BAUDRATE_TO "Ange Baudrate till" +#define D_RECEIVED_TOPIC "Mottaget ämne" +#define D_DATA_SIZE "Datastorlek" +#define D_ANALOG_INPUT "Analog" + +// support.ino +#define D_OSWATCH "osWatch" +#define D_BLOCKED_LOOP "Blockerad loop" +#define D_WPS_FAILED_WITH_STATUS "WPS-konfigurering MISSLYCKADES med status" +#define D_ACTIVE_FOR_3_MINUTES "aktiv för 3 minuter" +#define D_FAILED_TO_START "misslyckades att starta" +#define D_PATCH_ISSUE_2186 "Patch issue 2186" +#define D_CONNECTING_TO_AP "Ansluter till AP" +#define D_IN_MODE "i läge" +#define D_CONNECT_FAILED_NO_IP_ADDRESS "Anslutning misslyckades mottog ingen IP-adress" +#define D_CONNECT_FAILED_AP_NOT_REACHED "Anslutning misslyckades, kunde inte nå AP" +#define D_CONNECT_FAILED_WRONG_PASSWORD "Anslutning misslyckades, fel lösenord för AP" +#define D_CONNECT_FAILED_AP_TIMEOUT "Anslutning misslyckadess med AP, timeout" +#define D_ATTEMPTING_CONNECTION "Försöker ansluta..." +#define D_CHECKING_CONNECTION "Kontrollerar anslutning..." +#define D_QUERY_DONE "Fråga utförd. MQTT-tjänster hittades" +#define D_MQTT_SERVICE_FOUND "MQTT-tjänst hittades på" +#define D_FOUND_AT "hittades vid" +#define D_SYSLOG_HOST_NOT_FOUND "Syslog-värd hittades inte" + +// settings.ino +#define D_SAVED_TO_FLASH_AT "Sparade till flash vid" +#define D_LOADED_FROM_FLASH_AT "Laddade från flash vid" +#define D_USE_DEFAULTS "Använd standard" +#define D_ERASED_SECTOR "Rensade sektor" + +// xdrv_02_webserver.ino +#define D_NOSCRIPT "För att använda Tasmota, aktivera JavaScript" +#define D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "MINIMAL firmware - var god uppgradera" +#define D_WEBSERVER_ACTIVE_ON "Webbserver aktiv på" +#define D_WITH_IP_ADDRESS "med IP-adress" +#define D_WEBSERVER_STOPPED "Webbserver stoppad" +#define D_FILE_NOT_FOUND "Filen hittades inte" +#define D_REDIRECTED "Omdirigerad till fångstportal" +#define D_WIFIMANAGER_SET_ACCESSPOINT_AND_STATION "Wifihanterare ange accesspunkt och behåll station" +#define D_WIFIMANAGER_SET_ACCESSPOINT "Wifihanterare ange accesspunkt" +#define D_TRYING_TO_CONNECT "Försöker att ansluta enheten till nätverk" + +#define D_RESTART_IN "Omstart om" +#define D_SECONDS "sekunder" +#define D_DEVICE_WILL_RESTART "Enheten kommer att starta om inom ett antal sekunder" +#define D_BUTTON_TOGGLE "Växla" +#define D_CONFIGURATION "Konfigurering" +#define D_INFORMATION "Information" +#define D_FIRMWARE_UPGRADE "Uppgradera firmware" +#define D_CONSOLE "Konsol" +#define D_CONFIRM_RESTART "Bekräfta omstart" + +#define D_CONFIGURE_MODULE "Konfigurera modul" +#define D_CONFIGURE_WIFI "Konfigurera WiFi" +#define D_CONFIGURE_MQTT "Konfigurera MQTT" +#define D_CONFIGURE_DOMOTICZ "Konfigurera Domoticz" +#define D_CONFIGURE_LOGGING "Konfigurera loggning" +#define D_CONFIGURE_OTHER "Konfigurera annat" +#define D_CONFIRM_RESET_CONFIGURATION "Bekräfta nollställning av konfiguration" +#define D_RESET_CONFIGURATION "Nollställ konfiguration" +#define D_BACKUP_CONFIGURATION "Säkerhetskopiera konfiguration" +#define D_RESTORE_CONFIGURATION "Återställ konfiguration" +#define D_MAIN_MENU "Huvudmeny" + +#define D_MODULE_PARAMETERS "Modulparameterar" +#define D_MODULE_TYPE "Modultyp" +#define D_GPIO "GPIO" +#define D_SERIAL_IN "Seriell in" +#define D_SERIAL_OUT "Seriell ut" + +#define D_WIFI_PARAMETERS "Wifi-parameterar" +#define D_SCAN_FOR_WIFI_NETWORKS "Skanna efter wifi-nätverk" +#define D_SCAN_DONE "Skanning slutförd" +#define D_NO_NETWORKS_FOUND "Inga nätverk hittades" +#define D_REFRESH_TO_SCAN_AGAIN "Uppdatera för att skanna igen" +#define D_DUPLICATE_ACCESSPOINT "Dubblett accesspunkt" +#define D_SKIPPING_LOW_QUALITY "Hoppa över pga dålig kvalitet" +#define D_RSSI "RSSI" +#define D_WEP "WEP" +#define D_WPA_PSK "WPA PSK" +#define D_WPA2_PSK "WPA2 PSK" +#define D_AP1_SSID "AP1 SSId" +#define D_AP1_PASSWORD "AP1 lösenord" +#define D_AP2_SSID "AP2 SSId" +#define D_AP2_PASSWORD "AP2 lösenord" + +#define D_MQTT_PARAMETERS "MQTT-parameterar" +#define D_CLIENT "Klient" +#define D_FULL_TOPIC "Fullt ämne" + +#define D_LOGGING_PARAMETERS "Loggningsparametrar" +#define D_SERIAL_LOG_LEVEL "Seriell loggnivå" +#define D_WEB_LOG_LEVEL "Webb loggnivå" +#define D_SYS_LOG_LEVEL "Syslog-nivp" +#define D_MORE_DEBUG "Mer debugging" +#define D_SYSLOG_HOST "Syslog-värd" +#define D_SYSLOG_PORT "Syslog-port" +#define D_TELEMETRY_PERIOD "Telemetriperiod" + +#define D_OTHER_PARAMETERS "Andra parametrar" +#define D_WEB_ADMIN_PASSWORD "Webbadmin-lösenord" +#define D_MQTT_ENABLE "MQTT aktivera" +#define D_FRIENDLY_NAME "Läsbart namn" +#define D_BELKIN_WEMO "Belkin WeMo" +#define D_HUE_BRIDGE "Hue Bridge" +#define D_SINGLE_DEVICE "soloenhet" +#define D_MULTI_DEVICE "multienhet" + +#define D_SAVE_CONFIGURATION "Spara konfiguration" +#define D_CONFIGURATION_SAVED "Konfiguration sparad" +#define D_CONFIGURATION_RESET "Konfiguration nollställd" + +#define D_PROGRAM_VERSION "Programversion" +#define D_BUILD_DATE_AND_TIME "Build datum & tid" +#define D_CORE_AND_SDK_VERSION "Core/SDK Version" +#define D_FLASH_WRITE_COUNT "Flash-skrivningsräknare" +#define D_MAC_ADDRESS "MAC-adress" +#define D_MQTT_HOST "MQTT-värd" +#define D_MQTT_PORT "MQTT-port" +#define D_MQTT_CLIENT "MQTT-klient" +#define D_MQTT_USER "MQTT-användare" +#define D_MQTT_TOPIC "MQTT-ämne" +#define D_MQTT_GROUP_TOPIC "MQTT gruppämne" +#define D_MQTT_FULL_TOPIC "MQTT fullt ämne" +#define D_MDNS_DISCOVERY "mDNS upptäckning" +#define D_MDNS_ADVERTISE "mDNS annonsering" +#define D_ESP_CHIP_ID "ESP Chip Id" +#define D_FLASH_CHIP_ID "Flash Chip Id" +#define D_FLASH_CHIP_SIZE "Flash-storlek" +#define D_FREE_PROGRAM_SPACE "Ledigt programutrymme" + +#define D_UPGRADE_BY_WEBSERVER "Uppgradering via webbserver" +#define D_OTA_URL "OTA Url" +#define D_START_UPGRADE "Starta uppdatering" +#define D_UPGRADE_BY_FILE_UPLOAD "Uppgradering via filuppladdning" +#define D_UPLOAD_STARTED "Uppladdning startad" +#define D_UPGRADE_STARTED "Uppgradeing startad" +#define D_UPLOAD_DONE "Uppladdning klar" +#define D_UPLOAD_ERR_1 "Ingen fil vald" +#define D_UPLOAD_ERR_2 "Inte tillräckligt med ledigt utrymme" +#define D_UPLOAD_ERR_3 "Magisk byte är inte 0xE9" +#define D_UPLOAD_ERR_4 "Programmets flashstorlek är större än den verkliga flashstorleken" +#define D_UPLOAD_ERR_5 "Uppladdningbuffert stämmer inte överens" +#define D_UPLOAD_ERR_6 "Uppladdning misslyckad. Aktivera loggning 3" +#define D_UPLOAD_ERR_7 "Uppladdning avbruten" +#define D_UPLOAD_ERR_8 "Ogiltig fil" +#define D_UPLOAD_ERR_9 "För stor fil" +#define D_UPLOAD_ERR_10 "Misslyckades initera RF chip" +#define D_UPLOAD_ERR_11 "Misslyckades rensa RF chip" +#define D_UPLOAD_ERR_12 "Misslyckades skriva till RF chip" +#define D_UPLOAD_ERR_13 "Misslyckades avkoda RF firmware" +#define D_UPLOAD_ERROR_CODE "Upladdningsfelkod" + +#define D_ENTER_COMMAND "Ange kommando" +#define D_ENABLE_WEBLOG_FOR_RESPONSE "Aktivera weblog 2 om svar förväntas" +#define D_NEED_USER_AND_PASSWORD "Behöver användarnamn=&lösenord=" + +// xdrv_01_mqtt.ino +#define D_FINGERPRINT "Verifierar TLS fingeravtryck..." +#define D_TLS_CONNECT_FAILED_TO "TLS-anslutning misslyckades" +#define D_RETRY_IN "Försöker igen om" +#define D_VERIFIED "Verifierad med fingeravtryck" +#define D_INSECURE "Osäker anslutning pga ogiltigt fingeravtryck" +#define D_CONNECT_FAILED_TO "Anslutning misslyckades" + +// xplg_wemohue.ino +#define D_MULTICAST_DISABLED "Multicast inaktiverad" +#define D_MULTICAST_REJOINED "Multicast (åter)anslöt" +#define D_MULTICAST_JOIN_FAILED "Multicast anslutning misslyckades" +#define D_FAILED_TO_SEND_RESPONSE "Misslyckades skicka svar" + +#define D_WEMO "WeMo" +#define D_WEMO_BASIC_EVENT "WeMo standardhändelse" +#define D_WEMO_EVENT_SERVICE "WeMo händelsetjänst" +#define D_WEMO_META_SERVICE "WeMo metatjänst" +#define D_WEMO_SETUP "WeMo installation" +#define D_RESPONSE_SENT "Svar skickat" + +#define D_HUE "Hue" +#define D_HUE_BRIDGE_SETUP "Hue installation" +#define D_HUE_API_NOT_IMPLEMENTED "Hue API inte implementerat" +#define D_HUE_API "Hue API" +#define D_HUE_POST_ARGS "Hue POST args" +#define D_3_RESPONSE_PACKETS_SENT "3 svarspaket skickade" + +// xdrv_07_domoticz.ino +#define D_DOMOTICZ_PARAMETERS "Domoticz parametetrar" +#define D_DOMOTICZ_IDX "Idx" +#define D_DOMOTICZ_KEY_IDX "Nyckel idx" +#define D_DOMOTICZ_SWITCH_IDX "Switch idx" +#define D_DOMOTICZ_SENSOR_IDX "Sensor idx" + #define D_DOMOTICZ_TEMP "Temp" + #define D_DOMOTICZ_TEMP_HUM "Temp,Fuk" + #define D_DOMOTICZ_TEMP_HUM_BARO "Temp,Fuk,Baro" + #define D_DOMOTICZ_POWER_ENERGY "Spänning,Energi" + #define D_DOMOTICZ_ILLUMINANCE "Belysningsstyrka" + #define D_DOMOTICZ_COUNT "Antal/PM1" + #define D_DOMOTICZ_VOLTAGE "Volt/PM2.5" + #define D_DOMOTICZ_CURRENT "Ström/PM10" + #define D_DOMOTICZ_AIRQUALITY "Luftkvalitet" +#define D_DOMOTICZ_UPDATE_TIMER "Uppdatera timer" + +// xdrv_09_timers.ino +#define D_CONFIGURE_TIMER "Konfigurera timer" +#define D_TIMER_PARAMETERS "timerparametrar" +#define D_TIMER_ENABLE "Aktivera timer" +#define D_TIMER_ARM "Aktivera" +#define D_TIMER_TIME "Tid" +#define D_TIMER_DAYS "Dagar" +#define D_TIMER_REPEAT "Repetera" +#define D_TIMER_OUTPUT "Output" +#define D_TIMER_ACTION "Action" + +// xdrv_10_knx.ino +#define D_CONFIGURE_KNX "Konfigurera KNX" +#define D_KNX_PARAMETERS "KNX Parametrar" +#define D_KNX_GENERAL_CONFIG "Allmänt" +#define D_KNX_PHYSICAL_ADDRESS "Fysisk adress" +#define D_KNX_PHYSICAL_ADDRESS_NOTE "( Måste vara unik på KNX-nätverket )" +#define D_KNX_ENABLE "Aktivera KNX" +#define D_KNX_GROUP_ADDRESS_TO_WRITE "Data att skicka till gruppadresser" +#define D_ADD "Lägg till" +#define D_DELETE "Ta bort" +#define D_REPLY "Svara" +#define D_KNX_GROUP_ADDRESS_TO_READ "Gruppadresser att ta emot data från" +#define D_LOG_KNX "KNX: " +#define D_RECEIVED_FROM "Mottagen från" +#define D_KNX_COMMAND_WRITE "Skriv" +#define D_KNX_COMMAND_READ "Läs" +#define D_KNX_COMMAND_OTHER "Andra" +#define D_SENT_TO "skickad till" +#define D_KNX_WARNING "Gruppadressen ( 0 / 0 / 0 ) är reserverad och kan inte användas." +#define D_KNX_ENHANCEMENT "Kommuniceringsförbättring" +#define D_KNX_TX_SLOT "KNX TX" +#define D_KNX_RX_SLOT "KNX RX" + +// xdrv_03_energy.ino +#define D_ENERGY_TODAY "Energi idag" +#define D_ENERGY_YESTERDAY "Energi igår" +#define D_ENERGY_TOTAL "Energi totalt" + +// xsns_05_ds18b20.ino +#define D_SENSOR_BUSY "Sensor upptagen" +#define D_SENSOR_CRC_ERROR "Sensor CRC-fel" +#define D_SENSORS_FOUND "Sensorer hittades" + +// xsns_06_dht.ino +#define D_TIMEOUT_WAITING_FOR "Timeout under väntan" +#define D_START_SIGNAL_LOW "startsignal låg" +#define D_START_SIGNAL_HIGH "startsignal hög" +#define D_PULSE "puls" +#define D_CHECKSUM_FAILURE "Fel kontrollsumma" + +// xsns_07_sht1x.ino +#define D_SENSOR_DID_NOT_ACK_COMMAND "Sensor besvarade inte med ACK kommando" +#define D_SHT1X_FOUND "SHT1X hittades" + +// xsns_18_pms5003.ino +#define D_STANDARD_CONCENTRATION "CF-1 PM" // Standard Particle CF-1 Particle Matter +#define D_ENVIRONMENTAL_CONCENTRATION "PM" // Environmetal Particle Matter +#define D_PARTICALS_BEYOND "Partiklar" + +// xsns_32_mpu6050.ino +#define D_AX_AXIS "Accel. X-Axel" +#define D_AY_AXIS "Accel. Y-Axel" +#define D_AZ_AXIS "Accel. Z-Axel" +#define D_GX_AXIS "Gyro X-Axel" +#define D_GY_AXIS "Gyro Y-Axel" +#define D_GZ_AXIS "Gyro Z-Axel" + +// xsns_34_hx711.ino +#define D_HX_CAL_REMOVE "Ta bort vikter" +#define D_HX_CAL_REFERENCE "Ladda referensvikt" +#define D_HX_CAL_DONE "Kalibrerad" +#define D_HX_CAL_FAIL "Kalibrering misslyckad" +#define D_RESET_HX711 "Återställ våg" +#define D_CONFIGURE_HX711 "Konfigurera våg" +#define D_HX711_PARAMETERS "Vågparametrar" +#define D_ITEM_WEIGHT "Objektsvikt" +#define D_REFERENCE_WEIGHT "Referensvikt" +#define D_CALIBRATE "Kalibrera" +#define D_CALIBRATION "Kalibrering" + +//xsns_35_tx20.ino +#define D_TX20_WIND_DIRECTION "Vindriktning" +#define D_TX20_WIND_SPEED "Vindstyrka" +#define D_TX20_WIND_SPEED_AVG "Vindstyrka medel" +#define D_TX20_WIND_SPEED_MAX "Vindstyrka max" +#define D_TX20_NORTH "N" +#define D_TX20_EAST "E" +#define D_TX20_SOUTH "S" +#define D_TX20_WEST "W" + +// sonoff_template.h +#define D_SENSOR_NONE "Ingen" +#define D_SENSOR_DHT11 "DHT11" +#define D_SENSOR_AM2301 "AM2301" +#define D_SENSOR_SI7021 "SI7021" +#define D_SENSOR_DS18X20 "DS18x20" +#define D_SENSOR_I2C_SCL "I2C SCL" +#define D_SENSOR_I2C_SDA "I2C SDA" +#define D_SENSOR_WS2812 "WS2812" +#define D_SENSOR_DFR562 "MP3-spelare" +#define D_SENSOR_IRSEND "IRsend" +#define D_SENSOR_SWITCH "Omkopplare" // Suffix "1" +#define D_SENSOR_BUTTON "Knapp" // Suffix "1" +#define D_SENSOR_RELAY "Relä" // Suffix "1i" +#define D_SENSOR_LED "Led" // Suffix "1i" +#define D_SENSOR_PWM "PWM" // Suffix "1" +#define D_SENSOR_COUNTER "Räknare" // Suffix "1" +#define D_SENSOR_IRRECV "IRrecv" +#define D_SENSOR_MHZ_RX "MHZ Rx" +#define D_SENSOR_MHZ_TX "MHZ Tx" +#define D_SENSOR_PZEM004_RX "PZEM004 Rx" +#define D_SENSOR_PZEM016_RX "PZEM016 Rx" +#define D_SENSOR_PZEM017_RX "PZEM017 Rx" +#define D_SENSOR_PZEM0XX_TX "PZEM0XX Tx" +#define D_SENSOR_SAIR_RX "SAir Rx" +#define D_SENSOR_SAIR_TX "SAir Tx" +#define D_SENSOR_SPI_CS "SPI CS" +#define D_SENSOR_SPI_DC "SPI DC" +#define D_SENSOR_BACKLIGHT "BkLight" +#define D_SENSOR_PMS5003 "PMS5003" +#define D_SENSOR_SDS0X1_RX "SDS0X1 Rx" +#define D_SENSOR_SDS0X1_TX "SDS0X1 Tx" +#define D_SENSOR_SBR_RX "SerBr Rx" +#define D_SENSOR_SBR_TX "SerBr Tx" +#define D_SENSOR_SR04_TRIG "SR04 Tri" +#define D_SENSOR_SR04_ECHO "SR04 Ech" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" +#define D_SENSOR_SDM630_TX "SDM630 Tx" +#define D_SENSOR_SDM630_RX "SDM630 Rx" +#define D_SENSOR_TM1638_CLK "TM16 CLK" +#define D_SENSOR_TM1638_DIO "TM16 DIO" +#define D_SENSOR_TM1638_STB "TM16 STB" +#define D_SENSOR_HX711_SCK "HX711 SCK" +#define D_SENSOR_HX711_DAT "HX711 DAT" +#define D_SENSOR_TX20_TX "TX20" +#define D_SENSOR_RFSEND "RFSend" +#define D_SENSOR_RFRECV "RFrecv" +#define D_SENSOR_TUYA_TX "Tuya Tx" +#define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" + +// Units +#define D_UNIT_AMPERE "A" +#define D_UNIT_CENTIMETER "cm" +#define D_UNIT_HERTZ "Hz" +#define D_UNIT_HOUR "Hr" +#define D_UNIT_INCREMENTS "inc" +#define D_UNIT_KILOGRAM "kg" +#define D_UNIT_KILOMETER_PER_HOUR "km/h" // or "km/h" +#define D_UNIT_KILOOHM "kOhm" +#define D_UNIT_KILOWATTHOUR "kWh" +#define D_UNIT_LUX "lx" +#define D_UNIT_MICROGRAM_PER_CUBIC_METER "ug/m3" +#define D_UNIT_MICROMETER "um" +#define D_UNIT_MICROSECOND "us" +#define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" +#define D_UNIT_MILLISECOND "ms" +#define D_UNIT_MINUTE "Min" +#define D_UNIT_PARTS_PER_BILLION "ppb" +#define D_UNIT_PARTS_PER_DECILITER "ppd" +#define D_UNIT_PARTS_PER_MILLION "ppm" +#define D_UNIT_PRESSURE "hPa" +#define D_UNIT_SECOND "sek" +#define D_UNIT_SECTORS "sektorer" +#define D_UNIT_VA "VA" +#define D_UNIT_VAR "VAr" +#define D_UNIT_VOLT "V" +#define D_UNIT_WATT "W" +#define D_UNIT_WATTHOUR "Wh" +#define D_UNIT_WATT_METER_QUADRAT "W/m²" + +// Log message prefix +#define D_LOG_APPLICATION "APP: " // Application +#define D_LOG_BRIDGE "BRG: " // Bridge +#define D_LOG_CONFIG "CFG: " // Settings +#define D_LOG_COMMAND "CMD: " // Command +#define D_LOG_DEBUG "DBG: " // Debug +#define D_LOG_DHT "DHT: " // DHT sensor +#define D_LOG_DOMOTICZ "DOM: " // Domoticz +#define D_LOG_DSB "DSB: " // DS18xB20 sensor +#define D_LOG_HTTP "HTP: " // HTTP webserver +#define D_LOG_I2C "I2C: " // I2C +#define D_LOG_IRR "IRR: " // Infra Red Received +#define D_LOG_LOG "LOG: " // Logging +#define D_LOG_MODULE "MOD: " // Module +#define D_LOG_MDNS "DNS: " // mDNS +#define D_LOG_MQTT "MQT: " // MQTT +#define D_LOG_OTHER "OTH: " // Other +#define D_LOG_RESULT "RSL: " // Result +#define D_LOG_RFR "RFR: " // RF Received +#define D_LOG_SERIAL "SER: " // Serial +#define D_LOG_SHT1 "SHT: " // SHT1x sensor +#define D_LOG_UPLOAD "UPL: " // Upload +#define D_LOG_UPNP "UPP: " // UPnP +#define D_LOG_WIFI "WIF: " // Wifi + +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + +#endif // _LANGUAGE_SV_SE_H_ diff --git a/sonoff/language/tr-TR.h b/sonoff/language/tr-TR.h index 0588b5175..43acbaa77 100755 --- a/sonoff/language/tr-TR.h +++ b/sonoff/language/tr-TR.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Yazılım Flash Boyutu" #define D_PROGRAM_SIZE "Yazılım Boyutu" #define D_PROJECT "Proje" +#define D_RAIN "Rain" #define D_RECEIVED "Alınan" #define D_RESTART "Yeniden Başlat" #define D_RESTARTING "Yeniden Başlatılıyor" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "A" @@ -544,6 +553,8 @@ #define D_UNIT_MICROMETER "um" #define D_UNIT_MICROSECOND "us" #define D_UNIT_MILLIAMPERE "mA" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "ms" #define D_UNIT_MINUTE "Min" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_TR_TR_H_ diff --git a/sonoff/language/uk-UK.h b/sonoff/language/uk-UK.h index fc32479fc..a924a6cf4 100644 --- a/sonoff/language/uk-UK.h +++ b/sonoff/language/uk-UK.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "Розмір Flash для програм" #define D_PROGRAM_SIZE "Розмір програм " #define D_PROJECT "Проект" +#define D_RAIN "Rain" #define D_RECEIVED "Отримано" #define D_RESTART "Перезавантаження" #define D_RESTARTING "Перезавантаження" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "А" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "мкм" #define D_UNIT_MICROSECOND "мкс" #define D_UNIT_MILLIAMPERE "мА" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "мс" #define D_UNIT_MINUTE "хв" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_UK_UK_H_ diff --git a/sonoff/language/zh-CN.h b/sonoff/language/zh-CN.h index f4a19e324..dfd5662e0 100644 --- a/sonoff/language/zh-CN.h +++ b/sonoff/language/zh-CN.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "固件 Flash 大小" #define D_PROGRAM_SIZE "固件大小" #define D_PROJECT "项目:" +#define D_RAIN "Rain" #define D_RECEIVED "已接收" #define D_RESTART "重启" #define D_RESTARTING "正在重启" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "安" @@ -544,6 +553,8 @@ #define D_UNIT_MICROMETER "微米" #define D_UNIT_MICROSECOND "微秒" #define D_UNIT_MILLIAMPERE "毫安" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "毫秒" #define D_UNIT_MINUTE "分" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_ZH_CN_H_ diff --git a/sonoff/language/zh-TW.h b/sonoff/language/zh-TW.h index 61fa90d4d..abc3df93d 100644 --- a/sonoff/language/zh-TW.h +++ b/sonoff/language/zh-TW.h @@ -132,6 +132,7 @@ #define D_PROGRAM_FLASH_SIZE "韌體 Flash 大小" #define D_PROGRAM_SIZE "韌體大小" #define D_PROJECT "項目:" +#define D_RAIN "Rain" #define D_RECEIVED "已接收" #define D_RESTART "重啟" #define D_RESTARTING "正在重啟" @@ -515,8 +516,8 @@ #define D_SENSOR_SBR_TX "SerBr Tx" #define D_SENSOR_SR04_TRIG "SR04 Tri" #define D_SENSOR_SR04_ECHO "SR04 Ech" -#define D_SENSOR_SDM120_TX "SDM120 Tx" -#define D_SENSOR_SDM120_RX "SDM120 Rx" +#define D_SENSOR_SDM120_TX "SDM120/220 Tx" +#define D_SENSOR_SDM120_RX "SDM120/220 Rx" #define D_SENSOR_SDM630_TX "SDM630 Tx" #define D_SENSOR_SDM630_RX "SDM630 Rx" #define D_SENSOR_TM1638_CLK "TM16 CLK" @@ -529,6 +530,14 @@ #define D_SENSOR_RFRECV "RFrecv" #define D_SENSOR_TUYA_TX "Tuya Tx" #define D_SENSOR_TUYA_RX "Tuya Rx" +#define D_SENSOR_MGC3130_XFER "MGC3130 Xfer" +#define D_SENSOR_MGC3130_RESET "MGC3130 Reset" +#define D_SENSOR_SSPI_MISO "SSPI MISO" +#define D_SENSOR_SSPI_MOSI "SSPI MOSI" +#define D_SENSOR_SSPI_SCLK "SSPI SCLK" +#define D_SENSOR_SSPI_CS "SSPI CS" +#define D_SENSOR_SSPI_DC "SSPI DC" +#define D_SENSOR_RF_SENSOR "RF Sensor" // Units #define D_UNIT_AMPERE "安" @@ -545,6 +554,8 @@ #define D_UNIT_MICROMETER "微米" #define D_UNIT_MICROSECOND "微秒" #define D_UNIT_MILLIAMPERE "毫安" +#define D_UNIT_MILLIMETER "mm" +#define D_UNIT_MILLIMETER_MERCURY "mmHg" #define D_UNIT_MILLISECOND "毫秒" #define D_UNIT_MINUTE "分" #define D_UNIT_PARTS_PER_BILLION "ppb" @@ -585,4 +596,14 @@ #define D_LOG_UPNP "UPP: " // UPnP #define D_LOG_WIFI "WIF: " // Wifi +//SDM220 +#define D_PHASE_ANGLE "Phase Angle" +#define D_IMPORT_ACTIVE "Import Active" +#define D_EXPORT_ACTIVE "Export Active" +#define D_IMPORT_REACTIVE "Import Reactive" +#define D_EXPORT_REACTIVE "Export Reactive" +#define D_TOTAL_REACTIVE "Total Reactive" +#define D_UNIT_KWARH "kVArh" +#define D_UNIT_ANGLE "Deg" + #endif // _LANGUAGE_ZH_TW_H_ diff --git a/sonoff/my_user_config.h b/sonoff/my_user_config.h index 458279fde..32821365f 100644 --- a/sonoff/my_user_config.h +++ b/sonoff/my_user_config.h @@ -48,7 +48,9 @@ // -- Project ------------------------------------- #define PROJECT "sonoff" // PROJECT is used as the default topic delimiter -#define MODULE SONOFF_BASIC // [Module] Select default model from sonoff_template.h (Should not be changed) + +// If not selected the default will be SONOFF_BASIC +//#define MODULE SONOFF_BASIC // [Module] Select default model from sonoff_template.h #define SAVE_DATA 1 // [SaveData] Save changed parameters to Flash (0 = disable, 1 - 3600 seconds) #define SAVE_STATE 1 // [SetOption0] Save changed power state to Flash (0 = disable, 1 = enable) @@ -63,7 +65,7 @@ #define STA_PASS1 "" // [Password1] Wifi password #define STA_SSID2 "" // [Ssid2] Optional alternate AP Wifi SSID #define STA_PASS2 "" // [Password2] Optional alternate AP Wifi password -#define WIFI_CONFIG_TOOL WIFI_WAIT // [WifiConfig] Default tool if wifi fails to connect +#define WIFI_CONFIG_TOOL WIFI_RETRY // [WifiConfig] Default tool if wifi fails to connect // (WIFI_RESTART, WIFI_SMARTCONFIG, WIFI_MANAGER, WIFI_WPSCONFIG, WIFI_RETRY, WIFI_WAIT, WIFI_SERIAL) #define WIFI_CONFIG_NO_SSID WIFI_WPSCONFIG // Default tool if wifi fails to connect and no SSID is configured // (WIFI_SMARTCONFIG, WIFI_MANAGER, WIFI_WPSCONFIG, WIFI_SERIAL) @@ -94,6 +96,7 @@ #define MQTT_BUTTON_RETAIN 0 // [ButtonRetain] Button may send retain flag (0 = off, 1 = on) #define MQTT_POWER_RETAIN 0 // [PowerRetain] Power status message may send retain flag (0 = off, 1 = on) #define MQTT_SWITCH_RETAIN 0 // [SwitchRetain] Switch may send retain flag (0 = off, 1 = on) +#define MQTT_BUTTON_SWITCH_FORCE_LOCAL 0 // [SetOption61] Force local operation when button/switch topic is set (0 = off, 1 = on) #define MQTT_STATUS_OFF "OFF" // [StateText1] Command or Status result when turned off (needs to be a string like "0" or "Off") #define MQTT_STATUS_ON "ON" // [StateText2] Command or Status result when turned on (needs to be a string like "1" or "On") @@ -174,10 +177,12 @@ #define WS2812_LEDS 30 // [Pixels] Number of WS2812 LEDs to start with (max is 512) #define TEMP_CONVERSION 0 // [SetOption8] Return temperature in (0 = Celsius or 1 = Fahrenheit) +#define PRESSURE_CONVERSION 0 // [SetOption24] Return pressure in (0 = hPa or 1 = mmHg) #define TEMP_RESOLUTION 1 // [TempRes] Maximum number of decimals (0 - 3) showing sensor Temperature #define HUMIDITY_RESOLUTION 1 // [HumRes] Maximum number of decimals (0 - 3) showing sensor Humidity #define PRESSURE_RESOLUTION 1 // [PressRes] Maximum number of decimals (0 - 3) showing sensor Pressure #define ENERGY_RESOLUTION 3 // [EnergyRes] Maximum number of decimals (0 - 5) showing energy usage in kWh +#define CALC_RESOLUTION 3 // [CalcRes] Maximum number of decimals (0 - 7) used in commands ADD, SUB, MULT and SCALE /*********************************************************************************************\ * END OF SECTION 1 @@ -204,6 +209,7 @@ //#define MY_LANGUAGE pt-BR // Portuguese in Brazil //#define MY_LANGUAGE pt-PT // Portuguese in Portugal //#define MY_LANGUAGE ru-RU // Russian in Russia +//#define MY_LANGUAGE sv-SE // Swedish in Sweden //#define MY_LANGUAGE tr-TR // Turkish in Turkey //#define MY_LANGUAGE uk-UK // Ukrainian in Ukrain //#define MY_LANGUAGE zh-CN // Chinese (Simplified) in China @@ -281,8 +287,8 @@ #ifdef USE_I2C #define USE_SHT // Enable SHT1X sensor (+1k4 code) #define USE_HTU // Enable HTU21/SI7013/SI7020/SI7021 sensor (I2C address 0x40) (+1k5 code) - #define USE_BMP // Enable BMP085/BMP180/BMP280/BME280 sensors (I2C addresses 0x76 and 0x77) (+4k1 code) -// #define USE_BME680 // Enable support for BME680 sensors using Bosch BME680 library (+4k4 code) + #define USE_BMP // Enable BMP085/BMP180/BMP280/BME280 sensors (I2C addresses 0x76 and 0x77) (+4k4 code) +// #define USE_BME680 // Enable support for BME680 sensor using Bosch BME680 library (+4k code) #define USE_BH1750 // Enable BH1750 sensor (I2C address 0x23 or 0x5C) (+0k5 code) // #define USE_VEML6070 // Enable VEML6070 sensor (I2C addresses 0x38 and 0x39) (+1k5 code) #define USE_VEML6070_RSET 270000 // VEML6070, Rset in Ohm used on PCB board, default 270K = 270000ohm, range for this sensor: 220K ... 1Meg @@ -307,9 +313,11 @@ // #define USE_PCA9685_FREQ 50 // Define default PWM frequency in Hz to be used (must be within 24 to 1526) - If other value is used, it will rever to 50Hz // #define USE_MPR121 // Enable MPR121 controller (I2C addresses 0x5A, 0x5B, 0x5C and 0x5D) in input mode for touch buttons (+1k3 code) // #define USE_CCS811 // Enable CCS811 sensor (I2C address 0x5A) (+2k2 code) -// #define USE_MPU6050 // Enable MPU6050 sensor (I2C address 0x68 AD0 low or 0x69 AD0 high) (+2k6 code) +// #define USE_MPU6050 // Enable MPU6050 sensor (I2C address 0x68 AD0 low or 0x69 AD0 high) (+3K3 of code and 188 Bytes of RAM) +// #define USE_MPU6050_DMP // Enable in MPU6050 to use the DMP on the chip, should create better results (+8k6 of code) // #define USE_DS3231 // Enable DS3231 external RTC in case no Wifi is avaliable. See docs in the source file (+1k2 code) // #define USE_RTC_ADDR 0x68 // Default I2C address 0x68 +// #define USE_MGC3130 // Enable MGC3130 Electric Field Effect Sensor (I2C address 0x42) (+2k7 code, 0k3 mem) // #define USE_DISPLAY // Add I2C Display Support (+2k code) #define USE_DISPLAY_MODES1TO5 // Enable display mode 1 to 5 in addition to mode 0 @@ -335,6 +343,7 @@ #define USE_DISPLAY // Add SPI Display support for 320x240 and 480x320 TFT #endif #define USE_DISPLAY_ILI9341 // [DisplayModel 4] Enable ILI9341 Tft 480x320 display (+19k code) +// #define USE_DISPLAY_EPAPER_29 // [DisplayModel 5] Enable e-paper 2.9 inch display (+19k code) #endif // USE_SPI // -- Serial sensors ------------------------------ @@ -348,12 +357,15 @@ #define USE_SERIAL_BRIDGE // Add support for software Serial Bridge (+0k8 code) //#define USE_SDM120 // Add support for Eastron SDM120-Modbus energy meter (+1k7 code) #define SDM120_SPEED 9600 // SDM120-Modbus RS485 serial speed (default: 2400 baud) + #define USE_SDM220 // Add extra parameters for SDM220 (+0k1 code) //#define USE_SDM630 // Add support for Eastron SDM630-Modbus energy meter (+2k code) #define SDM630_SPEED 9600 // SDM630-Modbus RS485 serial speed (default: 9600 baud) //#define USE_MP3_PLAYER // Use of the DFPlayer Mini MP3 Player RB-DFR-562 commands: play, volume and stop #define MP3_VOLUME 10 // Set the startup volume on init, the range can be 0..30(max) #define USE_TUYA_DIMMER // Add support for Tuya Serial Dimmer - #define TUYA_DIMMER_ID 3 // Default dimmer Id + #define TUYA_DIMMER_ID 0 // Default dimmer Id +#define USE_ARMTRONIX_DIMMERS // Add support for Armtronix Dimmers (+1k4 code) +#define USE_PS_16_DZ // ADD support for PS-16-DZ Dimmer // Power monitoring sensors ----------------------- #define USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code) @@ -362,9 +374,12 @@ #define USE_MCP39F501 // Add support for MCP39F501 Energy monitor as used in Shelly 2 (+3k1 code) // -- Low level interface devices ----------------- -#define USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k code, 0k3 mem, 48 iram) -// #define USE_IR_HVAC // Support for HVAC system using IR (+2k code) - #define USE_IR_RECEIVE // Support for IR receiver (+5k5 code, 264 iram) +#define USE_IR_REMOTE // Send IR remote commands using library IRremoteESP8266 and ArduinoJson (+4k3 code, 0k3 mem, 48 iram) +// #define USE_IR_HVAC // Support for HVAC (Toshiba, Mitsubishi and LG) system using IR (+3k5 code) + #define USE_IR_RECEIVE // Support for IR receiver (+7k2 code, 264 iram) + #define IR_RCV_BUFFER_SIZE 100 // Max number of packets allowed in capture buffer (default 100 (*2 bytes ram)) + #define IR_RCV_TIMEOUT 15 // Number of milli-Seconds of no-more-data before we consider a message ended (default 15) + #define IR_RCV_MIN_UNKNOWN_SIZE 6 // Set the smallest sized "UNKNOWN" message packets we actually care about (default 6) #define USE_WS2812 // WS2812 Led string using library NeoPixelBus (+5k code, +1k mem, 232 iram) - Disable by // #define USE_WS2812_CTYPE NEO_GRB // WS2812 Color type (NEO_RGB, NEO_GRB, NEO_BRG, NEO_RBG, NEO_RGBW, NEO_GRBW) @@ -384,6 +399,10 @@ #define USE_RC_SWITCH // Add support for RF transceiver using library RcSwitch (+2k7 code, 460 iram) +//#define USE_RF_SENSOR // Add support for RF sensor receiver (434MHz or 868MHz) (+0k8 code) +// #define USE_THEO_V2 // Add support for decoding Theo V2 sensors as documented on https://sidweb.nl using 434MHz RF sensor receiver (+1k4 code) +// #define USE_ALECTO_V2 // Add support for decoding Alecto V2 sensors like ACH2010, WS3000 and DKW2012 using 868MHz RF sensor receiver (+1k7 code) + /*********************************************************************************************\ * Debug features are only supported in development branch \*********************************************************************************************/ diff --git a/sonoff/settings.h b/sonoff/settings.h index 4d1d61cd4..d18ab6886 100644 --- a/sonoff/settings.h +++ b/sonoff/settings.h @@ -48,8 +48,8 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu uint32_t not_power_linked : 1; // bit 20 (v5.11.1f) uint32_t no_power_on_check : 1; // bit 21 (v5.11.1i) uint32_t mqtt_serial : 1; // bit 22 (v5.12.0f) - uint32_t mqtt_serial_raw : 1; // bit 23 (v6.1.1c) - uint32_t rules_once : 1; // bit 24 (v5.12.0k) - free since v5.14.0b + uint32_t mqtt_serial_raw : 1; // bit 23 (v6.1.1c) // Was rules_enabled until 5.14.0b + uint32_t pressure_conversion : 1; // bit 24 (v6.3.0.2) // Was rules_once until 5.14.0b uint32_t knx_enabled : 1; // bit 25 (v5.12.0l) KNX uint32_t device_index_enable : 1; // bit 26 (v5.13.1a) uint32_t knx_enable_enhancement : 1; // bit 27 (v5.14.0a) KNX @@ -67,14 +67,14 @@ typedef union { // Restricted by MISRA-C Rule 18.4 bu uint32_t user_esp8285_enable : 1; // bit 1 (v6.1.1.14) uint32_t time_append_timezone : 1; // bit 2 (v6.2.1.2) uint32_t gui_hostname_ip : 1; // bit 3 (v6.2.1.20) - uint32_t spare04 : 1; - uint32_t spare05 : 1; - uint32_t spare06 : 1; - uint32_t spare07 : 1; - uint32_t spare08 : 1; - uint32_t spare09 : 1; - uint32_t spare10 : 1; - uint32_t spare11 : 1; + uint32_t tuya_apply_o20 : 1; // bit 4 (v6.3.0.4) + uint32_t hass_short_discovery_msg : 1; // bit 5 (v6.3.0.7) + uint32_t use_wifi_scan : 1; // bit 6 (v6.3.0.10) + uint32_t use_wifi_rescan : 1; // bit 7 (v6.3.0.10) + uint32_t receive_raw : 1; // bit 8 (v6.3.0.11) + uint32_t hass_tele_on_power : 1; // bit 9 (v6.3.0.13) + uint32_t sleep_normal : 1; // bit 10 (v6.3.0.15) - SetOption60 - Enable normal sleep instead of dynamic sleep + uint32_t button_switch_force_local : 1;// bit 11 uint32_t spare12 : 1; uint32_t spare13 : 1; uint32_t spare14 : 1; @@ -107,9 +107,7 @@ typedef union { uint32_t spare03 : 1; uint32_t spare04 : 1; uint32_t spare05 : 1; - uint32_t spare06 : 1; - uint32_t spare07 : 1; - uint32_t spare08 : 1; + uint32_t calc_resolution : 3; uint32_t weight_resolution : 2; uint32_t frequency_resolution : 2; uint32_t axis_resolution : 2; @@ -158,7 +156,7 @@ typedef union { uint16_t int_report_mode : 2; // Interrupt reporting mode 0 = immediate telemetry & event, 1 = immediate event only, 2 = immediate telemetry only uint16_t int_report_defer : 4; // Number of interrupts to ignore until reporting (default 0, max 15) uint16_t int_count_en : 1; // Enable interrupt counter for this pin - uint16_t spare12 : 1; + uint16_t int_retain_flag : 1; // Report if interrupt occured for pin in next teleperiod uint16_t spare13 : 1; uint16_t spare14 : 1; uint16_t spare15 : 1; @@ -302,9 +300,7 @@ struct SYSCFG { uint16_t pulse_counter_type; // 5D0 uint16_t pulse_counter_debounce; // 5D2 uint8_t rf_code[17][9]; // 5D4 - - byte free_66d[1]; // 66D - + uint8_t timezone_minutes; // 66D uint16_t switch_debounce; // 66E Timer timer[MAX_TIMERS]; // 670 int latitude; // 6B0 @@ -322,8 +318,12 @@ struct SYSCFG { uint16_t mcp230xx_int_timer; // 718 uint8_t rgbwwTable[5]; // 71A - byte free_71F[149]; // 71F + byte free_71F[117]; // 71F + uint32_t drivers[3]; // 794 + uint32_t monitors; // 7A0 + uint32_t sensors[3]; // 7A4 + uint32_t displays; // 7B0 uint32_t energy_kWhtotal_time; // 7B4 unsigned long weight_item; // 7B8 Weight of one item in gram * 10 diff --git a/sonoff/settings.ino b/sonoff/settings.ino index 4116a1c6d..46c1d849d 100644 --- a/sonoff/settings.ino +++ b/sonoff/settings.ino @@ -69,7 +69,7 @@ uint32_t rtc_settings_crc = 0; -uint32_t GetRtcSettingsCrc() +uint32_t GetRtcSettingsCrc(void) { uint32_t crc = 0; uint8_t *bytes = (uint8_t*)&RtcSettings; @@ -80,7 +80,7 @@ uint32_t GetRtcSettingsCrc() return crc; } -void RtcSettingsSave() +void RtcSettingsSave(void) { if (GetRtcSettingsCrc() != rtc_settings_crc) { RtcSettings.valid = RTC_MEM_VALID; @@ -89,7 +89,7 @@ void RtcSettingsSave() } } -void RtcSettingsLoad() +void RtcSettingsLoad(void) { ESP.rtcUserMemoryRead(100, (uint32_t*)&RtcSettings, sizeof(RTCMEM)); // 0x290 if (RtcSettings.valid != RTC_MEM_VALID) { @@ -106,7 +106,7 @@ void RtcSettingsLoad() rtc_settings_crc = GetRtcSettingsCrc(); } -boolean RtcSettingsValid() +boolean RtcSettingsValid(void) { return (RTC_MEM_VALID == RtcSettings.valid); } @@ -115,7 +115,7 @@ boolean RtcSettingsValid() uint32_t rtc_reboot_crc = 0; -uint32_t GetRtcRebootCrc() +uint32_t GetRtcRebootCrc(void) { uint32_t crc = 0; uint8_t *bytes = (uint8_t*)&RtcReboot; @@ -126,7 +126,7 @@ uint32_t GetRtcRebootCrc() return crc; } -void RtcRebootSave() +void RtcRebootSave(void) { if (GetRtcRebootCrc() != rtc_reboot_crc) { RtcReboot.valid = RTC_MEM_VALID; @@ -135,7 +135,7 @@ void RtcRebootSave() } } -void RtcRebootLoad() +void RtcRebootLoad(void) { ESP.rtcUserMemoryRead(100 - sizeof(RTCRBT), (uint32_t*)&RtcReboot, sizeof(RTCRBT)); // 0x280 if (RtcReboot.valid != RTC_MEM_VALID) { @@ -147,7 +147,7 @@ void RtcRebootLoad() rtc_reboot_crc = GetRtcRebootCrc(); } -boolean RtcRebootValid() +boolean RtcRebootValid(void) { return (RTC_MEM_VALID == RtcReboot.valid); } @@ -179,7 +179,7 @@ uint8_t *settings_buffer = NULL; /* * Based on cores/esp8266/Updater.cpp */ -void SetFlashModeDout() +void SetFlashModeDout(void) { uint8_t *_buffer; uint32_t address; @@ -198,7 +198,7 @@ void SetFlashModeDout() delete[] _buffer; } -void SettingsBufferFree() +void SettingsBufferFree(void) { if (settings_buffer != NULL) { free(settings_buffer); @@ -206,7 +206,7 @@ void SettingsBufferFree() } } -bool SettingsBufferAlloc() +bool SettingsBufferAlloc(void) { SettingsBufferFree(); if (!(settings_buffer = (uint8_t *)malloc(sizeof(Settings)))) { @@ -216,7 +216,7 @@ bool SettingsBufferAlloc() return true; } -uint16_t GetSettingsCrc() +uint16_t GetSettingsCrc(void) { uint16_t crc = 0; uint8_t *bytes = (uint8_t*)&Settings; @@ -227,7 +227,7 @@ uint16_t GetSettingsCrc() return crc; } -void SettingsSaveAll() +void SettingsSaveAll(void) { if (Settings.flag.save_state) { Settings.power = power; @@ -242,7 +242,7 @@ void SettingsSaveAll() * Config Save - Save parameters to Flash ONLY if any parameter has changed \*********************************************************************************************/ -uint32_t GetSettingsAddress() +uint32_t GetSettingsAddress(void) { return settings_location * SPI_FLASH_SEC_SIZE; } @@ -294,7 +294,7 @@ void SettingsSave(byte rotate) RtcSettingsSave(); } -void SettingsLoad() +void SettingsLoad(void) { /* Load configuration from eeprom or one of 7 slots below if first load does not stop_flash_rotate */ @@ -334,6 +334,7 @@ void SettingsErase(uint8_t type) 1 = Erase SDK parameter area at end of linker memory model (0x0FDxxx - 0x0FFFFF) solving possible wifi errors */ +#ifndef BE_MINIMAL bool result; uint32_t _sectorStart = (ESP.getSketchSize() / SPI_FLASH_SEC_SIZE) + 1; @@ -362,6 +363,7 @@ void SettingsErase(uint8_t type) } OsWatchLoop(); } +#endif // BE_MINIMAL } // Copied from 2.4.0 as 2.3.0 is incomplete @@ -377,7 +379,7 @@ bool SettingsEraseConfig(void) { return true; } -void SettingsSdkErase() +void SettingsSdkErase(void) { WiFi.disconnect(true); // Delete SDK wifi config SettingsErase(1); @@ -387,7 +389,7 @@ void SettingsSdkErase() /********************************************************************************************/ -void SettingsDefault() +void SettingsDefault(void) { AddLog_P(LOG_LEVEL_NONE, PSTR(D_LOG_CONFIG D_USE_DEFAULTS)); SettingsDefaultSet1(); @@ -395,7 +397,7 @@ void SettingsDefault() SettingsSave(2); } -void SettingsDefaultSet1() +void SettingsDefaultSet1(void) { memset(&Settings, 0x00, sizeof(SYSCFG)); @@ -407,7 +409,7 @@ void SettingsDefaultSet1() // Settings.cfg_crc = 0; } -void SettingsDefaultSet2() +void SettingsDefaultSet2(void) { memset((char*)&Settings +16, 0x00, sizeof(SYSCFG) -16); @@ -415,6 +417,9 @@ void SettingsDefaultSet2() // Settings.flag.stop_flash_rotate = 0; Settings.save_data = SAVE_DATA; Settings.sleep = APP_SLEEP; + if (Settings.sleep < 50) { + Settings.sleep = 50; // Default to 50 for sleep, for now + } // Module // Settings.flag.interlock = 0; @@ -481,6 +486,7 @@ void SettingsDefaultSet2() Settings.flag.mqtt_power_retain = MQTT_POWER_RETAIN; Settings.flag.mqtt_button_retain = MQTT_BUTTON_RETAIN; Settings.flag.mqtt_switch_retain = MQTT_SWITCH_RETAIN; + Settings.flag3.button_switch_force_local = MQTT_BUTTON_SWITCH_FORCE_LOCAL; // Settings.flag.mqtt_sensor_retain = 0; // Settings.flag.mqtt_offline = 0; // Settings.flag.mqtt_serial = 0; @@ -563,15 +569,17 @@ void SettingsDefaultSet2() // Sensor Settings.flag.temperature_conversion = TEMP_CONVERSION; + Settings.flag.pressure_conversion = PRESSURE_CONVERSION; Settings.flag2.pressure_resolution = PRESSURE_RESOLUTION; Settings.flag2.humidity_resolution = HUMIDITY_RESOLUTION; Settings.flag2.temperature_resolution = TEMP_RESOLUTION; // Settings.altitude = 0; // Rules -// Settings.flag.rules_enabled = 0; -// Settings.flag.rules_once = 0; +// Settings.rule_enabled = 0; +// Settings.rule_once = 0; // for (byte i = 1; i < MAX_RULE_SETS; i++) { Settings.rules[i][0] = '\0'; } + Settings.flag2.calc_resolution = CALC_RESOLUTION; // Home Assistant Settings.flag.hass_discovery = HOME_ASSISTANT_DISCOVERY_ENABLE; @@ -607,7 +615,13 @@ void SettingsDefaultSet2() SettingsDefaultSet_5_10_1(); // Display settings // Time - Settings.timezone = APP_TIMEZONE; + if (((APP_TIMEZONE > -14) && (APP_TIMEZONE < 15)) || (99 == APP_TIMEZONE)) { + Settings.timezone = APP_TIMEZONE; + Settings.timezone_minutes = 0; + } else { + Settings.timezone = APP_TIMEZONE / 60; + Settings.timezone_minutes = abs(APP_TIMEZONE % 60); + } strlcpy(Settings.ntp_server[0], NTP_SERVER1, sizeof(Settings.ntp_server[0])); strlcpy(Settings.ntp_server[1], NTP_SERVER2, sizeof(Settings.ntp_server[1])); strlcpy(Settings.ntp_server[2], NTP_SERVER3, sizeof(Settings.ntp_server[2])); @@ -628,11 +642,13 @@ void SettingsDefaultSet2() for (byte j = 0; j < 5; j++) { Settings.rgbwwTable[j] = 255; } + + memset(&Settings.drivers, 0xFF, 32); // Enable all possible monitors, displays, drivers and sensors } /********************************************************************************************/ -void SettingsDefaultSet_5_8_1() +void SettingsDefaultSet_5_8_1(void) { // Settings.flag.ws_clock_reverse = 0; Settings.ws_width[WS_SECOND] = 1; @@ -649,7 +665,7 @@ void SettingsDefaultSet_5_8_1() Settings.ws_color[WS_HOUR][WS_BLUE] = 0; } -void SettingsDefaultSet_5_10_1() +void SettingsDefaultSet_5_10_1(void) { Settings.display_model = 0; Settings.display_mode = 1; @@ -671,7 +687,7 @@ void SettingsDefaultSet_5_10_1() Settings.display_address[7] = MTX_ADDRESS8; } -void SettingsResetStd() +void SettingsResetStd(void) { Settings.tflag[0].hemis = TIME_STD_HEMISPHERE; Settings.tflag[0].week = TIME_STD_WEEK; @@ -681,7 +697,7 @@ void SettingsResetStd() Settings.toffset[0] = TIME_STD_OFFSET; } -void SettingsResetDst() +void SettingsResetDst(void) { Settings.tflag[1].hemis = TIME_DST_HEMISPHERE; Settings.tflag[1].week = TIME_DST_WEEK; @@ -691,7 +707,7 @@ void SettingsResetDst() Settings.toffset[1] = TIME_DST_OFFSET; } -void SettingsDefaultSet_5_13_1c() +void SettingsDefaultSet_5_13_1c(void) { SettingsResetStd(); SettingsResetDst(); @@ -699,7 +715,7 @@ void SettingsDefaultSet_5_13_1c() /********************************************************************************************/ -void SettingsDelta() +void SettingsDelta(void) { if (Settings.version != VERSION) { // Fix version dependent changes @@ -798,8 +814,8 @@ void SettingsDelta() } if (Settings.version < 0x050E0002) { for (byte i = 1; i < MAX_RULE_SETS; i++) { Settings.rules[i][0] = '\0'; } - Settings.rule_enabled = Settings.flag.mqtt_serial_raw; - Settings.rule_once = Settings.flag.rules_once; + Settings.rule_enabled = Settings.flag.mqtt_serial_raw; // Was rules_enabled until 5.14.0b + Settings.rule_once = Settings.flag.pressure_conversion; // Was rules_once until 5.14.0b } if (Settings.version < 0x06000000) { Settings.cfg_size = sizeof(SYSCFG); @@ -820,8 +836,8 @@ void SettingsDelta() } } if (Settings.version < 0x06000003) { - Settings.flag.mqtt_serial_raw = 0; - Settings.flag.rules_once = 0; + Settings.flag.mqtt_serial_raw = 0; // Was rules_enabled until 5.14.0b + Settings.flag.pressure_conversion = 0; // Was rules_once until 5.14.0b Settings.flag3.data = 0; } if (Settings.version < 0x06010103) { @@ -836,6 +852,20 @@ void SettingsDelta() Settings.rgbwwTable[j] = 255; } } + if (Settings.version < 0x06030002) { + Settings.timezone_minutes = 0; + } + if (Settings.version < 0x06030004) { + memset(&Settings.drivers, 0xFF, 32); // Enable all possible monitors, displays, drivers and sensors + } + if (Settings.version < 0x0603000E) { + Settings.flag2.calc_resolution = CALC_RESOLUTION; + } + if (Settings.version < 0x0603000F) { + if (Settings.sleep < 50) { + Settings.sleep = 50; // Default to 50 for sleep, for now + } + } Settings.version = VERSION; SettingsSave(1); diff --git a/sonoff/sonoff.h b/sonoff/sonoff.h index 9bcbbb731..71c761b28 100644 --- a/sonoff/sonoff.h +++ b/sonoff/sonoff.h @@ -20,6 +20,18 @@ #ifndef _SONOFF_H_ #define _SONOFF_H_ +/*********************************************************************************************\ + * Performance ROM (PROGMEM) vs RAM (RODATA) +\*********************************************************************************************/ + +//#define XFUNC_PTR_IN_ROM // Enable for keeping tables in ROM (PROGMEM) which seem to have access issues on some flash types + +/*********************************************************************************************\ + * Default sensor states +\*********************************************************************************************/ + +#define CODE_IMAGE 0 + #define USE_DHT // Default DHT11 sensor needs no external library #define USE_ENERGY_SENSOR // Use energy sensors (+14k code) #define USE_HLW8012 // Use energy sensor for Sonoff Pow and WolfBlitz @@ -50,6 +62,10 @@ typedef unsigned long power_t; // Power (Relay) type #define MAX_DOMOTICZ_SNS_IDX 12 // Max number of Domoticz sensors indices #define MAX_KNX_GA 10 // Max number of KNX Group Addresses to read that can be set #define MAX_KNX_CB 10 // Max number of KNX Group Addresses to write that can be set +#define MAX_XNRG_DRIVERS 32 // Max number of allowed energy drivers +#define MAX_XDSP_DRIVERS 32 // Max number of allowed display drivers +#define MAX_XDRV_DRIVERS 96 // Max number of allowed driver drivers +#define MAX_XSNS_DRIVERS 96 // Max number of allowed sensor drivers #define MAX_RULE_MEMS 5 // Max number of saved vars #define MAX_RULE_SETS 3 // Max number of rule sets of size 512 characters #define MAX_RULE_SIZE 512 // Max number of characters in rules @@ -58,6 +74,8 @@ typedef unsigned long power_t; // Power (Relay) type #define MAX_RULE_TIMERS 8 // Max number of rule timers (4 bytes / timer) #define MAX_RULE_VARS 5 // Max number of rule variables (10 bytes / variable) +#define MAX_FAN_SPEED 4 // Max number of iFan02 fan speeds (0 .. 3) + #define MQTT_TOKEN_PREFIX "%prefix%" // To be substituted by mqtt_prefix[x] #define MQTT_TOKEN_TOPIC "%topic%" // To be substituted by mqtt_topic, mqtt_grptopic, mqtt_buttontopic, mqtt_switchtopic #define MQTT_TOKEN_HOSTNAME "%hostname%" // To be substituted by mqtt_topic, mqtt_grptopic, mqtt_buttontopic, mqtt_switchtopic @@ -103,7 +121,7 @@ typedef unsigned long power_t; // Power (Relay) type #define INPUT_BUFFER_SIZE 520 // Max number of characters in (serial and http) command buffer #define CMDSZ 24 // Max number of characters in command #define TOPSZ 100 // Max number of characters in topic string -#define LOGSZ 512 // Max number of characters in log +#define LOGSZ 520 // Max number of characters in log #define MIN_MESSZ 893 // Min number of characters in MQTT message #define SENSOR_MAX_MISS 5 // Max number of missed sensor reads before deciding it's offline @@ -122,6 +140,9 @@ typedef unsigned long power_t; // Power (Relay) type #define SERIAL_POLLING 100 // Serial receive polling in ms #define MAX_STATUS 11 // Max number of status lines +#define DRIVER_BOOT_DELAY 1 // Number of milliseconds to retard driver cycles during boot-up time to reduce overall CPU load whilst Wifi is connecting +#define LOOP_SLEEP_DELAY 50 // Lowest number of milliseconds to go through the main loop using delay when needed + #define NO_EXTRA_4K_HEAP // Allocate 4k heap for WPS in ESP8166/Arduino core v2.4.2 (was always allocated in previous versions) /* @@ -133,7 +154,9 @@ typedef unsigned long power_t; // Power (Relay) type #define tmax(a,b) ((a)>(b)?(a):(b)) #define STR_HELPER(x) #x +#ifndef STR #define STR(x) STR_HELPER(x) +#endif //enum ws2812NeopixelbusFeature { NEO_RGB, NEO_GRB, NEO_BRG, NEO_RBG, NEO_3LED, NEO_RGBW, NEO_GRBW }; // Doesn't work #define NEO_RGB 0 // Neopixel RGB leds @@ -203,15 +226,18 @@ enum ButtonStates { PRESSED, NOT_PRESSED }; enum Shortcuts { SC_CLEAR, SC_DEFAULT, SC_USER }; -enum SettingsParmaIndex {P_HOLD_TIME, P_MAX_POWER_RETRY, P_TUYA_DIMMER_ID, P_MDNS_DELAYED_START, P_MAX_PARAM8}; // Max is PARAM8_SIZE (18) +enum SettingsParmaIndex {P_HOLD_TIME, P_MAX_POWER_RETRY, P_TUYA_DIMMER_ID, P_MDNS_DELAYED_START, P_MAX_PARAM8}; // Max is PARAM8_SIZE (18) - SetOption32 until SetOption49 enum DomoticzSensors {DZ_TEMP, DZ_TEMP_HUM, DZ_TEMP_HUM_BARO, DZ_POWER_ENERGY, DZ_ILLUMINANCE, DZ_COUNT, DZ_VOLTAGE, DZ_CURRENT, DZ_AIRQUALITY, DZ_MAX_SENSORS}; enum Ws2812ClockIndex { WS_SECOND, WS_MINUTE, WS_HOUR, WS_MARKER }; enum Ws2812Color { WS_RED, WS_GREEN, WS_BLUE }; -enum LightTypes {LT_BASIC, LT_PWM1, LT_PWM2, LT_PWM3, LT_PWM4, LT_PWM5, LT_PWM6, LT_PWM7, LT_SERIAL, LT_NU9, LT_NU10, LT_WS2812, LT_RGBW, LT_RGBWC}; -enum LichtSubtypes {LST_NONE, LST_SINGLE, LST_COLDWARM, LST_RGB, LST_RGBW, LST_RGBWC}; -enum LichtSchemes {LS_POWER, LS_WAKEUP, LS_CYCLEUP, LS_CYCLEDN, LS_RANDOM, LS_MAX}; + +enum LightSubtypes { LST_NONE, LST_SINGLE, LST_COLDWARM, LST_RGB, LST_RGBW, LST_RGBWC }; // Do not insert new fields +enum LightTypes { LT_BASIC, LT_PWM1, LT_PWM2, LT_PWM3, LT_PWM4, LT_PWM5, LT_PWM6, LT_PWM7, + LT_NU8, LT_SERIAL1, LT_SERIAL2, LT_WS2812, LT_RGBW, LT_RGBWC, LT_NU14, LT_NU15 }; // Do not insert new fields + +enum LightSchemes {LS_POWER, LS_WAKEUP, LS_CYCLEUP, LS_CYCLEDN, LS_RANDOM, LS_MAX}; enum XsnsFunctions {FUNC_SETTINGS_OVERRIDE, FUNC_MODULE_INIT, FUNC_PRE_INIT, FUNC_INIT, FUNC_LOOP, FUNC_EVERY_50_MSECOND, FUNC_EVERY_100_MSECOND, FUNC_EVERY_200_MSECOND, FUNC_EVERY_250_MSECOND, FUNC_EVERY_SECOND, @@ -221,12 +247,14 @@ enum XsnsFunctions {FUNC_SETTINGS_OVERRIDE, FUNC_MODULE_INIT, FUNC_PRE_INIT, FUN FUNC_RULES_PROCESS, FUNC_SERIAL, FUNC_FREE_MEM, FUNC_BUTTON_PRESSED, FUNC_WEB_ADD_BUTTON, FUNC_WEB_ADD_MAIN_BUTTON, FUNC_WEB_ADD_HANDLER}; -const uint8_t kDefaultRfCode[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 }; - enum CommandSource { SRC_IGNORE, SRC_MQTT, SRC_RESTART, SRC_BUTTON, SRC_SWITCH, SRC_BACKLOG, SRC_SERIAL, SRC_WEBGUI, SRC_WEBCOMMAND, SRC_WEBCONSOLE, SRC_PULSETIMER, SRC_TIMER, SRC_RULE, SRC_MAXPOWER, SRC_MAXENERGY, SRC_LIGHT, SRC_KNX, SRC_DISPLAY, SRC_WEMO, SRC_HUE, SRC_RETRY, SRC_MAX }; const char kCommandSource[] PROGMEM = "I|MQTT|Restart|Button|Switch|Backlog|Serial|WebGui|WebCommand|WebConsole|PulseTimer|Timer|Rule|MaxPower|MaxEnergy|Light|Knx|Display|Wemo|Hue|Retry"; +const uint8_t kDefaultRfCode[9] PROGMEM = { 0x21, 0x16, 0x01, 0x0E, 0x03, 0x48, 0x2E, 0x1A, 0x00 }; + +const uint8_t kIFan02Speed[MAX_FAN_SPEED][3] = {{6,6,6}, {7,6,6}, {7,7,6}, {7,6,7}}; // Do not use PROGMEM as it fails + /*********************************************************************************************\ * Extern global variables \*********************************************************************************************/ diff --git a/sonoff/sonoff.ino b/sonoff/sonoff.ino index 2258ab240..362b48ced 100755 --- a/sonoff/sonoff.ino +++ b/sonoff/sonoff.ino @@ -45,16 +45,10 @@ #endif // Libraries -#include // RTC, Energy, OSWatch -#include // MQTT, Ota, WifiManager -#include // MQTT, Ota +#include // Ota #include // Ota #include // Webserver, Updater #include // WemoHue, IRremote, Domoticz -#ifdef USE_WEBSERVER - #include // WifiManager, Webserver - #include // WifiManager -#endif // USE_WEBSERVER #ifdef USE_ARDUINO_OTA #include // Arduino OTA #ifndef USE_DISCOVERY @@ -95,17 +89,11 @@ const char kTasmotaCommands[] PROGMEM = D_CMND_TELEPERIOD "|" D_CMND_RESTART "|" D_CMND_RESET "|" D_CMND_TIMEZONE "|" D_CMND_TIMESTD "|" D_CMND_TIMEDST "|" D_CMND_ALTITUDE "|" D_CMND_LEDPOWER "|" D_CMND_LEDSTATE "|" D_CMND_I2CSCAN "|" D_CMND_SERIALSEND "|" D_CMND_BAUDRATE "|" D_CMND_SERIALDELIMITER "|" D_CMND_DRIVER; -const uint8_t kIFan02Speed[4][3] = {{6,6,6}, {7,6,6}, {7,7,6}, {7,6,7}}; +const char kSleepMode[] PROGMEM = "Dynamic|Normal"; // Global variables SerialConfig serial_config = SERIAL_8N1; // Serial interface configuration 8 data bits, No parity, 1 stop bit -#ifdef USE_MQTT_TLS - WiFiClientSecure EspClient; // Wifi Secure Client -#else - WiFiClient EspClient; // Wifi Client -#endif - WiFiUDP PortUdp; // UDP Syslog and Alexa unsigned long feature_drv1; // Compiled driver feature map @@ -137,6 +125,7 @@ int wifi_state_flag = WIFI_RESTART; // Wifi state flag int tele_period = 1; // Tele period timer int blinks = 201; // Number of LED blinks uint32_t uptime = 0; // Counting every second until 4294967295 = 130 year +uint32_t loop_load_avg = 0; // Indicative loop load average uint32_t global_update = 0; // Timestamp of last global temperature and humidity update float global_temperature = 0; // Provide a global temperature to be used by some sensors float global_humidity = 0; // Provide a global humidity to be used by some sensors @@ -176,6 +165,7 @@ uint8_t dht_flg = 0; // DHT configured uint8_t energy_flg = 0; // Energy monitor configured uint8_t i2c_flg = 0; // I2C configured uint8_t spi_flg = 0; // SPI configured +uint8_t soft_spi_flg = 0; // Software SPI configured uint8_t light_type = 0; // Light types uint8_t ntp_force_sync = 0; // Force NTP sync byte serial_in_byte; // Received byte @@ -193,6 +183,7 @@ boolean mdns_begun = false; // mDNS active mytmplt my_module; // Active copy of Module name and GPIOs (23 x 8 bits) StateBitfield global_state; // Global states (currently Wifi and Mqtt) (8 bits) char my_version[33]; // Composed version string +char my_image[33]; // Code image and/or commit char my_hostname[33]; // Composed Wifi hostname char mqtt_client[33]; // Composed MQTT Clientname char mqtt_topic[33]; // Composed MQTT topic @@ -202,6 +193,7 @@ char log_data[LOGSZ]; // Logging char web_log[WEB_LOG_SIZE] = {'\0'}; // Web log buffer String backlog[MAX_BACKLOG]; // Command backlog + /********************************************************************************************/ char* Format(char* output, const char* input, int size) @@ -377,7 +369,7 @@ void SetLedPower(uint8_t state) digitalWrite(pin[GPIO_LED1], (bitRead(led_inverted, 0)) ? !state : state); } -uint8_t GetFanspeed() +uint8_t GetFanspeed(void) { uint8_t fanspeed = 0; @@ -396,11 +388,14 @@ uint8_t GetFanspeed() void SetFanspeed(uint8_t fanspeed) { - for (byte i = 0; i < 3; i++) { + for (byte i = 0; i < MAX_FAN_SPEED -1; i++) { uint8_t state = kIFan02Speed[fanspeed][i]; // uint8_t state = pgm_read_byte(kIFan02Speed +(speed *3) +i); ExecuteCommandPower(i +2, state, SRC_IGNORE); // Use relay 2, 3 and 4 } +#ifdef USE_DOMOTICZ + DomoticzUpdateFanState(); // Command FanSpeed feedback +#endif // USE_DOMOTICZ } void SetPulseTimer(uint8_t index, uint16_t time) @@ -530,7 +525,7 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) char *blcommand = strtok(dataBuf, ";"); while ((blcommand != NULL) && (backlog_index != bl_pointer)) { while(true) { - blcommand = LTrim(blcommand); + blcommand = Trim(blcommand); if (!strncasecmp_P(blcommand, PSTR(D_CMND_BACKLOG), strlen(D_CMND_BACKLOG))) { blcommand += strlen(D_CMND_BACKLOG); // Skip unnecessary command Backlog } else { @@ -572,14 +567,14 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) if (data_len > 0) { if ('-' == dataBuf[0]) { payload = (int16_t)GetFanspeed() -1; - if (payload < 0) { payload = 3; } + if (payload < 0) { payload = MAX_FAN_SPEED -1; } } else if ('+' == dataBuf[0]) { payload = GetFanspeed() +1; - if (payload > 3) { payload = 0; } + if (payload > MAX_FAN_SPEED -1) { payload = 0; } } } - if ((payload >= 0) && (payload <= 3) && (payload != GetFanspeed())) { + if ((payload >= 0) && (payload < MAX_FAN_SPEED) && (payload != GetFanspeed())) { SetFanspeed(payload); } snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, GetFanspeed()); @@ -593,6 +588,9 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) else if (CMND_STATE == command_code) { mqtt_data[0] = '\0'; MqttShowState(); + if (Settings.flag3.hass_tele_on_power) { + MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_STATE), MQTT_TELE_RETAIN); + } } else if (CMND_SLEEP == command_code) { if ((payload >= 0) && (payload < 251)) { @@ -609,7 +607,6 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) // We also need at least 3 chars to make a valid version number string. if (((1 == data_len) && (1 == payload)) || ((data_len >= 3) && NewerVersion(dataBuf))) { ota_state_flag = 3; -// snprintf_P(mqtt_data, sizeof(mqtt_data), "{\"%s\":\"" D_JSON_VERSION " %s " D_JSON_FROM " %s\"}", command, my_version, Settings.ota_url); snprintf_P(mqtt_data, sizeof(mqtt_data), "{\"%s\":\"" D_JSON_VERSION " %s " D_JSON_FROM " %s\"}", command, my_version, GetOtaUrl(stemp1, sizeof(stemp1))); } else { snprintf_P(mqtt_data, sizeof(mqtt_data), "{\"%s\":\"" D_JSON_ONE_OR_GT "\"}", command, my_version); @@ -755,6 +752,13 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) else if (1 == ptype) { // SetOption50 .. 81 if (payload <= 1) { bitWrite(Settings.flag3.data, pindex, payload); + if (60 == ptype) { // SetOption60 enable or disable traditional sleep + if (payload == 0) { // Dynamic Sleep + WiFiSetSleepMode(); // Update WiFi sleep mode accordingly + } else { // Traditional Sleep //AT + WiFiSetSleepMode(); // Update WiFi sleep mode accordingly + } + } } } else { // SetOption32 .. 49 @@ -869,13 +873,20 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) mytmplt cmodule; memcpy_P(&cmodule, &kModules[Settings.module], sizeof(cmodule)); if ((GPIO_USER == ValidGPIO(index, cmodule.gp.io[index])) && (payload >= 0) && (payload < GPIO_SENSOR_END)) { - for (byte i = 0; i < MAX_GPIO_PIN; i++) { - if ((GPIO_USER == ValidGPIO(i, cmodule.gp.io[i])) && (Settings.my_gp.io[i] == payload)) { - Settings.my_gp.io[i] = 0; - } + bool present = false; + for (byte i = 0; i < sizeof(kGpioNiceList); i++) { + uint8_t midx = pgm_read_byte(kGpioNiceList + i); + if (midx == payload) { present = true; } + } + if (present) { + for (byte i = 0; i < MAX_GPIO_PIN; i++) { + if ((GPIO_USER == ValidGPIO(i, cmodule.gp.io[i])) && (Settings.my_gp.io[i] == payload)) { + Settings.my_gp.io[i] = 0; + } + } + Settings.my_gp.io[index] = payload; + restart_flag = 2; } - Settings.my_gp.io[index] = payload; - restart_flag = 2; } snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{")); for (byte i = 0; i < MAX_GPIO_PIN; i++) { @@ -895,16 +906,19 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) else if (CMND_GPIOS == command_code) { mytmplt cmodule; memcpy_P(&cmodule, &kModules[Settings.module], sizeof(cmodule)); - for (byte i = 0; i < GPIO_SENSOR_END; i++) { - if (!GetUsedInModule(i, cmodule.gp.io)) { + uint8_t midx; + for (byte i = 0; i < sizeof(kGpioNiceList); i++) { + midx = pgm_read_byte(kGpioNiceList + i); + if (!GetUsedInModule(midx, cmodule.gp.io)) { + if (!jsflg) { snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_GPIOS "%d\":["), lines); } else { snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,"), mqtt_data); } jsflg = 1; - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s\"%d (%s)\""), mqtt_data, i, GetTextIndexed(stemp1, sizeof(stemp1), i, kSensorNames)); - if ((strlen(mqtt_data) > (LOGSZ - TOPSZ)) || (i == GPIO_SENSOR_END -1)) { + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s\"%d (%s)\""), mqtt_data, midx, GetTextIndexed(stemp1, sizeof(stemp1), midx, kSensorNames)); + if ((strlen(mqtt_data) > (LOGSZ - TOPSZ)) || (i == sizeof(kGpioNiceList) -1)) { snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s]}"), mqtt_data); MqttPublishPrefixTopic_P(RESULT_OR_STAT, type); jsflg = 0; @@ -912,6 +926,7 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) } } } + mqtt_data[0] = '\0'; } else if ((CMND_PWM == command_code) && pwm_present && (index > 0) && (index <= MAX_PWMS)) { @@ -1110,7 +1125,7 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) wifi_state_flag = Settings.sta_config; snprintf_P(stemp1, sizeof(stemp1), kWifiConfig[Settings.sta_config]); snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_WIFICONFIG "\":\"%s " D_JSON_SELECTED "\"}"), stemp1); - if (WifiState() != WIFI_RESTART) { + if (WifiState() > WIFI_RESTART) { // snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s after restart"), mqtt_data); restart_flag = 2; } @@ -1163,10 +1178,29 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) } } else if (CMND_TIMEZONE == command_code) { - if ((data_len > 0) && (((payload >= -13) && (payload <= 14)) || (99 == payload))) { + if ((data_len > 0) && (payload >= -13)) { Settings.timezone = payload; + Settings.timezone_minutes = 0; + if (payload < 15) { + p = strtok (dataBuf, ":"); + if (p) { + p = strtok (NULL, ":"); + if (p) { + Settings.timezone_minutes = strtol(p, NULL, 10); + if (Settings.timezone_minutes > 59) { Settings.timezone_minutes = 59; } + } + } + } else { + Settings.timezone = 99; + } + ntp_force_sync = 1; + } + if (99 == Settings.timezone) { + snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, Settings.timezone); + } else { + snprintf_P(stemp1, sizeof(stemp1), PSTR("%+03d:%02d"), Settings.timezone, Settings.timezone_minutes); + snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_SVALUE, command, stemp1); } - snprintf_P(mqtt_data, sizeof(mqtt_data), S_JSON_COMMAND_NVALUE, command, Settings.timezone); } else if ((CMND_TIMESTD == command_code) || (CMND_TIMEDST == command_code)) { // TimeStd 0/1, 0/1/2/3/4, 1..12, 1..7, 0..23, +/-780 @@ -1187,9 +1221,9 @@ void MqttDataHandler(char* topic, byte* data, unsigned int data_len) if (5 == tpos) { Settings.tflag[ts].hour = (value < 0) ? 0 : (value > 23) ? 23 : value; } if (6 == tpos) { Settings.toffset[ts] = (value < -900) ? -900 : (value > 900) ? 900 : value; } } - p = LTrim(p); // Skip spaces + p = Trim(p); // Skip spaces if (tpos && (*p == ',')) { p++; } // Skip separator - p = LTrim(p); // Skip spaces + p = Trim(p); // Skip spaces q = p; // Reset any value entered flag value = strtol(p, &p, 10); tpos++; // Next parameter @@ -1276,12 +1310,13 @@ boolean SendKey(byte key, byte device, byte state) char *tmp = (key) ? Settings.switch_topic : Settings.button_topic; Format(key_topic, tmp, sizeof(key_topic)); if (Settings.flag.mqtt_enabled && MqttIsConnected() && (strlen(key_topic) != 0) && strcmp(key_topic, "0")) { - if (!key && (device > devices_present)) device = 1; // Only allow number of buttons up to number of devices - GetTopic_P(stopic, CMND, key_topic, GetPowerDevice(scommand, device, sizeof(scommand), key)); // cmnd/switchtopic/POWERx + if (!key && (device > devices_present)) { device = 1; } // Only allow number of buttons up to number of devices + GetTopic_P(stopic, CMND, key_topic, + GetPowerDevice(scommand, device, sizeof(scommand), (key + Settings.flag.device_index_enable))); // cmnd/switchtopic/POWERx if (9 == state) { mqtt_data[0] = '\0'; } else { - if ((!strcmp(mqtt_topic, key_topic) || !strcmp(Settings.mqtt_grptopic, key_topic)) && (2 == state)) { + if ((Settings.flag3.button_switch_force_local || !strcmp(mqtt_topic, key_topic) || !strcmp(Settings.mqtt_grptopic, key_topic)) && (2 == state)) { state = ~(power >> (device -1)) &1; } snprintf_P(mqtt_data, sizeof(mqtt_data), GetStateText(state)); @@ -1293,7 +1328,7 @@ boolean SendKey(byte key, byte device, byte state) #else MqttPublishDirect(stopic, (key) ? Settings.flag.mqtt_switch_retain : Settings.flag.mqtt_button_retain); #endif // USE_DOMOTICZ - result = true; + result = !Settings.flag3.button_switch_force_local; } else { snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"%s%d\":{\"State\":%d}}"), (key) ? "Switch" : "Button", device, state); result = XdrvRulesProcess(); @@ -1364,6 +1399,11 @@ void ExecuteCommandPower(byte device, byte state, int source) #ifdef USE_KNX KnxUpdatePowerState(device, power); #endif // USE_KNX + if (publish_power && Settings.flag3.hass_tele_on_power) { + mqtt_data[0] = '\0'; + MqttShowState(); + MqttPublishPrefixTopic_P(TELE, PSTR(D_RSLT_STATE), MQTT_TELE_RETAIN); + } if (device <= MAX_PULSETIMERS) { // Restart PulseTime if powered On SetPulseTimer(device -1, (((POWER_ALL_OFF_PULSETIME_ON == Settings.poweronstate) ? ~power : power) & mask) ? Settings.pulse_timer[device -1] : 0); } @@ -1389,7 +1429,7 @@ void ExecuteCommandPower(byte device, byte state, int source) if (publish_power) MqttPublishPowerState(device); } -void StopAllPowerBlink() +void StopAllPowerBlink(void) { power_t mask; @@ -1460,8 +1500,8 @@ void PublishStatus(uint8_t payload) } if ((0 == payload) || (2 == payload)) { - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS2_FIRMWARE "\":{\"" D_JSON_VERSION "\":\"%s\",\"" D_JSON_BUILDDATETIME "\":\"%s\",\"" D_JSON_BOOTVERSION "\":%d,\"" D_JSON_COREVERSION "\":\"" ARDUINO_ESP8266_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\"}}"), - my_version, GetBuildDateAndTime().c_str(), ESP.getBootVersion(), ESP.getSdkVersion()); + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS2_FIRMWARE "\":{\"" D_JSON_VERSION "\":\"%s%s\",\"" D_JSON_BUILDDATETIME "\":\"%s\",\"" D_JSON_BOOTVERSION "\":%d,\"" D_JSON_COREVERSION "\":\"" ARDUINO_ESP8266_RELEASE "\",\"" D_JSON_SDKVERSION "\":\"%s\"}}"), + my_version, my_image, GetBuildDateAndTime().c_str(), ESP.getBootVersion(), ESP.getSdkVersion()); MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS "2")); } @@ -1472,8 +1512,8 @@ void PublishStatus(uint8_t payload) } if ((0 == payload) || (4 == payload)) { - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS4_MEMORY "\":{\"" D_JSON_PROGRAMSIZE "\":%d,\"" D_JSON_FREEMEMORY "\":%d,\"" D_JSON_HEAPSIZE "\":%d,\"" D_JSON_PROGRAMFLASHSIZE "\":%d,\"" D_JSON_FLASHSIZE "\":%d,\"" D_JSON_FLASHMODE "\":%d,\"" D_JSON_FEATURES "\":[\"%08X\",\"%08X\",\"%08X\",\"%08X\",\"%08X\"]}}"), - ESP.getSketchSize()/1024, ESP.getFreeSketchSpace()/1024, ESP.getFreeHeap()/1024, ESP.getFlashChipSize()/1024, ESP.getFlashChipRealSize()/1024, ESP.getFlashChipMode(), LANGUAGE_LCID, feature_drv1, feature_drv2, feature_sns1, feature_sns2); + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS4_MEMORY "\":{\"" D_JSON_PROGRAMSIZE "\":%d,\"" D_JSON_FREEMEMORY "\":%d,\"" D_JSON_HEAPSIZE "\":%d,\"" D_JSON_PROGRAMFLASHSIZE "\":%d,\"" D_JSON_FLASHSIZE "\":%d,\"" D_JSON_FLASHCHIPID "\":\"%06X\",\"" D_JSON_FLASHMODE "\":%d,\"" D_JSON_FEATURES "\":[\"%08X\",\"%08X\",\"%08X\",\"%08X\",\"%08X\"]}}"), + ESP.getSketchSize()/1024, ESP.getFreeSketchSpace()/1024, ESP.getFreeHeap()/1024, ESP.getFlashChipSize()/1024, ESP.getFlashChipRealSize()/1024, ESP.getFlashChipId(), ESP.getFlashChipMode(), LANGUAGE_LCID, feature_drv1, feature_drv2, feature_sns1, feature_sns2); MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS "4")); } @@ -1491,12 +1531,17 @@ void PublishStatus(uint8_t payload) } if ((0 == payload) || (7 == payload)) { + if (99 == Settings.timezone) { + snprintf_P(stemp, sizeof(stemp), PSTR("%d" ), Settings.timezone); + } else { + snprintf_P(stemp, sizeof(stemp), PSTR("\"%s\"" ), GetTimeZone().c_str()); + } #if defined(USE_TIMERS) && defined(USE_SUNRISE) - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS7_TIME "\":{\"" D_JSON_UTC_TIME "\":\"%s\",\"" D_JSON_LOCAL_TIME "\":\"%s\",\"" D_JSON_STARTDST "\":\"%s\",\"" D_JSON_ENDDST "\":\"%s\",\"" D_CMND_TIMEZONE "\":%d,\"" D_JSON_SUNRISE "\":\"%s\",\"" D_JSON_SUNSET "\":\"%s\"}}"), - GetTime(0).c_str(), GetTime(1).c_str(), GetTime(2).c_str(), GetTime(3).c_str(), Settings.timezone, GetSun(0).c_str(), GetSun(1).c_str()); + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS7_TIME "\":{\"" D_JSON_UTC_TIME "\":\"%s\",\"" D_JSON_LOCAL_TIME "\":\"%s\",\"" D_JSON_STARTDST "\":\"%s\",\"" D_JSON_ENDDST "\":\"%s\",\"" D_CMND_TIMEZONE "\":%s,\"" D_JSON_SUNRISE "\":\"%s\",\"" D_JSON_SUNSET "\":\"%s\"}}"), + GetTime(0).c_str(), GetTime(1).c_str(), GetTime(2).c_str(), GetTime(3).c_str(), stemp, GetSun(0).c_str(), GetSun(1).c_str()); #else - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS7_TIME "\":{\"" D_JSON_UTC_TIME "\":\"%s\",\"" D_JSON_LOCAL_TIME "\":\"%s\",\"" D_JSON_STARTDST "\":\"%s\",\"" D_JSON_ENDDST "\":\"%s\",\"" D_CMND_TIMEZONE "\":%d}}"), - GetTime(0).c_str(), GetTime(1).c_str(), GetTime(2).c_str(), GetTime(3).c_str(), Settings.timezone); + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"" D_CMND_STATUS D_STATUS7_TIME "\":{\"" D_JSON_UTC_TIME "\":\"%s\",\"" D_JSON_LOCAL_TIME "\":\"%s\",\"" D_JSON_STARTDST "\":\"%s\",\"" D_JSON_ENDDST "\":\"%s\",\"" D_CMND_TIMEZONE "\":%s}}"), + GetTime(0).c_str(), GetTime(1).c_str(), GetTime(2).c_str(), GetTime(3).c_str(), stemp); #endif // USE_TIMERS and USE_SUNRISE MqttPublishPrefixTopic_P(option, PSTR(D_CMND_STATUS "7")); } @@ -1529,7 +1574,7 @@ void PublishStatus(uint8_t payload) } -void MqttShowPWMState() +void MqttShowPWMState(void) { snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s\"" D_CMND_PWM "\":{"), mqtt_data); bool first = true; @@ -1542,16 +1587,20 @@ void MqttShowPWMState() snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s}"), mqtt_data); } -void MqttShowState() +void MqttShowState(void) { char stemp1[33]; snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s{\"" D_JSON_TIME "\":\"%s\",\"" D_JSON_UPTIME "\":\"%s\""), mqtt_data, GetDateAndTime(DT_LOCAL).c_str(), GetUptime().c_str()); + #ifdef USE_ADC_VCC dtostrfd((double)ESP.getVcc()/1000, 3, stemp1); snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_JSON_VCC "\":%s"), mqtt_data, stemp1); #endif + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"SleepMode\":\"%s\",\"Sleep\":%u,\"LoadAvg\":%u"), + mqtt_data, GetTextIndexed(stemp1, sizeof(stemp1), Settings.flag3.sleep_normal, kSleepMode), sleep, loop_load_avg); + for (byte i = 0; i < devices_present; i++) { if (i == light_device -1) { LightState(1); @@ -1573,7 +1622,7 @@ void MqttShowState() mqtt_data, Settings.sta_active +1, Settings.sta_ssid[Settings.sta_active], WiFi.BSSIDstr().c_str(), WiFi.channel(), WifiGetRssiAsQuality(WiFi.RSSI())); } -boolean MqttShowSensor() +boolean MqttShowSensor(void) { snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s{\"" D_JSON_TIME "\":\"%s\""), mqtt_data, GetDateAndTime(DT_LOCAL).c_str()); int json_data_start = strlen(mqtt_data); @@ -1589,6 +1638,9 @@ boolean MqttShowSensor() } XsnsCall(FUNC_JSON_APPEND); boolean json_data_available = (strlen(mqtt_data) - json_data_start); + if (strstr_P(mqtt_data, PSTR(D_JSON_PRESSURE))) { + snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_JSON_PRESSURE_UNIT "\":\"%s\""), mqtt_data, PressureUnit().c_str()); + } if (strstr_P(mqtt_data, PSTR(D_JSON_TEMPERATURE))) { snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"" D_JSON_TEMPERATURE_UNIT "\":\"%c\""), mqtt_data, TempUnit()); } @@ -1600,13 +1652,17 @@ boolean MqttShowSensor() /********************************************************************************************/ -void PerformEverySecond() +void PerformEverySecond(void) { uptime++; if (BOOT_LOOP_TIME == uptime) { RtcReboot.fast_reboot_count = 0; RtcRebootSave(); + + Settings.bootcount++; // Moved to here to stop flash writes during start-up + snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_APPLICATION D_BOOT_COUNT " %d"), Settings.bootcount); + AddLog(LOG_LEVEL_DEBUG); } if ((4 == uptime) && (SONOFF_IFAN02 == Settings.module)) { // Microcontroller needs 3 seconds before accepting commands @@ -1673,7 +1729,7 @@ void PerformEverySecond() * Button handler with single press only or multi-press and hold on all buttons \*********************************************************************************************/ -void ButtonHandler() +void ButtonHandler(void) { uint8_t button = NOT_PRESSED; uint8_t button_present = 0; @@ -1795,7 +1851,7 @@ void ButtonHandler() // Success } else { if (multipress[button_index] < 3) { // Single or Double press - if (WifiState()) { // WPSconfig, Smartconfig or Wifimanager active + if (WifiState() > WIFI_RESTART) { // WPSconfig, Smartconfig or Wifimanager active restart_flag = 1; } else { ExecuteCommandPower(button_index + multipress[button_index], POWER_TOGGLE, SRC_BUTTON); // Execute Toggle command internally @@ -1911,7 +1967,7 @@ void SwitchHandler(byte mode) * Every 0.1 second \*-------------------------------------------------------------------------------------------*/ -void Every100mSeconds() +void Every100mSeconds(void) { // As the max amount of sleep = 250 mSec this loop will shift in time... power_t power_now; @@ -1960,7 +2016,7 @@ void Every100mSeconds() * Every 0.25 second \*-------------------------------------------------------------------------------------------*/ -void Every250mSeconds() +void Every250mSeconds(void) { // As the max amount of sleep = 250 mSec this loop should always be taken... @@ -2072,7 +2128,7 @@ void Every250mSeconds() if (90 == ota_state_flag) { // Allow MQTT to reconnect ota_state_flag = 0; if (ota_result) { - SetFlashModeDout(); // Force DOUT for both ESP8266 and ESP8285 +// SetFlashModeDout(); // Force DOUT for both ESP8266 and ESP8285 snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR(D_JSON_SUCCESSFUL ". " D_JSON_RESTARTING)); } else { snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR(D_JSON_FAILED " %s"), ESPhttpUpdate.getLastErrorString().c_str()); @@ -2140,7 +2196,7 @@ void Every250mSeconds() wifi_state_flag = WIFI_RESTART; break; case 3: // Every x.75 second - if (WL_CONNECTED == WiFi.status()) { MqttCheck(); } + if (!global_state.wifi_down) { MqttCheck(); } break; } } @@ -2156,10 +2212,10 @@ void Every250mSeconds() bool arduino_ota_triggered = false; uint16_t arduino_ota_progress_dot_count = 0; -void ArduinoOTAInit() +void ArduinoOTAInit(void) { ArduinoOTA.setPort(8266); - ArduinoOTA.setHostname(Settings.hostname); + ArduinoOTA.setHostname(my_hostname); if (Settings.web_password[0] !=0) ArduinoOTA.setPassword(Settings.web_password); ArduinoOTA.onStart([]() @@ -2225,7 +2281,7 @@ void ArduinoOTAInit() /********************************************************************************************/ -void SerialInput() +void SerialInput(void) { while (Serial.available()) { yield(); @@ -2338,28 +2394,34 @@ void SerialInput() void GpioSwitchPinMode(uint8_t index) { if (pin[GPIO_SWT1 +index] < 99) { -// pinMode(pin[GPIO_SWT1 +index], (16 == pin[GPIO_SWT1 +index]) ? INPUT_PULLDOWN_16 : bitRead(switch_no_pullup, index) ? INPUT : INPUT_PULLUP); - - uint8_t no_pullup = bitRead(switch_no_pullup, index); + pinMode(pin[GPIO_SWT1 +index], (16 == pin[GPIO_SWT1 +index]) ? INPUT_PULLDOWN_16 : bitRead(switch_no_pullup, index) ? INPUT : INPUT_PULLUP); +/* + // Re-enable pull-up on Shelly2 as of 20181110 (#4255) + uint8_t no_pullup = bitRead(switch_no_pullup, index); // 0 = INPUT_PULLUP, 1 = INPUT if (no_pullup) { if (SHELLY2 == Settings.module) { - no_pullup = (Settings.switchmode[index] < PUSHBUTTON); + // Switchmodes : TOGGLE, FOLLOW, FOLLOW_INV, PUSHBUTTON, PUSHBUTTON_INV, PUSHBUTTONHOLD, PUSHBUTTONHOLD_INV, PUSHBUTTON_TOGGLE, MAX_SWITCH_OPTION + no_pullup = (Settings.switchmode[index] < PUSHBUTTON); // INPUT on TOGGLE, FOLLOW and FOLLOW_INV. INPUT_PULLUP on anything else } } pinMode(pin[GPIO_SWT1 +index], (16 == pin[GPIO_SWT1 +index]) ? INPUT_PULLDOWN_16 : (no_pullup) ? INPUT : INPUT_PULLUP); +*/ } } -void GpioInit() +void GpioInit(void) { uint8_t mpin; uint8_t key_no_pullup = 0; mytmplt def_module; - if (!Settings.module || (Settings.module >= MAXMODULE)) { + if (Settings.module >= MAXMODULE) { Settings.module = MODULE; Settings.last_module = MODULE; } + if (Settings.module != Settings.last_module) { + baudrate = APP_BAUDRATE; + } memcpy_P(&def_module, &kModules[Settings.module], sizeof(def_module)); strlcpy(my_module.name, def_module.name, sizeof(my_module.name)); @@ -2438,6 +2500,7 @@ void GpioInit() my_module.gp.io[14] = GPIO_SPI_CLK; pin[GPIO_SPI_CLK] = 14; } + soft_spi_flg = ((pin[GPIO_SSPI_CS] < 99) && (pin[GPIO_SSPI_SCLK] < 99) && ((pin[GPIO_SSPI_MOSI] < 99) || (pin[GPIO_SSPI_MOSI] < 99))); #endif // USE_SPI #ifdef USE_I2C @@ -2548,7 +2611,7 @@ extern "C" { extern struct rst_info resetInfo; } -void setup() +void setup(void) { byte idx; @@ -2562,13 +2625,12 @@ void setup() Serial.println(); seriallog_level = LOG_LEVEL_INFO; // Allow specific serial messages until config loaded - snprintf_P(my_version, sizeof(my_version), PSTR("%d.%d.%d"), VERSION >> 24 & 0xff, VERSION >> 16 & 0xff, VERSION >> 8 & 0xff); - if (VERSION & 0xff) { + snprintf_P(my_version, sizeof(my_version), PSTR("%d.%d.%d"), VERSION >> 24 & 0xff, VERSION >> 16 & 0xff, VERSION >> 8 & 0xff); // Release version 6.3.0 + if (VERSION & 0xff) { // Development or patched version 6.3.0.10 snprintf_P(my_version, sizeof(my_version), PSTR("%s.%d"), my_version, VERSION & 0xff); } -#ifdef BE_MINIMAL - snprintf_P(my_version, sizeof(my_version), PSTR("%s-" D_JSON_MINIMAL), my_version); -#endif // BE_MINIMAL + char code_image[20]; + snprintf_P(my_image, sizeof(my_image), PSTR("(%s)"), GetTextIndexed(code_image, sizeof(code_image), CODE_IMAGE, kCodeImage)); SettingsLoad(); SettingsDelta(); @@ -2585,13 +2647,13 @@ void setup() mdns_delayed_start = Settings.param[P_MDNS_DELAYED_START]; seriallog_level = Settings.seriallog_level; seriallog_timer = SERIALLOG_TIMER; -#ifndef USE_EMULATION - Settings.flag2.emulation = 0; -#endif // USE_EMULATION syslog_level = Settings.syslog_level; stop_flash_rotate = Settings.flag.stop_flash_rotate; save_data_counter = Settings.save_data; sleep = Settings.sleep; +#ifndef USE_EMULATION + Settings.flag2.emulation = 0; +#endif // USE_EMULATION // Disable functionality as possible cause of fast restart within BOOT_LOOP_TIME seconds (Exception, WDT or restarts) if (RtcReboot.fast_reboot_count > 1) { // Restart twice @@ -2608,7 +2670,7 @@ void setup() } if (RtcReboot.fast_reboot_count > 4) { // Restarted 5 times Settings.module = SONOFF_BASIC; // Reset module to Sonoff Basic - Settings.last_module = SONOFF_BASIC; +// Settings.last_module = SONOFF_BASIC; for (byte i = 0; i < MAX_GPIO_PIN; i++) { Settings.my_gp.io[i] = GPIO_NONE; // Reset user defined GPIO disabling sensors } @@ -2617,10 +2679,6 @@ void setup() AddLog(LOG_LEVEL_DEBUG); } - Settings.bootcount++; - snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_APPLICATION D_BOOT_COUNT " %d"), Settings.bootcount); - AddLog(LOG_LEVEL_DEBUG); - Format(mqtt_client, Settings.mqtt_client, sizeof(mqtt_client)); Format(mqtt_topic, Settings.mqtt_topic, sizeof(mqtt_topic)); if (strstr(Settings.hostname, "%")) { @@ -2683,8 +2741,8 @@ void setup() } blink_powersave = power; - snprintf_P(log_data, sizeof(log_data), PSTR(D_PROJECT " %s %s (" D_CMND_TOPIC " %s, " D_FALLBACK " %s, " D_CMND_GROUPTOPIC " %s) " D_VERSION " %s-" ARDUINO_ESP8266_RELEASE), - PROJECT, Settings.friendlyname[0], mqtt_topic, mqtt_client, Settings.mqtt_grptopic, my_version); + snprintf_P(log_data, sizeof(log_data), PSTR(D_PROJECT " %s %s (" D_CMND_TOPIC " %s, " D_FALLBACK " %s, " D_CMND_GROUPTOPIC " %s) " D_VERSION " %s%s-" ARDUINO_ESP8266_RELEASE), + PROJECT, Settings.friendlyname[0], mqtt_topic, mqtt_client, Settings.mqtt_grptopic, my_version, my_image); AddLog(LOG_LEVEL_INFO); #ifdef BE_MINIMAL snprintf_P(log_data, sizeof(log_data), PSTR(D_WARNING_MINIMAL_VERSION)); @@ -2701,9 +2759,14 @@ void setup() XsnsCall(FUNC_INIT); } -void loop() +uint32_t _counter = 0; + +void loop(void) { + uint32_t my_sleep = millis(); + XdrvCall(FUNC_LOOP); + XsnsCall(FUNC_LOOP); OsWatchLoop(); @@ -2736,11 +2799,31 @@ void loop() if (!serial_local) SerialInput(); #ifdef USE_ARDUINO_OTA + MDNS.update(); ArduinoOTA.handle(); // Once OTA is triggered, only handle that and dont do other stuff. (otherwise it fails) while (arduino_ota_triggered) ArduinoOTA.handle(); #endif // USE_ARDUINO_OTA -// yield(); // yield == delay(0), delay contains yield, auto yield in loop - delay(sleep); // https://github.com/esp8266/Arduino/issues/2021 + uint32_t my_activity = millis() - my_sleep; + + if (Settings.flag3.sleep_normal) { + // yield(); // yield == delay(0), delay contains yield, auto yield in loop + delay(sleep); // https://github.com/esp8266/Arduino/issues/2021 + } else { + if (my_activity < (uint32_t)sleep) { + delay((uint32_t)sleep - my_activity); // Provide time for background tasks like wifi + } else { + if (global_state.wifi_down) { + delay(my_activity /2); // If wifi down and my_activity > setoption36 then force loop delay to 1/3 of my_activity period + } + } + } + + if (!my_activity) { my_activity++; } // We cannot divide by 0 + uint32_t loop_delay = sleep; + if (!loop_delay) { loop_delay++; } // We cannot divide by 0 + uint32_t loops_per_second = 1000 / loop_delay; // We need to keep track of this many loops per second + uint32_t this_cycle_ratio = 100 * my_activity / loop_delay; + loop_load_avg = loop_load_avg - (loop_load_avg / loops_per_second) + (this_cycle_ratio / loops_per_second); // Take away one loop average away and add the new one } diff --git a/sonoff/sonoff_post.h b/sonoff/sonoff_post.h index 186d0a349..b6fc2c77f 100755 --- a/sonoff/sonoff_post.h +++ b/sonoff/sonoff_post.h @@ -57,6 +57,9 @@ void KNX_CB_Action(message_t const &msg, void *arg); #ifdef USE_SENSORS +#undef CODE_IMAGE +#define CODE_IMAGE 3 + #undef USE_ADC_VCC // Add Analog input on selected devices #define USE_DS18x20 // For more than one DS18x20 sensors with id sort, single scan and read retry (+1k3 code) //#define USE_DS18x20_LEGACY // For more than one DS18x20 sensors with dynamic scan using library OneWire (+1k5 code) @@ -88,6 +91,7 @@ void KNX_CB_Action(message_t const &msg, void *arg); //#define USE_CCS811 // Add I2C code for CCS811 sensor (+2k2 code) //#define USE_MPU6050 // Enable MPU6050 sensor (I2C address 0x68 AD0 low or 0x69 AD0 high) (+2k6 code) //#define USE_DS3231 // Enable DS3231 external RTC in case no Wifi is avaliable. See docs in the source file (+1k2 code) +//#define USE_MGC3130 // Enable MGC3130 Electric Field Effect Sensor (I2C address 0x42) (+2k7 code, 0k3 mem) #define USE_MHZ19 // Add support for MH-Z19 CO2 sensor (+2k code) #define USE_SENSEAIR // Add support for SenseAir K30, K70 and S8 CO2 sensor (+2k3 code) #ifndef CO2_LOW @@ -104,7 +108,10 @@ void KNX_CB_Action(message_t const &msg, void *arg); #define USE_MP3_PLAYER // Use of the DFPlayer Mini MP3 Player RB-DFR-562 commands: play, volume and stop #define MP3_VOLUME 10 // Set the startup volume on init, the range can be 0..30(max) #define USE_TUYA_DIMMER // Add support for Tuya Serial Dimmer - #define TUYA_DIMMER_ID 3 // Default dimmer Id +#ifndef TUYA_DIMMER_ID + #define TUYA_DIMMER_ID 0 // Default dimmer Id +#endif +#define USE_PS_16_DZ // Add support for PS-16-DZ Dimmer #define USE_PZEM004T // Add support for PZEM004T Energy monitor (+2k code) #define USE_PZEM_AC // Add support for PZEM014,016 Energy monitor (+1k1 code) #define USE_PZEM_DC // Add support for PZEM003,017 Energy monitor (+1k1 code) @@ -134,6 +141,9 @@ void KNX_CB_Action(message_t const &msg, void *arg); #ifdef USE_CLASSIC +#undef CODE_IMAGE +#define CODE_IMAGE 2 + #ifndef USE_WPS #define USE_WPS // Add support for WPS as initial wifi configuration tool (+33k code, 1k mem (5k mem with core v2.4.2+)) #endif @@ -183,6 +193,9 @@ void KNX_CB_Action(message_t const &msg, void *arg); #ifdef USE_KNX_NO_EMULATION +#undef CODE_IMAGE +#define CODE_IMAGE 4 + #ifndef USE_KNX #define USE_KNX // Enable KNX IP Protocol Support (+23k code, +3k3 mem) #endif @@ -196,6 +209,9 @@ void KNX_CB_Action(message_t const &msg, void *arg); #ifdef USE_DISPLAYS +#undef CODE_IMAGE +#define CODE_IMAGE 6 + #undef USE_ENERGY_SENSOR // Disable energy sensors (-14k code) #undef USE_EMULATION // Disable Belkin WeMo and Hue Bridge emulation for Alexa (-16k code, -2k mem) @@ -229,6 +245,12 @@ void KNX_CB_Action(message_t const &msg, void *arg); #ifdef USE_BASIC +#undef CODE_IMAGE +#define CODE_IMAGE 5 + +#undef APP_SLEEP +#define APP_SLEEP 1 // Default to sleep = 1 for USE_BASIC + //#undef USE_ENERGY_SENSOR // Disable energy sensors #undef USE_ARDUINO_OTA // Disable support for Arduino OTA #undef USE_WPS // Disable support for WPS as initial wifi configuration tool @@ -285,6 +307,9 @@ void KNX_CB_Action(message_t const &msg, void *arg); #ifdef BE_MINIMAL +#undef CODE_IMAGE +#define CODE_IMAGE 1 + #undef USE_ENERGY_SENSOR // Disable energy sensors #undef USE_ARDUINO_OTA // Disable support for Arduino OTA #undef USE_WPS // Disable support for WPS as initial wifi configuration tool diff --git a/sonoff/sonoff_template.h b/sonoff/sonoff_template.h index f3712672f..91eec21c7 100644 --- a/sonoff/sonoff_template.h +++ b/sonoff/sonoff_template.h @@ -133,6 +133,14 @@ enum UserSelectablePins { GPIO_RFRECV, // RF receiver GPIO_TUYA_TX, // Tuya Serial interface GPIO_TUYA_RX, // Tuya Serial interface + GPIO_MGC3130_XFER, // MGC3130 Transfer + GPIO_MGC3130_RESET, // MGC3130 Reset + GPIO_SSPI_MISO, // Software SPI Master Input Slave Output + GPIO_SSPI_MOSI, // Software SPI Master Output Slave Input + GPIO_SSPI_SCLK, // Software SPI Serial Clock + GPIO_SSPI_CS, // Software SPI Chip Select + GPIO_SSPI_DC, // Software SPI Data or Command + GPIO_RF_SENSOR, // Rf receiver with sensor decoding GPIO_SENSOR_END }; // Programmer selectable GPIO functionality offset by user selectable GPIOs @@ -190,7 +198,10 @@ const char kSensorNames[] PROGMEM = D_SENSOR_HX711_SCK "|" D_SENSOR_HX711_DAT "|" D_SENSOR_TX20_TX "|" D_SENSOR_RFSEND "|" D_SENSOR_RFRECV "|" - D_SENSOR_TUYA_TX "|" D_SENSOR_TUYA_RX; + D_SENSOR_TUYA_TX "|" D_SENSOR_TUYA_RX "|" + D_SENSOR_MGC3130_XFER "|" D_SENSOR_MGC3130_RESET "|" + D_SENSOR_SSPI_MISO "|" D_SENSOR_SSPI_MOSI "|" D_SENSOR_SSPI_SCLK "|" D_SENSOR_SSPI_CS "|" D_SENSOR_SSPI_DC "|" + D_SENSOR_RF_SENSOR; /********************************************************************************************/ @@ -240,7 +251,7 @@ enum SupportedModules { ZENGGE_ZF_WF017, SONOFF_POW_R2, SONOFF_IFAN02, - BLITZWOLF_BWSHP2, + BLITZWOLF_BWSHP, SHELLY1, SHELLY2, PHILIPS, @@ -250,6 +261,12 @@ enum SupportedModules { TECKIN, APLIC_WDP303075, TUYA_DIMMER, + GOSUND, + ARMTRONIX_DIMMERS, + SK03_TUYA, + PS_16_DZ, + TECKIN_US, + MANZOKU_EU_4, MAXMODULE }; /********************************************************************************************/ @@ -267,7 +284,7 @@ typedef struct MYTMPLT { myio gp; } mytmplt; -const uint8_t kGpioNiceList[GPIO_SENSOR_END] PROGMEM = { +const uint8_t kGpioNiceList[] PROGMEM = { GPIO_NONE, // Not used GPIO_KEY1, // Buttons GPIO_KEY1_NP, @@ -335,48 +352,108 @@ const uint8_t kGpioNiceList[GPIO_SENSOR_END] PROGMEM = { GPIO_CNTR3_NP, GPIO_CNTR4, GPIO_CNTR4_NP, +#ifdef USE_I2C GPIO_I2C_SCL, // I2C SCL GPIO_I2C_SDA, // I2C SDA +#endif +#ifdef USE_SPI GPIO_SPI_CS, // SPI Chip Select GPIO_SPI_DC, // SPI Data Direction + GPIO_SSPI_MISO, // Software SPI Master Input Slave Output + GPIO_SSPI_MOSI, // Software SPI Master Output Slave Input + GPIO_SSPI_SCLK, // Software SPI Serial Clock + GPIO_SSPI_CS, // Software SPI Chip Select + GPIO_SSPI_DC, // Software SPI Data or Command +#endif +#ifdef USE_DISPLAY GPIO_BACKLIGHT, // Display backlight control +#endif GPIO_DHT11, // DHT11 GPIO_DHT22, // DHT21, DHT22, AM2301, AM2302, AM2321 GPIO_SI7021, // iTead SI7021 GPIO_DSB, // Single wire DS18B20 or DS18S20 +#ifdef USE_WS2812 GPIO_WS2812, // WS2812 Led string +#endif +#ifdef USE_IR_REMOTE GPIO_IRSEND, // IR remote +#ifdef USE_IR_RECEIVE GPIO_IRRECV, // IR receiver +#endif +#endif +#ifdef USE_RC_SWITCH GPIO_RFSEND, // RF transmitter GPIO_RFRECV, // RF receiver +#endif +#ifdef USE_RF_SENSOR + GPIO_RF_SENSOR, // Rf receiver with sensor decoding +#endif +#ifdef USE_SR04 GPIO_SR04_TRIG, // SR04 Trigger pin GPIO_SR04_ECHO, // SR04 Echo pin +#endif +#ifdef USE_TM1638 GPIO_TM16CLK, // TM1638 Clock GPIO_TM16DIO, // TM1638 Data I/O GPIO_TM16STB, // TM1638 Strobe +#endif +#ifdef USE_HX711 GPIO_HX711_SCK, // HX711 Load Cell clock GPIO_HX711_DAT, // HX711 Load Cell data +#endif +#ifdef USE_SERIAL_BRIDGE GPIO_SBR_TX, // Serial Bridge Serial interface GPIO_SBR_RX, // Serial Bridge Serial interface +#endif +#ifdef USE_MHZ19 GPIO_MHZ_TXD, // MH-Z19 Serial interface GPIO_MHZ_RXD, // MH-Z19 Serial interface +#endif +#ifdef USE_SENSEAIR GPIO_SAIR_TX, // SenseAir Serial interface GPIO_SAIR_RX, // SenseAir Serial interface +#endif +#ifdef USE_NOVA_SDS GPIO_SDS0X1_TX, // Nova Fitness SDS011 Serial interface GPIO_SDS0X1_RX, // Nova Fitness SDS011 Serial interface +#endif +#if defined(USE_PZEM004T) || defined(USE_PZEM_AC) || defined(USE_PZEM_DC) GPIO_PZEM0XX_TX, // PZEM0XX Serial interface +#endif +#ifdef USE_PZEM004T GPIO_PZEM004_RX, // PZEM004T Serial interface +#endif +#ifdef USE_PZEM_AC GPIO_PZEM016_RX, // PZEM-014,016 Serial Modbus interface +#endif +#ifdef USE_PZEM_DC GPIO_PZEM017_RX, // PZEM-003,017 Serial Modbus interface +#endif +#ifdef USE_SDM120 GPIO_SDM120_TX, // SDM120 Serial interface GPIO_SDM120_RX, // SDM120 Serial interface +#endif +#ifdef USE_SDM630 GPIO_SDM630_TX, // SDM630 Serial interface GPIO_SDM630_RX, // SDM630 Serial interface +#endif +#ifdef USE_PMS5003 GPIO_PMS5003, // Plantower PMS5003 Serial interface +#endif +#ifdef USE_TX20_WIND_SENSOR GPIO_TX20_TXD_BLACK, // TX20 Transmission Pin +#endif +#ifdef USE_MP3_PLAYER GPIO_MP3_DFR562, // RB-DFR-562, DFPlayer Mini MP3 Player Serial interface +#endif +#ifdef USE_TUYA_DIMMER GPIO_TUYA_TX, // Tuya Serial interface - GPIO_TUYA_RX // Tuya Serial interface + GPIO_TUYA_RX, // Tuya Serial interface +#endif +#ifdef USE_MGC3130 + GPIO_MGC3130_XFER, + GPIO_MGC3130_RESET +#endif }; const uint8_t kModuleNiceList[MAXMODULE] PROGMEM = { @@ -415,13 +492,19 @@ const uint8_t kModuleNiceList[MAXMODULE] PROGMEM = { WION, SHELLY1, SHELLY2, - BLITZWOLF_BWSHP2, // Socket Relay Devices with Energy Monitoring + BLITZWOLF_BWSHP, // Socket Relay Devices with Energy Monitoring TECKIN, + TECKIN_US, APLIC_WDP303075, + GOSUND, + SK03_TUYA, NEO_COOLCAM, // Socket Relay Devices OBI, + MANZOKU_EU_4, ESP_SWITCH, // Switch Devices - TUYA_DIMMER, // Dimmer Devices + TUYA_DIMMER, // Dimmer Devices + ARMTRONIX_DIMMERS, + PS_16_DZ, H801, // Light Devices MAGICHOME, ARILUX_LC01, @@ -441,7 +524,7 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { { "Sonoff Basic", // Sonoff Basic (ESP8266) GPIO_KEY1, // GPIO00 Button GPIO_USER, // GPIO01 Serial RXD and Optional sensor - 0, // GPIO02 + GPIO_USER, // GPIO02 Only available on newer Sonoff Basic R2 V1 GPIO_USER, // GPIO03 Serial TXD and Optional sensor GPIO_USER, // GPIO04 Optional sensor 0, // GPIO05 @@ -1043,10 +1126,11 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { GPIO_REL4, // GPIO15 WIFI_O3 Relay 4 (0 = Off, 1 = On) controlling the fan 0, 0 }, - { "BlitzWolf SHP2", // BlitzWolf BW-SHP2 (ESP8285 - BL0937 or HJL-01 Energy Monitoring) + { "BlitzWolf SHP", // BlitzWolf BW-SHP2 and BW-SHP6 (ESP8285 - BL0937 or HJL-01 Energy Monitoring) // https://www.banggood.com/BlitzWolf-BW-SHP2-Smart-WIFI-Socket-EU-Plug-220V-16A-Work-with-Amazon-Alexa-Google-Assistant-p-1292899.html // https://www.amazon.de/Steckdose-Homecube-intelligente-Verbrauchsanzeige-funktioniert/dp/B076Q2LKHG/ref=sr_1_fkmr0_1 // https://www.amazon.de/Intelligente-Stromverbrauch-Fernsteurung-Schaltbare-Energieklasse/dp/B076WZQS4S/ref=sr_1_1 + // https://www.aliexpress.com/store/product/BlitzWolf-BW-SHP6-EU-Plug-Metering-Version-WIFI-Smart-Socket-220V-240V-10A-Work-with-Amazon/1965360_32945504669.html GPIO_LED2_INV, // GPIO00 Red Led (1 = On, 0 = Off) GPIO_USER, // GPIO01 Serial RXD and Optional sensor GPIO_LED1_INV, // GPIO02 Blue Led (1 = On, 0 = Off) @@ -1075,9 +1159,9 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { GPIO_REL1, // GPIO04 GPIO_REL2, // GPIO05 0, 0, 0, 0, 0, 0, // Flash connection - GPIO_SWT1_NP, // GPIO12 + GPIO_SWT1, // GPIO12 0, - GPIO_SWT2_NP, // GPIO14 + GPIO_SWT2, // GPIO14 0, // GPIO15 MCP39F501 Reset 0, 0 }, @@ -1116,7 +1200,9 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { }, { "OBI Socket", // OBI socket (ESP8266) - https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706 GPIO_USER, // GPIO00 - 0,0,0, + GPIO_USER, // GPIO01 Serial RXD + 0, + GPIO_USER, // GPIO03 Serial TXD GPIO_LED1, // GPIO04 Blue LED GPIO_REL1, // GPIO05 (Relay OFF, but used as Relay Switch) 0, 0, 0, 0, 0, 0, // Flash connection @@ -1154,7 +1240,7 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { }, { "Tuya Dimmer", // Tuya Dimmer (ESP8266 w/ separate MCU dimmer) // https://www.amazon.com/gp/product/B07CTNSZZ8/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1 - GPIO_KEY1, // Virtual Button (controlled by MCU) + GPIO_USER, // Virtual Button (controlled by MCU) GPIO_USER, // GPIO01 MCU serial control GPIO_USER, GPIO_USER, // GPIO03 MCU serial control @@ -1163,10 +1249,100 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { 0, 0, 0, 0, 0, 0, // Flash connection GPIO_USER, GPIO_USER, - GPIO_LED1, // GPIO14 Green Led + GPIO_USER, // GPIO14 Green Led GPIO_USER, GPIO_USER, 0 + }, + { "Gosund SP1 v23", // https://www.amazon.de/gp/product/B0777BWS1P + 0, + GPIO_LED1_INV, // GPIO01 Serial RXD and LED1 (blue) inv + 0, + GPIO_KEY1, // GPIO03 Serial TXD and Button + GPIO_HJL_CF, // GPIO04 BL0937 or HJL-01 CF power + GPIO_NRG_CF1, // GPIO05 BL0937 or HJL-01 CF1 current / voltage + 0, 0, 0, 0, 0, 0, // Flash connection + GPIO_NRG_SEL_INV, // GPIO12 BL0937 or HJL-01 Sel output (0 = Voltage) + GPIO_LED2_INV, // GPIO13 LED2 (red) inv + GPIO_REL1, // GPIO14 Relay (0 = Off, 1 = On) + 0, 0, 0 + }, + { "ARMTR Dimmer", // ARMTRONIX Dimmer, one or two channel (ESP8266 w/ separate MCU dimmer) + // https://www.tindie.com/products/Armtronix/wifi-ac-dimmer-two-triac-board/ + // https://www.tindie.com/products/Armtronix/wifi-ac-dimmer-esp8266-one-triac-board-alexaecho/ + GPIO_USER, + GPIO_TXD, // GPIO01 MCU serial control + GPIO_USER, + GPIO_RXD, // GPIO03 MCU serial control + GPIO_USER, + GPIO_USER, + 0, 0, 0, 0, 0, 0, // Flash connection + GPIO_USER, + GPIO_USER, + GPIO_USER, + GPIO_USER, + GPIO_USER, + 0 + }, + { "SK03 Outdoor", // Outdoor smart plug with power monitoring HLW8012 chip - https://www.amazon.com/gp/product/B07CG7MBPV + GPIO_KEY1, // GPIO00 Button + 0, 0, 0, + GPIO_HLW_CF, // GPIO04 HLW8012 CF power + GPIO_NRG_CF1, // GPIO05 HLW8012 CF1 current / voltage + 0, 0, 0, 0, 0, 0, // Flash connection + GPIO_NRG_SEL_INV, // GPIO12 HLW8012 CF Sel output (0 = Voltage) + GPIO_LED2_INV, // GPIO13 Red Led (0 = On, 1 = Off) + GPIO_LED1_INV, // GPIO14 Blue Led (0 = On, 1 = Off) + GPIO_REL1, // GPIO15 Relay (0 = Off, 1 = On) + 0, 0 + }, + { "PS-16-DZ", // PS-16-DZ Dimmer (ESP8266 w/ separate Nuvoton MCU dimmer) + // https://www.aliexpress.com/item/SM-Smart-WIFI-Wall-Dimmer-Light-Switch-US-Ewelink-APP-Remote-Control-Wi-Fi-Wirele-Work/32871151902.html + GPIO_USER, + GPIO_TXD, // GPIO01 MCU serial control + GPIO_USER, + GPIO_RXD, // GPIO03 MCU serial control + GPIO_USER, + GPIO_USER, + 0, 0, 0, 0, 0, 0, // Flash connection + GPIO_USER, + GPIO_LED1, // GPIO13 WiFi LED + GPIO_USER, + GPIO_USER, + GPIO_USER, + 0 + }, + { "Teckin US", // Teckin SP20 US with Energy Monitoring + // https://www.amazon.com/Outlet-Compatible-Monitoring-Function-Required/dp/B079Q5W22B + // https://www.amazon.com/Outlet-ZOOZEE-Monitoring-Function-Compatible/dp/B07J2LR5KN + GPIO_LED2_INV, // GPIO00 Red Led (1 = On, 0 = Off) + 0, + GPIO_LED1_INV, // GPIO02 Blue Led (1 = On, 0 = Off) + 0, + GPIO_REL1, // GPIO04 Relay (0 = Off, 1 = On) + GPIO_HJL_CF, // GPIO05 BL0937 or HJL-01 CF power + 0, 0, 0, 0, 0, 0, // Flash connection + GPIO_NRG_SEL_INV, // GPIO12 BL0937 or HJL-01 Sel output (0 = Voltage) + GPIO_KEY1, // GPIO13 Button + GPIO_NRG_CF1, // GPIO14 BL0937 or HJL-01 CF1 current / voltage + 0, 0, 0 + }, + { "Manzoku strip", // "MANZOKU" labeled power strip, EU version + // https://www.amazon.de/Steckdosenleiste-AOFO-Mehrfachsteckdose-Überspannungsschutz-Sprachsteuerung/dp/B07GBSD11P/ + // https://www.amazon.de/Steckdosenleiste-Geekbes-USB-Anschluss-Kompatibel-gesteuert/dp/B078W23BW9/ + 0, // GPIO00 + 0, // GPIO01 Serial RXD + 0, + GPIO_KEY1, // GPIO03 Serial TXD + Button + GPIO_REL2, // GPIO04 Relay 2 + GPIO_REL1, // GPIO05 Relay 1 + 0, 0, 0, 0, 0, 0, // Flash connection + GPIO_REL3, // GPIO12 Relay 3 + GPIO_REL4, // GPIO13 Relay 4 + GPIO_USER, // GPIO14 + 0, + GPIO_USER, // GPIO16 + 0 } }; @@ -1282,6 +1458,16 @@ const mytmplt kModules[MAXMODULE] PROGMEM = { GPIO_USER, // GPIO16 (D16) 0 // ADC0 Analog input (A0) } + + { "Delock 11826", // Delock 11826 (ESP8285) = Sonoff Basic + GPIO_KEY1, // GPIO00 Button + 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, // Flash connection + GPIO_REL1, // GPIO12 Red Led and Relay (0 = Off, 1 = On) + GPIO_LED1_INV, // GPIO13 Green Led (0 = On, 1 = Off) + 0, 0, 0, 0 + } + */ #endif // _SONOFF_TEMPLATE_H_ diff --git a/sonoff/sonoff_version.h b/sonoff/sonoff_version.h index 44aa85be4..ef0fdab18 100644 --- a/sonoff/sonoff_version.h +++ b/sonoff/sonoff_version.h @@ -20,7 +20,7 @@ #ifndef _SONOFF_VERSION_H_ #define _SONOFF_VERSION_H_ -#define VERSION 0x06030000 +#define VERSION 0x06040000 #define D_PROGRAMNAME "Sonoff-Tasmota" #define D_AUTHOR "Theo Arends" diff --git a/sonoff/support.ino b/sonoff/support.ino index 9e1d82448..540191855 100644 --- a/sonoff/support.ino +++ b/sonoff/support.ino @@ -24,6 +24,8 @@ uint32_t syslog_host_hash = 0; // Syslog host name hash * Watchdog extension (https://github.com/esp8266/Arduino/issues/1532) \*********************************************************************************************/ +#include + Ticker tickerOSWatch; #define OSWATCH_RESET_TIME 120 @@ -39,7 +41,7 @@ byte oswatch_blocked_loop = 0; bool knx_started = false; #endif // USE_KNX -void OsWatchTicker() +void OsWatchTicker(void) { unsigned long t = millis(); unsigned long last_run = abs(t - oswatch_last_loop_time); @@ -57,7 +59,7 @@ void OsWatchTicker() } } -void OsWatchInit() +void OsWatchInit(void) { oswatch_blocked_loop = RtcSettings.oswatch_blocked_loop; RtcSettings.oswatch_blocked_loop = 0; @@ -65,13 +67,13 @@ void OsWatchInit() tickerOSWatch.attach_ms(((OSWATCH_RESET_TIME / 3) * 1000), OsWatchTicker); } -void OsWatchLoop() +void OsWatchLoop(void) { oswatch_last_loop_time = millis(); // while(1) delay(1000); // this will trigger the os watch } -String GetResetReason() +String GetResetReason(void) { char buff[32]; if (oswatch_blocked_loop) { @@ -82,7 +84,7 @@ String GetResetReason() } } -boolean OsWatchBlockedLoop() +boolean OsWatchBlockedLoop(void) { return oswatch_blocked_loop; } @@ -290,6 +292,7 @@ char* UpperCase_P(char* dest, const char* source) return dest; } +/* char* LTrim(char* p) { while ((*p != '\0') && (isblank(*p))) { @@ -308,14 +311,13 @@ char* RTrim(char* p) *q = '\0'; return p; } +*/ char* Trim(char* p) { - if (*p == '\0') { return p; } - while (isspace(*p)) { p++; } // Trim leading spaces - if (*p == '\0') { return p; } + while ((*p != '\0') && isblank(*p)) { p++; } // Trim leading spaces char* q = p + strlen(p) -1; - while (isspace(*q) && q >= p) { q--; } // Trim trailing spaces + while ((q >= p) && isblank(*q)) { q--; } // Trim trailing spaces q++; *q = '\0'; return p; @@ -450,7 +452,7 @@ char* GetPowerDevice(char* dest, uint8_t idx, size_t size, uint8_t option) strncpy_P(dest, S_RSLT_POWER, size); // POWER if ((devices_present + option) > 1) { snprintf_P(sidx, sizeof(sidx), PSTR("%d"), idx); // x - strncat(dest, sidx, size); // POWERx + strncat(dest, sidx, size - strlen(dest) -1); // POWERx } return dest; } @@ -470,11 +472,26 @@ float ConvertTemp(float c) return result; } -char TempUnit() +char TempUnit(void) { return (Settings.flag.temperature_conversion) ? 'F' : 'C'; } +float ConvertPressure(float p) +{ + float result = p; + + if (!isnan(p) && Settings.flag.pressure_conversion) { + result = p * 0.75006375541921; // mmHg + } + return result; +} + +String PressureUnit(void) +{ + return (Settings.flag.pressure_conversion) ? String(D_UNIT_MILLIMETER_MERCURY) : String(D_UNIT_PRESSURE); +} + void SetGlobalValues(float temperature, float humidity) { global_update = uptime; @@ -482,7 +499,7 @@ void SetGlobalValues(float temperature, float humidity) global_humidity = humidity; } -void ResetGlobalValues() +void ResetGlobalValues(void) { if ((uptime - global_update) > GLOBAL_VALUES_VALID) { // Reset after 5 minutes global_update = 0; @@ -631,89 +648,20 @@ boolean GetUsedInModule(byte val, uint8_t *arr) int offset = 0; if (!val) { return false; } // None -#ifndef USE_I2C - if (GPIO_I2C_SCL == val) { return true; } - if (GPIO_I2C_SDA == val) { return true; } -#endif -#ifndef USE_WS2812 - if (GPIO_WS2812 == val) { return true; } -#endif -#ifndef USE_IR_REMOTE - if (GPIO_IRSEND == val) { return true; } -#ifndef USE_IR_RECEIVE - if (GPIO_IRRECV == val) { return true; } -#endif -#endif -#ifndef USE_MHZ19 - if (GPIO_MHZ_TXD == val) { return true; } - if (GPIO_MHZ_RXD == val) { return true; } -#endif - int pzem = 3; -#ifndef USE_PZEM004T - pzem--; - if (GPIO_PZEM004_RX == val) { return true; } -#endif -#ifndef USE_PZEM_AC - pzem--; - if (GPIO_PZEM016_RX == val) { return true; } -#endif -#ifndef USE_PZEM_DC - pzem--; - if (GPIO_PZEM017_RX == val) { return true; } -#endif - if (!pzem && (GPIO_PZEM0XX_TX == val)) { return true; } + if ((val >= GPIO_KEY1) && (val < GPIO_KEY1 + MAX_KEYS)) { + offset = (GPIO_KEY1_NP - GPIO_KEY1); + } + if ((val >= GPIO_KEY1_NP) && (val < GPIO_KEY1_NP + MAX_KEYS)) { + offset = -(GPIO_KEY1_NP - GPIO_KEY1); + } -#ifndef USE_SENSEAIR - if (GPIO_SAIR_TX == val) { return true; } - if (GPIO_SAIR_RX == val) { return true; } -#endif -#ifndef USE_SPI - if (GPIO_SPI_CS == val) { return true; } - if (GPIO_SPI_DC == val) { return true; } -#endif -#ifndef USE_DISPLAY - if (GPIO_BACKLIGHT == val) { return true; } -#endif -#ifndef USE_PMS5003 - if (GPIO_PMS5003 == val) { return true; } -#endif -#ifndef USE_NOVA_SDS - if (GPIO_SDS0X1_TX == val) { return true; } - if (GPIO_SDS0X1_RX == val) { return true; } -#endif -#ifndef USE_SERIAL_BRIDGE - if (GPIO_SBR_TX == val) { return true; } - if (GPIO_SBR_RX == val) { return true; } -#endif -#ifndef USE_SR04 - if (GPIO_SR04_TRIG == val) { return true; } - if (GPIO_SR04_ECHO == val) { return true; } -#endif -#ifndef USE_SDM120 - if (GPIO_SDM120_TX == val) { return true; } - if (GPIO_SDM120_RX == val) { return true; } -#endif -#ifndef USE_SDM630 - if (GPIO_SDM630_TX == val) { return true; } - if (GPIO_SDM630_RX == val) { return true; } -#endif -#ifndef USE_TM1638 - if (GPIO_TM16CLK == val) { return true; } - if (GPIO_TM16DIO == val) { return true; } - if (GPIO_TM16STB == val) { return true; } -#endif -#ifndef USE_HX711 - if (GPIO_HX711_SCK == val) { return true; } - if (GPIO_HX711_DAT == val) { return true; } -#endif -#ifndef USE_TX20_WIND_SENSOR - if (GPIO_TX20_TXD_BLACK == val) { return true; } -#endif -#ifndef USE_RC_SWITCH - if (GPIO_RFSEND == val) { return true; } - if (GPIO_RFRECV == val) { return true; } -#endif + if ((val >= GPIO_SWT1) && (val < GPIO_SWT1 + MAX_SWITCHES)) { + offset = (GPIO_SWT1_NP - GPIO_SWT1); + } + if ((val >= GPIO_SWT1_NP) && (val < GPIO_SWT1_NP + MAX_SWITCHES)) { + offset = -(GPIO_SWT1_NP - GPIO_SWT1); + } if ((val >= GPIO_REL1) && (val < GPIO_REL1 + MAX_RELAYS)) { offset = (GPIO_REL1_INV - GPIO_REL1); @@ -735,6 +683,14 @@ boolean GetUsedInModule(byte val, uint8_t *arr) if ((val >= GPIO_PWM1_INV) && (val < GPIO_PWM1_INV + MAX_PWMS)) { offset = -(GPIO_PWM1_INV - GPIO_PWM1); } + + if ((val >= GPIO_CNTR1) && (val < GPIO_CNTR1 + MAX_COUNTERS)) { + offset = (GPIO_CNTR1_NP - GPIO_CNTR1); + } + if ((val >= GPIO_CNTR1_NP) && (val < GPIO_CNTR1_NP + MAX_COUNTERS)) { + offset = -(GPIO_CNTR1_NP - GPIO_CNTR1); + } + for (byte i = 0; i < MAX_GPIO_PIN; i++) { if (arr[i] == val) { return true; } if (arr[i] == val + offset) { return true; } @@ -758,7 +714,7 @@ void SetSerialBaudrate(int baudrate) } } -void ClaimSerial() +void ClaimSerial(void) { serial_local = 1; AddLog_P(LOG_LEVEL_INFO, PSTR("SNS: Hardware Serial")); @@ -874,789 +830,6 @@ void SetNextTimeInterval(unsigned long& timer, const unsigned long step) timer = millis() + (step - passed); } -/*********************************************************************************************\ - * Fill feature list -\*********************************************************************************************/ - -void GetFeatures() -{ - feature_drv1 = 0x00000000; // xdrv_01_mqtt.ino, xdrv_01_light.ino, xdrv_04_snfbridge.ino - -// feature_drv1 |= 0x00000001; -// feature_drv1 |= 0x00000002; - -#ifdef USE_I2C - feature_drv1 |= 0x00000004; // sonoff.ino -#endif -#ifdef USE_SPI - feature_drv1 |= 0x00000008; // sonoff.ino -#endif -#ifdef USE_DISCOVERY - feature_drv1 |= 0x00000010; // sonoff.ino -#endif -#ifdef USE_ARDUINO_OTA - feature_drv1 |= 0x00000020; // sonoff.ino -#endif -#ifdef USE_MQTT_TLS - feature_drv1 |= 0x00000040; // sonoff.ino -#endif -#ifdef USE_WEBSERVER - feature_drv1 |= 0x00000080; // xdrv_02_webserver.ino -#endif -#ifdef WEBSERVER_ADVERTISE - feature_drv1 |= 0x00000100; // xdrv_02_webserver.ino -#endif -#ifdef USE_EMULATION - feature_drv1 |= 0x00000200; // xplg_wemohue.ino -#endif -#if (MQTT_LIBRARY_TYPE == MQTT_PUBSUBCLIENT) - feature_drv1 |= 0x00000400; // xdrv_01_mqtt.ino -#endif -#if (MQTT_LIBRARY_TYPE == MQTT_TASMOTAMQTT) - feature_drv1 |= 0x00000800; // xdrv_01_mqtt.ino -#endif -#if (MQTT_LIBRARY_TYPE == MQTT_ESPMQTTARDUINO) // Obsolete since 6.2.1.11 - feature_drv1 |= 0x00001000; // xdrv_01_mqtt.ino -#endif -#ifdef MQTT_HOST_DISCOVERY - feature_drv1 |= 0x00002000; // xdrv_01_mqtt.ino -#endif -#ifdef USE_ARILUX_RF - feature_drv1 |= 0x00004000; // xdrv_04_light.ino -#endif -#ifdef USE_WS2812 - feature_drv1 |= 0x00008000; // xdrv_04_light.ino -#endif -#ifdef USE_WS2812_DMA - feature_drv1 |= 0x00010000; // xdrv_04_light.ino -#endif -#ifdef USE_IR_REMOTE - feature_drv1 |= 0x00020000; // xdrv_05_irremote.ino -#endif -#ifdef USE_IR_HVAC - feature_drv1 |= 0x00040000; // xdrv_05_irremote.ino -#endif -#ifdef USE_IR_RECEIVE - feature_drv1 |= 0x00080000; // xdrv_05_irremote.ino -#endif -#ifdef USE_DOMOTICZ - feature_drv1 |= 0x00100000; // xdrv_07_domoticz.ino -#endif -#ifdef USE_DISPLAY - feature_drv1 |= 0x00200000; // xdrv_13_display.ino -#endif -#ifdef USE_HOME_ASSISTANT - feature_drv1 |= 0x00400000; // xdrv_12_home_assistant.ino -#endif -#ifdef USE_SERIAL_BRIDGE - feature_drv1 |= 0x00800000; // xdrv_08_serial_bridge.ino -#endif -#ifdef USE_TIMERS - feature_drv1 |= 0x01000000; // xdrv_09_timers.ino -#endif -#ifdef USE_SUNRISE - feature_drv1 |= 0x02000000; // xdrv_09_timers.ino -#endif -#ifdef USE_TIMERS_WEB - feature_drv1 |= 0x04000000; // xdrv_09_timers.ino -#endif -#ifdef USE_RULES - feature_drv1 |= 0x08000000; // xdrv_10_rules.ino -#endif -#ifdef USE_KNX - feature_drv1 |= 0x10000000; // xdrv_11_knx.ino -#endif -#ifdef USE_WPS - feature_drv1 |= 0x20000000; // support.ino -#endif -#ifdef USE_SMARTCONFIG - feature_drv1 |= 0x40000000; // support.ino -#endif -#if (MQTT_LIBRARY_TYPE == MQTT_ARDUINOMQTT) - feature_drv1 |= 0x80000000; // xdrv_01_mqtt.ino -#endif - -/*********************************************************************************************/ - - feature_drv2 = 0x00000000; - -#ifdef USE_CONFIG_OVERRIDE - feature_drv2 |= 0x00000001; // user_config(_override).h -#endif -#ifdef BE_MINIMAL - feature_drv2 |= 0x00000002; // user_config(_override).h -#endif -#ifdef USE_SENSORS - feature_drv2 |= 0x00000004; // user_config(_override).h -#endif -#ifdef USE_CLASSIC - feature_drv2 |= 0x00000008; // user_config(_override).h -#endif -#ifdef USE_KNX_NO_EMULATION - feature_drv2 |= 0x00000010; // user_config(_override).h -#endif -#ifdef USE_DISPLAY_MODES1TO5 - feature_drv2 |= 0x00000020; // xdrv_13_display.ino -#endif -#ifdef USE_DISPLAY_GRAPH - feature_drv2 |= 0x00000040; // xdrv_13_display.ino -#endif -#ifdef USE_DISPLAY_LCD - feature_drv2 |= 0x00000080; // xdsp_01_lcd.ino -#endif -#ifdef USE_DISPLAY_SSD1306 - feature_drv2 |= 0x00000100; // xdsp_02_ssd1306.ino -#endif -#ifdef USE_DISPLAY_MATRIX - feature_drv2 |= 0x00000200; // xdsp_03_matrix.ino -#endif -#ifdef USE_DISPLAY_ILI9341 - feature_drv2 |= 0x00000400; // xdsp_04_ili9341.ino -#endif -#ifdef USE_DISPLAY_EPAPER - feature_drv2 |= 0x00000800; // xdsp_05_epaper.ino -#endif -#ifdef USE_DISPLAY_SH1106 - feature_drv2 |= 0x00001000; // xdsp_06_sh1106.ino -#endif -#ifdef USE_MP3_PLAYER - feature_drv2 |= 0x00002000; // xdrv_14_mp3.ino -#endif -#ifdef USE_PCA9685 - feature_drv2 |= 0x00004000; // xdrv_15_pca9685.ino -#endif -#ifdef USE_TUYA_DIMMER - feature_drv2 |= 0x00008000; // xdrv_16_tuyadimmer.ino -#endif -#ifdef USE_RC_SWITCH - feature_drv2 |= 0x00010000; // xdrv_17_rcswitch.ino -#endif - - - -#ifdef NO_EXTRA_4K_HEAP - feature_drv2 |= 0x00800000; // sonoff_post.h -#endif -#ifdef VTABLES_IN_IRAM - feature_drv2 |= 0x01000000; // platformio.ini -#endif -#ifdef VTABLES_IN_DRAM - feature_drv2 |= 0x02000000; // platformio.ini -#endif -#ifdef VTABLES_IN_FLASH - feature_drv2 |= 0x04000000; // platformio.ini -#endif -#ifdef PIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH - feature_drv2 |= 0x08000000; // platformio.ini -#endif -#ifdef PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY - feature_drv2 |= 0x10000000; // platformio.ini -#endif -#ifdef PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH - feature_drv2 |= 0x20000000; // platformio.ini -#endif -#ifdef DEBUG_THEO - feature_drv2 |= 0x40000000; // xdrv_99_debug.ino -#endif -#ifdef USE_DEBUG_DRIVER - feature_drv2 |= 0x80000000; // xdrv_99_debug.ino -#endif - -/*********************************************************************************************/ - - feature_sns1 = 0x00000000; // xsns_01_counter.ino, xsns_04_snfsc.ino - -// feature_sns1 |= 0x00000001; - -#ifdef USE_ADC_VCC - feature_sns1 |= 0x00000002; // support.ino (ADC) -#endif -#ifdef USE_ENERGY_SENSOR - feature_sns1 |= 0x00000004; // xdrv_03_energy.ino -#endif -#ifdef USE_PZEM004T - feature_sns1 |= 0x00000008; // xnrg_03_pzem004t.ino -#endif -#ifdef USE_DS18B20 - feature_sns1 |= 0x00000010; // xsns_05_ds18b20.ino -#endif -#ifdef USE_DS18x20_LEGACY - feature_sns1 |= 0x00000020; // xsns_05_ds18x20_legacy.ino -#endif -#ifdef USE_DS18x20 - feature_sns1 |= 0x00000040; // xsns_05_ds18x20.ino -#endif -#ifdef USE_DHT - feature_sns1 |= 0x00000080; // xsns_06_dht.ino -#endif -#ifdef USE_SHT - feature_sns1 |= 0x00000100; // xsns_07_sht1x.ino -#endif -#ifdef USE_HTU - feature_sns1 |= 0x00000200; // xsns_08_htu21.ino -#endif -#ifdef USE_BMP - feature_sns1 |= 0x00000400; // xsns_09_bmp.ino -#endif -#ifdef USE_BME680 - feature_sns1 |= 0x00000800; // xsns_09_bmp.ino - BME680 -#endif -#ifdef USE_BH1750 - feature_sns1 |= 0x00001000; // xsns_10_bh1750.ino -#endif -#ifdef USE_VEML6070 - feature_sns1 |= 0x00002000; // xsns_11_veml6070.ino -#endif -#ifdef USE_ADS1115_I2CDEV - feature_sns1 |= 0x00004000; // xsns_12_ads1115_i2cdev.ino -#endif -#ifdef USE_ADS1115 - feature_sns1 |= 0x00008000; // xsns_12_ads1115.ino -#endif -#ifdef USE_INA219 - feature_sns1 |= 0x00010000; // xsns_13_ina219.ino -#endif -#ifdef USE_SHT3X - feature_sns1 |= 0x00020000; // xsns_14_sht3x.ino -#endif -#ifdef USE_MHZ19 - feature_sns1 |= 0x00040000; // xsns_15_mhz19.ino -#endif -#ifdef USE_TSL2561 - feature_sns1 |= 0x00080000; // xsns_16_tsl2561.ino -#endif -#ifdef USE_SENSEAIR - feature_sns1 |= 0x00100000; // xsns_17_senseair.ino -#endif -#ifdef USE_PMS5003 - feature_sns1 |= 0x00200000; // xsns_18_pms5003.ino -#endif -#ifdef USE_MGS - feature_sns1 |= 0x00400000; // xsns_19_mgs.ino -#endif -#ifdef USE_NOVA_SDS - feature_sns1 |= 0x00800000; // xsns_20_novasds.ino -#endif -#ifdef USE_SGP30 - feature_sns1 |= 0x01000000; // xsns_21_sgp30.ino -#endif -#ifdef USE_SR04 - feature_sns1 |= 0x02000000; // xsns_22_sr04.ino -#endif -#ifdef USE_SDM120 - feature_sns1 |= 0x04000000; // xsns_23_sdm120.ino -#endif -#ifdef USE_SI1145 - feature_sns1 |= 0x08000000; // xsns_24_si1145.ino -#endif -#ifdef USE_SDM630 - feature_sns1 |= 0x10000000; // xsns_25_sdm630.ino -#endif -#ifdef USE_LM75AD - feature_sns1 |= 0x20000000; // xsns_26_lm75ad.ino -#endif -#ifdef USE_APDS9960 - feature_sns1 |= 0x40000000; // xsns_27_apds9960.ino -#endif -#ifdef USE_TM1638 - feature_sns1 |= 0x80000000; // xsns_28_tm1638.ino -#endif - -/*********************************************************************************************/ - - feature_sns2 = 0x00000000; - -#ifdef USE_MCP230xx - feature_sns2 |= 0x00000001; // xsns_29_mcp230xx.ino -#endif -#ifdef USE_MPR121 - feature_sns2 |= 0x00000002; // xsns_30_mpr121.ino -#endif -#ifdef USE_CCS811 - feature_sns2 |= 0x00000004; // xsns_31_ccs811.ino -#endif -#ifdef USE_MPU6050 - feature_sns2 |= 0x00000008; // xsns_32_mpu6050.ino -#endif -#ifdef USE_MCP230xx_OUTPUT - feature_sns2 |= 0x00000010; // xsns_29_mcp230xx.ino -#endif -#ifdef USE_MCP230xx_DISPLAYOUTPUT - feature_sns2 |= 0x00000020; // xsns_29_mcp230xx.ino -#endif -#ifdef USE_HLW8012 - feature_sns2 |= 0x00000040; // xnrg_01_hlw8012.ino -#endif -#ifdef USE_CSE7766 - feature_sns2 |= 0x00000080; // xnrg_02_cse7766.ino -#endif -#ifdef USE_MCP39F501 - feature_sns2 |= 0x00000100; // xnrg_04_mcp39f501.ino -#endif -#ifdef USE_PZEM_AC - feature_sns2 |= 0x00000200; // xnrg_05_pzem_ac.ino -#endif -#ifdef USE_DS3231 - feature_sns2 |= 0x00000400; // xsns_33_ds3231.ino -#endif -#ifdef USE_HX711 - feature_sns2 |= 0x00000800; // xsns_34_hx711.ino -#endif -#ifdef USE_PZEM_DC - feature_sns2 |= 0x00001000; // xnrg_06_pzem_dc.ino -#endif -#ifdef USE_TX20_WIND_SENSOR - feature_sns2 |= 0x00002000; // xsns_35_tx20.ino -#endif - - - -} - -/*********************************************************************************************\ - * Wifi -\*********************************************************************************************/ - -#define WIFI_CONFIG_SEC 180 // seconds before restart -#define WIFI_CHECK_SEC 20 // seconds -#define WIFI_RETRY_OFFSET_SEC 20 // seconds - -uint8_t wifi_counter; -uint8_t wifi_retry_init; -uint8_t wifi_retry; -uint8_t wifi_status; -uint8_t wps_result; -uint8_t wifi_config_type = 0; -uint8_t wifi_config_counter = 0; - -int WifiGetRssiAsQuality(int rssi) -{ - int quality = 0; - - if (rssi <= -100) { - quality = 0; - } else if (rssi >= -50) { - quality = 100; - } else { - quality = 2 * (rssi + 100); - } - return quality; -} - -boolean WifiConfigCounter() -{ - if (wifi_config_counter) { - wifi_config_counter = WIFI_CONFIG_SEC; - } - return (wifi_config_counter); -} - -extern "C" { -#include "user_interface.h" -} - -void WifiWpsStatusCallback(wps_cb_status status); - -void WifiWpsStatusCallback(wps_cb_status status) -{ -/* from user_interface.h: - enum wps_cb_status { - WPS_CB_ST_SUCCESS = 0, - WPS_CB_ST_FAILED, - WPS_CB_ST_TIMEOUT, - WPS_CB_ST_WEP, // WPS failed because that WEP is not supported - WPS_CB_ST_SCAN_ERR, // can not find the target WPS AP - }; -*/ - wps_result = status; - if (WPS_CB_ST_SUCCESS == wps_result) { - wifi_wps_disable(); - } else { - snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_WIFI D_WPS_FAILED_WITH_STATUS " %d"), wps_result); - AddLog(LOG_LEVEL_DEBUG); - wifi_config_counter = 2; - } -} - -boolean WifiWpsConfigDone(void) -{ - return (!wps_result); -} - -boolean WifiWpsConfigBegin(void) -{ - wps_result = 99; - if (!wifi_wps_disable()) { return false; } - if (!wifi_wps_enable(WPS_TYPE_PBC)) { return false; } // so far only WPS_TYPE_PBC is supported (SDK 2.0.0) - if (!wifi_set_wps_cb((wps_st_cb_t) &WifiWpsStatusCallback)) { return false; } - if (!wifi_wps_start()) { return false; } - return true; -} - -void WifiConfig(uint8_t type) -{ - if (!wifi_config_type) { - if ((WIFI_RETRY == type) || (WIFI_WAIT == type)) { return; } -#if defined(USE_WEBSERVER) && defined(USE_EMULATION) - UdpDisconnect(); -#endif // USE_EMULATION - WiFi.disconnect(); // Solve possible Wifi hangs - wifi_config_type = type; - -#ifndef USE_WPS - if (WIFI_WPSCONFIG == wifi_config_type) { wifi_config_type = WIFI_MANAGER; } -#endif // USE_WPS -#ifndef USE_WEBSERVER - if (WIFI_MANAGER == wifi_config_type) { wifi_config_type = WIFI_SMARTCONFIG; } -#endif // USE_WEBSERVER -#ifndef USE_SMARTCONFIG - if (WIFI_SMARTCONFIG == wifi_config_type) { wifi_config_type = WIFI_SERIAL; } -#endif // USE_SMARTCONFIG - - wifi_config_counter = WIFI_CONFIG_SEC; // Allow up to WIFI_CONFIG_SECS seconds for phone to provide ssid/pswd - wifi_counter = wifi_config_counter +5; - blinks = 1999; - if (WIFI_RESTART == wifi_config_type) { - restart_flag = 2; - } - else if (WIFI_SERIAL == wifi_config_type) { - AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_6_SERIAL " " D_ACTIVE_FOR_3_MINUTES)); - } -#ifdef USE_SMARTCONFIG - else if (WIFI_SMARTCONFIG == wifi_config_type) { - AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_1_SMARTCONFIG " " D_ACTIVE_FOR_3_MINUTES)); - WiFi.beginSmartConfig(); - } -#endif // USE_SMARTCONFIG -#ifdef USE_WPS - else if (WIFI_WPSCONFIG == wifi_config_type) { - if (WifiWpsConfigBegin()) { - AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_3_WPSCONFIG " " D_ACTIVE_FOR_3_MINUTES)); - } else { - AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_3_WPSCONFIG " " D_FAILED_TO_START)); - wifi_config_counter = 3; - } - } -#endif // USE_WPS -#ifdef USE_WEBSERVER - else if (WIFI_MANAGER == wifi_config_type) { - AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_2_WIFIMANAGER " " D_ACTIVE_FOR_3_MINUTES)); - WifiManagerBegin(); - } -#endif // USE_WEBSERVER - } -} - -void WiFiSetSleepMode() -{ -/* Excerpt from the esp8266 non os sdk api reference (v2.2.1): - * Sets sleep type for power saving. Set WIFI_NONE_SLEEP to disable power saving. - * - Default mode: WIFI_MODEM_SLEEP. - * - In order to lower the power comsumption, ESP8266 changes the TCP timer - * tick from 250ms to 3s in WIFI_LIGHT_SLEEP mode, which leads to increased timeout for - * TCP timer. Therefore, the WIFI_MODEM_SLEEP or deep-sleep mode should be used - * where there is a requirement for the accurancy of the TCP timer. - * - * Sleep is disabled in core 2.4.1 and 2.4.2 as there are bugs in their SDKs - * See https://github.com/arendst/Sonoff-Tasmota/issues/2559 - */ - -// Sleep explanation: https://github.com/esp8266/Arduino/blob/3f0c601cfe81439ce17e9bd5d28994a7ed144482/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp#L255 -#if defined(ARDUINO_ESP8266_RELEASE_2_4_1) || defined(ARDUINO_ESP8266_RELEASE_2_4_2) -#else // Enabled in 2.3.0, 2.4.0 and stage - if (sleep) { - WiFi.setSleepMode(WIFI_LIGHT_SLEEP); // Allow light sleep during idle times - } else { - WiFi.setSleepMode(WIFI_MODEM_SLEEP); // Disable sleep (Esp8288/Arduino core and sdk default) - } -#endif -} - -void WifiBegin(uint8_t flag) -{ - const char kWifiPhyMode[] = " BGN"; - -#if defined(USE_WEBSERVER) && defined(USE_EMULATION) - UdpDisconnect(); -#endif // USE_EMULATION - -#ifdef ARDUINO_ESP8266_RELEASE_2_3_0 // (!strncmp_P(ESP.getSdkVersion(),PSTR("1.5.3"),5)) - AddLog_P(LOG_LEVEL_DEBUG, S_LOG_WIFI, PSTR(D_PATCH_ISSUE_2186)); - WiFi.mode(WIFI_OFF); // See https://github.com/esp8266/Arduino/issues/2186 -#endif - - WiFi.persistent(false); // Solve possible wifi init errors (re-add at 6.2.1.16 #4044, #4083) - WiFi.disconnect(true); // Delete SDK wifi config - delay(200); - WiFi.mode(WIFI_STA); // Disable AP mode - WiFiSetSleepMode(); -// if (WiFi.getPhyMode() != WIFI_PHY_MODE_11N) { WiFi.setPhyMode(WIFI_PHY_MODE_11N); } - if (!WiFi.getAutoConnect()) { WiFi.setAutoConnect(true); } -// WiFi.setAutoReconnect(true); - switch (flag) { - case 0: // AP1 - case 1: // AP2 - Settings.sta_active = flag; - break; - case 2: // Toggle - Settings.sta_active ^= 1; - } // 3: Current AP - if ('\0' == Settings.sta_ssid[Settings.sta_active][0]) { Settings.sta_active ^= 1; } // Skip empty SSID - if (Settings.ip_address[0]) { - WiFi.config(Settings.ip_address[0], Settings.ip_address[1], Settings.ip_address[2], Settings.ip_address[3]); // Set static IP - } - WiFi.hostname(my_hostname); - WiFi.begin(Settings.sta_ssid[Settings.sta_active], Settings.sta_pwd[Settings.sta_active]); - snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_WIFI D_CONNECTING_TO_AP "%d %s " D_IN_MODE " 11%c " D_AS " %s..."), - Settings.sta_active +1, Settings.sta_ssid[Settings.sta_active], kWifiPhyMode[WiFi.getPhyMode() & 0x3], my_hostname); - AddLog(LOG_LEVEL_INFO); -} - -void WifiState(uint8_t state) -{ - if (state == global_state.wifi_down) { - if (state) { - rules_flag.wifi_connected = 1; - } else { - rules_flag.wifi_disconnected = 1; - } - } - global_state.wifi_down = state ^1; -} - -void WifiCheckIp() -{ - if ((WL_CONNECTED == WiFi.status()) && (static_cast(WiFi.localIP()) != 0)) { - WifiState(1); - wifi_counter = WIFI_CHECK_SEC; - wifi_retry = wifi_retry_init; - AddLog_P((wifi_status != WL_CONNECTED) ? LOG_LEVEL_INFO : LOG_LEVEL_DEBUG_MORE, S_LOG_WIFI, PSTR(D_CONNECTED)); - if (wifi_status != WL_CONNECTED) { -// AddLog_P(LOG_LEVEL_INFO, PSTR("Wifi: Set IP addresses")); - Settings.ip_address[1] = (uint32_t)WiFi.gatewayIP(); - Settings.ip_address[2] = (uint32_t)WiFi.subnetMask(); - Settings.ip_address[3] = (uint32_t)WiFi.dnsIP(); - } - wifi_status = WL_CONNECTED; - } else { - WifiState(0); - uint8_t wifi_config_tool = Settings.sta_config; - wifi_status = WiFi.status(); - switch (wifi_status) { - case WL_CONNECTED: - AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_NO_IP_ADDRESS)); - wifi_status = 0; - wifi_retry = wifi_retry_init; - break; - case WL_NO_SSID_AVAIL: - AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_AP_NOT_REACHED)); - if (WIFI_WAIT == Settings.sta_config) { - wifi_retry = wifi_retry_init; - } else { - if (wifi_retry > (wifi_retry_init / 2)) { - wifi_retry = wifi_retry_init / 2; - } - else if (wifi_retry) { - wifi_retry = 0; - } - } - break; - case WL_CONNECT_FAILED: - AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_WRONG_PASSWORD)); - if (wifi_retry > (wifi_retry_init / 2)) { - wifi_retry = wifi_retry_init / 2; - } - else if (wifi_retry) { - wifi_retry = 0; - } - break; - default: // WL_IDLE_STATUS and WL_DISCONNECTED - if (!wifi_retry || ((wifi_retry_init / 2) == wifi_retry)) { - AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_AP_TIMEOUT)); - } else { - if (('\0' == Settings.sta_ssid[0][0]) && ('\0' == Settings.sta_ssid[1][0])) { - wifi_config_tool = WIFI_CONFIG_NO_SSID; // Skip empty SSIDs and start Wifi config tool - wifi_retry = 0; - } else { - AddLog_P(LOG_LEVEL_DEBUG, S_LOG_WIFI, PSTR(D_ATTEMPTING_CONNECTION)); - } - } - } - if (wifi_retry) { - if (wifi_retry_init == wifi_retry) { - WifiBegin(3); // Select default SSID - } - if ((Settings.sta_config != WIFI_WAIT) && ((wifi_retry_init / 2) == wifi_retry)) { - WifiBegin(2); // Select alternate SSID - } - wifi_counter = 1; - wifi_retry--; - } else { - WifiConfig(wifi_config_tool); - wifi_counter = 1; - wifi_retry = wifi_retry_init; - } - } -} - -void WifiCheck(uint8_t param) -{ - wifi_counter--; - switch (param) { - case WIFI_SERIAL: - case WIFI_SMARTCONFIG: - case WIFI_MANAGER: - case WIFI_WPSCONFIG: - WifiConfig(param); - break; - default: - if (wifi_config_counter) { - wifi_config_counter--; - wifi_counter = wifi_config_counter +5; - if (wifi_config_counter) { -#ifdef USE_SMARTCONFIG - if ((WIFI_SMARTCONFIG == wifi_config_type) && WiFi.smartConfigDone()) { - wifi_config_counter = 0; - } -#endif // USE_SMARTCONFIG -#ifdef USE_WPS - if ((WIFI_WPSCONFIG == wifi_config_type) && WifiWpsConfigDone()) { - wifi_config_counter = 0; - } -#endif // USE_WPS - if (!wifi_config_counter) { - if (strlen(WiFi.SSID().c_str())) { - strlcpy(Settings.sta_ssid[0], WiFi.SSID().c_str(), sizeof(Settings.sta_ssid[0])); - } - if (strlen(WiFi.psk().c_str())) { - strlcpy(Settings.sta_pwd[0], WiFi.psk().c_str(), sizeof(Settings.sta_pwd[0])); - } - Settings.sta_active = 0; - snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_WIFI D_WCFG_1_SMARTCONFIG D_CMND_SSID "1 %s"), Settings.sta_ssid[0]); - AddLog(LOG_LEVEL_INFO); - } - } - if (!wifi_config_counter) { -#ifdef USE_SMARTCONFIG - if (WIFI_SMARTCONFIG == wifi_config_type) { WiFi.stopSmartConfig(); } -#endif // USE_SMARTCONFIG -// SettingsSdkErase(); // Disabled v6.1.0b due to possible bad wifi connects - restart_flag = 2; - } - } else { - if (wifi_counter <= 0) { - AddLog_P(LOG_LEVEL_DEBUG_MORE, S_LOG_WIFI, PSTR(D_CHECKING_CONNECTION)); - wifi_counter = WIFI_CHECK_SEC; - WifiCheckIp(); - } - if ((WL_CONNECTED == WiFi.status()) && (static_cast(WiFi.localIP()) != 0) && !wifi_config_type) { - WifiState(1); -#ifdef BE_MINIMAL - if (1 == RtcSettings.ota_loader) { - RtcSettings.ota_loader = 0; - ota_state_flag = 3; - } -#endif // BE_MINIMAL - -#ifdef USE_DISCOVERY - if (!mdns_begun) { - if (mdns_delayed_start) { - AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_MDNS D_ATTEMPTING_CONNECTION)); - mdns_delayed_start--; - } else { - mdns_delayed_start = Settings.param[P_MDNS_DELAYED_START]; - mdns_begun = MDNS.begin(my_hostname); - snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_MDNS "%s"), (mdns_begun) ? D_INITIALIZED : D_FAILED); - AddLog(LOG_LEVEL_INFO); - } - } -#endif // USE_DISCOVERY - -#ifdef USE_WEBSERVER - if (Settings.webserver) { - StartWebserver(Settings.webserver, WiFi.localIP()); -#ifdef USE_DISCOVERY -#ifdef WEBSERVER_ADVERTISE - if (mdns_begun) { - MDNS.addService("http", "tcp", WEB_PORT); - } -#endif // WEBSERVER_ADVERTISE -#endif // USE_DISCOVERY - } else { - StopWebserver(); - } -#ifdef USE_EMULATION - if (Settings.flag2.emulation) { UdpConnect(); } -#endif // USE_EMULATION -#endif // USE_WEBSERVER - -#ifdef USE_KNX - if (!knx_started && Settings.flag.knx_enabled) { - KNXStart(); - knx_started = true; - } -#endif // USE_KNX - - } else { - WifiState(0); -#if defined(USE_WEBSERVER) && defined(USE_EMULATION) - UdpDisconnect(); -#endif // USE_EMULATION - mdns_begun = false; -#ifdef USE_KNX - knx_started = false; -#endif // USE_KNX - } - } - } -} - -int WifiState() -{ - int state; - - if ((WL_CONNECTED == WiFi.status()) && (static_cast(WiFi.localIP()) != 0)) { - state = WIFI_RESTART; - } - if (wifi_config_type) { state = wifi_config_type; } - return state; -} - -void WifiConnect() -{ - WiFi.persistent(false); // Solve possible wifi init errors - wifi_status = 0; - wifi_retry_init = WIFI_RETRY_OFFSET_SEC + ((ESP.getChipId() & 0xF) * 2); - wifi_retry = wifi_retry_init; - wifi_counter = 1; -} - -/* -// Enable from 6.0.0a until 6.1.0a - disabled due to possible cause of bad wifi connect on core 2.3.0 -void WifiDisconnect() -{ - // Courtesy of EspEasy - WiFi.persistent(true); // use SDK storage of SSID/WPA parameters - ETS_UART_INTR_DISABLE(); - wifi_station_disconnect(); // this will store empty ssid/wpa into sdk storage - ETS_UART_INTR_ENABLE(); - WiFi.persistent(false); // Do not use SDK storage of SSID/WPA parameters -} - -void EspRestart() -{ - // This results in exception 3 on restarts - delay(100); // Allow time for message xfer - disabled v6.1.0b - WifiDisconnect(); - ESP.restart(); -} -*/ - -void EspRestart() -{ - ESP.restart(); -} - /*********************************************************************************************\ * Basic I2C routines \*********************************************************************************************/ @@ -1848,7 +1021,7 @@ void I2cScan(char *devs, unsigned int devs_len) } } if (any) { - strncat(devs, "\"}", devs_len); + strncat(devs, "\"}", devs_len - strlen(devs) -1); } else { snprintf_P(devs, devs_len, PSTR("{\"" D_CMND_I2CSCAN "\":\"" D_JSON_I2CSCAN_NO_DEVICES_FOUND "\"}")); @@ -1867,467 +1040,6 @@ boolean I2cDevice(byte addr) } #endif // USE_I2C -/*********************************************************************************************\ - * Real Time Clock - * - * Sources: Time by Michael Margolis and Paul Stoffregen (https://github.com/PaulStoffregen/Time) - * Timezone by Jack Christensen (https://github.com/JChristensen/Timezone) -\*********************************************************************************************/ - -extern "C" { -#include "sntp.h" -} - -#define SECS_PER_MIN ((uint32_t)(60UL)) -#define SECS_PER_HOUR ((uint32_t)(3600UL)) -#define SECS_PER_DAY ((uint32_t)(SECS_PER_HOUR * 24UL)) -#define LEAP_YEAR(Y) (((1970+Y)>0) && !((1970+Y)%4) && (((1970+Y)%100) || !((1970+Y)%400))) - -Ticker TickerRtc; - -static const uint8_t kDaysInMonth[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; // API starts months from 1, this array starts from 0 -static const char kMonthNamesEnglish[] = "JanFebMarAprMayJunJulAugSepOctNovDec"; - -uint32_t utc_time = 0; -uint32_t local_time = 0; -uint32_t daylight_saving_time = 0; -uint32_t standard_time = 0; -uint32_t ntp_time = 0; -uint32_t midnight = 1451602800; -uint32_t restart_time = 0; -int16_t time_timezone = 0; // Timezone * 10 -uint8_t midnight_now = 0; -uint8_t ntp_sync_minute = 0; - -String GetBuildDateAndTime() -{ - // "2017-03-07T11:08:02" - ISO8601:2004 - char bdt[21]; - char *p; - char mdate[] = __DATE__; // "Mar 7 2017" - char *smonth = mdate; - int day = 0; - int year = 0; - - // sscanf(mdate, "%s %d %d", bdt, &day, &year); // Not implemented in 2.3.0 and probably too much code - byte i = 0; - for (char *str = strtok_r(mdate, " ", &p); str && i < 3; str = strtok_r(NULL, " ", &p)) { - switch (i++) { - case 0: // Month - smonth = str; - break; - case 1: // Day - day = atoi(str); - break; - case 2: // Year - year = atoi(str); - } - } - int month = (strstr(kMonthNamesEnglish, smonth) -kMonthNamesEnglish) /3 +1; - snprintf_P(bdt, sizeof(bdt), PSTR("%d" D_YEAR_MONTH_SEPARATOR "%02d" D_MONTH_DAY_SEPARATOR "%02d" D_DATE_TIME_SEPARATOR "%s"), year, month, day, __TIME__); - return String(bdt); -} - -/* - * timestamps in https://en.wikipedia.org/wiki/ISO_8601 format - * - * DT_UTC - current data and time in Greenwich, England (aka GMT) - * DT_LOCAL - current date and time taking timezone into account - * DT_RESTART - the date and time this device last started, in local timezone - * - * Format: - * "2017-03-07T11:08:02-07:00" - if DT_LOCAL and SetOption52 = 1 - * "2017-03-07T11:08:02" - otherwise - */ -String GetDateAndTime(byte time_type) -{ - // "2017-03-07T11:08:02-07:00" - ISO8601:2004 - char dt[27]; - TIME_T tmpTime; - - switch (time_type) { - case DT_ENERGY: - BreakTime(Settings.energy_kWhtotal_time, tmpTime); - tmpTime.year += 1970; - break; - case DT_UTC: - BreakTime(utc_time, tmpTime); - tmpTime.year += 1970; - break; - case DT_RESTART: - if (restart_time == 0) { - return ""; - } - BreakTime(restart_time, tmpTime); - tmpTime.year += 1970; - break; - default: - tmpTime = RtcTime; - } - - snprintf_P(dt, sizeof(dt), PSTR("%04d-%02d-%02dT%02d:%02d:%02d"), - tmpTime.year, tmpTime.month, tmpTime.day_of_month, tmpTime.hour, tmpTime.minute, tmpTime.second); - - if (Settings.flag3.time_append_timezone && (DT_LOCAL == time_type)) { -// if (Settings.flag3.time_append_timezone && ((DT_LOCAL == time_type) || (DT_ENERGY == time_type))) { - snprintf_P(dt, sizeof(dt), PSTR("%s%+03d:%02d"), dt, time_timezone / 10, abs((time_timezone % 10) * 6)); // if timezone = +2:30 then time_timezone = 25 - } - - return String(dt); -} - -String GetUptime() -{ - char dt[16]; - - TIME_T ut; - - if (restart_time) { - BreakTime(utc_time - restart_time, ut); - } else { - BreakTime(uptime, ut); - } - - // "P128DT14H35M44S" - ISO8601:2004 - https://en.wikipedia.org/wiki/ISO_8601 Durations -// snprintf_P(dt, sizeof(dt), PSTR("P%dDT%02dH%02dM%02dS"), ut.days, ut.hour, ut.minute, ut.second); - - // "128 14:35:44" - OpenVMS - // "128T14:35:44" - Tasmota - snprintf_P(dt, sizeof(dt), PSTR("%dT%02d:%02d:%02d"), - ut.days, ut.hour, ut.minute, ut.second); - return String(dt); -} - -uint32_t GetMinutesUptime() -{ - TIME_T ut; - - if (restart_time) { - BreakTime(utc_time - restart_time, ut); - } else { - BreakTime(uptime, ut); - } - - return (ut.days *1440) + (ut.hour *60) + ut.minute; -} - -uint32_t GetMinutesPastMidnight() -{ - uint32_t minutes = 0; - - if (RtcTime.valid) { - minutes = (RtcTime.hour *60) + RtcTime.minute; - } - return minutes; -} - -void BreakTime(uint32_t time_input, TIME_T &tm) -{ -// break the given time_input into time components -// this is a more compact version of the C library localtime function -// note that year is offset from 1970 !!! - - uint8_t year; - uint8_t month; - uint8_t month_length; - uint32_t time; - unsigned long days; - - time = time_input; - tm.second = time % 60; - time /= 60; // now it is minutes - tm.minute = time % 60; - time /= 60; // now it is hours - tm.hour = time % 24; - time /= 24; // now it is days - tm.days = time; - tm.day_of_week = ((time + 4) % 7) + 1; // Sunday is day 1 - - year = 0; - days = 0; - while((unsigned)(days += (LEAP_YEAR(year) ? 366 : 365)) <= time) { - year++; - } - tm.year = year; // year is offset from 1970 - - days -= LEAP_YEAR(year) ? 366 : 365; - time -= days; // now it is days in this year, starting at 0 - tm.day_of_year = time; - - days = 0; - month = 0; - month_length = 0; - for (month = 0; month < 12; month++) { - if (1 == month) { // february - if (LEAP_YEAR(year)) { - month_length = 29; - } else { - month_length = 28; - } - } else { - month_length = kDaysInMonth[month]; - } - - if (time >= month_length) { - time -= month_length; - } else { - break; - } - } - strlcpy(tm.name_of_month, kMonthNames + (month *3), 4); - tm.month = month + 1; // jan is month 1 - tm.day_of_month = time + 1; // day of month - tm.valid = (time_input > 1451602800); // 2016-01-01 -} - -uint32_t MakeTime(TIME_T &tm) -{ -// assemble time elements into time_t -// note year argument is offset from 1970 - - int i; - uint32_t seconds; - - // seconds from 1970 till 1 jan 00:00:00 of the given year - seconds = tm.year * (SECS_PER_DAY * 365); - for (i = 0; i < tm.year; i++) { - if (LEAP_YEAR(i)) { - seconds += SECS_PER_DAY; // add extra days for leap years - } - } - - // add days for this year, months start from 1 - for (i = 1; i < tm.month; i++) { - if ((2 == i) && LEAP_YEAR(tm.year)) { - seconds += SECS_PER_DAY * 29; - } else { - seconds += SECS_PER_DAY * kDaysInMonth[i-1]; // monthDay array starts from 0 - } - } - seconds+= (tm.day_of_month - 1) * SECS_PER_DAY; - seconds+= tm.hour * SECS_PER_HOUR; - seconds+= tm.minute * SECS_PER_MIN; - seconds+= tm.second; - return seconds; -} - -uint32_t RuleToTime(TimeRule r, int yr) -{ - TIME_T tm; - uint32_t t; - uint8_t m; - uint8_t w; // temp copies of r.month and r.week - - m = r.month; - w = r.week; - if (0 == w) { // Last week = 0 - if (++m > 12) { // for "Last", go to the next month - m = 1; - yr++; - } - w = 1; // and treat as first week of next month, subtract 7 days later - } - - tm.hour = r.hour; - tm.minute = 0; - tm.second = 0; - tm.day_of_month = 1; - tm.month = m; - tm.year = yr - 1970; - t = MakeTime(tm); // First day of the month, or first day of next month for "Last" rules - BreakTime(t, tm); - t += (7 * (w - 1) + (r.dow - tm.day_of_week + 7) % 7) * SECS_PER_DAY; - if (0 == r.week) { - t -= 7 * SECS_PER_DAY; // back up a week if this is a "Last" rule - } - return t; -} - -String GetTime(int type) -{ - char stime[25]; // Skip newline - - uint32_t time = utc_time; - if (1 == type) time = local_time; - if (2 == type) time = daylight_saving_time; - if (3 == type) time = standard_time; - snprintf_P(stime, sizeof(stime), sntp_get_real_time(time)); - return String(stime); -} - -uint32_t LocalTime() -{ - return local_time; -} - -uint32_t Midnight() -{ - return midnight; -} - -boolean MidnightNow() -{ - boolean mnflg = midnight_now; - if (mnflg) midnight_now = 0; - return mnflg; -} - -void RtcSecond() -{ - int32_t stdoffset; - int32_t dstoffset; - TIME_T tmpTime; - - if ((ntp_sync_minute > 59) && (RtcTime.minute > 2)) ntp_sync_minute = 1; // If sync prepare for a new cycle - uint8_t offset = (uptime < 30) ? RtcTime.second : (((ESP.getChipId() & 0xF) * 3) + 3) ; // First try ASAP to sync. If fails try once every 60 seconds based on chip id - if ((WL_CONNECTED == WiFi.status()) && (offset == RtcTime.second) && ((RtcTime.year < 2016) || (ntp_sync_minute == RtcTime.minute) || ntp_force_sync)) { - ntp_time = sntp_get_current_timestamp(); - if (ntp_time > 1451602800) { // Fix NTP bug in core 2.4.1/SDK 2.2.1 (returns Thu Jan 01 08:00:10 1970 after power on) - ntp_force_sync = 0; - utc_time = ntp_time; - ntp_sync_minute = 60; // Sync so block further requests - if (restart_time == 0) { - restart_time = utc_time - uptime; // save first ntp time as restart time - } - BreakTime(utc_time, tmpTime); - RtcTime.year = tmpTime.year + 1970; - daylight_saving_time = RuleToTime(Settings.tflag[1], RtcTime.year); - standard_time = RuleToTime(Settings.tflag[0], RtcTime.year); - snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_APPLICATION "(" D_UTC_TIME ") %s, (" D_DST_TIME ") %s, (" D_STD_TIME ") %s"), - GetTime(0).c_str(), GetTime(2).c_str(), GetTime(3).c_str()); - AddLog(LOG_LEVEL_DEBUG); - if (local_time < 1451602800) { // 2016-01-01 - rules_flag.time_init = 1; - } else { - rules_flag.time_set = 1; - } - } else { - ntp_sync_minute++; // Try again in next minute - } - } - utc_time++; - local_time = utc_time; - if (local_time > 1451602800) { // 2016-01-01 - int32_t time_offset = Settings.timezone * SECS_PER_HOUR; - if (99 == Settings.timezone) { - dstoffset = Settings.toffset[1] * SECS_PER_MIN; - stdoffset = Settings.toffset[0] * SECS_PER_MIN; - if (Settings.tflag[1].hemis) { - // Southern hemisphere - if ((utc_time >= (standard_time - dstoffset)) && (utc_time < (daylight_saving_time - stdoffset))) { - time_offset = stdoffset; // Standard Time - } else { - time_offset = dstoffset; // Daylight Saving Time - } - } else { - // Northern hemisphere - if ((utc_time >= (daylight_saving_time - stdoffset)) && (utc_time < (standard_time - dstoffset))) { - time_offset = dstoffset; // Daylight Saving Time - } else { - time_offset = stdoffset; // Standard Time - } - } - } - local_time += time_offset; - time_timezone = time_offset / 360; // (SECS_PER_HOUR / 10) fails as it is defined as UL - if (!Settings.energy_kWhtotal_time) { Settings.energy_kWhtotal_time = local_time; } - } - BreakTime(local_time, RtcTime); - if (!RtcTime.hour && !RtcTime.minute && !RtcTime.second && RtcTime.valid) { - midnight = local_time; - midnight_now = 1; - } - RtcTime.year += 1970; -} - -void RtcInit() -{ - sntp_setservername(0, Settings.ntp_server[0]); - sntp_setservername(1, Settings.ntp_server[1]); - sntp_setservername(2, Settings.ntp_server[2]); - sntp_stop(); - sntp_set_timezone(0); // UTC time - sntp_init(); - utc_time = 0; - BreakTime(utc_time, RtcTime); - TickerRtc.attach(1, RtcSecond); -} - -#ifndef USE_ADC_VCC -/*********************************************************************************************\ - * ADC support -\*********************************************************************************************/ - -uint16_t adc_last_value = 0; - -uint16_t AdcRead() -{ - uint16_t analog = 0; - for (byte i = 0; i < 32; i++) { - analog += analogRead(A0); - delay(1); - } - analog >>= 5; - return analog; -} - -#ifdef USE_RULES -void AdcEvery250ms() -{ - uint16_t new_value = AdcRead(); - if ((new_value < adc_last_value -10) || (new_value > adc_last_value +10)) { - adc_last_value = new_value; - uint16_t value = adc_last_value / 10; - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("{\"ANALOG\":{\"A0div10\":%d}}"), (value > 99) ? 100 : value); - XdrvRulesProcess(); - } -} -#endif // USE_RULES - -void AdcShow(boolean json) -{ - uint16_t analog = AdcRead(); - - if (json) { - snprintf_P(mqtt_data, sizeof(mqtt_data), PSTR("%s,\"ANALOG\":{\"A0\":%d}"), mqtt_data, analog); -#ifdef USE_WEBSERVER - } else { - snprintf_P(mqtt_data, sizeof(mqtt_data), HTTP_SNS_ANALOG, mqtt_data, "", 0, analog); -#endif // USE_WEBSERVER - } -} - -/*********************************************************************************************\ - * Interface -\*********************************************************************************************/ - -#define XSNS_02 - -boolean Xsns02(byte function) -{ - boolean result = false; - - if (pin[GPIO_ADC0] < 99) { - switch (function) { -#ifdef USE_RULES - case FUNC_EVERY_250_MSECOND: - AdcEvery250ms(); - break; -#endif // USE_RULES - case FUNC_JSON_APPEND: - AdcShow(1); - break; -#ifdef USE_WEBSERVER - case FUNC_WEB_APPEND: - AdcShow(0); - break; -#endif // USE_WEBSERVER - } - } - return result; -} -#endif // USE_ADC_VCC - /*********************************************************************************************\ * Syslog * @@ -2370,7 +1082,7 @@ void GetLog(byte idx, char** entry_pp, size_t* len_p) } #endif // USE_WEBSERVER -void Syslog() +void Syslog(void) { // Destroys log_data char syslog_preamble[64]; // Hostname + Id @@ -2421,9 +1133,7 @@ void AddLog(byte loglevel) if (!web_log_index) web_log_index++; // Index 0 is not allowed as it is the end of char string } #endif // USE_WEBSERVER - if ((WL_CONNECTED == WiFi.status()) && (loglevel <= syslog_level)) { - Syslog(); - } + if (!global_state.wifi_down && (loglevel <= syslog_level)) { Syslog(); } } void AddLog_P(byte loglevel, const char *formatP) @@ -2438,7 +1148,7 @@ void AddLog_P(byte loglevel, const char *formatP, const char *formatP2) snprintf_P(log_data, sizeof(log_data), formatP); snprintf_P(message, sizeof(message), formatP2); - strncat(log_data, message, sizeof(log_data)); + strncat(log_data, message, sizeof(log_data) - strlen(log_data) -1); AddLog(loglevel); } @@ -2461,7 +1171,3 @@ void AddLogMissed(char *sensor, uint8_t misses) snprintf_P(log_data, sizeof(log_data), PSTR("SNS: %s missed %d"), sensor, SENSOR_MAX_MISS - misses); AddLog(LOG_LEVEL_DEBUG); } - -/*********************************************************************************************\ - * -\*********************************************************************************************/ diff --git a/sonoff/support_features.ino b/sonoff/support_features.ino new file mode 100644 index 000000000..652116b2f --- /dev/null +++ b/sonoff/support_features.ino @@ -0,0 +1,388 @@ +/* + support_features.ino - feature support for Sonoff-Tasmota + + Copyright (C) 2018 Theo Arends + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/*********************************************************************************************\ + * Fill feature list +\*********************************************************************************************/ + +void GetFeatures(void) +{ + feature_drv1 = 0x00000000; // xdrv_01_mqtt.ino, xdrv_01_light.ino, xdrv_04_snfbridge.ino + +// feature_drv1 |= 0x00000001; +// feature_drv1 |= 0x00000002; + +#ifdef USE_I2C + feature_drv1 |= 0x00000004; // sonoff.ino +#endif +#ifdef USE_SPI + feature_drv1 |= 0x00000008; // sonoff.ino +#endif +#ifdef USE_DISCOVERY + feature_drv1 |= 0x00000010; // sonoff.ino +#endif +#ifdef USE_ARDUINO_OTA + feature_drv1 |= 0x00000020; // sonoff.ino +#endif +#ifdef USE_MQTT_TLS + feature_drv1 |= 0x00000040; // sonoff.ino +#endif +#ifdef USE_WEBSERVER + feature_drv1 |= 0x00000080; // xdrv_02_webserver.ino +#endif +#ifdef WEBSERVER_ADVERTISE + feature_drv1 |= 0x00000100; // xdrv_02_webserver.ino +#endif +#ifdef USE_EMULATION + feature_drv1 |= 0x00000200; // xplg_wemohue.ino +#endif +#if (MQTT_LIBRARY_TYPE == MQTT_PUBSUBCLIENT) + feature_drv1 |= 0x00000400; // xdrv_01_mqtt.ino +#endif +#if (MQTT_LIBRARY_TYPE == MQTT_TASMOTAMQTT) + feature_drv1 |= 0x00000800; // xdrv_01_mqtt.ino +#endif +#if (MQTT_LIBRARY_TYPE == MQTT_ESPMQTTARDUINO) // Obsolete since 6.2.1.11 + feature_drv1 |= 0x00001000; // xdrv_01_mqtt.ino +#endif +#ifdef MQTT_HOST_DISCOVERY + feature_drv1 |= 0x00002000; // xdrv_01_mqtt.ino +#endif +#ifdef USE_ARILUX_RF + feature_drv1 |= 0x00004000; // xdrv_04_light.ino +#endif +#ifdef USE_WS2812 + feature_drv1 |= 0x00008000; // xdrv_04_light.ino +#endif +#ifdef USE_WS2812_DMA + feature_drv1 |= 0x00010000; // xdrv_04_light.ino +#endif +#ifdef USE_IR_REMOTE + feature_drv1 |= 0x00020000; // xdrv_05_irremote.ino +#endif +#ifdef USE_IR_HVAC + feature_drv1 |= 0x00040000; // xdrv_05_irremote.ino +#endif +#ifdef USE_IR_RECEIVE + feature_drv1 |= 0x00080000; // xdrv_05_irremote.ino +#endif +#ifdef USE_DOMOTICZ + feature_drv1 |= 0x00100000; // xdrv_07_domoticz.ino +#endif +#ifdef USE_DISPLAY + feature_drv1 |= 0x00200000; // xdrv_13_display.ino +#endif +#ifdef USE_HOME_ASSISTANT + feature_drv1 |= 0x00400000; // xdrv_12_home_assistant.ino +#endif +#ifdef USE_SERIAL_BRIDGE + feature_drv1 |= 0x00800000; // xdrv_08_serial_bridge.ino +#endif +#ifdef USE_TIMERS + feature_drv1 |= 0x01000000; // xdrv_09_timers.ino +#endif +#ifdef USE_SUNRISE + feature_drv1 |= 0x02000000; // xdrv_09_timers.ino +#endif +#ifdef USE_TIMERS_WEB + feature_drv1 |= 0x04000000; // xdrv_09_timers.ino +#endif +#ifdef USE_RULES + feature_drv1 |= 0x08000000; // xdrv_10_rules.ino +#endif +#ifdef USE_KNX + feature_drv1 |= 0x10000000; // xdrv_11_knx.ino +#endif +#ifdef USE_WPS + feature_drv1 |= 0x20000000; // support.ino +#endif +#ifdef USE_SMARTCONFIG + feature_drv1 |= 0x40000000; // support.ino +#endif +#if (MQTT_LIBRARY_TYPE == MQTT_ARDUINOMQTT) + feature_drv1 |= 0x80000000; // xdrv_01_mqtt.ino +#endif + +/*********************************************************************************************/ + + feature_drv2 = 0x00000000; + +#ifdef USE_CONFIG_OVERRIDE + feature_drv2 |= 0x00000001; // user_config(_override).h +#endif +#ifdef BE_MINIMAL + feature_drv2 |= 0x00000002; // user_config(_override).h +#endif +#ifdef USE_SENSORS + feature_drv2 |= 0x00000004; // user_config(_override).h +#endif +#ifdef USE_CLASSIC + feature_drv2 |= 0x00000008; // user_config(_override).h +#endif +#ifdef USE_KNX_NO_EMULATION + feature_drv2 |= 0x00000010; // user_config(_override).h +#endif +#ifdef USE_DISPLAY_MODES1TO5 + feature_drv2 |= 0x00000020; // xdrv_13_display.ino +#endif +#ifdef USE_DISPLAY_GRAPH + feature_drv2 |= 0x00000040; // xdrv_13_display.ino +#endif +#ifdef USE_DISPLAY_LCD + feature_drv2 |= 0x00000080; // xdsp_01_lcd.ino +#endif +#ifdef USE_DISPLAY_SSD1306 + feature_drv2 |= 0x00000100; // xdsp_02_ssd1306.ino +#endif +#ifdef USE_DISPLAY_MATRIX + feature_drv2 |= 0x00000200; // xdsp_03_matrix.ino +#endif +#ifdef USE_DISPLAY_ILI9341 + feature_drv2 |= 0x00000400; // xdsp_04_ili9341.ino +#endif +#ifdef USE_DISPLAY_EPAPER_29 + feature_drv2 |= 0x00000800; // xdsp_05_epaper.ino +#endif +#ifdef USE_DISPLAY_SH1106 + feature_drv2 |= 0x00001000; // xdsp_06_sh1106.ino +#endif +#ifdef USE_MP3_PLAYER + feature_drv2 |= 0x00002000; // xdrv_14_mp3.ino +#endif +#ifdef USE_PCA9685 + feature_drv2 |= 0x00004000; // xdrv_15_pca9685.ino +#endif +#ifdef USE_TUYA_DIMMER + feature_drv2 |= 0x00008000; // xdrv_16_tuyadimmer.ino +#endif +#ifdef USE_RC_SWITCH + feature_drv2 |= 0x00010000; // xdrv_17_rcswitch.ino +#endif +#ifdef USE_ARMTRONIX_DIMMERS + feature_drv2 |= 0x00020000; // xdrv_18_armtronixdimmer.ino +#endif + +// feature_drv2 |= 0x00040000; +// feature_drv2 |= 0x00080000; +// feature_drv2 |= 0x00100000; +// feature_drv2 |= 0x00200000; +// feature_drv2 |= 0x00400000; + +#ifdef NO_EXTRA_4K_HEAP + feature_drv2 |= 0x00800000; // sonoff_post.h +#endif +#ifdef VTABLES_IN_IRAM + feature_drv2 |= 0x01000000; // platformio.ini +#endif +#ifdef VTABLES_IN_DRAM + feature_drv2 |= 0x02000000; // platformio.ini +#endif +#ifdef VTABLES_IN_FLASH + feature_drv2 |= 0x04000000; // platformio.ini +#endif +#ifdef PIO_FRAMEWORK_ARDUINO_LWIP_HIGHER_BANDWIDTH + feature_drv2 |= 0x08000000; // platformio.ini +#endif +#ifdef PIO_FRAMEWORK_ARDUINO_LWIP2_LOW_MEMORY + feature_drv2 |= 0x10000000; // platformio.ini +#endif +#ifdef PIO_FRAMEWORK_ARDUINO_LWIP2_HIGHER_BANDWIDTH + feature_drv2 |= 0x20000000; // platformio.ini +#endif +#ifdef DEBUG_THEO + feature_drv2 |= 0x40000000; // xdrv_99_debug.ino +#endif +#ifdef USE_DEBUG_DRIVER + feature_drv2 |= 0x80000000; // xdrv_99_debug.ino +#endif + +/*********************************************************************************************/ + + feature_sns1 = 0x00000000; // xsns_01_counter.ino, xsns_04_snfsc.ino + +// feature_sns1 |= 0x00000001; + +#ifdef USE_ADC_VCC + feature_sns1 |= 0x00000002; // support.ino (ADC) +#endif +#ifdef USE_ENERGY_SENSOR + feature_sns1 |= 0x00000004; // xdrv_03_energy.ino +#endif +#ifdef USE_PZEM004T + feature_sns1 |= 0x00000008; // xnrg_03_pzem004t.ino +#endif +#ifdef USE_DS18B20 + feature_sns1 |= 0x00000010; // xsns_05_ds18b20.ino +#endif +#ifdef USE_DS18x20_LEGACY + feature_sns1 |= 0x00000020; // xsns_05_ds18x20_legacy.ino +#endif +#ifdef USE_DS18x20 + feature_sns1 |= 0x00000040; // xsns_05_ds18x20.ino +#endif +#ifdef USE_DHT + feature_sns1 |= 0x00000080; // xsns_06_dht.ino +#endif +#ifdef USE_SHT + feature_sns1 |= 0x00000100; // xsns_07_sht1x.ino +#endif +#ifdef USE_HTU + feature_sns1 |= 0x00000200; // xsns_08_htu21.ino +#endif +#ifdef USE_BMP + feature_sns1 |= 0x00000400; // xsns_09_bmp.ino +#endif +#ifdef USE_BME680 + feature_sns1 |= 0x00000800; // xsns_09_bmp.ino - BME680 +#endif +#ifdef USE_BH1750 + feature_sns1 |= 0x00001000; // xsns_10_bh1750.ino +#endif +#ifdef USE_VEML6070 + feature_sns1 |= 0x00002000; // xsns_11_veml6070.ino +#endif +#ifdef USE_ADS1115_I2CDEV + feature_sns1 |= 0x00004000; // xsns_12_ads1115_i2cdev.ino +#endif +#ifdef USE_ADS1115 + feature_sns1 |= 0x00008000; // xsns_12_ads1115.ino +#endif +#ifdef USE_INA219 + feature_sns1 |= 0x00010000; // xsns_13_ina219.ino +#endif +#ifdef USE_SHT3X + feature_sns1 |= 0x00020000; // xsns_14_sht3x.ino +#endif +#ifdef USE_MHZ19 + feature_sns1 |= 0x00040000; // xsns_15_mhz19.ino +#endif +#ifdef USE_TSL2561 + feature_sns1 |= 0x00080000; // xsns_16_tsl2561.ino +#endif +#ifdef USE_SENSEAIR + feature_sns1 |= 0x00100000; // xsns_17_senseair.ino +#endif +#ifdef USE_PMS5003 + feature_sns1 |= 0x00200000; // xsns_18_pms5003.ino +#endif +#ifdef USE_MGS + feature_sns1 |= 0x00400000; // xsns_19_mgs.ino +#endif +#ifdef USE_NOVA_SDS + feature_sns1 |= 0x00800000; // xsns_20_novasds.ino +#endif +#ifdef USE_SGP30 + feature_sns1 |= 0x01000000; // xsns_21_sgp30.ino +#endif +#ifdef USE_SR04 + feature_sns1 |= 0x02000000; // xsns_22_sr04.ino +#endif +#ifdef USE_SDM120 + feature_sns1 |= 0x04000000; // xsns_23_sdm120.ino +#endif +#ifdef USE_SI1145 + feature_sns1 |= 0x08000000; // xsns_24_si1145.ino +#endif +#ifdef USE_SDM630 + feature_sns1 |= 0x10000000; // xsns_25_sdm630.ino +#endif +#ifdef USE_LM75AD + feature_sns1 |= 0x20000000; // xsns_26_lm75ad.ino +#endif +#ifdef USE_APDS9960 + feature_sns1 |= 0x40000000; // xsns_27_apds9960.ino +#endif +#ifdef USE_TM1638 + feature_sns1 |= 0x80000000; // xsns_28_tm1638.ino +#endif + +/*********************************************************************************************/ + + feature_sns2 = 0x00000000; + +#ifdef USE_MCP230xx + feature_sns2 |= 0x00000001; // xsns_29_mcp230xx.ino +#endif +#ifdef USE_MPR121 + feature_sns2 |= 0x00000002; // xsns_30_mpr121.ino +#endif +#ifdef USE_CCS811 + feature_sns2 |= 0x00000004; // xsns_31_ccs811.ino +#endif +#ifdef USE_MPU6050 + feature_sns2 |= 0x00000008; // xsns_32_mpu6050.ino +#endif +#ifdef USE_MCP230xx_OUTPUT + feature_sns2 |= 0x00000010; // xsns_29_mcp230xx.ino +#endif +#ifdef USE_MCP230xx_DISPLAYOUTPUT + feature_sns2 |= 0x00000020; // xsns_29_mcp230xx.ino +#endif +#ifdef USE_HLW8012 + feature_sns2 |= 0x00000040; // xnrg_01_hlw8012.ino +#endif +#ifdef USE_CSE7766 + feature_sns2 |= 0x00000080; // xnrg_02_cse7766.ino +#endif +#ifdef USE_MCP39F501 + feature_sns2 |= 0x00000100; // xnrg_04_mcp39f501.ino +#endif +#ifdef USE_PZEM_AC + feature_sns2 |= 0x00000200; // xnrg_05_pzem_ac.ino +#endif +#ifdef USE_DS3231 + feature_sns2 |= 0x00000400; // xsns_33_ds3231.ino +#endif +#ifdef USE_HX711 + feature_sns2 |= 0x00000800; // xsns_34_hx711.ino +#endif +#ifdef USE_PZEM_DC + feature_sns2 |= 0x00001000; // xnrg_06_pzem_dc.ino +#endif +#ifdef USE_TX20_WIND_SENSOR + feature_sns2 |= 0x00002000; // xsns_35_tx20.ino +#endif +#ifdef USE_MGC3130 + feature_sns2 |= 0x00004000; // xsns_36_mgc3130.ino +#endif +#ifdef USE_RF_SENSOR + feature_sns2 |= 0x00008000; // xsns_37_rfsensor.ino +#endif +#ifdef USE_THEO_V2 + feature_sns2 |= 0x00010000; +#endif +#ifdef USE_ALECTO_V2 + feature_sns2 |= 0x00020000; +#endif +// feature_sns2 |= 0x00040000; +// feature_sns2 |= 0x00080000; +// feature_sns2 |= 0x00100000; +// feature_sns2 |= 0x00200000; +// feature_sns2 |= 0x00400000; +// feature_sns2 |= 0x00800000; +// feature_sns2 |= 0x01000000; +// feature_sns2 |= 0x02000000; +// feature_sns2 |= 0x04000000; +// feature_sns2 |= 0x08000000; +// feature_sns2 |= 0x10000000; +// feature_sns2 |= 0x20000000; +// feature_sns2 |= 0x40000000; +// feature_sns2 |= 0x80000000; + +} diff --git a/sonoff/support_rtc.ino b/sonoff/support_rtc.ino new file mode 100644 index 000000000..b09c593e2 --- /dev/null +++ b/sonoff/support_rtc.ino @@ -0,0 +1,421 @@ +/* + support_rtc.ino - Real Time Clock support for Sonoff-Tasmota + + Copyright (C) 2018 Theo Arends + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/*********************************************************************************************\ + * Sources: Time by Michael Margolis and Paul Stoffregen (https://github.com/PaulStoffregen/Time) + * Timezone by Jack Christensen (https://github.com/JChristensen/Timezone) +\*********************************************************************************************/ + +#define SECS_PER_MIN ((uint32_t)(60UL)) +#define SECS_PER_HOUR ((uint32_t)(3600UL)) +#define SECS_PER_DAY ((uint32_t)(SECS_PER_HOUR * 24UL)) +#define MINS_PER_HOUR ((uint32_t)(60UL)) +#define LEAP_YEAR(Y) (((1970+Y)>0) && !((1970+Y)%4) && (((1970+Y)%100) || !((1970+Y)%400))) + +extern "C" { +#include "sntp.h" +} +#include + +Ticker TickerRtc; + +static const uint8_t kDaysInMonth[] = { 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 }; // API starts months from 1, this array starts from 0 +static const char kMonthNamesEnglish[] = "JanFebMarAprMayJunJulAugSepOctNovDec"; + +uint32_t utc_time = 0; +uint32_t local_time = 0; +uint32_t daylight_saving_time = 0; +uint32_t standard_time = 0; +uint32_t ntp_time = 0; +uint32_t midnight = 1451602800; +uint32_t restart_time = 0; +int32_t time_timezone = 0; +uint8_t midnight_now = 0; +uint8_t ntp_sync_minute = 0; + +String GetBuildDateAndTime(void) +{ + // "2017-03-07T11:08:02" - ISO8601:2004 + char bdt[21]; + char *p; + char mdate[] = __DATE__; // "Mar 7 2017" + char *smonth = mdate; + int day = 0; + int year = 0; + + // sscanf(mdate, "%s %d %d", bdt, &day, &year); // Not implemented in 2.3.0 and probably too much code + byte i = 0; + for (char *str = strtok_r(mdate, " ", &p); str && i < 3; str = strtok_r(NULL, " ", &p)) { + switch (i++) { + case 0: // Month + smonth = str; + break; + case 1: // Day + day = atoi(str); + break; + case 2: // Year + year = atoi(str); + } + } + int month = (strstr(kMonthNamesEnglish, smonth) -kMonthNamesEnglish) /3 +1; + snprintf_P(bdt, sizeof(bdt), PSTR("%d" D_YEAR_MONTH_SEPARATOR "%02d" D_MONTH_DAY_SEPARATOR "%02d" D_DATE_TIME_SEPARATOR "%s"), year, month, day, __TIME__); + return String(bdt); // 2017-03-07T11:08:02 +} + +String GetTimeZone(void) +{ + char tz[7]; + + snprintf_P(tz, sizeof(tz), PSTR("%+03d:%02d"), time_timezone / 60, abs(time_timezone % 60)); + + return String(tz); // -03:45 +} + +String GetDT(uint32_t time) +{ + // "2017-03-07T11:08:02" - ISO8601:2004 + + char dt[20]; + TIME_T tmpTime; + + BreakTime(time, tmpTime); + snprintf_P(dt, sizeof(dt), PSTR("%04d-%02d-%02dT%02d:%02d:%02d"), + tmpTime.year +1970, tmpTime.month, tmpTime.day_of_month, tmpTime.hour, tmpTime.minute, tmpTime.second); + + return String(dt); // 2017-03-07T11:08:02 +} + +/* + * timestamps in https://en.wikipedia.org/wiki/ISO_8601 format + * + * DT_UTC - current data and time in Greenwich, England (aka GMT) + * DT_LOCAL - current date and time taking timezone into account + * DT_RESTART - the date and time this device last started, in local timezone + * + * Format: + * "2017-03-07T11:08:02-07:00" - if DT_LOCAL and SetOption52 = 1 + * "2017-03-07T11:08:02" - otherwise + */ +String GetDateAndTime(byte time_type) +{ + // "2017-03-07T11:08:02-07:00" - ISO8601:2004 + uint32_t time = local_time; + + switch (time_type) { + case DT_ENERGY: + time = Settings.energy_kWhtotal_time; + break; + case DT_UTC: + time = utc_time; + break; + case DT_RESTART: + if (restart_time == 0) { + return ""; + } + time = restart_time; + break; + } + String dt = GetDT(time); // 2017-03-07T11:08:02 + if (Settings.flag3.time_append_timezone && (DT_LOCAL == time_type)) { + dt += GetTimeZone(); // 2017-03-07T11:08:02-07:00 + } + return dt; // 2017-03-07T11:08:02-07:00 +} + +String GetTime(int type) +{ + /* type 1 - Local time + * type 2 - Daylight Savings time + * type 3 - Standard time + */ + char stime[25]; // Skip newline + + uint32_t time = utc_time; + if (1 == type) time = local_time; + if (2 == type) time = daylight_saving_time; + if (3 == type) time = standard_time; + snprintf_P(stime, sizeof(stime), sntp_get_real_time(time)); + + return String(stime); // Thu Nov 01 11:41:02 2018 +} + +String GetUptime(void) +{ + char dt[16]; + + TIME_T ut; + + if (restart_time) { + BreakTime(utc_time - restart_time, ut); + } else { + BreakTime(uptime, ut); + } + + // "P128DT14H35M44S" - ISO8601:2004 - https://en.wikipedia.org/wiki/ISO_8601 Durations +// snprintf_P(dt, sizeof(dt), PSTR("P%dDT%02dH%02dM%02dS"), ut.days, ut.hour, ut.minute, ut.second); + + // "128 14:35:44" - OpenVMS + // "128T14:35:44" - Tasmota + snprintf_P(dt, sizeof(dt), PSTR("%dT%02d:%02d:%02d"), ut.days, ut.hour, ut.minute, ut.second); + + return String(dt); // 128T14:35:44 +} + +uint32_t GetMinutesUptime(void) +{ + TIME_T ut; + + if (restart_time) { + BreakTime(utc_time - restart_time, ut); + } else { + BreakTime(uptime, ut); + } + + return (ut.days *1440) + (ut.hour *60) + ut.minute; +} + +uint32_t GetMinutesPastMidnight(void) +{ + uint32_t minutes = 0; + + if (RtcTime.valid) { + minutes = (RtcTime.hour *60) + RtcTime.minute; + } + return minutes; +} + +void BreakTime(uint32_t time_input, TIME_T &tm) +{ +// break the given time_input into time components +// this is a more compact version of the C library localtime function +// note that year is offset from 1970 !!! + + uint8_t year; + uint8_t month; + uint8_t month_length; + uint32_t time; + unsigned long days; + + time = time_input; + tm.second = time % 60; + time /= 60; // now it is minutes + tm.minute = time % 60; + time /= 60; // now it is hours + tm.hour = time % 24; + time /= 24; // now it is days + tm.days = time; + tm.day_of_week = ((time + 4) % 7) + 1; // Sunday is day 1 + + year = 0; + days = 0; + while((unsigned)(days += (LEAP_YEAR(year) ? 366 : 365)) <= time) { + year++; + } + tm.year = year; // year is offset from 1970 + + days -= LEAP_YEAR(year) ? 366 : 365; + time -= days; // now it is days in this year, starting at 0 + tm.day_of_year = time; + + days = 0; + month = 0; + month_length = 0; + for (month = 0; month < 12; month++) { + if (1 == month) { // february + if (LEAP_YEAR(year)) { + month_length = 29; + } else { + month_length = 28; + } + } else { + month_length = kDaysInMonth[month]; + } + + if (time >= month_length) { + time -= month_length; + } else { + break; + } + } + strlcpy(tm.name_of_month, kMonthNames + (month *3), 4); + tm.month = month + 1; // jan is month 1 + tm.day_of_month = time + 1; // day of month + tm.valid = (time_input > 1451602800); // 2016-01-01 +} + +uint32_t MakeTime(TIME_T &tm) +{ +// assemble time elements into time_t +// note year argument is offset from 1970 + + int i; + uint32_t seconds; + + // seconds from 1970 till 1 jan 00:00:00 of the given year + seconds = tm.year * (SECS_PER_DAY * 365); + for (i = 0; i < tm.year; i++) { + if (LEAP_YEAR(i)) { + seconds += SECS_PER_DAY; // add extra days for leap years + } + } + + // add days for this year, months start from 1 + for (i = 1; i < tm.month; i++) { + if ((2 == i) && LEAP_YEAR(tm.year)) { + seconds += SECS_PER_DAY * 29; + } else { + seconds += SECS_PER_DAY * kDaysInMonth[i-1]; // monthDay array starts from 0 + } + } + seconds+= (tm.day_of_month - 1) * SECS_PER_DAY; + seconds+= tm.hour * SECS_PER_HOUR; + seconds+= tm.minute * SECS_PER_MIN; + seconds+= tm.second; + return seconds; +} + +uint32_t RuleToTime(TimeRule r, int yr) +{ + TIME_T tm; + uint32_t t; + uint8_t m; + uint8_t w; // temp copies of r.month and r.week + + m = r.month; + w = r.week; + if (0 == w) { // Last week = 0 + if (++m > 12) { // for "Last", go to the next month + m = 1; + yr++; + } + w = 1; // and treat as first week of next month, subtract 7 days later + } + + tm.hour = r.hour; + tm.minute = 0; + tm.second = 0; + tm.day_of_month = 1; + tm.month = m; + tm.year = yr - 1970; + t = MakeTime(tm); // First day of the month, or first day of next month for "Last" rules + BreakTime(t, tm); + t += (7 * (w - 1) + (r.dow - tm.day_of_week + 7) % 7) * SECS_PER_DAY; + if (0 == r.week) { + t -= 7 * SECS_PER_DAY; // back up a week if this is a "Last" rule + } + return t; +} + +uint32_t LocalTime(void) +{ + return local_time; +} + +uint32_t Midnight(void) +{ + return midnight; +} + +boolean MidnightNow(void) +{ + boolean mnflg = midnight_now; + if (mnflg) midnight_now = 0; + return mnflg; +} + +void RtcSecond(void) +{ + TIME_T tmpTime; + + if ((ntp_sync_minute > 59) && (RtcTime.minute > 2)) ntp_sync_minute = 1; // If sync prepare for a new cycle + uint8_t offset = (uptime < 30) ? RtcTime.second : (((ESP.getChipId() & 0xF) * 3) + 3) ; // First try ASAP to sync. If fails try once every 60 seconds based on chip id + if (!global_state.wifi_down && (offset == RtcTime.second) && ((RtcTime.year < 2016) || (ntp_sync_minute == RtcTime.minute) || ntp_force_sync)) { + ntp_time = sntp_get_current_timestamp(); + if (ntp_time > 1451602800) { // Fix NTP bug in core 2.4.1/SDK 2.2.1 (returns Thu Jan 01 08:00:10 1970 after power on) + ntp_force_sync = 0; + utc_time = ntp_time; + ntp_sync_minute = 60; // Sync so block further requests + if (restart_time == 0) { + restart_time = utc_time - uptime; // save first ntp time as restart time + } + BreakTime(utc_time, tmpTime); + RtcTime.year = tmpTime.year + 1970; + daylight_saving_time = RuleToTime(Settings.tflag[1], RtcTime.year); + standard_time = RuleToTime(Settings.tflag[0], RtcTime.year); + snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_APPLICATION "(" D_UTC_TIME ") %s, (" D_DST_TIME ") %s, (" D_STD_TIME ") %s"), + GetTime(0).c_str(), GetTime(2).c_str(), GetTime(3).c_str()); + AddLog(LOG_LEVEL_DEBUG); + if (local_time < 1451602800) { // 2016-01-01 + rules_flag.time_init = 1; + } else { + rules_flag.time_set = 1; + } + } else { + ntp_sync_minute++; // Try again in next minute + } + } + utc_time++; + local_time = utc_time; + if (local_time > 1451602800) { // 2016-01-01 + int16_t timezone_minutes = Settings.timezone_minutes; + if (Settings.timezone < 0) { timezone_minutes *= -1; } + time_timezone = (Settings.timezone * SECS_PER_HOUR) + (timezone_minutes * SECS_PER_MIN); + if (99 == Settings.timezone) { + int32_t dstoffset = Settings.toffset[1] * SECS_PER_MIN; + int32_t stdoffset = Settings.toffset[0] * SECS_PER_MIN; + if (Settings.tflag[1].hemis) { + // Southern hemisphere + if ((utc_time >= (standard_time - dstoffset)) && (utc_time < (daylight_saving_time - stdoffset))) { + time_timezone = stdoffset; // Standard Time + } else { + time_timezone = dstoffset; // Daylight Saving Time + } + } else { + // Northern hemisphere + if ((utc_time >= (daylight_saving_time - stdoffset)) && (utc_time < (standard_time - dstoffset))) { + time_timezone = dstoffset; // Daylight Saving Time + } else { + time_timezone = stdoffset; // Standard Time + } + } + } + local_time += time_timezone; + time_timezone /= 60; + if (!Settings.energy_kWhtotal_time) { Settings.energy_kWhtotal_time = local_time; } + } + BreakTime(local_time, RtcTime); + if (!RtcTime.hour && !RtcTime.minute && !RtcTime.second && RtcTime.valid) { + midnight = local_time; + midnight_now = 1; + } + RtcTime.year += 1970; +} + +void RtcInit(void) +{ + sntp_setservername(0, Settings.ntp_server[0]); + sntp_setservername(1, Settings.ntp_server[1]); + sntp_setservername(2, Settings.ntp_server[2]); + sntp_stop(); + sntp_set_timezone(0); // UTC time + sntp_init(); + utc_time = 0; + BreakTime(utc_time, RtcTime); + TickerRtc.attach(1, RtcSecond); +} diff --git a/sonoff/support_wifi.ino b/sonoff/support_wifi.ino new file mode 100644 index 000000000..7f2771dde --- /dev/null +++ b/sonoff/support_wifi.ino @@ -0,0 +1,594 @@ +/* + support_wifi.ino - wifi support for Sonoff-Tasmota + + Copyright (C) 2018 Theo Arends + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ + +/*********************************************************************************************\ + * Wifi +\*********************************************************************************************/ + +#ifndef WIFI_RSSI_THRESHOLD +#define WIFI_RSSI_THRESHOLD 10 // Difference in dB between current network and scanned network +#endif +#ifndef WIFI_RESCAN_MINUTES +#define WIFI_RESCAN_MINUTES 44 // Number of minutes between wifi network rescan +#endif + +#define WIFI_CONFIG_SEC 180 // seconds before restart +#define WIFI_CHECK_SEC 20 // seconds +#define WIFI_RETRY_OFFSET_SEC 20 // seconds + +#include // Wifi, MQTT, Ota, WifiManager + +uint8_t wifi_counter; +uint8_t wifi_retry_init; +uint8_t wifi_retry; +uint8_t wifi_status; +uint8_t wps_result; +uint8_t wifi_config_type = 0; +uint8_t wifi_config_counter = 0; + +uint8_t wifi_scan_state; +uint8_t wifi_bssid[6]; + +int WifiGetRssiAsQuality(int rssi) +{ + int quality = 0; + + if (rssi <= -100) { + quality = 0; + } else if (rssi >= -50) { + quality = 100; + } else { + quality = 2 * (rssi + 100); + } + return quality; +} + +boolean WifiConfigCounter(void) +{ + if (wifi_config_counter) { + wifi_config_counter = WIFI_CONFIG_SEC; + } + return (wifi_config_counter); +} + +extern "C" { +#include "user_interface.h" +} + +void WifiWpsStatusCallback(wps_cb_status status); + +void WifiWpsStatusCallback(wps_cb_status status) +{ +/* from user_interface.h: + enum wps_cb_status { + WPS_CB_ST_SUCCESS = 0, + WPS_CB_ST_FAILED, + WPS_CB_ST_TIMEOUT, + WPS_CB_ST_WEP, // WPS failed because that WEP is not supported + WPS_CB_ST_SCAN_ERR, // can not find the target WPS AP + }; +*/ + wps_result = status; + if (WPS_CB_ST_SUCCESS == wps_result) { + wifi_wps_disable(); + } else { + snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_WIFI D_WPS_FAILED_WITH_STATUS " %d"), wps_result); + AddLog(LOG_LEVEL_DEBUG); + wifi_config_counter = 2; + } +} + +boolean WifiWpsConfigDone(void) +{ + return (!wps_result); +} + +boolean WifiWpsConfigBegin(void) +{ + wps_result = 99; + if (!wifi_wps_disable()) { return false; } + if (!wifi_wps_enable(WPS_TYPE_PBC)) { return false; } // so far only WPS_TYPE_PBC is supported (SDK 2.0.0) + if (!wifi_set_wps_cb((wps_st_cb_t) &WifiWpsStatusCallback)) { return false; } + if (!wifi_wps_start()) { return false; } + return true; +} + +void WifiConfig(uint8_t type) +{ + if (!wifi_config_type) { + if ((WIFI_RETRY == type) || (WIFI_WAIT == type)) { return; } +#if defined(USE_WEBSERVER) && defined(USE_EMULATION) + UdpDisconnect(); +#endif // USE_EMULATION + WiFi.disconnect(); // Solve possible Wifi hangs + wifi_config_type = type; + +#ifndef USE_WPS + if (WIFI_WPSCONFIG == wifi_config_type) { wifi_config_type = WIFI_MANAGER; } +#endif // USE_WPS +#ifndef USE_WEBSERVER + if (WIFI_MANAGER == wifi_config_type) { wifi_config_type = WIFI_SMARTCONFIG; } +#endif // USE_WEBSERVER +#ifndef USE_SMARTCONFIG + if (WIFI_SMARTCONFIG == wifi_config_type) { wifi_config_type = WIFI_SERIAL; } +#endif // USE_SMARTCONFIG + + wifi_config_counter = WIFI_CONFIG_SEC; // Allow up to WIFI_CONFIG_SECS seconds for phone to provide ssid/pswd + wifi_counter = wifi_config_counter +5; + blinks = 1999; + if (WIFI_RESTART == wifi_config_type) { + restart_flag = 2; + } + else if (WIFI_SERIAL == wifi_config_type) { + AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_6_SERIAL " " D_ACTIVE_FOR_3_MINUTES)); + } +#ifdef USE_SMARTCONFIG + else if (WIFI_SMARTCONFIG == wifi_config_type) { + AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_1_SMARTCONFIG " " D_ACTIVE_FOR_3_MINUTES)); + WiFi.beginSmartConfig(); + } +#endif // USE_SMARTCONFIG +#ifdef USE_WPS + else if (WIFI_WPSCONFIG == wifi_config_type) { + if (WifiWpsConfigBegin()) { + AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_3_WPSCONFIG " " D_ACTIVE_FOR_3_MINUTES)); + } else { + AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_3_WPSCONFIG " " D_FAILED_TO_START)); + wifi_config_counter = 3; + } + } +#endif // USE_WPS +#ifdef USE_WEBSERVER + else if (WIFI_MANAGER == wifi_config_type) { + AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_WCFG_2_WIFIMANAGER " " D_ACTIVE_FOR_3_MINUTES)); + WifiManagerBegin(); + } +#endif // USE_WEBSERVER + } +} + +void WiFiSetSleepMode(void) +{ +/* Excerpt from the esp8266 non os sdk api reference (v2.2.1): + * Sets sleep type for power saving. Set WIFI_NONE_SLEEP to disable power saving. + * - Default mode: WIFI_MODEM_SLEEP. + * - In order to lower the power comsumption, ESP8266 changes the TCP timer + * tick from 250ms to 3s in WIFI_LIGHT_SLEEP mode, which leads to increased timeout for + * TCP timer. Therefore, the WIFI_MODEM_SLEEP or deep-sleep mode should be used + * where there is a requirement for the accurancy of the TCP timer. + * + * Sleep is disabled in core 2.4.1 and 2.4.2 as there are bugs in their SDKs + * See https://github.com/arendst/Sonoff-Tasmota/issues/2559 + */ + +// Sleep explanation: https://github.com/esp8266/Arduino/blob/3f0c601cfe81439ce17e9bd5d28994a7ed144482/libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp#L255 +#if defined(ARDUINO_ESP8266_RELEASE_2_4_1) || defined(ARDUINO_ESP8266_RELEASE_2_4_2) +#else // Enabled in 2.3.0, 2.4.0 and stage + if (sleep && Settings.flag3.sleep_normal) { + WiFi.setSleepMode(WIFI_LIGHT_SLEEP); // Allow light sleep during idle times + } else { + WiFi.setSleepMode(WIFI_MODEM_SLEEP); // Disable sleep (Esp8288/Arduino core and sdk default) + } +#endif +} + +void WifiBegin(uint8_t flag, uint8_t channel) +{ + const char kWifiPhyMode[] = " BGN"; + +#if defined(USE_WEBSERVER) && defined(USE_EMULATION) + UdpDisconnect(); +#endif // USE_EMULATION + +#ifdef ARDUINO_ESP8266_RELEASE_2_3_0 // (!strncmp_P(ESP.getSdkVersion(),PSTR("1.5.3"),5)) + AddLog_P(LOG_LEVEL_DEBUG, S_LOG_WIFI, PSTR(D_PATCH_ISSUE_2186)); + WiFi.mode(WIFI_OFF); // See https://github.com/esp8266/Arduino/issues/2186 +#endif + + WiFi.persistent(false); // Solve possible wifi init errors (re-add at 6.2.1.16 #4044, #4083) + WiFi.disconnect(true); // Delete SDK wifi config + delay(200); + WiFi.mode(WIFI_STA); // Disable AP mode + WiFiSetSleepMode(); +// if (WiFi.getPhyMode() != WIFI_PHY_MODE_11N) { WiFi.setPhyMode(WIFI_PHY_MODE_11N); } + if (!WiFi.getAutoConnect()) { WiFi.setAutoConnect(true); } +// WiFi.setAutoReconnect(true); + switch (flag) { + case 0: // AP1 + case 1: // AP2 + Settings.sta_active = flag; + break; + case 2: // Toggle + Settings.sta_active ^= 1; + } // 3: Current AP + if ('\0' == Settings.sta_ssid[Settings.sta_active][0]) { Settings.sta_active ^= 1; } // Skip empty SSID + if (Settings.ip_address[0]) { + WiFi.config(Settings.ip_address[0], Settings.ip_address[1], Settings.ip_address[2], Settings.ip_address[3]); // Set static IP + } + WiFi.hostname(my_hostname); + if (channel) { + WiFi.begin(Settings.sta_ssid[Settings.sta_active], Settings.sta_pwd[Settings.sta_active], channel, wifi_bssid); + } else { + WiFi.begin(Settings.sta_ssid[Settings.sta_active], Settings.sta_pwd[Settings.sta_active]); + } + snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_WIFI D_CONNECTING_TO_AP "%d %s " D_IN_MODE " 11%c " D_AS " %s..."), + Settings.sta_active +1, Settings.sta_ssid[Settings.sta_active], kWifiPhyMode[WiFi.getPhyMode() & 0x3], my_hostname); + AddLog(LOG_LEVEL_INFO); +} + +void WifiBeginAfterScan() +{ + static int8_t best_network_db; + + // Not active + if (0 == wifi_scan_state) { return; } + // Init scan when not connected + if (1 == wifi_scan_state) { + memset((void*) &wifi_bssid, 0, sizeof(wifi_bssid)); + best_network_db = -127; + wifi_scan_state = 3; + } + // Init scan when connected + if (2 == wifi_scan_state) { + uint8_t* bssid = WiFi.BSSID(); // Get current bssid + memcpy((void*) &wifi_bssid, (void*) bssid, sizeof(wifi_bssid)); + best_network_db = WiFi.RSSI(); // Get current rssi and add threshold + if (best_network_db < -WIFI_RSSI_THRESHOLD) { best_network_db +WIFI_RSSI_THRESHOLD; } + wifi_scan_state = 3; + } + // Init scan + if (3 == wifi_scan_state) { + if (WiFi.scanComplete() != WIFI_SCAN_RUNNING) { + WiFi.scanNetworks(true); // Start wifi scan async + wifi_scan_state++; + AddLog_P(LOG_LEVEL_DEBUG, S_LOG_WIFI, PSTR("Network (re)scan started...")); + return; + } + } + int8_t wifi_scan_result = WiFi.scanComplete(); + // Check scan done + if (4 == wifi_scan_state) { + if (wifi_scan_result != WIFI_SCAN_RUNNING) { + wifi_scan_state++; + } + } + // Scan done + if (5 == wifi_scan_state) { + int32_t channel = 0; // No scan result + int8_t ap = 3; // AP default if not found + uint8_t last_bssid[6]; // Save last bssid + memcpy((void*) &last_bssid, (void*) &wifi_bssid, sizeof(last_bssid)); + + if (wifi_scan_result > 0) { + // Networks found + for (int8_t i = 0; i < wifi_scan_result; ++i) { + + String ssid_scan; + int32_t rssi_scan; + uint8_t sec_scan; + uint8_t* bssid_scan; + int32_t chan_scan; + bool hidden_scan; + + WiFi.getNetworkInfo(i, ssid_scan, sec_scan, rssi_scan, bssid_scan, chan_scan, hidden_scan); + + bool known = false; + uint8_t j; + for (j = 0; j < 2; j++) { + if (ssid_scan == Settings.sta_ssid[j]) { // SSID match + known = true; + if (rssi_scan > best_network_db) { // Best network + if (sec_scan == ENC_TYPE_NONE || Settings.sta_pwd[j]) { // Check for passphrase if not open wlan + best_network_db = (int8_t)rssi_scan; + channel = chan_scan; + ap = j; // AP1 or AP2 + memcpy((void*) &wifi_bssid, (void*) bssid_scan, sizeof(wifi_bssid)); + } + } + break; + } + } + snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_WIFI "Network %d, AP%c, SSId %s, Channel %d, BSSId %02X:%02X:%02X:%02X:%02X:%02X, RSSI %d, Encryption %d"), + i, (known) ? (j) ? '2' : '1' : '-', ssid_scan.c_str(), chan_scan, bssid_scan[0], bssid_scan[1], bssid_scan[2], bssid_scan[3], bssid_scan[4], bssid_scan[5], rssi_scan, (sec_scan == ENC_TYPE_NONE) ? 0 : 1); + AddLog(LOG_LEVEL_DEBUG); + delay(0); + } + WiFi.scanDelete(); // Clean up Ram + delay(0); + } + wifi_scan_state = 0; + // If bssid changed then (re)connect wifi + for (uint8_t i = 0; i < sizeof(wifi_bssid); i++) { + if (last_bssid[i] != wifi_bssid[i]) { + WifiBegin(ap, channel); // 0 (AP1), 1 (AP2) or 3 (default AP) + break; + } + } + } +} + +void WifiSetState(uint8_t state) +{ + if (state == global_state.wifi_down) { + if (state) { + rules_flag.wifi_connected = 1; + } else { + rules_flag.wifi_disconnected = 1; + } + } + global_state.wifi_down = state ^1; +} + +void WifiCheckIp(void) +{ + if ((WL_CONNECTED == WiFi.status()) && (static_cast(WiFi.localIP()) != 0)) { + WifiSetState(1); + wifi_counter = WIFI_CHECK_SEC; + wifi_retry = wifi_retry_init; + AddLog_P((wifi_status != WL_CONNECTED) ? LOG_LEVEL_INFO : LOG_LEVEL_DEBUG_MORE, S_LOG_WIFI, PSTR(D_CONNECTED)); + if (wifi_status != WL_CONNECTED) { +// AddLog_P(LOG_LEVEL_INFO, PSTR("Wifi: Set IP addresses")); + Settings.ip_address[1] = (uint32_t)WiFi.gatewayIP(); + Settings.ip_address[2] = (uint32_t)WiFi.subnetMask(); + Settings.ip_address[3] = (uint32_t)WiFi.dnsIP(); + } + wifi_status = WL_CONNECTED; + } else { + WifiSetState(0); + uint8_t wifi_config_tool = Settings.sta_config; + wifi_status = WiFi.status(); + switch (wifi_status) { + case WL_CONNECTED: + AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_NO_IP_ADDRESS)); + wifi_status = 0; + wifi_retry = wifi_retry_init; + break; + case WL_NO_SSID_AVAIL: + AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_AP_NOT_REACHED)); + if (WIFI_WAIT == Settings.sta_config) { + wifi_retry = wifi_retry_init; + } else { + if (wifi_retry > (wifi_retry_init / 2)) { + wifi_retry = wifi_retry_init / 2; + } + else if (wifi_retry) { + wifi_retry = 0; + } + } + break; + case WL_CONNECT_FAILED: + AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_WRONG_PASSWORD)); + if (wifi_retry > (wifi_retry_init / 2)) { + wifi_retry = wifi_retry_init / 2; + } + else if (wifi_retry) { + wifi_retry = 0; + } + break; + default: // WL_IDLE_STATUS and WL_DISCONNECTED + if (!wifi_retry || ((wifi_retry_init / 2) == wifi_retry)) { + AddLog_P(LOG_LEVEL_INFO, S_LOG_WIFI, PSTR(D_CONNECT_FAILED_AP_TIMEOUT)); + } else { + if (('\0' == Settings.sta_ssid[0][0]) && ('\0' == Settings.sta_ssid[1][0])) { + wifi_config_tool = WIFI_CONFIG_NO_SSID; // Skip empty SSIDs and start Wifi config tool + wifi_retry = 0; + } else { + AddLog_P(LOG_LEVEL_DEBUG, S_LOG_WIFI, PSTR(D_ATTEMPTING_CONNECTION)); + } + } + } + if (wifi_retry) { + if (Settings.flag3.use_wifi_scan) { + if (wifi_retry_init == wifi_retry) { + wifi_scan_state = 1; // Select scanned SSID + } + } else { + if (wifi_retry_init == wifi_retry) { + WifiBegin(3, 0); // Select default SSID + } + if ((Settings.sta_config != WIFI_WAIT) && ((wifi_retry_init / 2) == wifi_retry)) { + WifiBegin(2, 0); // Select alternate SSID + } + } + wifi_counter = 1; + wifi_retry--; + } else { + WifiConfig(wifi_config_tool); + wifi_counter = 1; + wifi_retry = wifi_retry_init; + } + } +} + +void WifiCheck(uint8_t param) +{ + wifi_counter--; + switch (param) { + case WIFI_SERIAL: + case WIFI_SMARTCONFIG: + case WIFI_MANAGER: + case WIFI_WPSCONFIG: + WifiConfig(param); + break; + default: + if (wifi_config_counter) { + wifi_config_counter--; + wifi_counter = wifi_config_counter +5; + if (wifi_config_counter) { +#ifdef USE_SMARTCONFIG + if ((WIFI_SMARTCONFIG == wifi_config_type) && WiFi.smartConfigDone()) { + wifi_config_counter = 0; + } +#endif // USE_SMARTCONFIG +#ifdef USE_WPS + if ((WIFI_WPSCONFIG == wifi_config_type) && WifiWpsConfigDone()) { + wifi_config_counter = 0; + } +#endif // USE_WPS + if (!wifi_config_counter) { + if (strlen(WiFi.SSID().c_str())) { + strlcpy(Settings.sta_ssid[0], WiFi.SSID().c_str(), sizeof(Settings.sta_ssid[0])); + } + if (strlen(WiFi.psk().c_str())) { + strlcpy(Settings.sta_pwd[0], WiFi.psk().c_str(), sizeof(Settings.sta_pwd[0])); + } + Settings.sta_active = 0; + snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_WIFI D_WCFG_1_SMARTCONFIG D_CMND_SSID "1 %s"), Settings.sta_ssid[0]); + AddLog(LOG_LEVEL_INFO); + } + } + if (!wifi_config_counter) { +#ifdef USE_SMARTCONFIG + if (WIFI_SMARTCONFIG == wifi_config_type) { WiFi.stopSmartConfig(); } +#endif // USE_SMARTCONFIG +// SettingsSdkErase(); // Disabled v6.1.0b due to possible bad wifi connects + restart_flag = 2; + } + } else { + if (wifi_scan_state) { WifiBeginAfterScan(); } + + if (wifi_counter <= 0) { + AddLog_P(LOG_LEVEL_DEBUG_MORE, S_LOG_WIFI, PSTR(D_CHECKING_CONNECTION)); + wifi_counter = WIFI_CHECK_SEC; + WifiCheckIp(); + } + if ((WL_CONNECTED == WiFi.status()) && (static_cast(WiFi.localIP()) != 0) && !wifi_config_type) { + WifiSetState(1); + + if (Settings.flag3.use_wifi_rescan) { + if (!(uptime % (60 * WIFI_RESCAN_MINUTES))) { + wifi_scan_state = 2; + } + } + +#ifdef BE_MINIMAL + if (1 == RtcSettings.ota_loader) { + RtcSettings.ota_loader = 0; + ota_state_flag = 3; + } +#endif // BE_MINIMAL + +#ifdef USE_DISCOVERY + if (!mdns_begun) { + if (mdns_delayed_start) { + AddLog_P(LOG_LEVEL_INFO, PSTR(D_LOG_MDNS D_ATTEMPTING_CONNECTION)); + mdns_delayed_start--; + } else { + mdns_delayed_start = Settings.param[P_MDNS_DELAYED_START]; + mdns_begun = MDNS.begin(my_hostname); + snprintf_P(log_data, sizeof(log_data), PSTR(D_LOG_MDNS "%s"), (mdns_begun) ? D_INITIALIZED : D_FAILED); + AddLog(LOG_LEVEL_INFO); + } + } +#endif // USE_DISCOVERY + +#ifdef USE_WEBSERVER + if (Settings.webserver) { + StartWebserver(Settings.webserver, WiFi.localIP()); +#ifdef USE_DISCOVERY +#ifdef WEBSERVER_ADVERTISE + if (mdns_begun) { + MDNS.addService("http", "tcp", WEB_PORT); + } +#endif // WEBSERVER_ADVERTISE +#endif // USE_DISCOVERY + } else { + StopWebserver(); + } +#ifdef USE_EMULATION + if (Settings.flag2.emulation) { UdpConnect(); } +#endif // USE_EMULATION +#endif // USE_WEBSERVER + +#ifdef USE_KNX + if (!knx_started && Settings.flag.knx_enabled) { + KNXStart(); + knx_started = true; + } +#endif // USE_KNX + + } else { + WifiSetState(0); +#if defined(USE_WEBSERVER) && defined(USE_EMULATION) + UdpDisconnect(); +#endif // USE_EMULATION + mdns_begun = false; +#ifdef USE_KNX + knx_started = false; +#endif // USE_KNX + } + } + } +} + +int WifiState(void) +{ + int state = -1; + + if (!global_state.wifi_down) { state = WIFI_RESTART; } + if (wifi_config_type) { state = wifi_config_type; } + return state; +} + +void WifiConnect(void) +{ + WifiSetState(0); + WiFi.persistent(false); // Solve possible wifi init errors + wifi_status = 0; + wifi_retry_init = WIFI_RETRY_OFFSET_SEC + ((ESP.getChipId() & 0xF) * 2); + wifi_retry = wifi_retry_init; + wifi_counter = 1; +} + +// Enable from 6.0.0a until 6.1.0a - disabled due to possible cause of bad wifi connect on core 2.3.0 +// Re-enabled from 6.3.0.7 with ESP.restart replaced by ESP.reset +void WifiDisconnect(void) +{ + // Courtesy of EspEasy + WiFi.persistent(true); // use SDK storage of SSID/WPA parameters + ETS_UART_INTR_DISABLE(); + wifi_station_disconnect(); // this will store empty ssid/wpa into sdk storage + ETS_UART_INTR_ENABLE(); + WiFi.persistent(false); // Do not use SDK storage of SSID/WPA parameters +} + +void EspRestart(void) +{ + delay(100); // Allow time for message xfer - disabled v6.1.0b + if (Settings.flag.mqtt_enabled) MqttDisconnect(); + WifiDisconnect(); +// ESP.restart(); // This results in exception 3 on restarts on core 2.3.0 + ESP.reset(); +} + +/* +void EspRestart(void) +{ + ESP.restart(); +} +*/ + +void WifiAddDelayWhenDisconnected(void) +{ + if (APP_BAUDRATE == baudrate) { // When baudrate too low it will fail on Sonoff Pow R2 and S31 serial interface initialization + if (global_state.wifi_down) { + delay(DRIVER_BOOT_DELAY); + } + } +} diff --git a/sonoff/xdrv_01_webserver.ino b/sonoff/xdrv_01_webserver.ino index 261510924..b5c73aea5 100644 --- a/sonoff/xdrv_01_webserver.ino +++ b/sonoff/xdrv_01_webserver.ino @@ -25,7 +25,14 @@ * Based on source by AlexT (https://github.com/tzapu) \*********************************************************************************************/ -#define HTTP_REFRESH_TIME 2345 // milliseconds +#define XDRV_01 1 + +#define HTTP_REFRESH_TIME 2345 // milliseconds +#define HTTP_RESTART_RECONNECT_TIME 9000 // milliseconds +#define HTTP_OTA_RESTART_RECONNECT_TIME 20000 // milliseconds + +#include +#include #ifdef USE_RF_FLASH uint8_t *efm8bb1_update = NULL; @@ -41,12 +48,13 @@ const char HTTP_HEAD[] PROGMEM = "{h} - {v}" ""; + +const char HTTP_SCRIPT_ROOT[] PROGMEM = "function la(p){" "var a='';" "if(la.arguments.length==1){" @@ -83,43 +90,21 @@ const char HTTP_HEAD[] PROGMEM = "la('?t='+p);" // ?t related to WebGetArg("t", tmp, sizeof(tmp)); "}"; -const char HTTP_HEAD_RELOAD[] PROGMEM = - "setTimeout(function(){location.href='.';},4000);"; +const char HTTP_SCRIPT_WIFI[] PROGMEM = + "function c(l){" + "eb('s1').value=l.innerText||l.textContent;" + "eb('p1').focus();" + "}"; -const char HTTP_HEAD_STYLE[] PROGMEM = - "" +const char HTTP_SCRIPT_RELOAD[] PROGMEM = + "setTimeout(function(){location.href='.';}," STR(HTTP_RESTART_RECONNECT_TIME) ");" + ""; - "" +// Local OTA upgrade requires more time to complete cp: before web ui should be reloaded +const char HTTP_SCRIPT_RELOAD_OTA[] PROGMEM = + "setTimeout(function(){location.href='.';}," STR(HTTP_OTA_RESTART_RECONNECT_TIME) ");" + ""; - "" - "" - "
" -#ifdef BE_MINIMAL - "

" D_MINIMAL_FIRMWARE_PLEASE_UPGRADE "

" -#endif - "
" -#ifdef LANGUAGE_MODULE_NAME - "

" D_MODULE " {ha

" -#else - "

{ha " D_MODULE "

" -#endif - "

{h}

{j}
"; const char HTTP_SCRIPT_CONSOL[] PROGMEM = "var sn=0;" // Scroll position "var id=0;" // Get most of weblog initially @@ -156,28 +141,76 @@ const char HTTP_SCRIPT_CONSOL[] PROGMEM = "return false;" "}" ""; + const char HTTP_SCRIPT_MODULE1[] PROGMEM = "var os;" - "function sk(s,g){" + "function sk(s,g){" // s = value, g = id and name "var o=os.replace(\"value='\"+s+\"'\",\"selected value='\"+s+\"'\");" "eb('g'+g).innerHTML=o;" "}" "function sl(){" - "var o0=\""; + "if(x!=null){x.abort();}" // Abort any request pending + "x=new XMLHttpRequest();" + "x.onreadystatechange=function(){" + "if(x.readyState==4&&x.status==200){" + "var i,o=x.responseText.replace(/}1/g,\"