1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-25 20:02:37 +03:00

3461 Commits

Author SHA1 Message Date
Earle F. Philhower, III
b478429fe4
Change Sphinx version to latest (#6817)
Was locked at an older one which no longer works due to an issue a while
ago, but that may no longer be needed.
2019-11-20 08:36:04 -07:00
Dirk O. Kaar
916eb89b07 Mark esp_schedule IRAM_ATTR to make it ISR safe - this complements the suspend CONT via esp_yield pattern in esp_delay for early returning from delay due to external events. In libraries/ESP8266WiFi/src/ESP8266WiFiGeneric.cpp this is done from CBs, that are called from tools/sdk/lwip/include/lwip/dns.h (#6809) 2019-11-20 00:50:40 -03:00
Adrian Scillato
6533be353f Version bump for package.json (#6784) 2019-11-20 00:08:36 -03:00
Earle F. Philhower, III
800794de37 Add callbacks for ESP8266HTTPUpdate (#6796)
Replaces abandoned #1817 and #2694

Add optional std::function callback (so it supports lambdas and normal
functions) via ::onStart, ::onEnd, ::onProgress, and ::onError methods.

Update example with their use.

From @baruch's original pull request:
The callback is called when the upgrade actually starts rather than just
the initial query so that the user can know that it will not take longer
and can also prepare for the upgrade by shutting down other works.

From @karlp's original pull request:
Incomplete: I've not updated any documentation yet. If this style looks
good, I'll happily go and update the documentation (likewise for the
examples)
2019-11-19 16:15:57 -03:00
Earle F. Philhower, III
36f903443b Add const char* content to ESP8266WebServer::send() (#6797)
* Add const char* content to ESP8266WebSerer::send()

Supercedes #3492

Allow sending raw binary data or strings directly without conversion to
a String to reduce memory overhead when possible.

From original @timw1971 PR #3492
Added public functions to allow content to be uploaded using const
char*. For some cases, this can remove the need for content to be copied
into a String, and thus can be considerably more space-efficient.

* Fix example formatting

* Make GIF example use static const array

* Make the example really need to use const char*

Make the generated GIF dynamic in the example and move the original to
PROGMEM (since that's where const arrays like this belong).
2019-11-19 14:46:30 -03:00
Earle F. Philhower, III
919c753563 Terminate the chunked printDirectory (#6808)
Fixes #2481

Send a 0-len chunk when the directory is completed (in a chunked HTTP
transfer) to terminate the HTTP transfer properly.
2019-11-19 10:32:39 +01:00
Dirk O. Kaar
cb6b30a47d Weak binding lessens version dependency between ESP8266 and MT library CoopTask. (#6790) 2019-11-19 04:43:28 -03:00
Earle F. Philhower, III
6768116b8c Only add "l" to XX.htm URLs if XX.html exists (#6794)
Fixes #6792

Only append the "l" to ".htm" when there actually is a ".html" file
present.  If not, fall-thru like before and try .gz through the normal
paths.
2019-11-19 02:43:47 -03:00
Earle F. Philhower, III
344c4492af [SSDP] add schema(Print &) const (#6798)
* [SSDP] add `schema(Print &) const`

Supercedes #2806

Make SSDP::schema(WiFiClient&) use a by-ref (reduce stack use)

Add a SSDP::schema(Print&)

From @Palatis' original PR:
useful when using AsyncWebServer.

* Use ip.toString, only export Print& schema interface

Because WiFiClient inherits a Print interface, replace the
::schema(WiFiClient&) with ::schema(Print&) which is source compatible
with existing code and allows the functionality requested in the initial
PR.

Use ip.toString() in the templates instead of breaking up the octets of
the address.

* Fix compile errors and backwards compatibility
2019-11-19 02:02:54 -03:00
Develo
9b96f53778
Fix typo in mode timeout loop (#6801)
Fix typo to make timeout 1s instead if 1ms, as originally intended.
2019-11-19 01:27:10 -03:00
liebman
bbfe2c2035 remove clear() before beginInternal() so _location is not cleared before its passed to beginInternal() (#6786) 2019-11-18 16:41:24 -03:00
Earle F. Philhower, III
b71872ccca
Add stdint, move headers up in core_features.h (#6793)
Fixes #6791 which I think only happened when the file was included from
a .C file (due to the headers being included only ifdef __cplusplus).
2019-11-17 20:26:03 -07:00
Earle F. Philhower, III
dabf4c53d4 Make upload.py compatible with existing FS upload (#6788)
* Make upload.py compatible with existing FS upload

PR #6765 introduced an incompatibility with the existing Java uploaders
for SPIFFS and LittleFS,  breaking them because of the upload.py
parameter format change to support single stage erase/upload.

Add in patch to silently eat the single --end and to parse the write
address and filename properly as generated by calls from the plugins,
while retaining compatibility with the current IDE changes.

* Clean upload.py, make platform use write_flash

Make upload.py more concise and pythonic.

Use the "write_flash" argument in platform.txt for uploads instead of
assuming anything that is a file is the bin to upload.
2019-11-17 19:05:43 -03:00
Earle F. Philhower, III
01e9d948c7
Update SdFat to not undefine F() macro (#6787)
Fixes #6767 .  Remove the `undef F` from SysCall.h as it is not needed
nor used in the SD or SDFS libraries.  This puts F() strings back in
flash when using the SD/SDFS libs.
2019-11-16 15:50:02 -07:00
david gauchard
25f74bb52e release process: updates about Travis CI (#6785) 2019-11-15 13:55:04 -08:00
Dirk O. Kaar
240ae5ef26 Add/unify comments for target and source sites of async scheduling via delay()/esp_yield()/esp_schedule() (#6780) 2019-11-15 14:53:43 +01:00
André Futter
05454df164 Root page should be of type text/html (#6776)
In order to be displayed properly by a browser the HTML should be returned as text/html.
2019-11-15 00:29:31 +01:00
Mehdi Beyk Mohamadi
95c740705e Add missing "LittleFS.begin()" in LittleFS_Timestamp example. (#6762)
* Add missing "LittleFS.begin()"

Add missing first LittleFS.begin() call.

* Update LittleFS_Timestamp.ino
2019-11-14 18:25:56 -03:00
david gauchard
48ea3a3e9e
Update platform to 2.7.0-dev, bump Readme to 2.6.1 (#6774) 2019-11-14 17:36:32 +01:00
Dirk O. Kaar
482516e393 Minimize header use, move Ticker function definitions into cpp file (#6496)
* Backport from ESP32

* Use new library layout (.../src)

* Cleanup test case.

* C++ style cast required.

* Whitespace

* Inlining via header has better baseline ROM footprint.

* Reordered functions for better code-compare to master

* Reduces ROM footprint some more.

* Avoid unnecessary parameter passing - refactoring, same generated footprint.

* Reformat example sources
2.6.1
2019-11-14 10:02:32 -03:00
david gauchard
af85bd2efc
release process for 2.6.1 (#6773) 2019-11-14 10:24:22 +01:00
david gauchard
b52c52791a a single esptool command for erasing and flashing (#6765)
* esptool: a single command for erasing and flashing
(and update to esptool-2.8)

* fixes per review
2019-11-14 02:46:20 -03:00
Dirk O. Kaar
6f3c57b7fa Fix issue with functions scheduled from scheduled functions (#6770)
Calling schedule_function() from a scheduled function would result in an infinite loop, because the list traversal would never end.
2019-11-14 00:56:18 -03:00
david gauchard
2f26d94f64 minor: examples: reorder functions for declarations prior to call (#6766)
* minor: reorder functions for declaration prior to call
harmless for arduino, helps with emulation on host or PIO

* fixes per review
2019-11-13 22:35:30 -03:00
Earle F. Philhower, III
09896d5287 Add String::concat(char*, len) to allow non null-term strings (#6754)
* Add comcat(char*, len) to Sting

Fixes #5061

Adds a concat(const char *data, int len) method which allows arbitrary
sequences of data (including ones w/embedded \0s) to be appended to a
String.  May be useful for certain MQTT operations.

Adds sanity test for the feature to host suite

* Review comment cleanups
2019-11-14 00:58:07 +01:00
Earle F. Philhower, III
d2d0ee3d43
Update to LittleFS 2.1.3 (#6757) 2019-11-12 19:55:50 +01:00
s-hadinger
41d99ad48a WString explicit converters to reduce Flash size (#6759)
* WString explicit converters to reduce Flash size

* Fix add return value for start/endsWith

* Adding const to startsWith() and endsWith()
2019-11-12 18:47:26 +01:00
Dirk O. Kaar
8222acedaf EspSoftwareSerial release 6.1.1, "9bit" support (#6761)
* EspSoftwareSerial release 6.1.0:

New feature, a.k.a. "9bit": Supports parity bit on TX and RX and 2 stop bits.

* Fix for local relative #include
2019-11-12 15:57:11 +01:00
david gauchard
bc60e97489
board NodeMCUv1 menu: led selection (2, 16) (#6748) 2019-11-10 22:07:51 +01:00
david gauchard
4e5bf118c1
release script: remove makecorever.py call in released version (#6747)
* (fix) remove makecorever.py call in released version

* fix regexp
2019-11-10 18:22:21 +01:00
Dirk O. Kaar
739bcd3fd5 Updated EspSoftwareSerial brings backward compatibility for ctor/begin() pair (only for the common cases with complete default argument use) (#6746) 2019-11-10 10:48:12 +01:00
Develo
43e0554b9c
Add some useful links (#6744)
Fixes #1360
2019-11-10 03:52:40 -03:00
Develo
dde76d1b5d
Puts to rest the confusion about the builtin leds for nodemcu boards (#6743)
Given that most nodemcu boards are based on the ESP12 boards, the definition of the builtin led is now changed to 2.
In addition, for those nodemcu boards that have an additional LED on the board connected to gpio16, an additional define is added called LED_BUILTIN_AUX.
2019-11-10 02:01:02 -03:00
Develo
adda7da485
Mention erasing arduino15 contents before installing git (#6741) 2019-11-09 23:53:38 -03:00
Peter
2c2468f962 Add ipv4_addr_t for espconn/LwIP1.4 compat (#6740)
`espconnn.h` references ipv4_addr_t, so it seems appropriate it be defined here also.
2019-11-10 00:41:26 +01:00
Chế Tiệp Chân Khoa
6626b2fb07 add docs: how to get POST body in ESP8266WebSever (#6736) 2019-11-09 08:55:18 +01:00
Develo
b5f873ecc3
Update platform to 2.7.0-dev, bump Readme to 2.6.0 (#6734) 2019-11-08 22:17:53 -03:00
Develo
643ec203b3
Release 2.6.0 (#6733) 2.6.0 2019-11-08 19:08:14 -03:00
M Hightower
9f6d3c7c3e Add board filter support ... (#6643)
* Add boards filter support - allows for the creation of an abridged boards.txt.
Add some of the ITEAD Sonoff boards to boards.txt.py.
Minor reorder of presentation of board menu items, mainly grouped
board Model and module selection to the top.

* Corrected, I think, LED_BUILTIN vs BUILTIN_LED??

* Updated boards.txt

* Added support for DOIT ESP-Mx DevKit (ESP8285) board.
Adjusted wording and fixed side bar formating issue on the
Sonoff description. Also, removed resetmethod menu
and assigned resetmethod of none.
2019-11-08 14:49:29 -03:00
Dirk O. Kaar
5260b30730 EspSoftwareSerial release 5.4.0 with performance/error rate improvement in TX (#6722)
* EspSoftwareSerial release 5.3.5 with performance/error rate improvement in TX

* EspSoftwareSerial 5.3.6 with CI fix and, tadaaa, reliable tx and rx at 115200bps and beyond.

* Version 5.4.0 stabilized work of past 24h.
2019-11-08 17:53:03 +01:00
Niek van der Maas
3b1ad418b3 Add missing time.h include, use relative include path on time.h includes (#6730)
* Add missing time.h include

* Change other includes of time.h as well

* Added comment
2019-11-08 13:16:03 -03:00
david gauchard
1ec3683ca0
FW: use NONOS-SDK branch 2.2.x from 2019-10-24 by default (#6724)
* FW: use NONOS-SDK branch 2.2.x from 2019-10-24 by default
former one is available when using generic board configuration

* tv qvoqve, Platform-ii

* nonos-sdk v2.2.x from 2019-11-05 by default for all boards
(previous ones can be selected with the generic board)

* (w/ fw files)

* 191024 by default, 191105 is an option
2019-11-08 11:41:22 +01:00
Develo
453eb2d064
Add wait loop at the end of mode, refactor can_yield (#6721)
* Add wait loop at the end of mode, refactor can_yield

* fix mock build
2019-11-07 18:25:20 -03:00
david gauchard
6f7eb2828a Make SPIFFS and LittleFS stay out of link when not needed (#6699)
* define two weak functions defaulting to no-op
redefine them to do something useful when either spiffs or littlefs are used

* noop

* single entry point for closing FSes

* rename functions, override when instanciated, add link to explanation

* spiffs: call end on destructor
2019-11-06 21:37:52 -03:00
Laurent Lalanne
c28838d980 Update esptool reset method (#6429)
* Reset method changes for esptool.py

* Workaround - to be reverted in case esptool do erase/write_flash in one command

* Keep previous resetmethod names and translate to esptool.py options

* Regenerated boards.txt
2019-11-06 22:55:33 +01:00
Develo
98785f7cdf
Rollback setContentLength removal (#6715) (#6719)
Apparently I messed up testing #6715 and something broke. This rolls back that PR.
That means #2132 remains closed with no action.
2019-11-06 16:08:28 -03:00
Develo
ffa9e3c7c2
Remove useless call to setContentLength() (#6715)
* Update ESP8266WebServer-impl.h

Remove useless call to setContentLength()

* Fix warning unused param
2019-11-05 21:50:52 -03:00
hreintke
2abcd16efb Implementation of a generic CallBackList (#5710)
* Initial version

Move to experimental namespace

Change namespace
2019-11-05 19:48:04 -03:00
Elias Santistevan
e2959eefd5 Adds SparkFun Blynk Board (#6713)
* adds initial commit to boards.txt before actual edits

* reminder to remove vim .swp file

* Removes spaces and modifies outdated tags for menu `CpuFrequency -> xtal` for example

* Adds SparkFun Bynk Board to boards.txt.py, moves .build flags all together for SparkFun Blynk

* runs boards.txt.py to generate files for pull request - all files have been included as instructed at top of boards.txt file

* Deletes three .orig files generated by boards.txt.py: rst, txt, and json

* Moves boards.txt.py back to /tools directory and attempts to change its mode.

* restore 'x' flag
2019-11-05 17:56:52 +01:00
Dirk O. Kaar
d14419efa2 Save 16 bytes RAM by placing esp8266_gpioToFn (core_esp8266_wiring_digital.cpp) array in PROGMEM (#6703)
* Save 16 bytes RAM by placing the array in PROGMEM.

* Reduce runtime computation at expense of switching from uint8_t[16] to uint32_t*[16]
2019-11-05 12:37:15 -03:00