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
packed structures in strings. Very useful for network protocol
packing/unpacking. The docs are directly converted from the original.
Review feedback
Fix typo
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.
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
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.