Commit Graph

121 Commits

Author SHA1 Message Date
Nathaniel Wesley Filardo c3dd27cf9c
LiquidCrystal robustness and test (#3369)
* LiquidCrystal I2C 4-bit robustness

- Fix up some formatting
- Initialization is now more conformant with the datasheet.
- Read-backs don't needlessly (or erroneously!) store back

While here, document some unexpected behaviour of read-back commands.

* liquidcrystal i2c 4bit NTest
2021-01-13 02:36:00 +00:00
Jedrzej Potoniec 9e08be7b28 httpserver: fix memory leak
There was a memory leak related to not dropping all references to
fifosock's ssend.
2021-01-05 11:07:47 +00:00
Gregor Hartmann 63d82131a7
Doc fixes (#3333) 2020-11-25 12:53:46 +01:00
Lukáš Voborský d279ba2fd9
BME280 Lua module - `(config[3] & 0xFC) | BME280_FORCED_MODE` workaround bug fix (#3325) 2020-11-11 22:07:20 +00:00
Lukáš Voborský b9b5815e97
DS18B20 Lua module (#3150) 2020-11-07 22:41:16 +01:00
Nathaniel Wesley Filardo f5665ace71
MCP23017 module refactorings to save some heap (#3317)
* mcp23017: functions to metatable

Avoids closures for each module.

* mcp23017: inline constants

Saves nearly half a kilobyte of heap.
2020-10-29 12:59:30 +00:00
Marcel P ef353809eb
Add mcp23017 Lua module (#3197) 2020-10-25 12:48:34 +01:00
hanfengcan 02e4720b3d fix: fixed the memory leak 2020-10-18 16:35:32 +01:00
Lukáš Voborský b9091784ae bme280 driver in Lua+C 2020-10-05 20:41:36 +01:00
Terry Ellison 1f2e5bba4a
Implement panic call handling for all modules (#3163) 2020-06-16 08:19:55 +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
seregaxvm 70cad7de5d fix liquidcrystal luacheck warnings (#3081)
Co-authored-by: Matsievskiy S.V <matsievskiysv@gmail.com>
2020-06-09 22:26:52 +02:00
seregaxvm 6499387039 add LiquidCrystal lua module (#2974) 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
Edvinas 56a86c2661 Bugfix conn metatable method call (#3012)
Here `conn` is net.socket instance, so it should be called as one.
Otherwise request is very likely to end up with crash and PANIC.

nwf edited in light of bcb669a4a0
2020-06-09 22:26:52 +02:00
Lukáš Voborský cd9da6463c Add CRC check (#2992)
Also clean-up a nasty `ow` module example.
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
Andreas f56722074a fixed missing forward declaration (#2975) 2020-06-09 22:26:06 +02:00
Gregor Hartmann bfcccbf0b4 Improve httpserver documentation (#2971) 2020-06-09 22:26:06 +02:00
Edvinas 3d91785018
Bugfix conn metatable method call (#3012)
Here `conn` is net.socket instance, so it should be called as one.
Otherwise request is very likely to end up with crash and PANIC.
2020-02-23 09:46:35 -08:00
Terry Ellison 6d9c5a49a4
Example Lua module for coroutining (#2851) 2019-07-26 16:43:56 +01:00
Marcel Stör c50d007f9e Add README
Fixes #2725
2019-04-19 15:51:32 +02: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
Marcel Stör b126c6b2d2 Re-organize documentation
Drop support for localized content, #2213

Restructure some content to match more closely what we have in master, #2542
2019-01-13 22:01:57 +01:00
galjonsfigur ebdfd1ff6a Rename http server Lua module and fix its documentation (#2594) 2018-12-19 12:23:14 +01:00
galjonsfigur f5fcd0d984 Recreate and unify documentation for Lua modules (#2592)
* Recreate and unify documentation for Lua modules

* Fix typos in docs

* Added/modified READMES to link to new documentation
2018-12-16 21:39:43 +01:00
Nathaniel Wesley Filardo 61433c448e Deprecate C ds18b20 module (#2581) 2018-12-05 21:38:11 +01:00
Gregor 520b853bf4 Small typo in ftp server fails compilation
There sneaked in an 'o' at the beginning of the file
2018-07-09 01:19:19 +02:00
TerryE 8dcc3c8a55 New FTP module 2018-07-02 03:22:15 +01:00
Marcel Stör cb2808835d Fix Markdown syntax issues, fixes #2347 2018-04-06 17:35:23 +02:00
Arnim Läuger 4367e6e9e0 remove deprecated init functions in adxl345, am2320, bme280, bmp085, hdc1080, hmc58831, l3g4200d, HDC1000, lm92 (#2276) 2018-03-12 07:56:07 +01:00
Marcel Stör c4440e47ba Link ds18b20 C/Lua module docs 2017-08-16 21:32:04 +02:00
Lukáš Voborský 55c368ac03 DS18B20 module - update (enhanced, optimized) (#1996) 2017-08-16 21:04:52 +02:00
devsaurus f1bc858021 remove si7021 from lua_modules tree 2017-04-27 23:22:08 +02:00
Arnim Läuger 9c71c64dcd ds3231: require bit module, doc formatting (#1891) 2017-03-31 20:31:35 +02:00
Arnim Läuger 925991715f Fix float version, auto-detect int/float, OO tmr (#1866) 2017-03-16 23:10:04 +01:00
Arnim Läuger 46f651cccb Fix self.pin when specifying lpin for readTemp() (#1865) 2017-03-16 12:36:09 +01: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
Jonathan Karras 4acabab1cc Change address printing to Hex from Base64. (#1840) 2017-03-07 07:06:50 +01:00
vsky 5feae3fee1 Re-write DS18B20 asynchronous example (#1820) 2017-02-25 22:56:45 +01:00
TerryE 6fcd554e9c Delered as per #475 and creation of the encoder module 2016-03-02 00:33:51 +00:00
devsaurus ee96273191 Remove lua modules with equivalent ones in app/modules. 2016-02-14 23:03:33 +01:00
Vittorio Giovanelli ecd79d7914 Fixed some grammar on docs 2016-02-10 09:32:37 +01:00
Vittorio Giovanelli ca104a96ce Added full support for DS3231 2016-02-07 21:19:33 +01:00
Marcel Stör 4f330e4500 Merge pull request #946 from SebastianSchildt/fixds18b20
Fix unit constants to be consistent with code
2016-01-17 21:50:00 +01:00
Sebastian Schildt 0863a4c221 Fix unit constants to be consistent with code
Extend example to show querying different units or specific sensors
2016-01-17 14:39:39 +01:00
elgarbe 4c037bfeac Add support for Temperature Comparison register set/get functions 2016-01-06 15:05:32 -03:00