Ir esp8266 lib update and code impacts (#235)
* integrate new IRremoteESP8266 lib 2.4.2 and add new protocols IR_RC6 IR_MITSUBISHI IR_GICABLE IR_MITSUBISHI2 IR_LASERTAG IR_CARRIER_AC IR_MIDEA IR_NIKAI IR_SHERWOOD IR_DENON IR_AIWA_RC_T501 IR_JVC
This commit is contained in:
1 parent
9b258723a8
commit
b12ee19979
130 files changed
+16548
-1693
No files matched your search
@@ -0,0 +1,80 @@
|
||||
#!/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)
|
||||
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} ${ENUMS}; do
|
||||
echo -e "${i}\tLITERAL1"
|
||||
done | sort -u
|
||||
Reference in new issue
Block a user