* added fadeIn, faceOut and shift to ws2812 module
* improvements to rotate, unified fade method
shift renamed to rotate and usage of more efficient memory operations.
fadeIn and fadeOut unified into fade method with optional parameter for direction.
* rename method to "shift" with optional mode parameter
Fixes#1164 and thus also #1150, #1149, #1147 and #898.
* Move to latest version of SPIFFS
* Add SPIFFS porting layer for NodeMCU
* Add option to delete output if it doesn't fit
* Change FLASHSIZE to be in bits by default: default 4mb 32mb
* Add SPIFFS_MAX_FILESYSTEM_SIZE override
* Add notes on SPIFFS_FIXED_LOCATION
* Add 1M boundary
* Include the current version of the LICENSE
- Stop fighting against the SDK in terms of owning/writing the init_data block.
NodeMCU included a default init_data block because originally the SDK did
not, but by now it's not needed.
- Expose a way to reconfigure the ADC mode from Lua land. With most people
using the cloud builder and not able to change the #define for byte 107
this has been a pain point.
- Less confusion about which init_data has been used. Lua code can now simply
state what mode it wants the ADC to be in, and not worry about the rest of
the init_data complexities such as the init_data changing location due to
flashing with wrong flash_size setting, or doing/not doing a chip-erase
before loading new NodeMCU firmware.
* Change upper limit for timer in `tmr_register` and `tmr_interval` to reflect new limit in SDK 1.5.3.
* Change documentation for `tmr.alarm()`, `tmr.interval()` and `tmr.register()` to match source.
* Improve error reporting to be more descriptive.
* Fix bug on first write
Pin is 'HIGH' at reset, so we need to pull it down and generate a
reset.
* Move init code to flash section, not needed to be in iram.
* Remove pin choice in API
* Remove lock in ws2812_buffer_write
* Remove naked malloc
* Drop ws2812_writergb
* Drop support of ws2812.buffers to ws2812_writegrb should use ws2812.buffers:write
* Add support for <>3 colors per leds strips (RGBW)
* Remove ICACHE_FLASH_ATTR
* Add static const on _uartData to avoid initialization penalty
* Provide an error code to SNTP error callback.
* Switch SNTP to use ephemeral port.
In case we're being hit by ISP-level thou-shall-not-run-NTP silliness.
Merging as suggested by @TerryE (and squashing at the same time. Turns out that this feature is enabled for this repo).
* Squashed commit of the following:
commit f985f10d9d2ee035f5a6ee6245c60d9904d98cc1
Author: philip <philip@gladstonefamily.net>
Date: Sun Mar 27 21:52:46 2016 -0400
Better mdns code
commit 6ee49ee106
Author: philip <philip@gladstonefamily.net>
Date: Fri Mar 25 23:25:11 2016 -0400
Update the docs
commit 7e455541c6
Author: philip <philip@gladstonefamily.net>
Date: Thu Mar 24 21:58:16 2016 -0400
Add retries and buffer checking to mdns
Get the length right
Now it seems to work
* Might work for combined mode
* Fix crash
* Simplified various bits of code. Changed the LUA interface
Added checking (to some degree) incoming quyery types
Move the defaults to the right place
Added reference to the RFC`
Implement SDK event monitor
Move wifi status event monitor code into seperate file
(app/modules/wifi_eventmon.c)
Modify wifi lua callback registration code.
Add Functions wifi.ap.deauth and wifi.sta.getrssi
Rework wifi event monitor to use tasking interface
fix for Lua coroutine compatibility issue
Made changes Suggested by TerryE
Also, moved code that sets the default host name out of
luaopen_wifi_init and into a separate function and added a post_task_low
entry in it's place.
Replaced some if test then return error lines with
luaL_argcheck
Add check for malloc null return in wifi.eventmon
to catch out of memory errors
Due to the hard-close, the status message did not get sent out reliably.
Connection closing logic now reworked to be nicer, while still avoiding
the problem of lots of connections lingering in fin_wait.
Shutting down an espconn server safely is impossible, and currently would
include at least one use-after-free. Even with that patched, at best this
would change things from impossible to "very tricky".
The native LWIP API does not have those issues, and is still quite easy
to work with.
A single bug is fixed, a few features are added and overall the codebase has been worked through.
- Added support for calls to /generate_204 that let's android know that the internet is accessible.
- Added 10 second delay to the shutdown call to allow a final status update to be fetched by the client.
- Added iframe to html to avoid having a form submission change the page.
- Added support for dynamic /status responses.
- Improved HTML appearance by removing AP-list button.
- Improved CSS to center form, even when list of access points have loaded.
- Improved debug prints to contain line numbers and not require lua_State*.
- Fixed broken failure check when calling wifi_station_connect().
- Fixed unguarded malloc().
Also changed wifi.sta.eventMonStop("unreg all") to
wifi.sta.eventMonStop(1) and wifi.sta.eventMonReg(wifi.status, "unreg")
to wifi.sta.eventMonReg(wifi.status)
Squashed commit of the following:
commit 4439b8c45192f6dee1222df78bbb59f74509e0ee
Author: philip <philip@gladstonefamily.net>
Date: Sun Mar 6 20:23:21 2016 -0500
Fix the ignore
commit a07ee5acdf91286607c3e2dce128c9b8bfd7bd80
Author: philip <philip@gladstonefamily.net>
Date: Sun Mar 6 20:20:41 2016 -0500
Remove uneeded stuff
commit b3604ace92fc13b30161d385c354b0f1c5fe4046
Author: philip <philip@gladstonefamily.net>
Date: Sun Mar 6 20:15:26 2016 -0500
Remove client cert auth
commit 6e48c633569630736a986cd07a59a12de954391e
Author: philip <philip@gladstonefamily.net>
Date: Sun Mar 6 20:11:42 2016 -0500
More cleanup
commit d40eade405ef071d0d1b60d038566b5b8f2cafa3
Author: philip <philip@gladstonefamily.net>
Date: Sat Mar 5 10:56:56 2016 -0500
Move to almost working version
commit 1860a2d90afa94461c53bd41251d4870d6527f9d
Author: philip <philip@gladstonefamily.net>
Date: Fri Mar 4 08:04:09 2016 -0500
Changed the naem to server-ca.crt
commit e7a315660843273fe62943b7fe8ee6c0541dada2
Author: philip <philip@gladstonefamily.net>
Date: Thu Mar 3 21:16:26 2016 -0500
Update gitignores
commit 2b037d185c396209b64381399c40821c15e1840e
Author: philip <philip@gladstonefamily.net>
Date: Thu Mar 3 08:56:17 2016 -0500
Getting better
commit 763255cffba8e279158cd7f43391a3573efdeca8
Author: philip <philip@gladstonefamily.net>
Date: Wed Mar 2 22:28:21 2016 -0500
Works a bit better
commit a38325d1a47dbad255cb3e681da8415e8cf699ea
Author: philip <philip@gladstonefamily.net>
Date: Wed Mar 2 09:11:04 2016 -0500
First building version
commit 4aef13da33470ed954f2eaf5f7ac0ac3dcdf3774
Merge: 180e147 ebb0c33
Author: philip <philip@gladstonefamily.net>
Date: Tue Mar 1 22:03:06 2016 -0500
Merge remote-tracking branch 'upstream/dev' into ssl-client
commit 180e147c1abdcf4046ad9be9b3c1a48f4a875312
Author: philip <philip@gladstonefamily.net>
Date: Sun Feb 28 21:34:21 2016 -0500
Missing files from espressif
Try to imporve layout
Align the file names with the contents
Missing file
Review comments
More review coments
- Process the CONNACK message received from the broker after Connect
- Provide feedback to Lua via failure callback on client:connect()
- Also provide failure information for other situations not covered by CONNACK
commit 2c7c3fc3985cc32866e8af496abea9971eaee90a
Merge: 9179dae 41022c3
Author: philip <philip@gladstonefamily.net>
Date: Sun Feb 28 14:47:47 2016 -0500
Merge remote-tracking branch 'upstream/dev' into rotary_2
commit 9179dae0824e6b35ad09e5113aacc26dc91692c0
Author: philip <philip@gladstonefamily.net>
Date: Fri Feb 26 20:53:27 2016 -0500
Review comments
commit 67741170e20ccb2b636e701f0664feff2aafbb4c
Author: philip <philip@gladstonefamily.net>
Date: Fri Feb 26 20:59:49 2016 -0500
Squashed commit of the following:
commit 8c9a64731c4a8b9aedda18a399b433b173d2199f
Merge: 085935f 19d3c1d
Author: philip <philip@gladstonefamily.net>
Date: Fri Feb 26 20:58:10 2016 -0500
Merge remote-tracking branch 'upstream/dev' into rotarymod
Conflicts:
app/platform/platform.c
commit 085935fc56986d607ff5e05d1663970331959c34
Author: philip <philip@gladstonefamily.net>
Date: Fri Feb 26 20:53:27 2016 -0500
Review comment
commit 7732fd2d1044f28b8fcf5b0aa0f76d76fe80f449
Author: philip <philip@gladstonefamily.net>
Date: Sat Feb 20 12:10:38 2016 -0500
Module to handle rotary decoders
Eliminate ROTARY_DEBUG
Remove unused file
Eliminate a malloc call
Cleaned up the register code. Now 0x114 bytes
Fix bug with clearing bits in one case
Fix the type in the #define name
1) Signal incorect reading when the sensor is disconnected.
2) Reset humidity oversampling settings when calling `bme280.startreadout()` - if the sensor is reconnected and readouts are in forced mode there is no need to re-initialize the sensor (`bme280.init()`).
AFAIK no one uses the wifi.startsmart() and wifi.stopsmart(). Removing
them frees up an extra 20-25K of Flash to use as filesystem. So I have
added a new config define WIFI_SMART_ENABLE which is enabled by default
so the default functionality is the same, but if this is commented out
then this code is omitted.
I have also removed wofs and upgrade from this build as we no longer
support these.
Squashed commit of the following:
commit f1820af82bb5467d0c79c03290fca809b0273030
Author: philip <philip@gladstonefamily.net>
Date: Sun Feb 21 15:08:31 2016 -0500
Now uses userdata
commit 74a2298f5f2d2b07097a9501046efb8d4061ec5e
Merge: 4ffab15 716e682
Author: philip <philip@gladstonefamily.net>
Date: Sun Feb 21 13:54:40 2016 -0500
Merge remote-tracking branch 'upstream/dev' into performance
Conflicts:
app/platform/hw_timer.c
app/platform/hw_timer.h
commit 4ffab15a2a15e0c6b2d7e93611a02be47bafdc79
Author: philip <philip@gladstonefamily.net>
Date: Fri Feb 12 17:36:12 2016 -0500
Simple low level performance monitoring tool
Make it work with the new hw_timer code
commit 944db2bdb8
Author: philip <philip@gladstonefamily.net>
Date: Sun Feb 14 10:32:41 2016 -0500
Initial version of the hw_timer as part of the platform
Addressed review comments
Add the binsize return
As with the last commit this rolls up the follwowing, but include the various
review comments on the PR.
- **Documentation changes**. I've added the taks FAQ as a stub new Extension
developer FAQ, and split the old FAQ into a Lua Developer FAQ and a Hardware
FAQ.
- **Tasking I/F**. New `app/task/Makefile`, `app/task/task.c`,
`app/include/task/task.h` and `app/Makefile` as per previous commit. Cascade
changes to `app/driver/uart.c`, `app/include/driver/uart.h`,
`app/user/user_main.c` and `app/modules/node.c`
- **GPIO Rework** to `app/modules/gpio.c` and `pin_map.[hc]`, `platform.[hc]`
in `app/platform`
- **Other Optimisations** Move the `platform_*_exists()` from
`app/platform/common.c` to static inline declarations in `platform.h` as
this generates faster, smaller code. Move lgc.a routines out of iram0.
packed structures in strings. Very useful for network protocol
packing/unpacking. The docs are directly converted from the original.
Review feedback
Fix typo
Fixes:
* Removed spurious \0 bytes being sent to the client in many cases.
* Properly terminated 404 header.
* Now including Content-length: header for index.html (including built-in).
Clients otherwise had to wait for their own timeout before considering
the page load complete, which resulting in an unpleasant sluggish
experience.
* Switched form submission to GET, as iOS sometimes does not include the
body in the same packet as the POST header, which led to the module
not finding the form values.
* Added redirect after form submission to avoid blank-page-in-browser.
* Moved common "enduser_setup" prefix to a lua_pushfstring() to reduce
string literal overhead.
* Replaced cached lua_State* with calls to lua_getstate(), as in other
modules.
* Fixed broken appending of MAC to the SSID.
* Fixed up macro definitions to not break `if` clauses unintentionally.
Enhancements:
* Support for scanning for available WiFi networks, and picking from the list.
* Support for retrieving the current WiFi station status.
* Added "manual" mode, where the module does not (re)configure the AP setup,
nor shut down automatically. Default is still automatic, as before.
* Updated docs for new `enduser_setup.manual()` function.
To create a size led long buffer:
buffer = ws2812.newBuffer(size);
To fill the buffer:
buffer:fill(g, r, b)
To get a particular led color:
g, r, b = buffer:get(index)
To set a particular led color:
buffer:set(index, g, r, b);
To send the buffer:
buffer:write(pin);
Module creation & registration now made a lot simpler. In essence,
each module file is now self-contained and only needs a
NODEMCU_MODULE(MYNAME, "myname", myname_map, luaopen_myname);
line to both be automatically recognised by the Lua initialization
as well as honor the LUA_USE_MODULES_MYNAME #define.
As per #810 & #796, only LUA_OPTIMIZE_MEMORY=2 & MIN_OPT_LEVEL=2 are
supported when building. This commit effects that limitation.
With this change modules/auxmods.h no longer needs to be updated for
every new module, nor do module writers need to cater for a hypothetical
LUA_OPTIMIZE_MEMORY < 2 scenario.
With the new SDK soft-wdt it is no longer sufficient to tickle the hardware
watchdog, so all (found) instances have been changed to system_soft_wdt_feed().
The module will start a SoftAP, DNS, HTTP server acting as a captive portal.
The portal will have the SSID SetupGadget and will serve a website where
credentials for the end users WLAN can be submitted.
Once valid credentials have been submitted and used to connect to the
local WLAN this module will stop.
This module requires USE_DNS to enabled in dhcpserver.h
Also made the cache on/off configurable via user_config.h. Uncached writes
are not a very good idea, but for read-only deployments a further ~0.5k RAM
can be gained by disabling the cache.
Tweaked the file.read() workhorse to read large chunks at a time rather
than use getc(), to compensate for potential unavailability of cache.
- Fixes the "first led problem" (#534#487).
- Adds support for 160MHz mode.
- Optimized timings. Time to write pixels is reduced by about 25%
This is useful when having a large amount of chained LEDs (>500).
The rtcfifo module uses RTC memory to store sensor samples across deep-sleeps,
making it possible to batch up samples for less frequent uploads. This
component uses 9 RTC memory slots for control, and a variable number of
slots for sample storage (see rtcfifo.prepare() on how to control the
size/location of the latter).
When used together with the rtctime module, it also exposes the convenience
function rtcfifo.dsleep_until_sample() which can be used to easily take
readings on a regular basis without having to manually take into account
time spent awake to get an accurate sleep time.
The format used for storing samples is quite dense, and allows for 16 bits
of data in a fixed point format (per sample).
Added Lua module rtctime to interface with it.
This keeps as accurate time as is possible on the ESP8266, including across
deep sleeps (provided rtctime.dsleep() is used rather than node.dsleep()).
Intended to be used together with NTP for high accuracy time keeping. The
API is via rtctime.{get,set}timeofday(), working from Unix epoch.
Note that 160MHz CPU clock is not currently supported by the rtctime code,
as it is only aware of the 52MHz boot clock and the regular 80Mhz default
clock.
See rtctime.h for detailed info on how this all works.
If NodeMCU can't connect Wi-Fi, please use it.
After reboot, all will be OK.
RESTORE ITEMS:
wifi_station_set_auto_connect, wifi_set_phy_mode, wifi_softap_set_config, wifi_station_set_config, wifi_set_opmode.
Add the original ws2812.write() function which does not scramble the
buffer while preserving the 'new' ws2812.writergb.
With this everybody should be happy again