Commit Graph

1658 Commits

Author SHA1 Message Date
Arnim Läuger c57af8972f Rework support for >4MB modules: place SPIFFS after SDK data (#1646) 2016-12-26 14:17:57 +01:00
Philip Gladstone 543f438b6b Added node.random implementation (#1665) 2016-12-26 14:14:49 +01:00
Marcel Stör 7c9fdef77a Tiny formatting fix 2016-12-25 16:10:31 +01:00
Philip Gladstone feab8b2208 Various minor bits of cleanup (#1647)
* Check the return code of the read function when doing crypto.fhash so that we don't pass negative lengths to the hashing functions
*  Fix various assert failures in the LVM arising from rotables. No functional change
* Add the gpio interrupt time to the callback (and pass it from the interrupt handler)
* Get the PC right in the perf module
* Make the headers static in the websocket module
* Fix the documentation
2016-12-25 10:45:34 +11:00
kicer 118acb808e Fix crypto.mask() to encode with correct mask (#1677) (#1678)
Thank you.
2016-12-23 12:03:02 -05:00
Marcel Stör 1452fbfd13 Fix list formatting 2016-12-23 13:43:52 +01:00
Marcel Stör 680d349039 Fix list formatting 2016-12-23 12:59:46 +01:00
Johny Mattsson c5c0143b2f rtctime.dsleep() current draw improvements (#1659)
* Switch off interrupts before rtctime dsleep.

* Deal with the fact that MCU keeps running after being told to enter deep sleep
(It can keep running for quite a few instructions at times (and none at
all at others), and it appears that trying to cache additional code from
SPI flash while trying to go to sleep fails miserably at both....)

* Ensure flash is not active when going into deep sleep.
2016-12-14 12:39:31 +01:00
Marcel Stör 1b8e9a33e5 Use constant for start_level 2016-12-14 08:07:23 +01:00
Marcel Stör d85f2638cd Fix grammatical mistakes 2016-12-14 07:34:00 +01:00
Arnim Läuger 84dc61f068 Minor formatting fix in bme280.md 2016-12-11 22:34:28 +01:00
vsky d56b4ef2e6 BME280: improved reliability and efficiency (#1662)
* BME280: improved reliability and efficiency

* BME280: new parameter to bme280.init() and new bme280.read() method documented
2016-12-11 22:31:39 +01:00
Yury Popov bdd54648f4 Upgrade to SDK 2.0.0 (#1435)
* Update LWIP from SDK
* mbedTLS integration
* Fix argument type in dbg_printf (#1624)
* Migrate to espressif’s download center (#1604)
* Fixed BBS links to firmware
* Adjust net module docs with mbedTLS info
* Remove unrelevant axTLS notice
2016-12-11 21:03:00 +01:00
Philip Gladstone 017b4637c2 Adds uart.getconfig(0) to get the current uart parameters (#1658) 2016-12-11 20:35:04 +01:00
vsky 12a7b1c239 BME280: fixing humidity trimming parameter readout bug (#1652) 2016-12-09 21:19:58 -05:00
Marcel Stör c8176168ea Add note about how to merge master-drop PRs 2016-12-07 22:57:27 +01:00
Jonathan Karras 063cb6e7f2 Add lua.cross to CI tests. (#1649) 2016-12-06 07:28:43 +01:00
Philip Gladstone 384cfbec80 Fix missing dbg_printf (#1648) 2016-12-06 07:17:47 +01:00
Philip Gladstone 79013ae79a Improve SNTP module: Add list of servers and auto-sync [SNTP module only] (#1596) 2016-12-04 21:03:49 +01:00
Arnim Läuger ea7ad21318 move init_data from .text to .rodata.dram section (#1643) 2016-12-04 20:19:51 +01:00
Marcel Stör 11ded3fc9a Update collaborator section 2016-12-01 22:44:39 +01:00
ffedoroff 9f9fee9008 add new rfswitch module to handle 433MHZ devices (#1565) 2016-12-01 22:19:01 +01:00
Yury Popov 83eec61874 Fix iram/irom section contents (#1566) 2016-12-01 22:14:20 +01:00
Philip Gladstone 00b356be84 HTTP module can now chain requests (#1629)
* Fix up the HTTP module to use less memory
2016-12-01 22:13:33 +01:00
Jason Follas a48e88d4a3 EUS bug fixes (#1605)
- Bug fixes and improvements
- FIX: Ensure that station is enabled before doing network scan (this seems to be the cause of #1578)
- FIX: Check if state == NULL on enduser_setup.stop()
- IMPROVEMENT: Look for both enduser_setup.html.gz and enduser_setup.html as valid filenames, for semantic reasons
- IMPROVEMENT: Show a generic status message on HTML page if failure occurred before user even submitted data (i.e., would have come from previously stored config when the STA was started by EUS)
2016-12-01 22:12:47 +01:00
Marcel Stör 85c3a24927 Fix Somfy docs 2016-12-01 21:57:24 +01:00
Johny Mattsson 016f289f31 Merge pull request #1626 from tae-jun/patch-2
Fix typo at rtctime.md
2016-11-30 16:45:30 +11:00
Jun Kim 58321a9263 Fix typo at rtctime.md
rtctime.dsleep -> rtctime.dsleep_aligned
2016-11-29 22:41:15 +09:00
Marcel Stör 1032e9dd90 Extract and hoist net receive callbacks
This is done to avoid the accidental upval binding
2016-11-27 21:42:10 +01:00
Marcel Stör c54bc05ba6 Fix macro as suggested in #1548 2016-11-19 21:17:50 +01:00
Arnim Läuger c70dc7497e Handle error condition in file.read() (#1599)
* handle error condition in file.read()

* simplify loop initialization
2016-11-19 10:36:00 -05:00
Mariusz Kryński 59b9b3e26f support for custom websocket headers (#1573)
Looks good to me. Thank you.

Also:
 - allow for '\0's in received messages

* add client:config for setting websocket headers

Also:
 - headers are case-insensitive now

* fix docs

* fix typo

* remove unnecessary luaL_argcheck calls

* replace os_sprintf with simple string copy
2016-11-19 10:35:20 -05:00
Marcel Stör 6331e0868c Turn SPI busses note to admonition note 2016-11-17 21:25:33 +01:00
Mike Pye 9a30797ba2 Add note on dev board usage of SPI bus 0 (#1591) 2016-11-17 20:10:48 +01:00
Marcel Stör 1d0cf5e8d0 Virtual u8g display driver for RFB/VNC support (#1514)
* add u8g.fb_rle display
* move comm drivers to u8g_glue.c
* disable fb_rle per default
2016-11-14 13:40:45 +01:00
zelll 798759950f i2c - allow slave stretching SCL (just loop and check) (#1589) 2016-11-13 10:16:07 -05:00
Marcel Stör a168449619 Overhaul flashing docs once again (#1587)
* Add chapter about determine flash size plus small fixes
* Rewrite esptool.py chapter, move flash size chapter to end
2016-11-12 20:20:46 +01:00
Marcel Stör 1e955caf26 Fix link 2016-11-10 21:31:49 +01:00
Arnim Läuger fdc766be9f fix vfs_lseek() result checking in enduser_setup and clarify SPIFFS_lseek() return value (#1570) 2016-11-08 22:27:12 +01:00
Jason Follas 058777ea60 Eus channelfix (#1583)
Squashed commits included:

Bug fixes and final implementation
- Added Content-Length: 0 to all headers
- Endpoint name checks not using trailing space so cache-busting techniques can be used (i.e., append a nonce to the URL)
- Track when connecting so APList scan doesn't take place during (which changes the channel)
- More debugging output added to assist in tracking down some issues

Added /status.json endpoint for phone apps/XHR to get JSON response

Station Status caching for wifi channel workaround + AJAX/CORS
- During checkstation poll, cache the last station status
- Shut down the station if status = 2,3,4 and channel is different than SoftAP
- Add Access-Control-Allow-Origin: * to endpoint responses used by a service
- Add a /setwifi GET endpoint for phone apps/XHR to use (same parameters as /update endpoint). Returns a JSON response containing chip id and status code.
- Add handler for OPTIONS verb (needed for CORS support)

Wi-Fi Channel Issue Workaround
- Do a site survey upon startup, set SoftAP channel to the strongest rssi's channel
- Compare successful station connect channel to SoftAP's. If different, then defer the Lua success callback to the end. Shut down Station and start the SoftAP back up with original channel.
- After the 10 second shutdown timer fires, check to see if success callback was already called. If not, then call it while starting the Station back up.

HTTP Response and DNS enhancements
- If DNS's UDP buffer fills up, keep going as non-fatal. It's UDP and not guaranteed anyways. I've seen this occur when connecting a PC to the SoftAP and every open program tries to phone home at the same time, overwhelming the EUS DNS server.
- Support for detecting/handling pre-gzipped `enduser_setup.html` (and `http_html_backup`) payload. Nice for keeping the size of the `state->http_payload_data` as small as possible (also makes minimization not as critical)
- Corrected misuse of HTTP 401 response status (changed one occurrence to 400/Bad Request, and changed another to 405/Method Not Allowed)

* Normalized formatting (tabs-to-spaces)
* Added documentation
* Corrected misuse of strlen for binary (gzip) data.
* Added NULL check after malloc
2016-11-08 21:58:33 +01:00
Arnim Läuger a0e2e0ca37 Implement object model for files (#1532) 2016-11-08 21:02:51 +01:00
Philip Gladstone b74a9dbdf7 Make the MQTT PING functionality work better. (#1557)
Deal with flow control stopped case
2016-11-08 21:00:17 +01:00
dnc40085 73773fd8a5 Update to the wifi module (#1497)
* Removed inline documentation for several functions and update comments
Since documentation is now part of the repository, the inline
documentation just adds to the already huge wifi.c

* Wifi module: add new functionality, update documentation

Functions Added:
wifi.getdefaultmode(): returns default wifi opmode
wifi.sta.apchange(): select alternate cached AP
wifi.sta.apinfo(): get cached AP list 
wifi.sta.aplimit(): set cached AP limit
wifi.sta.getapindex(): get index of currently configured AP
wifi.sta.getdefaultconfig(): get default station configuration
wifi.ap.getdefaultconfig(): get default AP configuration

functions modified:
wifi.setmode: saving mode to flash is now optional
wifi.sta.config: now accepts table as an argument and save config to
flash is now optional
wifi.sta.getconfig: added option to return table
wifi.ap.config: save config to flash is now optional
wifi.ap.getconfig: added option to return table

Documentation changes:
- Modified documentation to reflect above changes
- Removed unnecessary inline documentation from `wifi.c` 
- Updated documentation for `wifi.sta.disconnect`to address issue #1480 
- Fixed inaccurate documentation for function `wifi.sleeptype`
- Added more details to `wifi.nullmodesleep()`

* Move function `wifi.sleeptype()` to `wifi.sta.sleeptype()`

* Fixed problem where wifi.x.getconfig() returned invalid strings when
ssid or password were set to maximum length.

* fix error in documentation for `wifi.sta.getapindex`

* Renamed some wifi functions
wifi.sta.apinfo -> getapinfo
wifi.sta.aplimit -> setaplimit 
wifi.sta.apchange -> changeap

also organized the wifi_station_map array
2016-11-06 20:51:01 +01:00
Philip Gladstone 77b2e85d09 Add support to mix ws2812.buffer objects. (#1575)
* Add load/dump/mix/power operations on the buffer object
* Calculate the pixel value in mix and then clip to the range.
* Fixed the two wrong userdata types
* Added a couple more useful methods
* Add support for shifting a piece of the buffer.
* Fix a minor bug with offset shifts
2016-11-05 13:53:42 +01:00
Marcel Stör cbe967d715 Update CONTRIBUTING.md 2016-11-02 23:08:33 +01:00
Arnim Läuger f0780e399e Add ssd1306_128x32 for U8G (#1571) 2016-10-30 00:19:04 +03:00
Marcel Stör 7c3f76009a Change HTTP failures from debug to error messages (#1568)
* Change HTTP failures from debug to error messages

* Add tag to HTTP error messages

* Create macro for error msg and improve dbg msg
2016-10-29 14:04:23 +02:00
Arnim Läuger 9db07783f4 Remove luaL_buffer from file_g_read() (#1541)
* remove luaL_buffer from file_g_read()
- avoid memory leak when function gets terminated by lua_error
- skip scanning for end_char when reading until EOF
* attempt to free memory in any case
2016-10-28 17:32:12 +03:00
Philip Gladstone 2227383843 Small improvement to http client (#1558) 2016-10-27 14:07:04 +03:00
Philip Gladstone ebb537c502 Version of printf that doesn't suffer from buffer overflows (#1564) 2016-10-27 09:38:47 +03:00