Commit Graph

845 Commits

Author SHA1 Message Date
FrankX e14dd7aba0 Adjust EUS to new SPIFFS (#1376) 2016-06-28 22:50:23 +02:00
Philip Gladstone 4a8abc2060 Add support for driving instrument gauge stepper motors (#1355) 2016-06-26 14:19:06 +02:00
moononournation 4aad34158b add 64m and 128m flash support (#1367)
* update esptool.py to v1.2-dev

* add 64 Mbit and 128 Mbit support
2016-06-26 14:16:39 +02:00
vsky f2d0195732 gpio.serout going asynchronous (#1359)
* gpio.serout going asynchronous

* fixing several issues following PR comments
2016-06-16 20:33:26 +02:00
Arnim Läuger d445ae97fb Enable spi clock_div < 4. (#1283) 2016-06-15 21:01:52 +02:00
Jonathan Karras 7ff8326cc9 Skip passing port in Host header if standard port. (#1362)
Some virtual hosts break if the port is added in the headers.
2016-06-15 12:45:39 +02:00
Konrad Hübner 500bbceded added fadeIn, faceOut and shift to ws2812 module (#1343)
* 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
2016-06-10 22:23:37 +02:00
Arnim Läuger d416648990 Add pcm module. (#1255)
* Add pcm module.
* Add network streaming example.
* document hw_timer dependency with pwm
* Add vu peak callback.
2016-06-05 23:21:36 +02:00
Philip Gladstone af39a0bc25 Upgrade to latest SPIFFS and add building of file systems (#1226)
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
2016-06-05 23:10:58 +02:00
Jason Schmidlapp e3f7e6321f Added support for STM L3G4200D digital gyroscope (#1251) 2016-06-05 23:00:37 +02:00
Jason Schmidlapp be10ccdb6b Added support for Analog Devices ADXL345 accelerometer (#1252) 2016-06-05 22:59:55 +02:00
Jason Schmidlapp bb9e210441 Added support for Honeywell HMC5883L digital compass (#1253) 2016-06-05 22:59:39 +02:00
dnc40085 4a1775c2e8 Fixed bug where default hostname is not set on boot when in SoftAP mode (#1341) 2016-06-05 13:38:12 +02:00
FrankX f4582e2499 EUS: add assigned IP address (#1313)
This change shows the assigned IP address when connected using EUS
2016-06-04 00:21:18 +02:00
Arnim Läuger ae873b70c6 Add caching for multi-byte transfers (#1247)
* add caching for multi-byte transfers
handle HSPI /CS in examples

* push similar code snippets into macro
2016-06-04 00:18:19 +02:00
Sebastian ecf74e5004 Added support for tm1829 baed led controllers (#1330) 2016-06-03 23:47:36 +02:00
dnc40085 2fdaa9b171 Moved call to set default wifi hostname (#1317)
Moved call from `luaopen_wifi (wifi.c)` to `user_rf_pre_init
(user_main.c)`
Note: This change adds ~440 us to boot time
2016-05-27 13:25:42 +02:00
Arnim Läuger 37411da06d Remove app/json. (#1312) 2016-05-27 11:53:21 +02:00
Philip Gladstone 2dacec156a Ensure that load_store exceptions trigger the exception handler (#1307)
Chain unhandled load_store exceptions to SDK exception handler
2016-05-27 12:14:02 +10:00
Arnim Läuger 2bb6e407a3 Initialize cb for unsubscribe and unref it upon socket deletion. (#1305)
Thank you.
2016-05-21 08:25:16 -04:00
Johny Mattsson 30d354c290 Rework ADC mode setting approach (#1285)
- 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.
2016-05-18 21:45:15 +02:00
dnc40085 1744372060 Updated tmr module and documentation
* 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.
2016-05-14 00:17:04 +02:00
Philip Gladstone f0c1034308 Send a multicast response for QM query and other mDNS fixes
* Send a multicast response if it is a QM query
* Use the NSEC record in the style which mDNS demands
* Shuffle the code a bit and allow sending of A response...
* Made the A record work
* Now gets TTLs right and (I think) handles multiple questions
2016-05-12 14:37:46 +02:00
philip 501ef9d566 Fix bugs with mqtt connection error handling 2016-05-09 22:04:23 -04:00
Thomas Soëte 0577c8af0f Finalize work on ws2812 module
* 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
2016-05-09 07:21:50 +02:00
Johny Mattsson 9a7a2c4dc3 Merge pull request #1184 from devsaurus/user-gnu11
Enable -std=gnu11 for user dir
2016-04-30 13:26:09 +10:00
devsaurus 8e11e895f5 move SPIRead to rom.h 2016-04-29 19:57:31 +02:00
Philip Gladstone 0472587c4c Added length checking (#1260)
Made the code clearer
2016-04-24 16:45:47 +02:00
Philip Gladstone 5b4b1e0388 Autobaudrate detection by default -- to reduce problems with speed change (#1215)
* Auto autobaud detection by default

* Added stopping the autobaud if explicitly configured

* Add note about auto-baud to the uart.md
2016-04-17 23:44:18 +02:00
Johny Mattsson f428897810 SNTP module enhancements (#1243)
* 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.
2016-04-15 12:49:18 +02:00
Philip Gladstone 61c2b4dfe3 Minimal changes to handle bad bodies (#1212)
Fix failure to compile

Move the check into the http module

Reverted change
2016-04-09 13:54:10 +02:00
Philip Gladstone 3a5e5f10e2 Take 2: Add regular sends to mdns. Check for (some) buffer overflows. Make it handle unicast
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`
2016-04-03 14:10:52 -04:00
Jason Follas e16204d4f4 Corrected SPI CPOL/CPHA relationships
* Corrected CPOL/CPHA relationships

* Simplified to remove duplicated code

* Removed comments about when MISO is sampled. ESP seems to sample MISO on same clock edge as when MOSI is set.
2016-04-02 19:26:07 +02:00
Johny Mattsson f3cc39c2a2 Merge pull request #1214 from robertfoss/eus_js_fix
EUS JS select fix, part 2
2016-04-01 15:26:38 +11:00
dnc40085 5e9ab01523 Modified wifi module
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
2016-03-31 19:01:41 -07:00
Robert Foss 2e597e72e9 Improve previous EUS JS select fix to work better on mobile UIs. 2016-03-31 21:26:22 -04:00
Johny Mattsson 51efa2ab65 Fixed EUS password/ssid decoding. 2016-03-31 17:47:40 +11:00
Johny Mattsson 7e43c2c352 Merge pull request #1206 from robertfoss/eus_js_fix
enduser_setup: JS select fix
2016-03-31 13:05:48 +11:00
Johny Mattsson e7c6790b68 Merge pull request #1200 from DiUS/enduser-setup-status-fix
enduser_setup: Fixed missing status update.
2016-03-31 13:01:46 +11:00
Robert Foss 701d4121ed Fix SSID selection box when aplist only has one entry. 2016-03-30 11:04:37 -04:00
Johny Mattsson 7b95711636 Merge pull request #1203 from DiUS/reduce-tmr-time-drift
Make tmr.time() more resilient against RTC changing frequency
2016-03-30 21:58:25 +11:00
Terry Ellison e99f44350b Merge pull request #1202 from DiUS/crypto-fix-double-free
Fixed double-free in crypto module
2016-03-30 10:13:16 +01:00
Marcel Stör 568e83a775 Change index.html to eus-index.html 2016-03-30 08:09:15 +02:00
Bernd Meyer 858e4bf501 Make tmr.time() more resilient against RTC changing frequency 2016-03-30 13:33:01 +11:00
Bernd Meyer f2991f555d Remove improper free of userdata; It's for the garbage collection to free 2016-03-30 12:35:06 +11:00
Johny Mattsson 0e40477011 enduser_setup: Fixed missing status update.
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.
2016-03-29 17:32:07 +11:00
Johny Mattsson d515dfd8d6 Merge pull request #1138 from robertfoss/enduser_setup_improvements
Improve overall enduser_setup user experience.
2016-03-29 12:57:04 +11:00
Johny Mattsson e1fffe6ae4 Switch enduser_setup_module to LWIP raw API.
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.
2016-03-28 18:48:18 -04:00
Robert Foss 2d4f8f8e77 Improved overall enduser_setup user experience.
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().
2016-03-28 18:48:18 -04:00
Marcel Stör 117df40f58 Merge pull request #1179 from pjsg/unsubscribe
MQTT Unsubscribe support
2016-03-28 12:23:10 +02:00
Philip Gladstone bff75bc0f4 Merge pull request #1132 from pjsg/devtool
Merging on @TerryE say-so. No spurious output seen.
2016-03-25 23:36:41 -04:00
philip ab950ff518 Removed useless checks before calling luaL_unref 2016-03-25 23:35:07 -04:00
devsaurus f768e22293 shorten ucg constructors to keep them below LUA_MAX_ROTABLE_NAME 2016-03-25 23:49:22 +01:00
devsaurus 8bc2e8aa19 Enable -std=gnu11 for user dir 2016-03-24 00:06:09 +01:00
devsaurus 103cca303e Enable -std=gnu11 for tsl2561 dir 2016-03-22 22:26:44 +01:00
devsaurus 212cc8fdcd enable -std=gnu11 for u8glib and ucglib dir 2016-03-22 22:26:36 +01:00
philip 426e805c43 Initial version of unsubscribe 2016-03-20 18:44:06 -04:00
philip 84487d300b Remove unusedcode 2016-03-20 12:54:16 -04:00
Philip Gladstone 6822116d64 Merge pull request #1136 from TerryE/dev-quick-gpio-bugfix
one line bugfix to GPIO.c -- Oops!  (Finally!)
2016-03-19 10:02:55 -04:00
jfollas 92eb21cd02 Merge branch 'dev' into mqtt-connack
# Conflicts:
#	app/modules/mqtt.c
2016-03-17 20:22:12 -04:00
jfollas 354b9e9684 Merge branch 'dev' into mqtt-connack 2016-03-17 19:59:02 -04:00
Terry Ellison 09269a6452 Merge pull request #1154 from dnc40085/dev_1065_fix
fix for #1065
2016-03-17 00:20:44 +00:00
Terry Ellison 30f2c5ca1c Merge pull request #1148 from devsaurus/gpio_opendrain
Add support for GPIO open-drain output mode.
2016-03-17 00:17:33 +00:00
devsaurus 23137b4ed1 Add support for GPIO open-drain output mode. 2016-03-17 00:21:28 +01:00
philip d3fe213fbe Fix bug with PINGREQ not being sent on a timeout.
Remove the offending code
2016-03-16 08:13:17 -04:00
philip 09f9bc62b2 Merge remote-tracking branch 'upstream/dev' into mqtt-qos 2016-03-16 07:29:48 -04:00
TerryE 20465dd30f Updates to gpio.c and documentation to reflect review comments 2016-03-14 01:11:09 +00:00
dnc40085 7def6ec7cf fix for #1065
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)
2016-03-13 09:51:48 -07:00
Terry Ellison 13f519ee41 Merge pull request #1142 from DiUS/fix-boot-input-race-crash
Fix null-pointer crash on early input
2016-03-11 00:47:44 +00:00
TerryE 76ff541244 Prevent UART input race without extra lua_started flag 2016-03-11 00:41:40 +00:00
philip 8f355d5d5f Fix problem with subscribing to multiple topics 2016-03-09 22:45:20 -05:00
Johny Mattsson 3490ffb285 Merge pull request #1125 from pjsg/ssl-verify
Adds support for verifying the certificate offered by an SSL server.
2016-03-10 14:02:16 +11:00
philip dd6359e7db Try to make qos~=0 work better
Added send_if_possible to clean up the code
2016-03-09 21:57:27 -05:00
philip 501bd1fb9a Adds support for verifying the certificate offered by an SSL server.
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
2016-03-09 21:51:23 -05:00
Bernd Meyer cf05c9cd08 Don't try to handle uart input until we have set up the buffer for it 2016-03-10 12:46:56 +11:00
Terry Ellison 1b3d8d4815 Merge pull request #1127 from marcelstoer/dev-new-default-config
Change a number of default values
2016-03-09 22:24:14 +00:00
Marcel Stör bcbf49f275 Change a number of default values 2016-03-09 23:16:43 +01:00
TerryE 5595ca35cb Small bugfix to GPIO.c -- Oops! 2016-03-09 00:06:09 +00:00
Johny Mattsson d3bfdf3ac8 Fixed race-crash in SNTP module. 2016-03-07 12:40:14 +11:00
jfollas aa50eca4f6 Refactoring of MQTT module to consolidate duplicate code into a function
- per @pjsg's suggestion
2016-03-06 20:11:16 -05:00
jfollas 0abe2fe964 MQTT Client - CONNACK processing
- 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
2016-03-06 16:33:57 -05:00
Terry Ellison 76f2654f82 Merge pull request #1105 from TerryE/dev-node-task
Extend the node library to include a Lua implementation of task posting
2016-03-06 17:17:55 +00:00
TerryE acddf29fb0 Address Philip's review comments 2016-03-06 17:11:18 +00:00
TerryE 1e49d03dbc Limit file.open() names to 31 char max C string format. See #1112 2016-03-04 01:46:35 +00:00
TerryE 9977b13bcd Update to address review comments in PR #1105 2016-03-03 15:48:09 +00:00
Johny Mattsson 5684392911 Merge pull request #1111 from TerryE/dev-fix-luac-compile
Fix break in luac.cross build and add some documentation
2016-03-04 01:22:41 +11:00
TerryE f2ea3df8a4 Fix break in luac.cross build and add some documentation 2016-03-03 02:03:23 +00:00
philip 6efbf13eae Omit all the PWM code if the PWM module is not included 2016-03-01 21:55:21 -05:00
Terry Ellison ebb0c33364 Merge pull request #1040 from pjsg/struct
Direct port of the struct module
2016-03-02 01:57:17 +00:00
TerryE 4f8f192cbe Extend the node library to include a Lua implementation of task posting 2016-03-01 23:37:41 +00:00
Marcel Stör f087908d62 Disable SmartConfig by default 2016-03-01 21:32:24 +01:00
Terry Ellison 00cc4b42dc Merge pull request #1067 from pjsg/rotarymod
Module to handle rotary decoders
2016-03-01 16:36:24 +00:00
Terry Ellison d883f2c4be Merge pull request #1088 from TerryE/dev-dis-smart-wifi
Make the wifi.smart functions options and remove wofs and upgrade
2016-03-01 16:34:00 +00:00
Terry Ellison 128177acd4 Merge pull request #1102 from DiUS/enduser_setup-less_crash
Crash-fixes for enduser_setup module
2016-03-01 16:28:18 +00:00
philip dbaad1b81c Add call to get_pin_map() in pwms_init()
Move get_pin_map() into platform_init
2016-03-01 09:18:36 -05:00
Johny Mattsson 969e9f2e90 Fix fatal crash if enduser_setup.stop() called twice. 2016-03-01 18:59:30 +11:00
Johny Mattsson a3d9d3ea47 Include the SSID in enduser_setup status message.
For more userfriendly feedback.
2016-03-01 18:59:24 +11:00
Johny Mattsson 04889813f3 Fix nasty case of memory corruption by enduser_setup.
Turns out that running wifi_station_config() from a network callback can
be a Really Really Bad Idea(tm).
2016-03-01 18:59:18 +11:00
philip d40ee50a8e Squashed commit of the following:
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
2016-02-29 08:21:12 -05:00
vsky fac579fbb8 BME280 - fixing 2 issues
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()`).
2016-02-27 15:44:15 +01:00
Arnim Läuger 19d3c1d581 Merge pull request #1041 from pjsg/performance
Simple low level performance monitoring tool as a module
2016-02-26 22:20:25 +01:00
TerryE 46ea2aa42e Make the wifi.smart functions options and remove wofs and upgrade
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.
2016-02-26 17:23:38 +00:00
Terry Ellison ef5eed307c Merge pull request #1082 from pjsg/gpio-int
Made level triggers work better than before
2016-02-26 14:18:14 +00:00
philip ad3f267da6 Fix review comments 2016-02-26 09:07:06 -05:00
Johny Mattsson c2bd582c36 Merge pull request #1083 from dnc40085/dev_tmr_lua_state_fix
Fix coroutine incompatibility in tmr module
2016-02-26 18:16:15 +11:00
Johny Mattsson 88369a5bd3 Merge pull request #1072 from TerryE/dev-encoder
Addition of encoder module with base64 and hex encode/decode as per #925
2016-02-26 12:35:02 +11:00
TerryE 8353991722 Update encoder files after #925 & #1072 review comments 2016-02-26 00:44:33 +00:00
philip 72d8c73763 Made level triggers work better than before
Move the level trigger to be after the callback
2016-02-25 08:38:25 -05:00
dnc40085 8e88612276 Fixed issue where timer callback wasn't using the proper lua_state.
This made the timer module incompatible with the lua coroutining module.
2016-02-24 17:56:16 -08:00
Terry Ellison 323d302829 Merge pull request #1068 from TerryE/dev-node-egc
Add node.egc.setmode() + constants as per #609
2016-02-24 23:53:20 +00:00
Arnim Läuger 78e9873d33 Merge pull request #988 from pjsg/mdns
Simple mdns implementation using the Espressif code
2016-02-24 22:54:39 +01:00
dnc40085 9a8edd8ae8 Fix inconsistency between flash_init_data in flash_api.c and
esp_init_data_default.bin in SDK 1.51
2016-02-23 01:22:41 -08:00
philip e516a0e9a2 Performance monitoring tool.
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
2016-02-22 08:50:07 -05:00
Adam Bonner 96f905bf81 Crypto-new_hash Improved code based on review in #1037 2016-02-21 21:13:06 -08:00
Adam Bonner 332b53b9db Initial implementation of a chunk capable hash function in crypto module 2016-02-21 21:13:06 -08:00
Arnim Läuger b171ca35ba Merge pull request #1008 from vsky279/bme280
BME280/BMP280 Digital Pressure Sensor module
2016-02-21 20:58:37 +01:00
vsky 6bd0ec4480 BME280/BMP280 Digital Pressure Sensor module 2016-02-21 19:51:08 +01:00
TerryE ffa7ee9b67 Addition of encoder module with bas64 and hex encode/decode as per #925 2016-02-21 04:18:27 +00:00
TerryE 0ef362472c Add node.egc.setmode() + constants as per #609 2016-02-20 19:15:52 +00:00
Arnim Läuger 8743319b02 Merge pull request #1000 from devsaurus/sigma_delta
Add sigma_delta module.
2016-02-20 20:11:42 +01:00
Arnim Läuger e82cb974a6 Merge pull request #1057 from pjsg/hwtimer
Add real hw_timer support and convert the pwm module to use it
2016-02-20 20:05:40 +01:00
Terry Ellison 68919dea65 Merge pull request #1004 from cheloftus/dev
Added crypto.fhash function for hashing files
2016-02-19 20:16:09 +00:00
devsaurus 8982650df9 Add sigma_delta module. 2016-02-18 21:35:58 +01:00
Terry Ellison dc905f080b Merge pull request #1063 from DiUS/fscfg
Add file.fscfg() command for fs location + size.
2016-02-18 08:51:03 +00:00
philip 669543bbf2 Hardware timer support and convert the PWM module to use it 2016-02-17 21:07:33 -05:00
Johny Mattsson 1fd98d9f86 Add file.fscfg() command for fs location + size. 2016-02-18 12:52:40 +11:00
Johny Mattsson 1afa72d53a Merge pull request #1061 from TerryE/dev-task-if
Add New Tasking I/F and rework GPIO, UART, etc to support it
2016-02-18 11:51:27 +11:00
Terry Ellison 16953690bb Merge pull request #902 from Alkorin/ws2812-buffer-1.5
ws2812 strip data buffer
2016-02-17 22:05:47 +00:00
Terry Ellison 4501f655f6 Merge pull request #1050 from jfollas/file-exists
Added file.exists() method
2016-02-17 22:04:09 +00:00
TerryE 49733f6f6d Add New Tasking I/F and rework GPIO, UART, etc to support it
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.
2016-02-17 17:13:17 +00:00
devsaurus c88f0bd3f8 Enable UART baudrate 256000 in platform layer. 2016-02-15 21:40:20 +01:00
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