Skip to content

Commit

Permalink
Minor i18n changes and add some platformio environs. (#955)
Browse files Browse the repository at this point in the history
* rename locale files from xx_XX.h to xx-XX.h
* Enable building different langauges for IRrecvDumpV2 via platformio.
* IRrecvDumpV2: Add Comments and add back "Raw Timing" as legacy option.
* Clean up platformio.ini files.
  • Loading branch information
crankyoldgit authored Oct 7, 2019
1 parent 93af026 commit 1ce36a8
Show file tree
Hide file tree
Showing 39 changed files with 95 additions and 85 deletions.
3 changes: 1 addition & 2 deletions examples/CommonAcControl/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
5 changes: 2 additions & 3 deletions examples/ControlSamsungAC/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
build_flags =
framework = arduino
build_flags = -D_IR_LOCALE_=en-AU

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
3 changes: 1 addition & 2 deletions examples/DumbIRRepeater/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
3 changes: 1 addition & 2 deletions examples/IRGCSendDemo/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
3 changes: 1 addition & 2 deletions examples/IRGCTCPServer/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
13 changes: 3 additions & 10 deletions examples/IRMQTTServer/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
build_flags = -DMQTT_MAX_PACKET_SIZE=768
build_flags = -DMQTT_MAX_PACKET_SIZE=768 -D_IR_LOCALE_=en-AU
framework = arduino
platform = espressif8266

[common]
lib_deps_builtin =
Expand All @@ -26,20 +28,14 @@ lib_deps_external =
https://github.com/tzapu/WiFiManager.git#development

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2
lib_deps = ${common_esp8266.lib_deps_external}

[env:d1_mini]
platform = espressif8266
framework = arduino
board = d1_mini
lib_deps = ${common_esp8266.lib_deps_external}

[env:d1_mini_no_mqtt]
platform = espressif8266
framework = arduino
board = d1_mini
build_flags =
${env.build_flags}
Expand All @@ -48,13 +44,10 @@ lib_deps = ${common_esp8266.lib_deps_external}

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
lib_deps = ${common_esp32.lib_deps_external}

[env:esp01_1m]
platform = espressif8266
framework = arduino
board = esp01_1m
build_flags =
${env.build_flags}
Expand Down
3 changes: 1 addition & 2 deletions examples/IRServer/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
3 changes: 1 addition & 2 deletions examples/IRrecvDemo/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
3 changes: 1 addition & 2 deletions examples/IRrecvDump/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
17 changes: 15 additions & 2 deletions examples/IRrecvDumpV2/IRrecvDumpV2.ino
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@
* https://github.com/crankyoldgit/IRremoteESP8266/wiki#ir-receiving
*
* Changes:
* Version 1.0 October, 2019
* - Internationalisation (i18n) support.
* - Stop displaying the legacy raw timing info.
* Version 0.5 June, 2019
* - Move A/C description to IRac.cpp.
* Version 0.4 July, 2018
Expand Down Expand Up @@ -93,6 +96,11 @@ const uint8_t kTimeout = 15;
// 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;

// Legacy (No longer supported!)
//
// Change to `true` if you miss/need the old "Raw Timing[]" display.
#define LEGACY_TIMING_INFO false
// ==================== end of TUNEABLE PARAMETERS ====================

// Use turn on the save buffer feature for more complete capture coverage.
Expand All @@ -112,7 +120,7 @@ void setup() {
#if DECODE_HASH
// Ignore messages with less than minimum on or off pulses.
irrecv.setUnknownThreshold(kMinUnknownSize);
#endif // DECODE_HASH
#endif // DECODE_HASH
irrecv.enableIRIn(); // Start the receiver
}

Expand All @@ -123,7 +131,7 @@ void loop() {
// Display a crude timestamp.
uint32_t now = millis();
Serial.printf(D_STR_TIMESTAMP " : %06u.%03u\n", now / 1000, now % 1000);
// Check if we got an IR message tha was to big for our capture buffer.
// Check if we got an IR message that was to big for our capture buffer.
if (results.overflow)
Serial.printf(D_WARN_BUFFERFULL "\n", kCaptureBufferSize);
// Display the library version the message was captured with.
Expand All @@ -134,6 +142,11 @@ void loop() {
String description = IRAcUtils::resultAcToString(&results);
if (description.length()) Serial.println(D_STR_MESGDESC ": " + description);
yield(); // Feed the WDT as the text output can take a while to print.
#if LEGACY_TIMING_INFO
// Output legacy RAW timing info of the result.
Serial.println(resultToTimingInfo(&results));
yield(); // Feed the WDT (again)
#endif // LEGACY_TIMING_INFO
// Output the results as source code
Serial.println(resultToSourceCode(&results));
Serial.println(); // Blank line between entries
Expand Down
31 changes: 28 additions & 3 deletions examples/IRrecvDumpV2/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,42 @@
src_dir = .

[env]
; Default platform
platform = espressif8266
; Default board
board = nodemcuv2
framework = arduino
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2
; build_flags = -D_IR_LOCALE_=en-AU

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
; build_flags = -D_IR_LOCALE_=en-AU

[env:de-CH]
build_flags = -D_IR_LOCALE_=de-CH

[env:de-DE]
build_flags = -D_IR_LOCALE_=de-DE

[env:en-AU]
build_flags = -D_IR_LOCALE_=en-AU

[env:en-IE]
build_flags = -D_IR_LOCALE_=en-IE

[env:en-UK]
build_flags = -D_IR_LOCALE_=en-UK

[env:en-US]
build_flags = -D_IR_LOCALE_=en-US

[env:es-ES]
build_flags = -D_IR_LOCALE_=es-ES
3 changes: 1 addition & 2 deletions examples/IRsendDemo/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
3 changes: 1 addition & 2 deletions examples/IRsendProntoDemo/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
3 changes: 1 addition & 2 deletions examples/JVCPanasonicSendDemo/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
3 changes: 1 addition & 2 deletions examples/LGACSend/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
3 changes: 1 addition & 2 deletions examples/SmartIRRepeater/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
3 changes: 1 addition & 2 deletions examples/TurnOnArgoAC/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
3 changes: 1 addition & 2 deletions examples/TurnOnDaikinAC/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,13 @@ src_dir = .
lib_extra_dirs = ../../
lib_ldf_mode = deep+
lib_ignore = examples
framework = arduino
build_flags =

[env:nodemcuv2]
platform = espressif8266
framework = arduino
board = nodemcuv2

[env:esp32dev]
platform = espressif32
framework = arduino
board = esp32dev
Loading

0 comments on commit 1ce36a8

Please sign in to comment.