Commit Graph

48 Commits

Author SHA1 Message Date
philip 96a6dcc196 CLean up the PR a bit 2020-09-27 03:05:36 +01:00
philip 9bea108da7 Now use the original c99-snprintf as a submodule. 2020-09-27 03:05:36 +01:00
philip df9f3030e6 Add snprintf and remove our sprintf 2020-09-27 03:05:36 +01:00
vsky 64bbf00689 Adding '+' flag to string.format 2020-09-09 04:23:33 +01:00
Lukáš Voborský 2fa63a1303
Fix of string.format("%.0f") (#3199)
Co-authored-by: vsky <blue205@centrum.cz>
2020-07-07 14:35:37 +01:00
Terry Ellison bbeb09b695 Squashed updates do get Lua51 and Lua53 working (#3075)
-  Lots of minor but nasty bugfixes to get all tests to run clean
-  core lua and test suite fixes to allow luac -F to run cleanly against test suite
-  next tranch to get LFS working
-  luac.cross -a options plus fixes from feedback
-  UART fixes and lua.c merge
-  commit of wip prior to rebaselining against current dev
-  more tweaks
2020-06-09 22:26:52 +02:00
Terry Ellison 98c2c0520d
Dev make cleanup (#2842) 2019-07-23 18:47:18 +03:00
Johny Mattsson f7a545b951
Evict c_types.h, tidy up a other c_prefixes. (#2841) 2019-07-23 14:22:38 +10:00
Johny Mattsson 526d21dab4 Major cleanup - c_whatever is finally history. (#2838)
The PR removed the bulk of non-newlib headers from the NodeMCU source base.  
app/libc has now been cut down to the bare minimum overrides to shadow the 
corresponding functions in the SDK's libc. The old c_xyz.h headerfiles have been 
nuked in favour of the standard <xyz.h> headers, with a few exceptions over in 
sdk-overrides. Again, shipping a libc.a without headers is a terrible thing to do. We're 
still living on a prayer that libc was configured the same was as a default-configured
xtensa gcc toolchain assumes it is. That part I cannot do anything about, unfortunately, 
but it's no worse than it has been before.

This enables our source files to compile successfully using the standard header files, 
and use the typical malloc()/calloc()/realloc()/free(), the strwhatever()s and 
memwhatever()s. These end up, through macro and linker magic, mapped to the 
appropriate SDK or ROM functions.
2019-07-22 00:58:21 +03:00
Terry Ellison bc61528db7
1st Tranch of SDK 3.0 follow up changes (#2732)
1st Tranche of SDK 3.0 follow up changes
2019-05-01 18:29:11 +01:00
Terry Ellison 9a47107920
SDK 3.0 release (#2692)
* Rebaseline firmware to non-OS SDK version 3.0
* Note that SDK version 3.0 introduces the concept of a Flash Partition Table(PT).  This is located at Flash offset 0x10000 in our firmware build.
* The firmware is now PT aware with both LFS and SPIFFS taking their partition size and location from the PT
* A new tool `tools/nodemcu-partition.py` is now used to initialise these data and can also download LFS and SPIFFS images to these partitions.
2019-04-05 16:01:45 +01:00
sergio d77666c0e8 trailing spaces cleanup (#2659) 2019-02-17 18:26:29 +00:00
TerryE 4f21224d56 LFS patch updates following review II and testing 2018-06-22 22:29:16 +01:00
TerryE 88bd9e01d3 LFS patch updates following review 2018-04-19 16:27:47 +01:00
Nathaniel Wesley Filardo fe032edd9c Add %p to libc's debug printf (#2062) 2017-08-16 21:38:10 +02: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 ebb537c502 Version of printf that doesn't suffer from buffer overflows (#1564) 2016-10-27 09:38:47 +03:00
Luís Fonseca 19f80abb32 Fix float math.pow when number was negative and power was odd (#1492) 2016-09-07 22:45:06 +02:00
Marcel Stör ced7ddc926 Fix math.floor for negative integers (#1454)
Fixes #1453
2016-08-19 16:35:35 +10: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
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
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
Johny Mattsson 9fd215b028 Corrected sprintf() prototype & behaviour. 2016-01-28 17:56:01 +11:00
devsaurus f149b60c7f enable -std=gnu11 for lua dir 2016-01-24 00:02:27 +01:00
Johny Mattsson 182d45f928 Enable -std=gnu11 for modules dir.
Plus boat-load of fixes to actually make that build.
2016-01-20 19:40:47 +11:00
TerryE 0beee5c1ae Minor tweaks to luac.cross for SDK 1.4 support
plus Add extra logic to handle different loci path in luac.cross
for handling 32 bit or great hex integers Also add a helpfull hint in the
build tool to point out the Lua and lfs depencencies.
2015-11-03 22:45:43 +00:00
funshine 09750b5653 add queue to mqtt module 2015-03-30 00:24:09 +08:00
funshine a70709268b merge cjson and dev to master, make a stable release 2015-03-18 14:22:17 +08:00
funshine d425dd7127 under develop 2015-03-16 17:09:43 +08:00
funshine 394cced84b fix #273 2015-03-15 16:06:35 +08:00
HuangRui 960032ddd8 Fixed compilation fails, adjust redefined #define __P(x) x,closed #206. 2015-02-12 20:03:27 +08:00
HuangRui f3540ffe29 Fixed many floating point bug.
Fixed #148 String:format Floating point, width.precision not working.
Fixed #140 string.format not working since 0127(float version) #140.
2015-02-12 01:15:30 +08:00
HuangRui b86bb49576 Move powersOf10 to spi-flash. 2015-02-11 23:07:08 +08:00
HuangRui d49182c1ab Move powersOf10 array to global. 2015-02-11 23:05:46 +08:00
HuangRui f1f508ca98 Optimization of floating point Memory usage again. 2015-02-11 00:39:03 +08:00
HuangRui 361bedf0b9 Optimization of memory usage when using double pow(double x, double y). 2015-02-05 12:26:20 +08:00
HuangRui cca0de9b39 Align the code of c_math.c 2015-02-05 10:20:20 +08:00
HuangRui bb244d47ab Move array about pow form local to global. 2015-02-05 10:06:22 +08:00
funshine 1346cbbc38 fix string.format, maybe partialy 2015-01-27 21:48:44 +08:00
HuangRui 646eaec29c Fixed LUA_NUMBER_INTEGRAL definition in user_config.h. 2015-01-26 19:57:54 +08:00
HuangRui e11721ebfd Support floating point.
Add PRINTF_LONG_SUPPORT to %g option.
2015-01-26 17:21:43 +08:00
HuangRui 2e513a967e Add floating point support for output.
Changed %.14g to %g.
Add c_sprintf definition.
2015-01-26 17:17:04 +08:00
HuangRui 530e964d95 Try to ENABLE floating point, lack %g support. 2015-01-26 04:15:54 +08:00
funshine ad966146fc migrate to sdk 0.9.5 release version 2015-01-24 23:36:04 +08:00
funshine 729603fae7 move some buffer to local 2015-01-06 19:01:34 +08:00
HuangRui c04f2578ec Updated SDK to v0.9.5 and optimized memory. 2015-01-05 10:09:51 +08:00
funshine f1d87ee7ee replace custom stdarg.h header file with the one in toolchain 2014-12-26 21:24:28 +08:00
funshine cdd13b1af3 source file first commit, folder structure refact 2014-12-22 19:35:05 +08:00