Henk Vergonet
a1c1e015ff
Add i2c based module for am2320 humidity sensor
...
Example use:
> sda=1
> scl=2
> am2320.init(sda,scl)
> rh, t = am2320.read()
> print(string.format("Temperature: %s degrees C", t / 10))
> print(string.format("RH: %s %%", rh / 10))
signed-off-by: henk.vergonet@gmail.com
2016-02-14 15:12:42 +01:00
jfollas
d4ae67d0b4
Changed filename length error handling per TerryE's suggestion
2016-02-13 18:58:04 -05:00
jfollas
44786a22ff
Added file.exists() method to save the need to use file.list() for checking file existence
2016-02-13 17:37:04 -05:00
philip
0e9a0d43d4
Direct port of the struct module that provides access to
...
packed structures in strings. Very useful for network protocol
packing/unpacking. The docs are directly converted from the original.
Review feedback
Fix typo
2016-02-13 08:32:25 -05:00
Marcel Stör
2c687313de
Merge pull request #1002 from pjsg/mqtt
...
Fix memory exhaustion in mqtt under circumstances from issue #975
2016-02-10 12:58:26 +01:00
Marcel Stör
2e37a52aaa
Merge pull request #1030 from devsaurus/spi_pinconfig
...
Enable spi functionality on pins after internal config has been applied.
2016-02-10 07:06:13 +01:00
devsaurus
5d8848ecaf
Enable spi functionality on pins after internal config has been applied.
2016-02-09 23:26:40 +01:00
devsaurus
dc2e1efefb
Extend data type for spi miso/mosi buffer offset to 16 bit.
2016-02-09 22:05:05 +01:00
Arnim Läuger
25585672ae
Merge pull request #1014 from urish/patch-1
...
Fix secure TCP connections for `net` and `mqtt` modules.
2016-02-07 19:51:32 +01:00
Uri Shaked
31a62a9eb1
Fix secure MQTT connections
...
Call `espconn_secure_set_size()` before calling `espconn_secure_connect()`, similar to how the http module works
2016-02-07 18:11:30 +02:00
Arnim Läuger
d760a5e29c
Merge pull request #940 from devsaurus/dev-ssd1327
...
implement architecture dependent delay functions for u8glib
2016-02-06 21:46:01 +01:00
Uri Shaked
ce498462f7
Fix secure TCP connections
...
Call `espconn_secure_set_size()` before calling `esp_secure_connect()`, should fix issues like #710 and #520
2016-02-06 17:12:46 +02:00
cheloftus
58dd15e1d1
Added crypto.fhash function for hashing files
2016-02-05 22:19:00 +00:00
philip
c9cf02ba31
Send any queued packets when possible
2016-02-01 22:29:32 -05:00
Johny Mattsson
fcb14a33b3
Merge pull request #987 from DiUS/enduser_enhanced
...
Enhancements to enduser_setup module
2016-02-02 00:39:47 +11:00
Johny Mattsson
86839d6e71
Fixes and enchancements for enduser_setup module.
...
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.
2016-02-01 14:42:24 +11:00
philip
76b28c1f74
Simple mdns implementation using the Espressif code
2016-01-29 21:37:19 -05:00
devsaurus
8db93bcabf
make delay optional
2016-01-29 18:52:38 +01:00
devsaurus
3a597f1698
implement architecture dependent delay functions for esp8266 port
2016-01-29 18:52:38 +01:00
devsaurus
1c32d20502
improve error checking in mqtt module
...
connect(), close(), subscribe(), publish()
2016-01-28 21:36:38 +01:00
Johny Mattsson
9fd215b028
Corrected sprintf() prototype & behaviour.
2016-01-28 17:56:01 +11:00
Johny Mattsson
74d27b3486
Merge pull request #968 from devsaurus/crypto_http_mqtt_lua-gnu11
...
Enable -std=gnu11 for crypto, http, mqtt, and lua dir
2016-01-28 17:36:27 +11:00
jfollas
edbcbe1b0f
Fixed issue where default ESP_xxxxxx SSID was appearing for enduser_setup
2016-01-27 10:24:10 -05:00
Johny Mattsson
9741f2c678
Merge pull request #977 from vowstar/fixed-http-1-1
...
Fix HTTP response bug while server only support HTTP/1.0
2016-01-27 10:51:48 +11:00
Robert Foss
6ef7ece046
Cleaned up APA102 module registration.
2016-01-26 17:14:19 -05:00
Huang Rui
1a20f2eda8
Fix HTTP response bug while server response HTTP/1.0
...
Signed-off-by: Huang Rui <vowstar@gmail.com>
2016-01-26 16:06:11 +08:00
Robert Foss
0f3c0ffbb0
Added support for the APA102 LED.
2016-01-25 20:54:27 -05:00
Huang Rui
5e2eb3588c
Fix redefine bug on some other version SDK(such as espressif's lubuntu environment)
...
Signed-off-by: Huang Rui <vowstar@gmail.com>
2016-01-25 03:06:18 +08:00
devsaurus
cd06905b58
include user_interface.h to avoid implicit decls
2016-01-24 00:22:11 +01:00
devsaurus
f149b60c7f
enable -std=gnu11 for lua dir
2016-01-24 00:02:27 +01:00
devsaurus
b3b50646ef
enable -std=gnu11 for mqtt dir
2016-01-23 22:42:55 +01:00
devsaurus
19fda87e33
enable -std=gnu11 for http dir
2016-01-23 22:41:41 +01:00
devsaurus
8befcf0888
enable -std=gnu11 for crypto dir
2016-01-23 22:36:35 +01:00
Johny Mattsson
91b2533aa6
Merge pull request #965 from devsaurus/platform-gnu11
...
Enable -std=gnu11 for platform and driver dir.
2016-01-24 01:23:27 +11:00
Terry Ellison
85bd7bbeda
Merge pull request #951 from Alkorin/ws2812-uart
...
Rewrite ws2812 serialization code to use UART1 instead of bit-banging.
2016-01-23 10:42:56 +00:00
devsaurus
9f54c8f5d4
enable -std=gnu11 for driver dir with corrected os_printf* decls
2016-01-23 11:22:03 +01:00
devsaurus
0c3fc6cc78
enable -std=gnu11 for platform dir
2016-01-22 23:21:34 +01:00
Arnim Läuger
3b589e2177
Merge pull request #958 from DiUS/modules-gnu11
...
Enable -std=gnu11 for modules dir.
2016-01-22 23:20:29 +01:00
Johny Mattsson
0cd287e67b
Added -Wimplicit to modules build.
...
Plus associated fixes.
2016-01-22 10:55:57 +11:00
Terry Ellison
a4e7885a6e
Merge pull request #923 from DiUS/spiffs-alignment-fix-915
...
Ugly workaround for broken SPIFFS GC alignment.
2016-01-20 09:48:47 +00:00
Johny Mattsson
182d45f928
Enable -std=gnu11 for modules dir.
...
Plus boat-load of fixes to actually make that build.
2016-01-20 19:40:47 +11:00
Johny Mattsson
5b381d2f1e
Added AES support to crypto module.
...
Merely a wrapper around the (undocumented) internal SDK AES functions.
2016-01-19 15:19:11 +11:00
Thomas Soëte
47b44229bf
ws2812 data buffer
...
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);
2016-01-18 17:21:08 +01:00
Thomas Soëte
51bb8a50ba
Rewrite code to use UART1 instead of bit-banging.
...
It allows keeping interrupts enabled but force to use GPIO2.
2016-01-18 17:16:18 +01:00
Marcel Stör
82b19c4c37
Merge branch 'newdocs' into dev
2016-01-17 14:23:13 +01:00
Terry Ellison
7e8c54890f
Merge pull request #878 from dnc40085/dev_wifi_sta_Xethostname
...
Add functions: wifi.sta.sethostname and wifi.sta.gethostname
2016-01-15 08:56:37 +00:00
Johny Mattsson
52e121f469
Merge pull request #887 from vowstar/dev-all-in-one
...
Add HTTP client module and documents.
2016-01-15 17:44:41 +11:00
Johny Mattsson
30f8f62420
Optimized node.bootreason() for size.
...
Reduces the size from 179 to 102 bytes.
2016-01-15 11:42:20 +11:00
Konrad Beckmann
d426976e60
BMP085: bmp085.init() should return 0
2016-01-14 22:23:03 +01:00
philip
dc5cc6d9f4
Add the exccause parameter into the bootreason block
2016-01-14 08:16:26 -05:00
Johny Mattsson
2d82e622b6
Merge pull request #890 from vowstar/dev-fix-flash-api
...
Update flash_api due to flash size map is redefined by espressif.
2016-01-14 17:00:50 +11:00
Johny Mattsson
9772e7cdec
Merge pull request #888 from dnc40085/patch-1
...
Fix problem in wifi.sta.getap where invidual result is lost.
2016-01-14 16:49:20 +11:00
jfollas
bf74b617d0
SPI: Implemented CPOL=1
...
Reference: http://bbs.espressif.com/viewtopic.php?f=49&t=1570
2016-01-13 22:39:15 -05:00
philip
dd5dafa99e
Merge remote-tracking branch 'jmattsson/tmr-libmain-binpatch150' into sdk1.5.1
...
Conflicts:
Makefile
2016-01-13 07:54:27 -05:00
Philip Gladstome
1d9336fb99
Upgrade to SDK version 1.5.1 from Espressif
2016-01-12 21:05:47 -05:00
Johny Mattsson
57917601b7
Expose extended reset info via node.bootreason().
2016-01-12 17:29:46 +11:00
Johny Mattsson
58427563ed
Ugly workaround for broken SPIFFS GC alignment.
...
Proper fix should be done upstream and pulled in once available.
2016-01-12 17:24:02 +11:00
Johny Mattsson
3fb0de859f
Range check the tmr interval value.
...
Plain SDK 1.5.0 bugs out for values >6871948 or so - this commit does
not do anything to mitigate that.
2016-01-10 18:10:03 +11:00
Johny Mattsson
0b2d90300a
Remove left-over cruft regarding Lua mem opt.
2016-01-06 10:38:58 +11:00
dnc40085
c2f2bbd92a
Fix problem in wifi.sta.getap where invidual result is lost.
2016-01-03 20:02:50 -08:00
dnc40085
fcbf58cf0d
Rewrote wifi_sta_gethostname in wifi module.
2016-01-02 19:43:40 -08:00
dnc40085
b2190e4d7b
Added functions: wifi.sta.sethostname and wifi.sta.gethostname and
...
option to set hostname in user.config.h
2016-01-02 18:34:40 -08:00
dnc40085
cb0a982dc3
Minor change to node module
...
node.dsleep was using sint32 to hold sleep time when it should be using
uint32
2016-01-02 03:10:27 -08:00
Terry Ellison
2f655deeca
Merge pull request #885 from jmattsson/sdk150bin
...
Upgrade to SDK 1.5.0 + Espressif's Open LWIP 1.5.0.
2016-01-01 22:30:22 +00:00
Huang Rui
f2e6c9366b
Sync flash_api.c with flash_api.h
2015-12-30 09:49:01 +08:00
Huang Rui
7737d36f24
Update flash_api.h due to flash size map is redefined by espressif.
2015-12-30 09:46:43 +08:00
Huang Rui
88bae3ed22
Remove all version data and combine 33 commits to 1.
...
Add http module and documention, including fix httpclient bug.
2015-12-29 19:25:37 +08:00
devsaurus
20629386ca
fix parameter access for ucg.getStrWidth()
2015-12-28 15:22:09 +01:00
Johny Mattsson
a6c0873a28
Upgrade to SDK 1.5.0 + Espressif's Open LWIP 1.5.0.
...
Removed earlier TCP port randomisation fix - the new SDK has its own fix
even though Espressif told me they wouldn't fix it. Yay?
2015-12-23 11:17:05 +11:00
devsaurus
6cbe716db0
uart: fix parity and stopbit generation
2015-12-21 17:51:43 +01:00
Robert Foss
672c396c69
Fixed compilation error when the enduser_setup module is disabled yet requires ENDUSER_SETUP_AP_SSID to be defined.
2015-12-20 22:50:36 -05:00
Terry Ellison
1462d00e9f
Merge pull request #842 from jmattsson/module-ltr-cleanup
...
Cleanup: LTR module registration
2015-12-19 23:22:18 +00:00
Johny Mattsson
9003d3e8fb
Rework NODEMCU_MODULE() to not pull in extra gunk.
...
Third time lucky. I hope. Hi Terry.
2015-12-18 13:10:48 +11:00
Johny Mattsson
6d82f8da9d
Merge pull request #857 from devsaurus/dev-spi_cpol
...
SPI: cpol=high is not implemented due to insufficient hw docs
2015-12-17 12:57:25 +11:00
Johny Mattsson
7e02935a27
Deal with ld's overly eager discarding of globals.
2015-12-17 12:37:01 +11:00
devsaurus
5e9bf95ccc
cpol=high is not implemented due to insufficient hw docs
2015-12-16 22:23:04 +01:00
Terry Ellison
53ee80e3aa
Merge pull request #841 from jmattsson/flash-addr-cleanup
...
Cleanup/minor correction: Flash addr cleanup
2015-12-16 10:53:58 +00:00
Johny Mattsson
fd9113124c
Corrected the 4-page alignment for start of fs.
2015-12-16 18:59:55 +11:00
Johny Mattsson
4e8ef87d03
Reworked module registration, removed modules.h
...
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.
2015-12-16 16:09:16 +11:00
TerryE
b773290b8c
Major cleanup of module registration pass 2.
...
carrying on Johny's edits as per my comments on #810
2015-12-16 11:21:40 +11:00
Artem Pastukhov
5cb27f89ae
Add ImageMagic info.
2015-12-15 09:35:20 +03:00
Artem Pastukhov
6009602382
Some polish
2015-12-14 11:41:10 +03:00
Artem Pastukhov
4b0cec1757
* Add u8glib readme.
2015-12-14 11:34:11 +03:00
Terry Ellison
0386ae6559
Merge pull request #804 from DiUS/panic
...
Do not allow execution to continue after a PANIC
2015-12-12 15:36:00 +00:00
Johny Mattsson
6b6456be47
Major cleanup of module registration.
...
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.
2015-12-12 15:03:40 +11:00
Johny Mattsson
d84a24fc9a
Proper cached-flash to phys address translation.
2015-12-12 13:20:22 +11:00
Johny Mattsson
c4e8b04fbf
Cleaned up all uses of INTERNAL_FLASH_START_ADDRESS.
...
There was only one genuine use of this macro, all other places were
using it only as a necessary compensation. While this was fine as long as
it was the first meg of flash which was mapped, it became incorrect and
quite dangerous whenever this assumption did not hold (such as when
running from the second slot in an OTA scenario).
The flash API now uses actual addresses, not translated/mapped
addresses, and the users of this API have been adjusted accordingly.
This makes the flash API work correctly regardless of what flash mapping
is in use.
The old macro is still available under the new name
INTERNAL_FLASH_MAPPED_ADDRESS, and this is used to detect flash writes
where the source is mapped flash (and thus has to be bounced), and to
adjust the _flash_used_end linker symbol when used with
flassh_find_sector() by the filesystem code. The latter usage is not
OTA-proof, but in an OTA scenario the filesystem needs a fixed location
anyway and thus would not use this code path.
2015-12-12 13:20:22 +11:00
Nick Andrew
e9ee9a57d1
Remove the lobject.c:88 assertion failures
...
When lua assertions are enabled, normal operation results in many:
lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)
lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)
lobject.c:88: (((t1)->tt) == 4)
lobject.c:88: (((t2)->tt) == 4)
It comes from using the pvalue() macro for 3 pointer types, where
pvalue() also checks the type of pointer and complains through the
assertion where the type == 4 (TLIGHTUSERDATA).
Use the correct macro according to the type of data being compared
to eliminate this assertion error.
Signed-off-by: Nick Andrew <nick@nick-andrew.net>
2015-12-06 01:42:29 +11:00
TerryE
e71a2dd64a
Fix ECG case in concat where stack top not recalculated
2015-12-03 19:16:30 +00:00
Terry Ellison
32b2911263
Merge pull request #746 from DiUS/vdd33
...
Remove adc.readvdd33() limitation.
2015-12-01 23:37:53 +00:00
Johny Mattsson
e9e2efc443
Merge pull request #794 from btsimonh/btsimonhdev
...
Added uart.alt(n) to swap to use alternate rx/tx lines.
2015-12-01 21:35:09 +11:00
Johny Mattsson
6acd91810f
Merge pull request #776 from askainet/net_dns
...
Make net.dns.resolve and net.dns work with an IP address as the hostname
2015-12-01 21:24:05 +11:00
Johny Mattsson
0fbf442158
Do not allow execution to continue after a PANIC!
...
It really does not improve things...
2015-12-01 18:11:38 +11:00
btsimonh
b2345857e9
Added uart.alt(n) to swap to use alternate rx/tx lines.
...
if n = 0 -> std pinout.
if n != 0 -> alternate pinout (gpio13 and gpio15)
2015-11-28 22:51:01 +00:00
Johny Mattsson
33e41a633e
Merge pull request #787 from TerryE/dev-onewire
...
Merge Onewire changes from Master into Dev
2015-11-24 11:05:40 +11:00
Johny Mattsson
455f0f2166
Merge pull request #779 from askainet/sntp_dns
...
Make sntp.sync work with DNS hostnames
2015-11-24 11:03:37 +11:00
TerryE
583049f620
Merge Onewire changes from Master into Dev
...
Master contained two OW changes one of which was already reimplemented in dev using the
correct macros. The second was from hazarkarabay (f6d0c0c
) that onewire_search()
returns a device address vector even when no device is found. I've reimplemented this
but using the correct index, rom_byte_number, rather than declaring a new temp index i.
2015-11-23 01:23:41 +00:00
devsaurus
1c2fad5330
re-add detection of CR as newline
2015-11-22 13:00:40 +01:00
Arnim Läuger
b216e6a809
Merge pull request #777 from devsaurus/dev-cr
...
Skip CR in interactive mode
2015-11-20 22:56:12 +01:00
Terry Ellison
7460f034ea
Merge pull request #780 from marcelstoer/dev-order-modules-list
...
Order modules list alphabetically
2015-11-19 23:47:21 +00:00