1. 26 May, 2016 3 commits
  2. 24 May, 2016 2 commits
    • Johny Mattsson's avatar
      Reimplemented the NodeMCU task interface on top of RTOS. · 5c39a1f6
      Johny Mattsson authored
      Not yet hooked up to an RTOS task, however.
      5c39a1f6
    • Johny Mattsson's avatar
      Initial pass at switching to RTOS SDK. · f3e2a3af
      Johny Mattsson authored
      This compiles, links, and starts the RTOS without crashing and burning.
      
      Lua environment does not yet start due to the different task architecture.
      
      Known pain points:
      
        - task implementation needs to be rewritten for RTOS (next up on my TODO)
      
        - secure espconn does not exist, all secure espconn stuff has been #if 0'd
      
        - lwip now built from within the RTOS SDK, but does not appear to include
          MDNS support. Investigation needed.
      
        - there is no access to FRC1 NMI, not sure if we ever actually used that
          however. Also #if 0'd out for now.
      
        - new timing constraints introduced by the RTOS, all use of ets_delay_us()
          and os_delay_us() needs to be reviewed (the tsl2561 driver in particular).
      
        - even more confusion with ets_ vs os_ vs c_ vs non-prefixed versions.
          In the long run everything should be switched to non-prefixed versions.
      
        - system_set_os_print() not available, needs to be reimplemented
      
        - all the RTOS rodata is loaded into RAM, as it apparently uses some
          constants while the flash isn't mapped, so our exception handler can't
          work its magic. This should be narrowed down to the minimum possible
          at some point.
      
        - with each task having its own stack in RTOS, we probably need change
          flash-page buffers from the stack to the heap in a bunch of places.
          A single, shared, page buffer *might* be possible if we limit ourselves
          to running NodeMCU in a single task.
      
        - there's a ton of junk in the sdk-overrides now; over time the core code
          should be updated to not need those shims
      f3e2a3af
  3. 21 May, 2016 1 commit
  4. 18 May, 2016 1 commit
    • Johny Mattsson's avatar
      Rework ADC mode setting approach (#1285) · 30d354c2
      Johny Mattsson authored
      - 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.
      30d354c2
  5. 13 May, 2016 1 commit
    • dnc40085's avatar
      Updated tmr module and documentation · 17443720
      dnc40085 authored
      * 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.
      17443720
  6. 12 May, 2016 1 commit
  7. 10 May, 2016 1 commit
  8. 09 May, 2016 1 commit
    • Thomas Soëte's avatar
      Finalize work on ws2812 module · 0577c8af
      Thomas Soëte authored
      * 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
      0577c8af
  9. 29 Apr, 2016 1 commit
  10. 24 Apr, 2016 1 commit
  11. 17 Apr, 2016 1 commit
  12. 15 Apr, 2016 1 commit
    • Johny Mattsson's avatar
      SNTP module enhancements (#1243) · f4288978
      Johny Mattsson authored
      * 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.
      f4288978
  13. 09 Apr, 2016 1 commit
  14. 03 Apr, 2016 1 commit
    • Philip Gladstone's avatar
      Take 2: Add regular sends to mdns. Check for (some) buffer overflows. Make it handle unicast · 3a5e5f10
      Philip Gladstone authored
      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 6ee49ee106274bc63f6309047e57f7bc9828523e
      Author: philip <philip@gladstonefamily.net>
      Date:   Fri Mar 25 23:25:11 2016 -0400
      
          Update the docs
      
      commit 7e455541c6f2531824cfb2419d051f1306935fdf
      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`
      3a5e5f10
  15. 02 Apr, 2016 1 commit
    • Jason Follas's avatar
      Corrected SPI CPOL/CPHA relationships · e16204d4
      Jason Follas authored
      * 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.
      e16204d4
  16. 01 Apr, 2016 2 commits
    • dnc40085's avatar
      Modified wifi module · 5e9ab015
      dnc40085 authored
      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
      5e9ab015
    • Robert Foss's avatar
  17. 31 Mar, 2016 1 commit
  18. 30 Mar, 2016 4 commits
  19. 29 Mar, 2016 1 commit
    • Johny Mattsson's avatar
      enduser_setup: Fixed missing status update. · 0e404770
      Johny Mattsson authored
      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.
      0e404770
  20. 28 Mar, 2016 2 commits
    • Johny Mattsson's avatar
      Switch enduser_setup_module to LWIP raw API. · e1fffe6a
      Johny Mattsson authored
      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.
      e1fffe6a
    • Robert Foss's avatar
      Improved overall enduser_setup user experience. · 2d4f8f8e
      Robert Foss authored
      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().
      2d4f8f8e
  21. 26 Mar, 2016 1 commit
  22. 25 Mar, 2016 1 commit
  23. 23 Mar, 2016 1 commit
  24. 22 Mar, 2016 2 commits
  25. 20 Mar, 2016 2 commits
  26. 16 Mar, 2016 2 commits
  27. 14 Mar, 2016 1 commit
  28. 13 Mar, 2016 1 commit
    • dnc40085's avatar
      fix for #1065 · 7def6ec7
      dnc40085 authored
      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)
      7def6ec7
  29. 11 Mar, 2016 1 commit