Commit Graph

736 Commits

Author SHA1 Message Date
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