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

3852 Commits

Author SHA1 Message Date
sticilface
f4a42a0c1b Merge branch 'master' of https://github.com/esp8266/Arduino 2020-11-15 09:23:24 +00:00
Max Prokhorov
979bbfea72
Use -std=gnu17 instead of -std=c17 for GCC and test (#7588) 2020-11-14 16:38:32 -08:00
Earle F. Philhower, III
417aacc509
Fix sntp_get_real_time prototype in header (#7707)
sntp_get_real_time takes a `time_t` in the core, but in the header it
was listed as `long`.  Make them both match by changing the header.
2020-11-14 09:38:29 +01:00
Dirk O. Kaar
9b437d7c5e
Change servo defaults to safer defaults (#7023)
* The default timings were chosen vastly outside specification. On COTS servos, this causes much confusion for the user, because a wide range of angle starting from 0 degress, and a just a large range of angle leading up to 180 degrees, is dead - in fact, the servo doesn't move at all, from any position.

Not investigated further for obvious reasons, as this may have also destroyed servos that ran hot trying to abide by the PWM signal but could not mechanically!

* Change timing limits to safe values. With previous default timings and safety limits, popular servos

could force against internal physical endstops, which could overload and destroy them.

* Review action: revert changes to hard boundary for min/max duty cycle timings. Internal review, fix/drop legacy comments.

* A Servo on each available ESP8266 GPIO (D0-D8), no observed interference.

* Remove possible jerk due to force-cancelling duty cycle.

* Overload attach: can specify initial angle for servo, too.

* Stricter checks for configured, and default, bounded timings.

* Missed the min/max in a comment.

* Default microsecond lower bound of 1000 causes confusing behavior - 200 is minimum enforced elsewhere, so use it here too as nearest multiple of 100 from 180.

* Comment rationale for changed defaults of min/max pulse widths.

Comment rationale for changed defaults of min/max pulse widths.
2020-11-13 23:59:14 -08:00
Paulo Cabral Sanz
c5c9f845d1
Provide String::indexOf for a char* needle (#7706) 2020-11-13 12:13:32 -08:00
Earle F. Philhower, III
8375faa542
Fix newlib to support <+-nn> timezone names (#7702)
Undoes the change in #7699 and fixed #7690 root cause.

Newlib did not support timezone names of the form "<[+-]?[0-9]+>" and
would parse the offset using the <name>.

Fix newlib tzset parser with
  https://github.com/earlephilhower/newlib-xtensa/pull/14
  https://github.com/earlephilhower/newlib-xtensa/pull/15
and undo the UNK changes used as an expedient workaround.
2020-11-12 09:31:01 -08:00
david gauchard
4de681b504
Help newlib TZ parser (#7699)
* TZ: help newlib parser

Timezones coded with numeric abbreviations <±nn>±nn<±nn>[±nn][,...] are incorrectly parsed
by newlib's TZ parser.
Replacing <±nn> occurences by UNK allows newlib's TZ parser to nicely interpret all timezones.
Detailed explanation in https://github.com/earlephilhower/newlib-xtensa/issues/12
2020-11-10 23:35:04 +01:00
david gauchard
c919f61169
update documentation example (#7697) 2020-11-10 22:17:17 +01:00
sticilface
5022cf0ff7 fix different sign complication error 2020-11-07 19:40:45 +00:00
sticilface
4afa2d4502 remove unused variable 2020-11-07 19:40:22 +00:00
sticilface
e9d486bee3 Merge branch 'master' of https://github.com/sticilface/Arduino 2020-11-07 19:25:47 +00:00
sticilface
ee1481aa7c Parsed with restyle.sh. Compile with all errors. 2020-11-07 19:24:31 +00:00
sticilface
d382a33c7d Fix unused variable i 2020-11-07 19:23:09 +00:00
sticilface
cbf4073695
Update FSTools.cpp
fix ESP.h to Esp.h
2020-11-07 08:36:54 +00:00
sticilface
745db9ab55 Oops. Need to pass layout by reference in order to capture the correct address. Took a while to find that. There maybe a better way to store all these configs 2020-11-06 22:33:01 +00:00
sticilface
0fb1ebc3c0 Add FSTools with examples of how to convert between SPIFFS and LITTLEFS. 2020-11-06 20:31:43 +00:00
Matthew Foran
5d2563eee9
Fixed bug in parsing POST file uploads (#7543)
The boundary parsing in the webserver could end up missing boundaries if the
uploaded file had `--` at the start of the line because it read in the entire boundary
length worth of bytes.  Fix by only reading up to either the boundary length or
a newline, avoiding the issue.

Fixes #7542
2020-11-01 18:31:59 -08:00
Earle F. Philhower, III
1bb0815fed
Hook up custom timestamp proc for SD/SDFS (#7686)
The SDFS implementation didn't include plumbing to support user-supplied
timestamp generators (for file create/write times) because the SDFat
library doesn't support a callback parameter.

Work around it by using a single, global (inside sdfs namespace) that
the static timestamp callback member can see and use.

Add a test of the feature in CI.

Fixes #7682
2020-10-31 08:05:34 -07:00
isadora-6th
996211f132
Compile failure fix with FS_NO_GLOBALS flag (#7685) 2020-10-29 17:11:57 -07:00
Earle F. Philhower, III
77bd71ec29
Add Stream loaders for BearSSL (#7675)
Fixes #7671

Allows for code to do things like read certs from LittleFS or even HTTP
connections with code like:

  File cert = LittleFS.open("/client-crt.pem", "r");
  clientCert = new X509List(cert, cert.size());
  cert.close();
2020-10-28 07:22:41 -07:00
Earle F. Philhower, III
cfdcff1028
Catch and display SSL errors for fatal alerts (#7681)
Partial fix to #7678
2020-10-27 22:18:26 -07:00
Pargorn Puttapirat
eb7e082a3c
Revive a dead link (#7679)
* Revive a dead link.
* Update server-examples.rst
2020-10-27 22:06:31 -07:00
Earle F. Philhower, III
7f38e141c7
BREAKING: Add Print::availableForWrite method (#7658)
* Add Print::availableForWrite method

Adds an availableForWrite() method to the Print class, matching current
ArduinoCore-API commit 398e70f188e2b861c10d9ffe5e2bfcb6a4a4f489 .

Hook availableForWrite into the SDFS filesystem (other FSes don't have
this capability built-in).

Fixes #7650

* WiFiClient::availableForWrite proto matching Print

* Fix Netdump signedness warning

* Clean up Serial availableForWrite

This is evidently a breaking change due to the type difference.
Arduino's `availableForWrite` returns an `int`, while the
(multiply-implemented, non-virtual) core `availableForWrite` returned
`size_t`.
2020-10-27 11:55:42 +01:00
Erriez
95de525af9
Refactor WiFi scan example (#7655) 2020-10-27 11:20:07 +01:00
Earle F. Philhower, III
c65626622a
Fix long password validation in WebServer (#7676)
Use a base64 encode that doesn't add CRs to the output when comparing
username:password values for authentication.

Fixes #7664
2020-10-25 04:03:02 -07:00
Earle F. Philhower, III
8d2f53d9a2
Remove Travis-CI configuration (#7674)
We've moved to Github CI exclusively, because Travis has unfortunately
become exceedingly slow.  Remove the obsolete configuration file.
2020-10-24 11:48:44 -07:00
david gauchard
64def3cd8d
boards.txt: sort by displayed name (#7670)
* boards.txt: sort by displayed name

* reduce diff

* use boardlist instead of boards
2020-10-24 11:39:37 -07:00
david gauchard
95fb104562
settimeofday_cb: distinguish from user or sntp (#7637)
* settimeofday_cb: distinguish from user or sntp
2020-10-23 10:43:45 +02:00
Dirk Niggemann
ace5e98bf6
Fix eboot crash with exception 28. ets_printf() should take pointer argument. (#7666)
* Fix eboot crash with exception 28. ets_printf takes pointer argument, not 32bit literal.

* add missing eboot.elf for 32b load fix

* Corrected pointer use for uint32_t arrays.

* removed accidental change from uitn32_t to int32_t
2020-10-21 15:35:59 -07:00
Earle F. Philhower, III
e920564b8d
Fix Netdump library architecture (#7659)
When building with the Netdump library, the IDE generates the following warning:
> WARNING: library Netdump claims to run on (esp8266 lwip) architecture(s) and may be incompatible with your current board which runs on (esp8266) architecture(s).

Fix the library.properties to call the architecture just "esp8266"
2020-10-17 11:21:40 -07:00
Earle F. Philhower, III
bbc14c0979
Use 32b loads to set print strings (#7545)
Instead of using either a series of etc_putc or setting a series of bytes
one by one, use a simple macro to define 32b constants to build up strings.

Saves ~30 bytes of program code in eboot for #6538 to work with.
2020-10-16 10:52:35 -07:00
Erriez
e79eb1174d
BREAKING: Change return EEPROM.end() to bool (#7630) 2020-10-15 15:03:28 -07:00
Develo
81a10a48af
BREAKING: Change return type of channel() (#7656) 2020-10-15 14:48:00 -07:00
Develo
0452f4728f
BREAKING: Change return type of RSSI() (#7657) 2020-10-15 14:00:30 -07:00
Develo
ccecbfe459
Add Copyright notice to Schedule.h (#7653)
* Add Copyright notice to Schedule.h

* Add copyright notice to Schedule.cpp
2020-10-15 21:09:14 +02:00
hreintke
9003b02889
MDNS MultiInterface (#7636)
* MDNS MultiInterface
* Move strlcat & strlcpy to __cplusplus
* Add LwipIntfCB.cpp to Makefile
2020-10-15 10:39:55 -07:00
Develo
1c624dd76a
BREAKING: Add Wrong Password wifi status case (#7652)
* Add Wrong Password wifi status case
* Add wrong password case for status return
* Add wrong password case for debug
* Add Wrong password case to interactive example
* Add case for wrong password to station doc
* Add case for wrong password to resumeFromShutdown
* Add wrong password case to wifi readme
* Update ESP8266WiFiGeneric.cpp
2020-10-15 09:52:17 -07:00
Drzony
79ea883fb3
New flash writing method with offset/memory/size alignment handling (#7514)
* Do not write more data than requested on PUYA flashes

* Always align flash reads/writes to 4 bytes

* fixup! Always align flash reads/writes to 4 bytes

This commit simplifies the code a bit and fixes a bug that caused wrong number of bytes to be
written

* fixup! Always align flash reads/writes to 4 bytes

* fixup! Always align flash reads/writes to 4 bytes

* Check for result before additional read/write

* Add overloads for unaligned reads/writes

* fixup! Add overloads for unaligned reads/writes

* fixup! Add overloads for unaligned reads/writes

* fixup! Add overloads for unaligned reads/writes

* fixup! Add overloads for unaligned reads/writes

* fixup! Add overloads for unaligned reads/writes

* fixup! Add overloads for unaligned reads/writes

* fixup! Add overloads for unaligned reads/writes

* Add tests for flashRead/flashWrite

* fixup! Add overloads for unaligned reads/writes

* fixup! Add tests for flashRead/flashWrite

* fixup! Add tests for flashRead/flashWrite

* fixup! Add overloads for unaligned reads/writes
2020-10-14 22:21:41 -07:00
Earle F. Philhower, III
200e47fc7b
Fix error when debug enabled but no port chosen (#7648)
When the debug level for the device includes SSL but the debug port is
chosen as "None," don't attempt to write debug messages.

Fixes #7638
2020-10-09 15:54:39 -07:00
david gauchard
bc2b13ae16
LEAmDNSv2: change a macro name to be independant from LEAmDNS1 (#7640) 2020-10-07 12:31:56 +02:00
Max Prokhorov
36b444dba3
Allow test framework to use cores/esp8266/Arduino.h directly (#7377)
* Allow test framework to use cores/esp8266/Arduino.h directly
* fix wps debugging
* some more missing debug.h
* Hunt down debug.h and roll-back
  TODO: rename it to something else... it is an internal header
* Move abs+round checks to test/device/test_sw
* Restore macros for C code
* fixup! Move abs+round checks to test/device/test_sw
* Fix bad c/p, actually try round with ints
* tweak c macros per review
* fix gcc-10 missing cerrno include
2020-10-06 16:18:00 +02:00
Kevin Sidwar
7ba31010be
Update OTA HTTP Server Header Information (#7633)
The headers sent when an OTA update is requested of an HTTP server have changed in the code. This change is to update the documentation accordingly. PHP sample code was changed but not tested.
2020-10-06 12:49:27 +02:00
Harald
01cfc54ccb
Add missing sntp_init/sntp_stop (#7628) 2020-10-06 12:31:45 +02:00
Dirk Mueller
4aeb0f5cca
Use direct member initialization instead of ctr initialisation (#7558)
* Use direct member initialization instead of ctr initialisation

This removes a bit of code repetition.

* Add symbolic names for member initializers
2020-10-05 13:56:08 -07:00
Harald
8b8639e833
Prevent rewriting Updater_Signing.h if content unchanged (#7627) 2020-10-03 12:47:30 -07:00
Develo
d0300806cd
Merge pull request #7631 from Erriez/feature/documentation-wifi-multi
Add WiFi Multi to readme.rst
2020-10-03 14:42:30 -03:00
Erriez
9c9e193f7f Add WiFi Multi to readme.rst 2020-10-03 17:14:25 +02:00
Earle F. Philhower, III
85ba53a249
Remove stray axtls refs, deprecated compat funcs (#7626)
Remove the axTLS compatability functions from WiFiClient/ServerSecure,
device tests for axTLS, and any document refs to axTLS.
2020-10-02 21:39:36 -07:00
Develo
7c8f934d2b
Merge pull request #7619 from Erriez/redesign-wifi-multi
Redesign ESP8266WiFiMulti.[cpp|h]
2020-10-02 16:02:29 -03:00
Develo
fcb5414e02
Merge branch 'master' into redesign-wifi-multi 2020-10-02 15:51:07 -03:00