Commit Graph

2401 Commits

Author SHA1 Message Date
Marcel Stör bc9cba2430
Update RTD MkDocs (#3458) 2021-08-19 07:44:56 +02:00
Marcel Stör d2f08f54d2 Remove Travis CI remnants 2021-08-04 12:20:56 +02:00
Lukáš Voborský 949875d590
File LFS Lua module initial commit (#3332)
* File LFS module initial commit

* LFS file module update #1

* LFS file module update #2 - doc update and file.stat() returning read only attribute

* Implementing file.list()

* Fine-tuning `file_lfs` module

* Adding `file_lfs` to mkdocs.yml

* Implementing file.list() update #1

* Fine-tuning

* Fine-tuning #2
2021-05-06 06:52:39 +02:00
Michael Grünewald af689a606a
Fix i2c docs formatting (#3425) 2021-04-25 07:45:58 +02:00
黄文鉴 8e5109d46e
Add extra online XBM format converter (#3411) 2021-04-01 21:48:42 +02:00
Marcel Stör c8e2e18e4f Update docs/modules/node.md
Co-authored-by: Gregor Hartmann <HHHartmann@users.noreply.github.com>
2021-04-01 21:46:17 +02:00
Marcel Stör 34ad3370bd Document node.setonerror()
Fixes #3381
2021-04-01 21:46:17 +02:00
Marcel Stör 4f978118f5 Fix docs link 2021-03-17 21:29:50 +01:00
Lukáš Voborský d528333eee NmraDcc port to NodeMCU Lua
Merging @pjsg's ack functionalities and other fixes
2021-03-12 12:55:59 +01:00
Lukáš Voborský 3bf8db1306 NmraDcc upstream version 2021-03-12 12:55:59 +01:00
Gregor Hartmann e96078e6db
Handle impact of excluding pixbuf from build (#3398) 2021-02-14 08:41:17 +01:00
Marcel Stör 6643cb4697
Add note about GPL (#3400)
Fixes #3025
2021-02-14 08:40:16 +01:00
Marcel Stör e416045485 Add missing test board render 2021-02-03 22:57:01 +01:00
Marcel Stör b1af3fe0d6 Fix broken link 2021-02-03 22:45:05 +01:00
Marcel Stör 5e00b43000 Add missing periods 2021-02-03 22:25:56 +01:00
Marcel Stör 593a549eef Fix admonitions 2021-02-02 22:17:26 +01:00
Nathaniel Wesley Filardo 136e09739b Merge dev into release
While we intend our release strategy to be that we just fast-forward our
`release` branch to `dev`, things have come a little off the wheels.
This is a "git merge -s recursive -X theirs" of `dev` into `release`
instead.
2021-02-01 01:45:52 +00:00
Gregor Hartmann c212b30a03
Add Auto create release (#3385) 2021-01-25 15:27:17 +01:00
Fivefold 2f452b22b4
Doc update for bme280.lua (#3384)
- Changed the note about bme280_math dependency into a blue note box, like in the [bh1750 documentation](https://nodemcu.readthedocs.io/en/release/lua-modules/bh1750/)
- Added a paragraph on differentiating between BMP280 and BME280 sensors. It put it in an orange caution box for now, might be too visible for a rare problem.
- Small fixes in bme280.setup() description
2021-01-24 20:33:46 +01:00
Philip Gladstone fc1085084f
Add test board documentation (#3359) 2021-01-21 21:38:38 +01:00
Nathaniel Wesley Filardo 6316b33296
More NTest prep work for eventual test harness (#3353)
* Rename to tests/README.md

* Expand tests/README.md a bit

* NTest: remove report() in favor of named fields

Use a metatable to provide defaults which can be shadowed by the calling
code.

* NTest: remove old interface flag

I think we have few enough tests that we can verify not needing this
alert for ourselves.

* NTest tests: new standard prelude

Allow for NTest constructor to be passed in to the test itself.
The test harness can use this to provide a wrapper that will
pre-configure NTest itself.

* NTest output handler for TAP messages

* expect tests: core library functions

* expect tests: file xfer TCL module

* expect tests: add TAP-based test runner

* Begin documenting TCL goo

* Add .gitattributes to make sure lineends are correct ...

... if checked out under windows and executed under linux (say docker)

* tests/README: enumerate dependencies

* tests: more README.md

Co-authored-by: Gregor Hartmann <HHHartmann@users.noreply.github.com>
2021-01-16 21:26:22 +00:00
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
Nathaniel Wesley Filardo 109f500be7
More LED fixes (#3368)
* apa102: remove dead code

We can't store strings of hundreds of thousands of characters in RAM, so
this can't possibly have fired, historically.  Pixbufs are still RAM
objects, so that's still out.  With LFS, it would take a pathological
example to hit the required 400KB TSTRING.

* Add IRQ management functions

* ws2812: fill UART FIFOs with IRQs off

Refactor code to make the use of two fill loops less gross.
2021-01-10 17:19:10 +00:00
Gregor Hartmann 4023df7e60
fix regression in luaL_typerror and Change NTest so it can run tests on the host emulating node.task.post (#3357)
* Change NTest so it can run tests on the host emulating node.task.post
* Add executing first host test
* Regression: fix luaL_typerror
2021-01-09 22:25:22 +01:00
Gregor Hartmann 53fc7170bd
Add CI check to verify MkDocs menu items (#3367) 2021-01-08 23:39:47 +01:00
Gregor Hartmann c4aaa9e0a7
Add pixbuf to doc index
I am sure I have seen this in the PR at some time
2021-01-07 19:16:11 +01:00
Nathaniel Wesley Filardo 85df6b588d
LED strip refactor (#3158)
`ws2812` buffer extracted to new `pixbuf` module.

* The new pixbuf module has more functionality than the `ws2812`-specific buffer it replaces.
* This is work in progress towards https://github.com/nodemcu/nodemcu-firmware/issues/2916
* The LED driver modules `ws2812`, `ws2801`, `apa102`, and `tm1829` have sprouted `pixbuf` support.
* `NTest` tests for `pixbuf` now exist.

While here, document the ws2812 UART-based overlapping with mainline
execution.  Fixes https://github.com/nodemcu/nodemcu-firmware/issues/3140

Co-authored-by: Gregor Hartmann <HHHartmann@users.noreply.github.com>
2021-01-06 23:35:34 +00:00
M.K 9a26e0a94b
Makefiles: Validate LUA selection or refer to the other Makefile. (#3269) 2021-01-06 03:57:50 +01: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
Nathaniel Wesley Filardo c695a451ee
First round of MQTT fixes (#3360)
* mqtt: remove concept of connection timeout

Just rely on the network stack to tell us when things have gone south.

* mqtt: remove write-only mqtt_state.port field

* mqtt: drop useless conditional

* mqtt: decouple message sent flag from timer

* mqtt: reconnect callback does not need to hang up

The network stack has certainly done that for us at this point.
Similarly, since we're about to call mqtt_socket_disconnected, don't
bother unregistering the timer here, either.

* mqtt: don't tick once per second

Set the timer for the duration of the wait and cancel it on the other side.

* mqtt: defer message queue destruction to _disconnect

We're going to want to publish a disconnect message for real, so doing
this in _close does no one any favors

* mqtt: miscellaneous cleanups

No functional change intended

* mqtt: close() should send disconnect message for real

This means waiting for _sent() to fire again before telling the network
stack to disconnect.

* mqtt: tidy connect and dns

- Push the self-ref to after all allocations and error returns

- Don't try to extract IPv4 from the domain string ourselves, let the
  resolver, since it can

- Don't try to connect to localhost.  That can't possibly work.

* mqtt: common up some callback invocations

* mqtt: don't retransmit messages on timeout

There's no point in retransmitting messages on timeout; the network
stack will be trying to do it for us anyway.

* mqtt: remove unnecessary NULL udata checks

* mqtt: hold strings in Lua, not C

Eliminates a host of C-side allocations.

While here, move the rest of the mqtt_connect_info structure out to its
own thing, and pack some flags using a bitfield.

* mqtt: mqtt_socket_on use lua_checkoption

* mqtt: slightly augment debug messages

These changes have made some debugging ever so slightly easier.
2021-01-05 12:07:09 +01:00
Gregor Hartmann 18d24364db
convert mispec tests to NTest and remove mispec (#3358)
* convert mispec tests to NTest and remove mispec

* fix luacheck
2020-12-31 15:54:32 +00:00
Nathaniel Wesley Filardo c2b3710f60
Add pipeutils example (#3354)
These have been handy within the test harness for streaming files and
LFS images across to the DUTs.

Add nrec method to pipe

Co-authored-by: Gregor Hartmann <HHHartmann@users.noreply.github.com>
2020-12-29 08:54:54 +01:00
Lukáš Voborský 0ef609d8f4
Add Somfy receiver (#3320) 2020-12-28 00:04:32 +01:00
Gregor Hartmann 0fb2a121c1
Add GitHub Actions (#3337)
Will build in parallel and covers more environments than the Travis build.
2020-12-25 23:35:00 +01:00
Nathaniel Wesley Filardo b1d318de62
NFC: Backport luaL_testudata to Lua 5.1 (#3352)
And move luaL_checkudata to it, as in 5.3.
2020-12-24 08:39:08 +01:00
Lukáš Voborský 9c1f4aca5b Fix DHT module (#3334)
* DHT module negative values bug fix
* Revamp of the DHT module, DHT12 support
* Updated documentation
2020-12-16 23:20:09 +01:00
Lukáš Voborský f4ba635d3c
Fix softuart module setup function parameters (#3348) 2020-12-16 12:56:55 +01:00
Philip Gladstone 432fe49612
Convert test documentation to Markdown (#3346)
* COnvert the rst to md...

* CLeanup the automatic conversion

* Try and make the tables work

* And again

* Get rid of the end-of-table marker
2020-12-12 03:24:31 +00:00
Gregor Hartmann ad8f82c6e2
fix search path for lua require (#3336) 2020-11-25 19:07:17 +00:00
Gregor Hartmann 63d82131a7
Doc fixes (#3333) 2020-11-25 12:53:46 +01:00
Nathaniel Wesley Filardo 49b09d050e
Basic hardware test examples for adc and gpio + define hardware setup (#3324) 2020-11-15 16:01:15 +01:00
Gregor Hartmann 02dcc235c9
Allow turning off softwd again as documented (#3327)
* Allow turning off softwd again as documented

* fix luacheck warnings

* fix outcome of review
2020-11-13 11:11:29 +00: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
Gregor Hartmann c4baa9f3b9
Create NodeMCU test system based on gambiarra (#2984)
* Create mispec_file.lua

* Initial commit of gambiarra

* Adapt gambiarra to NodeMCU

* adapt to NodeMCU spacing and add nok functionality

* Some refactoring to make it easier to add new functionality

* Add methode `fail` to check failing code and pass error messages to output

- fail can be called with a function that should fail and a string which should be contained in the errormessage.
- Pass failed check reasons to output.

* Create gambiarra_file.lua

* Add reporting of tests that failed with Lua error

* ok, nok and fail will terminate the running test

* Add capability to run sync and async tests in mixed order and have a task.post inbetween them

* fix gambiarra self test to also run on device (not only host)

Use less ram in checking tests directly after they ran.
Use nateie task.post to tame watchdog.

* Update file tests + add async tmr tests

* Another fix in executing async test

* Catch errors in callbacks using node.setonerror

* change interface to return an object with several test methods

* Update README.md

* Change interface of Gambiarra + add reason for failed eq

* Update gambiarra documentation

* Add coroutine testcases to gambiarra

* Delete mispec_file.lua as it is superseeded by gambiarra_file.lua

* improve regexp for stack frame extraction

* Use Lua 53 debug capabilities

* move actual tests upfront

* remove debug code + optimization

* Show errors immediately instead of at the end of the test, freeing memory earlier

* Split tests to be run in 2 tranches

* rename to NTest and move to new location

* Add tests to checking mechanisms

* Add luacheck to tests

* Some pushing around of files

* more (last) fixes and file juggling

* Minor tweaks and forgotten checkin

* Add NTest selftest to travis

* Trying how to master travis

* another try

* restrict NTest selftest to linux
2020-11-08 14:31:11 +00:00
Lukáš Voborský b9b5815e97
DS18B20 Lua module (#3150) 2020-11-07 22:41:16 +01:00
Philip Gladstone f67792e0d3
Add support for using doubles in the LUA53 build. (#3225) 2020-11-07 22:38:40 +01:00
Gregor Hartmann 4f6792773f Fix ftpserver documentation and some formating in httpserver.md (#3322) 2020-11-07 16:23:43 +01:00
Marcel Stör 1503e280e1 Replace master with release 2020-11-07 16:23:43 +01:00
Nathaniel Wesley Filardo 0cafaca4cb 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-11-07 16:23:43 +01:00
Marcel P 7f30381301 Add mcp23017 Lua module (#3197) 2020-11-07 16:23:43 +01:00