Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IR module (Infrared) #3094

Open
wants to merge 72 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
14c1b8f
Lua 5.1 to 5.3 realignement phase 1
TerryE Jul 18, 2019
ba03cb0
Add telnet example
TerryE Jul 19, 2019
bc98174
Updates following JM review
TerryE Jul 19, 2019
39bb60e
Rebased against current dev
TerryE Jul 23, 2019
522b1d0
Rebased against current dev, tweaks for clean compile
TerryE Jul 23, 2019
fff9f95
Merge pull request #2836 from TerryE/dev-new-lua.c
TerryE Sep 7, 2019
32ad759
Add streaming support for hx711 device (#2793)
pjsg Sep 10, 2019
4c3d45e
Revert "Add streaming support for hx711 device (#2793)" (#2914)
marcelstoer Sep 13, 2019
81e213a
Remove superfluous module def
marcelstoer Sep 21, 2019
04287ac
Fix invalid smartconfig include
marcelstoer Sep 29, 2019
043046d
Deprecate crypto.to{Hex,Base64} (#2929)
nwf Sep 30, 2019
f3044e1
Fix typos
marcelstoer Oct 30, 2019
0e34f7d
fix lfs upload issue
Nov 13, 2019
f3b4984
Merge pull request #2961 from seregaxvm/lfsfix
TerryE Nov 14, 2019
e3935de
Improve MQTT documentation (#2967)
stromnet Nov 21, 2019
9a2579d
Improve httpserver documentation (#2971)
HHHartmann Nov 26, 2019
c7d0f83
Update sensor driver for BME680 to 3.5.9 (#2969)
vsky279 Dec 9, 2019
b179f30
Fixes for `ws2812` and `ws2812_effects` (#2953)
HHHartmann Dec 9, 2019
4fc2b85
Streaming support for hx711 (#2915)
marcelstoer Dec 9, 2019
f85c278
New `net.if.info` call to show LwIP information (#2862)
nwf Dec 9, 2019
d84da36
fixed missing forward declaration (#2975)
glumanda Dec 13, 2019
bf8f14b
SSL rampage (#2938)
nwf Dec 27, 2019
52a1587
Initial version of software UART C module (#2673)
galjonsfigur Dec 27, 2019
1652c0c
Add DCC decoder module (#2905)
vsky279 Dec 28, 2019
bcb669a
Polish Lua examples (#2846)
galjonsfigur Dec 30, 2019
7ed3d00
Minor typo and wording fixes (#2991)
mk-pmb Jan 1, 2020
8c08e76
Add CRC check (#2992)
vsky279 Jan 2, 2020
5278944
Fix compile warning and set correct order in module LROT (#2996)
galjonsfigur Jan 3, 2020
1c83f02
Expose CPU CCOUNT register as tmr function (#2906)
fikin Jan 4, 2020
49f25bd
Clarify LFS build info is its size (#3022)
mk-pmb Feb 1, 2020
76e9f1a
Document tls.cert.auth (#3010)
HHHartmann Feb 1, 2020
9fb8a2f
Add flag to disable start-up banner (#3026)
532910 Feb 9, 2020
df83908
Documentation fixes for pipe (#3041)
HHHartmann Feb 18, 2020
ec8622f
Fix timing of softuart module RX (#3029)
galjonsfigur Feb 18, 2020
1851a73
Update sqlite3.md (#3042)
HHHartmann Feb 21, 2020
31d4714
net: rename net.if.info to net.ifinfo (#3033)
nwf Feb 23, 2020
1577988
Bugfix conn metatable method call (#3012)
edzius Feb 23, 2020
c116d9d
Add Lua module for Gossip protocol (#3013)
alexandruantochi Mar 6, 2020
787ac7c
WIP: MQTT fixes (#2986)
nwf Mar 14, 2020
f265867
Fix connect() params in example
marcelstoer Mar 15, 2020
75db62f
Fix init.lua link
marcelstoer Mar 15, 2020
a9991c6
Update getting-started docs hrefs for LFS examples (#3048)
cerasmus Mar 22, 2020
f45a9ef
Add hint about locally built docs
marcelstoer Mar 22, 2020
cb2636d
Add page about Lua module directory
marcelstoer Mar 22, 2020
f5aa0af
Networking rampage and accumulated fixes (#3060)
nwf Apr 7, 2020
c12b2ef
add LiquidCrystal lua module (#2974)
Apr 18, 2020
5552fdb
mispec: don't use %f
nwf Dec 26, 2019
1c8dd6a
mispec: don't use uart.write
nwf Dec 26, 2019
fe9f2d6
mqtt: remove dead store
nwf Apr 7, 2020
0daef0a
net: annotate deliberate case fallthrough
nwf Apr 7, 2020
132dccd
lua_examples/lfs/HTTP_OTA: move :connect() after :on()
nwf Apr 5, 2020
c79ba4e
file: raise error on .on() with non-function/nil
nwf Feb 14, 2020
810d60d
mqtt: drop LUA_GCSTOP/GCRESTART dance
nwf Apr 5, 2020
627bd5d
net: drop LUA_GCSTOP/GCRESTART dance
nwf Apr 5, 2020
766ab59
net.dns: don't calloc a single int
nwf Apr 6, 2020
bd7695f
tls: fix new verification API
nwf Apr 7, 2020
04ab7d7
app/modules: prune some unnecessary metamethods
nwf Apr 7, 2020
e47c267
Correct integer types in BMP085 driver (#3070)
andrmuel Apr 24, 2020
3c3bec9
HTML for Apple devices to mitigate POST fragmentation (#3069)
HHHartmann Apr 25, 2020
e627249
fix #2565 by inverting the grb2hsv argcheck condition (#3076)
Firenox89 Apr 26, 2020
020b5a5
#2954: adapt LuaOTA to the new firmware api for the timer and some ot…
adeltc Apr 26, 2020
9ef5c7d
Squashed updates do get Lua51 and Lua53 working (#3075)
TerryE Apr 27, 2020
cd6452d
fix liquidcrystal luacheck warnings (#3081)
Apr 29, 2020
976d9dd
fix build
HHHartmann Apr 29, 2020
7523418
poor mans link which also works on docker under windows
HHHartmann Apr 30, 2020
17f74fb
Delete espconn.h
HHHartmann Apr 30, 2020
3d2c989
resurecting it as regular file
HHHartmann Apr 30, 2020
b6bfe1c
Add missing newline
marcelstoer Apr 30, 2020
314ca4f
Fix Windows build (#3084)
marcelstoer Apr 30, 2020
88a33af
Add another LFS size value
marcelstoer May 1, 2020
b2175a2
Add IR module
ecrips Apr 25, 2020
8e65f07
Add documentation for IR module
ecrips May 5, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
20 changes: 18 additions & 2 deletions .gdbinitlua
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ set pagination off
set print null-stop

define prTS
set $o = &(((TString *)($arg0))->tsv)
set $o = &(((TString *)(($arg0).value))->tsv)
printf "Common header: next = %p, marked = 0x%01x\n", $o->next, $o->marked
printf "String: hash = 0x%08x, len = %u : %s\n", $o->hash, $o->len, (char *)(&$o[1])
printf "String: hash = 0x%08x, len = %u : %s\n", $o->hash, $o->len, (char *)($o+1)
end

define prTnodes
Expand All @@ -24,6 +24,18 @@ define prTnodes
set $i = $i +1
end
end

define prTarray
set $o = (Table *)($arg0)
set $n = $o->sizearray
set $i = 0
while $i < $n
set $nd = ($o->array) + $i
prTV $nd
set $i = $i +1
end
end

define prTV
if $arg0
set $type = ($arg0).tt
Expand Down Expand Up @@ -78,6 +90,10 @@ define prTV
end
if $type == 9
# UserData
set $o = &($val->gc.u.uv)
printf "Common header: next = %p, marked = 0x%01x\n", $o->next, $o->marked
printf "UD = %p Userdata: metatable = ", ($o+1))
print ($o)->metatable
end
if $type == 10
# Thread
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tools/toolchains/
.project
.settings/
.vscode
.vs

#ignore temp file for build infos
buildinfo.h
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ addons:
packages:
- python-serial
- srecord
- luarocks
cache:
- directories:
- cache
Expand All @@ -33,4 +34,5 @@ script:
- echo "checking:"
- find lua_modules lua_examples -iname "*.lua" -print0 | xargs -0 echo
- find lua_modules lua_examples -iname "*.lua" -print0 | xargs -0 $LUACC -p
# - if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck.sh || true ; fi
- if [ "$OS" = "linux" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck-linux.sh; fi
- if [ "$OS" = "windows" ]; then bash "$TRAVIS_BUILD_DIR"/tools/travis/run-luacheck-windows.sh; fi
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ ifneq (,$(findstring indows,$(OS)))
else
# It is gcc, may be cygwin
# Can we use -fdata-sections?
CCFLAGS += -ffunction-sections -fno-jump-tables -fdata-sections
CCFLAGS += -ffunction-sections -fno-jump-tables -fdata-sections -fpack-struct=4
AR = xtensa-lx106-elf-ar
CC = xtensa-lx106-elf-gcc
CXX = xtensa-lx106-elf-g++
Expand Down
21 changes: 13 additions & 8 deletions app/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ TARGET = eagle
#FLAVOR = release
FLAVOR = debug

# Handle Lua Directory selector
ifeq ("$(LUA)","53")
LUA_DIR := lua53
else
LUA_DIR := lua
endif

ifndef PDIR # {
GEN_IMAGES= eagle.app.v6.out
GEN_BINS= eagle.app.v6.bin
Expand All @@ -34,16 +41,15 @@ SUBDIRS= \
mbedtls \
platform \
libc \
lua \
$(LUA_DIR) \
lwip \
task \
smart \
modules \
spiffs \
net \
net \
fatfs \
esp-gdbstub \
pm \
pm \
uzlib \
$(OPT_SEL_MKTARGETS)

Expand All @@ -64,10 +70,9 @@ COMPONENTS_eagle.app.v6 = \
user/libuser.a \
crypto/libcrypto.a \
driver/libdriver.a \
platform/libplatform.a \
task/libtask.a \
platform/libplatform.a \
libc/liblibc.a \
lua/liblua.a \
$(LUA_DIR)/liblua.a \
lwip/liblwip.a \
smart/smart.a \
spiffs/spiffs.a \
Expand Down Expand Up @@ -152,7 +157,7 @@ DDEFINES += \
#
# Required for each makefile to inherit from the parent
#
INCLUDES := -I $(PDIR)libc -I $(PDIR)lua -I $(PDIR)platform \
INCLUDES := -I $(PDIR)libc -I $(PDIR)$(LUA_DIR) -I $(PDIR)platform \
$(INCLUDES) -I $(PDIR) -I $(PDIR)include
PDIR := ../$(PDIR)

Expand Down
23 changes: 16 additions & 7 deletions app/coap/endpoints.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,20 +162,29 @@ static int handle_post_function(const coap_endpoint_t *ep, coap_rw_buffer_t *scr
return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_NOT_FOUND, COAP_CONTENTTYPE_NONE);
}

extern int lua_put_line(const char *s, size_t l);

static const coap_endpoint_path_t path_command = {2, {"v1", "c"}};
static int handle_post_command(const coap_endpoint_t *ep, coap_rw_buffer_t *scratch, const coap_packet_t *inpkt, coap_packet_t *outpkt, uint8_t id_hi, uint8_t id_lo)
{
if (inpkt->payload.len == 0)
return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_BAD_REQUEST, COAP_CONTENTTYPE_TEXT_PLAIN);
if (inpkt->payload.len > 0)
{
char line[LUA_MAXINPUT];
if (!coap_buffer_to_string(line, LUA_MAXINPUT, &inpkt->payload) &&
lua_put_line(line, strlen(line))) {
NODE_DBG("\nResult(if any):\n");
system_os_post (LUA_TASK_PRIO, LUA_PROCESS_LINE_SIG, 0);
char line[LUA_MAXINPUT+1];
if (!coap_buffer_to_string(line, LUA_MAXINPUT, &inpkt->payload)) {
lua_State *L = lua_getstate();
int base = lua_gettop(L), n, status;
int l = strlen(line);
line[l++] = '\n';
/* compile and exec payload; any error or results will be left on the stack and printed */
/* TODO: consider returning output as result instead of printing */
luaL_dostring(L, line);
if ((n = lua_gettop(L) - base) > 0)
{
lua_getglobal(L, "print");
lua_insert(L, base);
lua_pcall(L, n, 0, 0);
lua_settop(L, base);
}
}
return coap_make_response(scratch, outpkt, NULL, 0, id_hi, id_lo, &inpkt->tok, COAP_RSPCODE_CONTENT, COAP_CONTENTTYPE_TEXT_PLAIN);
}
Expand Down
7 changes: 0 additions & 7 deletions app/crypto/digests.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@
#include <strings.h>
#include <errno.h>

#ifdef MD2_ENABLE
#include "ssl/ssl_crypto.h"
#endif

#ifdef SHA2_ENABLE
#include "sha2.h"
#endif
Expand All @@ -60,9 +56,6 @@ typedef char ensure_int_and_size_t_same[(sizeof(int)==sizeof(size_t)) ? 0 : -1];

static const digest_mech_info_t hash_mechs[] ICACHE_RODATA_ATTR =
{
#ifdef MD2_ENABLE
MECH(MD2, _ , MD2_SIZE, 16),
#endif
MECH(MD5, , MD5_DIGEST_LENGTH, 64)
,MECH(SHA1, , SHA1_DIGEST_LENGTH, 64)
#ifdef SHA2_ENABLE
Expand Down
2 changes: 1 addition & 1 deletion app/driver/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ifndef PDIR
GEN_LIBS = libdriver.a
endif

STD_CFLAGS=-std=gnu11 -Wimplicit
STD_CFLAGS=-std=gnu11 -Wimplicit -Wall

#############################################################
# Configuration i.e. compile options etc.
Expand Down
Loading