Commit Graph

108 Commits

Author SHA1 Message Date
Nathaniel Wesley Filardo f8baf63a73 Further adaptation of lfs/_init.lua
See https://github.com/nodemcu/nodemcu-firmware/issues/3278 .  Thanks to
@vsky279 and @bazooka07 for suggestions.
2020-10-23 04:22:30 +01:00
vsky a0d27059bc LFS lua example Lua 5.3 compatibility 2020-09-03 12:50:29 +01:00
Marcel Stör 8d091c476e Make the telnet example an Lua module (#3133)
Also update ftp server
2020-06-09 22:26:53 +02:00
evoluman 99aba34460 #2954: adapt LuaOTA to the new firmware api for the timer and some other sma… (#3016)
* #2954: adapt to the new firmware api for the timer and some other small fixes

* reduce the error msg in when not response is sent back from esp

* cleanup: remove trailing whitespaces

Co-authored-by: Adel Tayeb-Cherif <adel@evoluhome.com>
2020-06-09 22:26:52 +02:00
Nathaniel Wesley Filardo 31c71c0e5d lua_examples/lfs/HTTP_OTA: move :connect() after :on()
IMHO, it's generally good style to register the callbacks first.
2020-06-09 22:26:52 +02:00
Alexandru Antochi 1719f90a3b Add Lua module for Gossip protocol (#3013) 2020-06-09 22:26:52 +02:00
galjonsfigur 6926c66b16 Polish Lua examples (#2846)
* Add missing globals from luacheck config

* Fix luacheck warnings in all lua files

* Re-enable luacheck in Travis

* Speed up Travis by using preinstalled LuaRocks

* Fix more luacheck warnings in httpserver lua module

* Fix DCC module and add appropriate definitions to luacheck config.

* Change inline comments from ignoring block to only ignore specific line

* Add Luacheck for Windows and enable it for both Windows and Linux

* Change luacheck exceptions and fix errors from 1st round of polishing

* Add retry and timeout params to wget
2020-06-09 22:26:52 +02:00
Lukáš Voborský 36df8d009f Add DCC decoder module (#2905) 2020-06-09 22:26:06 +02:00
Terry Ellison ce2e50c651 Updates following JM review 2020-06-09 22:26:06 +02:00
Terry Ellison 50b69d8487 Add telnet example 2020-06-09 22:26:06 +02:00
galjonsfigur 7a969b5651 Modify HTTP OTA to not erase saved credentials (#2758) (#2778) 2019-06-01 18:07:40 +02:00
Alistair Witt bc1dd37aee Replaced obsolete static timers in lfs_fragments.lua (nodemcu #2764) 2019-05-22 17:18:49 +02:00
Martijn van Buul 45a7187a6c luaOTA updated to include object form timers (#2752) 2019-05-17 13:13:49 +01:00
Nathaniel Wesley Filardo 1070466feb Revise fifo{,sock} (#2671)
Fixes to #2650:

- Convert fifosock to returning tables containing ctors
- Improve docs
- Add a missed :on("sent", nil) in the http server
2019-02-17 18:32:16 +00:00
sergio d77666c0e8 trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
Nathaniel Wesley Filardo dcc1ea2a49 A generic fifo and fifosock wrapper, under telnet and http server (#2650)
* lua_modules/fifo: a generic queue & socket wrapper

One occasionally wants a generic fifo, so here's a plausible
implementation that's reasonably flexible in its usage.

One possible consumer of this is a variant of TerryE's two-level fifo
trick currently in the telnetd example.  Factor that out to fifosock for
more general use.

* lua_examples/telnet: use factored out fifosock

* lua_modules/http: improve implementation

Switch to fifosock for in-order sending and waiting for everything to be
sent before closing.

Fix header callback by moving the invocation of the handler higher

* fifosock: optimistically cork and delay tx

If we just pushed a little bit of data into a fifosock that had idled,
wait a tick (1 ms) before transmitting.  Hopefully, this means that
we let the rest of the system push more data in before we send the first
packet.  But in a high-throughput situation, where we are streaming data
without idling the fifo, there won't be any additional delay and we'll
coalesce during operation as usual.

The fifosocktest mocks up enough of tmr for this to run, but assumes
an arbitrarily slow processor. ;)
2019-02-16 13:51:40 +01:00
Lukáš Voborský 27e9e6c085 Fix to telnet Lua example and ftpserver Lua module in consequence of PR #2603 (#2654) 2019-02-13 06:49:45 +01:00
Arnim Läuger 67567af959 Submodulify ucg and update to v1.5.2 (#2503)
* turn ucg into submodule
* update ucg to 1.5.2
* add license note to doc
* align docs with esp32
* move ucg hal into platform folder
adapt examples
2018-10-19 21:18:50 +01:00
Terry Ellison 172fb276ca
Add compression to LFS images (#2448)
* Merge of LFS compress, optimize against current dev
* Fixes to LFS compress patch
2018-09-29 16:57:51 +03:00
Nathaniel Wesley Filardo 161c855580 lua_examples/telnet: small tweaks (#2455)
* Remove the old telnet.lua, which has been duplicated as
  simple_telnet.lua.

* Fix some typos and whitespace issues
2018-08-27 12:46:39 +01:00
Terry Ellison add0938d81
LFS documentation and example updates (#2458)
Updates to LFS documentation and the LFS HTTP_OTA module before release to master
2018-08-22 11:09:04 +01:00
Nathaniel Wesley Filardo e896face0c LFS: small tweaks to docs and examples (#2454) 2018-08-11 13:48:46 +02:00
devsaurus 87bb96dfbe port u8g2 module from esp32 platform 2018-07-22 13:51:10 +02:00
Gregor Hartmann 2d2c189a66 Add checking of Lua sources to travis build (#2423) 2018-07-16 07:48:47 +02:00
Jedrzej Jajor 46236dd091 Fixed missing wifi module name. 2018-07-08 16:13:11 +02:00
TerryE c6ba33b749 New Telnet module 2018-07-01 23:42:45 +01:00
TerryE 2ab061f510 merge current dev to resolve update conflcts in node.c 2018-06-22 22:44:19 +01:00
TerryE 4f21224d56 LFS patch updates following review II and testing 2018-06-22 22:29:16 +01:00
Gergo Huszty 2cc195d5c9 webap_toggle_pin.lua HTML warnings and typos fixed (#2394) 2018-06-04 13:16:20 +02:00
TerryE 88bd9e01d3 LFS patch updates following review 2018-04-19 16:27:47 +01:00
Marcel Stör 555b5574a2 Add sjson streaming example
Fixes #2209.
2018-02-04 12:45:27 +01:00
Terry Ellison 26540cf098 LuaOTA provisioning system (#2060) 2017-10-28 23:22:34 +02:00
Philip Gladstone b09cac058a Add support for streaming JSON encoder/decoder (#1755)
Replaces the problematic cjson module.
2017-03-22 11:24:32 +11:00
Jonathan Karras 725feade27 Update DS18b20 examples (#1851)
- Remove old non-async examples from `lua-examples`.
- Rename `ds18b20.EN.md` to `README.md`
- Change remaining `toBase64` calls to the more standard `toHex` call.
- Fix some spelling and markdown formatting issues in README file.

Addresses issue #1841
2017-03-10 22:10:49 +01:00
Philip Gladstone c0848ec66f Sample code for timezone handling (#1853) 2017-03-10 22:09:36 +01:00
Arnim Läuger 46dc9eaeb3 fix pcm examples to comply with current code base (#1720) 2017-01-11 21:11:38 +01:00
Thomas Mohaupt 61d20a75e2 Dev (#1698)
* Toogle between full screen and clip range test
2017-01-02 21:45:06 +01:00
vsky 880bd9850b Somfy/TELIS driver (#1521) 2016-10-14 07:49:58 +09:00
Marcel Stör 5f340f5f48 Delete http-client.lua (#1448) 2016-08-10 21:45:26 +02:00
Arnim Läuger d416648990 Add pcm module. (#1255)
* Add pcm module.
* Add network streaming example.
* document hw_timer dependency with pwm
* Add vu peak callback.
2016-06-05 23:21:36 +02:00
Arnim Läuger ae873b70c6 Add caching for multi-byte transfers (#1247)
* add caching for multi-byte transfers
handle HSPI /CS in examples

* push similar code snippets into macro
2016-06-04 00:18:19 +02:00
Marcel Stör bd17b295ba Change upper/lower case 2016-06-01 11:16:41 +02:00
Marcel Stör 08aff66c29 Delete http_server.lua, fixes #1196 2016-05-27 13:32:56 +02:00
Arnim Läuger 25b4285c4d update examples to task posting (#1249) 2016-04-18 13:35:07 +02:00
UncleRedz 7e0b58b950 Corrected typo in u8g documentation and added a new u8g example which demonstrate a draw loop that works correctly with WiFi. 2016-03-29 06:18:26 +02:00
devsaurus ee96273191 Remove lua modules with equivalent ones in app/modules. 2016-02-14 23:03:33 +01:00
Marcel Stör 08921c9871 Transfer HTTP client examples to lua_examples/
Fixes #941
2016-01-25 20:33:21 +01:00
Terry Ellison 94402443f2 Merge pull request #910 from devsaurus/dev-gcfix
Remove superfluous collectgarbage() in webap example
2016-01-07 22:50:45 +00:00
devsaurus 07c1a28d4d remove ; and dangling spaces 2016-01-07 23:08:44 +01:00
devsaurus 626e7d3c91 close connection on sent instead on receive 2016-01-07 23:00:24 +01:00