Commit Graph

96 Commits

Author SHA1 Message Date
Marcel Stör 4f978118f5 Fix docs link 2021-03-17 21:29:50 +01:00
Gregor Hartmann 53fc7170bd
Add CI check to verify MkDocs menu items (#3367) 2021-01-08 23:39:47 +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
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 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
Philip Gladstone f67792e0d3
Add support for using doubles in the LUA53 build. (#3225) 2020-11-07 22:38:40 +01:00
Cody Cutrer 63e1fcda06
add wiegand module (#3203)
* add wiegand module

* minor tweaks to wiegand module

 * fix a whitespace error (tabs!!!!)
 * remove an unnecessary volatile qualifier
2020-10-19 01:05:31 +01:00
Lukáš Voborský b9091784ae bme280 driver in Lua+C 2020-10-05 20:41:36 +01:00
vsky a0d27059bc LFS lua example Lua 5.3 compatibility 2020-09-03 12:50:29 +01:00
Philip Gladstone ba611101e5
Don't allocate flash to SPIFFS that is reserved by the system. (#3260) 2020-09-01 22:40:57 +01:00
galjonsfigur b4c148eff0
Add missing features to Travis CI PR build (#3255) 2020-08-30 21:04:00 +02:00
Richard Marko 28c6bda9b4
tools/Makefile: remove stray whitespace from APP_DIR (#3240) 2020-08-08 13:30:44 +02:00
Nathaniel Wesley Filardo f20591a82e Lost fix to nodemcu-partition.py (take 2) (#3139)
Replay a line from https://github.com/nodemcu/nodemcu-firmware/pull/2861
after accidental revert in
https://github.com/nodemcu/nodemcu-firmware/pull/3075 (specifically
9ef5c7dbea)
2020-06-09 22:26:52 +02:00
Terry Ellison bbeb09b695 Squashed updates do get Lua51 and Lua53 working (#3075)
-  Lots of minor but nasty bugfixes to get all tests to run clean
-  core lua and test suite fixes to allow luac -F to run cleanly against test suite
-  next tranch to get LFS working
-  luac.cross -a options plus fixes from feedback
-  UART fixes and lua.c merge
-  commit of wip prior to rebaselining against current dev
-  more tweaks
2020-06-09 22:26:52 +02:00
Nathaniel Wesley Filardo af426d0315 Networking rampage and accumulated fixes (#3060)
* espconn: remove unused espconn code, take 1

This is the easiest part of https://github.com/nodemcu/nodemcu-firmware/issues/3004 .
It removes a bunch of functions that were never called in our tree.

* espconn: De-orbit espconn_gethostbyname

Further work on https://github.com/nodemcu/nodemcu-firmware/issues/3004

While here, remove `mqtt`'s charming DNS-retry logic (which is neither
shared with nor duplicated in other modules) and update its :connect()
return value behavior and documentation.

* espconn: remove scary global pktinfo

A write-only global!  How about that.

* net: remove deprecated methods

All the TLS stuff moved over there a long time ago, and
net_createUDPSocket should just do what it says on the tin.

* espconn_secure: remove ESPCONN_SERVER support

We can barely function as a TLS client; being a TLS server seems like a
real stretch.  This code was never called from Lua anyway.

* espconn_secure: more code removal

* espconn_secure: simplify ssl options structure

There is nothing "ssl_packet" about this structure.  Get rid of the
terrifying "pbuffer" pointer.

Squash two structure types together and eliminate an unused field.

* espconn_secure: refactor mbedtls_msg_info_load

Split out espconn_mbedtls_parse, which we can use as part of our effort
towards addressing https://github.com/nodemcu/nodemcu-firmware/issues/3032

* espconn_secure: introduce TLS cert/key callbacks

The new feature part of https://github.com/nodemcu/nodemcu-firmware/issues/3032
Subsequent work will remove the old mechanism.

* tls: add deprecation warnings

* luacheck: net.ifinfo is a thing now

* tls: remove use of espconn->reverse

* mqtt: stop using espconn->reverse

Instead, just place the espconn structure itself at the top of the user
data.  This enlarges the structure somewhat but removes one more layer
of dynamic heap usage and NULL checks.

While here, simplify the code a bit.

* mqtt: remove redundant pointer to connect_info

Everywhere we have the mqtt_state_t we also have the lmqtt_userdata.

* mqtt: doc fixes

* mqtt: note bug

* tls: allow :on(...,nil) to unregister a callback
2020-06-09 22:26:52 +02:00
M.K 3aba085f82 Clarify LFS build info is its size (#3022) 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
Gregor Hartmann 739b675b72 add build_date to build info (#2888) 2019-08-15 12:33:22 +02:00
Nathaniel Wesley Filardo 15afa7fd2e
Merge pull request #2830 from HHHartmann/Extend-node.info
Extend node.info
2019-08-04 20:52:41 +01:00
Nathaniel Wesley Filardo 49ac968bde Lost fixes to nodemcu-partition.py (#2861) 2019-07-27 14:21:52 +02:00
Gregor Hartmann d054d17694
adapt sed calls for macOS 2019-07-27 13:09:11 +02:00
Gregor Hartmann 825e35053f
have common capitalization in startup message 2019-07-27 12:55:34 +02:00
Gregor 0ff3084fe3 small fixes as outcome of review 2019-07-27 08:27:19 +02:00
Gregor 9eec82fead Get DTS in UTC as Marcel proposed. 2019-07-27 05:36:06 +00:00
Gregor 5fafa6378c change to better UI and get information directly from .h file 2019-07-27 05:36:06 +00:00
Gregor 1d976e54f2 inprove USER_PROLOG handling 2019-07-27 05:36:06 +00:00
Gregor 063988f12a Change DTS to string since it is too big as number 2019-07-27 05:36:05 +00:00
Gregor 6a78546707 update file permission 2019-07-27 05:36:05 +00:00
Gregor 6f1e366946 Revert "update file permission"
This reverts commit af9b123bc1c0603859caf9fcd6fcfdeeeb08dbce.
2019-07-27 05:36:05 +00:00
Gregor 299b248932 Cover for failed RELEASE_DTS calculation 2019-07-27 05:36:05 +00:00
Gregor 2d80042f91 update file permission 2019-07-27 05:36:05 +00:00
Gregor bc4b177086 Fix small issues and add execute bit for unix 2019-07-27 05:36:04 +00:00
Gregor ad90e8dd51 tweal the startup message a bit 2019-07-27 05:36:04 +00:00
Gregor e6c2f4cb55 Include environment variable USER_PROLOG in user config default 2019-07-27 05:36:04 +00:00
Gregor e0273185db include buildinfo generation in makefile 2019-07-27 05:36:04 +00:00
Gregor 4b279939b6 Add release info 2019-07-27 05:36:02 +00:00
Gregor 21c35a1a97 Create buildinfo.h and return new Values in node.info 2019-07-27 05:36:02 +00:00
Terry Ellison 98c2c0520d
Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
galjonsfigur 7de8a01705 Add luacheck config and configuration for Travis CI (#2790)
* Move luacheck conf and fix Travis for all possible filenames
* Add lua script to help with luacheck config
* Add xargs approach for current luac.cross file checking
* Enable luacheck but do not break build
2019-06-28 06:53:19 +02:00
Terry Ellison f1b5dfc34e
SDK-3.0 tranche updates (#2757)
includes some dRAM -> iRAM optimisations
2019-05-17 13:04:19 +01:00
Terry Ellison bc61528db7
1st Tranch of SDK 3.0 follow up changes (#2732)
1st Tranche of SDK 3.0 follow up changes
2019-05-01 18:29:11 +01:00
ziggurat29 5a6992c26a added spiffsimg host tools project to msvc build configuration. (#2686) 2019-04-09 14:38:49 +01:00
Gregor Hartmann 9842a8ef83 Add building luac.cross to travis ci builds (#2682)
Add building luac.cross to travis ci builds
2019-04-09 14:37:47 +01:00
Terry Ellison 9a47107920
SDK 3.0 release (#2692)
* Rebaseline firmware to non-OS SDK version 3.0
* Note that SDK version 3.0 introduces the concept of a Flash Partition Table(PT).  This is located at Flash offset 0x10000 in our firmware build.
* The firmware is now PT aware with both LFS and SPIFFS taking their partition size and location from the PT
* A new tool `tools/nodemcu-partition.py` is now used to initialise these data and can also download LFS and SPIFFS images to these partitions.
2019-04-05 16:01:45 +01:00
sergio d77666c0e8 trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
Arnim Läuger 09533fdf23 set default value for summary var to unbreak standalone builds (#2618) 2019-01-24 21:29:32 +01:00
Arnim Läuger 031fd0a913 Reduce default make verbosity (#2583) 2018-12-09 21:39:43 +01:00
Ryan Hartlage 8bb41fe93f Download pre-built toolchains (#2545)
* Download pre-built toolchains

* Updated to include the platform in the name of the pre-built toolchain

* Download archive into cache/

* Update Travis configuration to use pre-built toolchain via make
2018-12-03 13:24:19 +11:00
Gregor Hartmann 0a248cdfd7 Fix output filename of LFS image built in tools (#2459) 2018-08-15 10:48:23 +02:00