Commit Graph

18 Commits

Author SHA1 Message Date
sergio d77666c0e8 trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
dnc40085 96e5c026a8 Refactor timer suspend portion of node.sleep (pmsleep) (#2287)
* pmsleep refactor
* Shortened swtmr disabled message 
* Added swtimer debug module option to user_modules.h.
* Added comments to user_config.h.
* Fixed error in documentation for node.sleep()
* remove blank sntp.c that got added in during rebase onto dev(6218b92)
* Added #ifdefs around SWTIMER_REG_CB to prevent inclusion of disabled
code
2018-04-13 21:41:14 +02:00
Philip Gladstone c7006dfb27 Ignore lookup errors on sync request unless all lookups fail (#2298) 2018-03-21 07:02:25 +01:00
Philip Gladstone f2d605d27c Fix SNTP so that it retries DNS lookups if it needs to (#2283) 2018-03-01 23:57:55 +01:00
Philip Gladstone d93465cd86 Add tracking and control of the rate error in the clock crystal. (#1697)
* Improve RTC timekeeping -- includes clock rate tracking
* Improved division by 1M
* Fix crash in sntp
* Disable RTC debug
* Get the offset correct
* Add comments on where the mysterious numbers came from
* Fix a crash with auto repeat mode and errors on repeat
2017-07-18 22:51:20 +02:00
Philip Gladstone 9b86937d45 Fix crash in sntp and add more reliable defaults servers (#1682)
* Fix bug in sntp where callback was run at interrupt level. Also add
the nodemcu pool servers as the default.

* Add comments on where the mysterious numbers came from

* Fix a crash with auto repeat mode and errors on repeat
2017-01-01 22:26:17 +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
Philip Gladstone ebb537c502 Version of printf that doesn't suffer from buffer overflows (#1564) 2016-10-27 09:38:47 +03:00
Yury Popov a499716cc1 Update modules to be Lua coroutine compatible (#1423) 2016-08-02 22:33:05 +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
Johny Mattsson d3bfdf3ac8 Fixed race-crash in SNTP module. 2016-03-07 12:40:14 +11:00
devsaurus cd06905b58 include user_interface.h to avoid implicit decls 2016-01-24 00:22:11 +01: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
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
Ivan Lopez d96383691f Make sntp.sync work with DNS hostnames 2015-11-19 21:51:33 +01:00
Johny Mattsson dd38a0a0e6 Imported reworked rtctime support. 2015-07-10 16:16:25 +10:00
Johny Mattsson 09410d55c6 Added SNTP module, for easy time sync.
Integrates with the rtctime component if it's available.
2015-07-10 15:12:31 +10:00