Commit Graph

2420 Commits

Author SHA1 Message Date
Josef Fröhle 4e3990d81c
Fix Typo in ds18b20-web.lua (#3561) 2022-12-14 08:31:39 +01:00
Gregor Hartmann 193fe3593e
Fix some bugs and problems in gossip (#3527)
* Allow configuration of debugOutput to be performed

* don't send to own IP or update own data

* Use same socket to send and receive. Avoid problems in many opened and closed sockets to send

* Add callback for REMOVEed hosts

* Send broascast messages if seedList is empty

* Adapt yeelink to new luacheck rules

* Fix building of luac.cross for win to win2019 and VS 2019
2022-07-10 17:01:21 +02:00
Arnie97 27dbe11fcb
Fix dead link (#3518)
The header files were moved into `include` in the commit 87d7b110d6
2022-05-23 13:18:12 +02:00
Marcel Stör fe74f77654 Pin jinja2, see https://twitter.com/readthedocs/status/1507388916013314048 2022-05-20 07:53:27 +02:00
Nathaniel Wesley Filardo 565bbbfcbb Switch GET_BYTE_FN to LUA_LOAD_BYTE_FN
This is intended to be a more portable abstraction: rather than
hard-coding offsets in the macro invocations, it relies on the existence
of __builtin_offset and its availability even within inline asm blocks.

While here, rename some of the functions involved to hopefully improve
clarity
2022-04-03 14:23:29 +01:00
Ilkka Poutanen 10e566babc
Fix build for WSL users (#3499)
This change prevents the shell from erroring out with `$PATH` values that contain e.g. parentheses, as is likely for WSL users.
2022-01-27 07:04:04 +01:00
Marcel Stör 46959c1bae Fix the handling of relative links
Do not change the URL to artifacts that reside inside the `/docs`
folder as they are correctly managed by MkDocs.

Fixes #3495
2022-01-15 01:24:50 +01:00
Marcel Stör fb232337e5 Fix spelling 2022-01-15 01:23:18 +01:00
Andreas Deininger ae8426729d
Fix several typos (#3491) 2022-01-12 13:22:52 +01:00
Nathaniel Wesley Filardo 496a64035e
docs: node: point at telnet module now (#3489)
* docs: node: point at telnet module now

See 8d091c476e

* Fix links

Co-authored-by: Marcel Stör <marcelstoer@users.noreply.github.com>
2022-01-07 05:53:42 +01:00
Marcel Stör f25dc56d3c Bump MkDocs 2021-12-30 08:46:20 +01:00
Michael Currin 0b9785585e Update PULL_REQUEST_TEMPLATE.md 2021-12-28 18:33:45 +00:00
Johan Ström b91368594d
MQTT: trigger conn failure callback if DNS success but connection failed (#3477) 2021-12-06 13:38:48 +01:00
Johny Mattsson 1965a12efc
Minor Lua fixes. (#3467)
Discovered over on the dev-esp32-idf4 branch.

- Off by one error in loadLFS, leading to slight memory leak and
  potential corruption.

- Insufficient return value check in loadLFS, where uzlib may return
  one of two success conditions, one of which would result in an
  out-of-bounds access and related pain.

- One case of a side effect within a lua_assert(), leading to
  silently broken LFS image handling when compiling without asserts
  enabled, the issue showing up as module names being shuffled around.

- Incorrect encoding of TValues in LFS when 64bit numbers in use.
2021-11-19 22:50:27 +01:00
Johan Ström f7b48b9214
Fix IGMP timer (#3476)
LWIP_RAND() return type is int, value returned is sometimes negative.
This causes timer to sometimes (often) go outside of max_time, which in turn causes IGMP snoopers or IGMP routers to drop the subscription
2021-11-19 22:47:54 +01:00
Johan Ström 77e5359087
ow: add alarm scans and timing tweaking (#3461) 2021-09-08 22:34:43 +02:00
Roger D. Winans 9b477e0aae
Update link to `flashchips.h` (#3464) 2021-09-08 07:58:38 +02:00
Marcel Stör a23a07a8f7
Bump to Ubuntu 20.04 (#3463)
Bump to Ubuntu 20.04
2021-09-07 23:24:55 +02:00
Lukáš Voborský c72d6083ef
Fix crash in sntp.sync() (#3460) 2021-08-27 12:09:43 +02:00
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