1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

2792 Commits

Author SHA1 Message Date
hreintke
adde93bcaa Implementation of Functional and Scheduled option in Ticker lib (#5030)
* Implementation of Functional and Scheduled option in Ticker lib

* Update example formatting

* More example updates

* More updates to example

* More updates to example
2018-08-14 16:00:20 -03:00
SarenT
cbcefa7d3f Analog input voltage can be 3.3V (#5020)
* Analog input voltage can be 3.3V

According to this tutorial and my personal test with my Amica, 1.0V delivers 320 and 3.3V delivers 1024 at 10-bit resolution. I guess 3.3V is possible.

* Update reference.rst

Added warnings.

* Update reference.rst

* Update reference.rst

requested  changes
2018-08-13 22:53:39 -03:00
Ivan Kravets
a0e6d22ac1
Switch to isolated build flags per framework (#5028) 2018-08-11 20:01:20 +03:00
Ivan Grokhotkov
559a286f02 Minor fixes for #4999 (#5003)
* ci: work around tagging issue in Travis CI deployment

When `draft: true` is set, incorrect commit/tag information is sent to
Github. Override tag/target fields for correct behavior.

Ref. https://github.com/travis-ci/travis-ci/issues/9852

* doc: clarify some points in the release process
2018-08-08 14:12:02 -04:00
Jiří Engelthaler
f77645465c CaptivePortalAdvanced: Change debug print to println 2018-08-04 15:01:54 +03:00
WEMOS Electronics
319adc6b8a Fix boards.txt.py compatible with python3 (#4998) 2018-08-03 10:45:03 +02:00
Ivan Grokhotkov
8b55758546 Bump version to 2.5.0-dev 2018-08-03 09:56:17 +03:00
Ivan Grokhotkov
bb28d4a392 Release 2.4.2 2.4.2 2018-08-03 09:54:08 +03:00
Ivan Grokhotkov
1dba69d87e doc: add document describing the release process 2018-08-03 09:51:29 +03:00
Ivan Grokhotkov
0f762f64af ci: deploy released package index to arduino.esp8266.com 2018-08-03 09:51:29 +03:00
Jeroen88
e4d9c279ef Function added to detect baudrate (#4978)
* Function added to detect baudrate

* Added uart_start_detect_baudrate, detectBaudrate() wrappers for HardwareSerial and an example usage SerialDetectBaudrate.ino

* Some layout changes to pass Travis tests

* Some more nitty-gritty layout changes to pass Travis tests

* Some even more nitty-gritty layout changes to pass Travis tests

* renamed one function to testBaudrate() and updated doc/reference.rst

* Minor updates to doc/reference.rst

* New lines added
2018-08-01 15:33:25 -04:00
david gauchard
3ab38d690d board generator documentation (#4989)
* update "more flash" doc

* doc: try to emphasize OOM knowledge

* fighting with markdown?

* it seems I can't emphasize text in link

* board generator doc: need reviewers

* markdown formatting, typos

* typos

* add links

* + last memory failure allocation + emphasis exception decoder

* more emphasis on exception decoder

* repeat the board generator introduction

* fixes
2018-08-01 00:00:59 -04:00
aerlon
7d5997dad1 Update of mesh network library. (#4718)
* Make mesh network actually usable. Make mesh network use static IP during initial connection to speed up connection time. Add separate handlers for requests and responses. Add network password. Provide more detailed code example. Add optional verbose mode. Improve comments. Add readme file.

* Fix compiler warnings. Fix code style of HelloMesh.ino to avoid upsetting Travis.

* Remove stray spaces.

* Make mesh network WiFi password settable via the ESP8266WiFiMesh constructor. Make use of static IP optional by moving static IP initialization code to setStaticIP method. Increase scanning interval from one to two seconds in the HelloMesh.ino example to increase chances of successful connections. Update comments. Update README.rst.

* Increase specificity in the conditions of the waitForClientTransmission method (renamed from waitForClient) to avoid issues related to #4626 , #4728 and #4754 in the future.

* Improve most parts of the library to achieve better performance and greatly increase flexibility.

Changes:
* Make WiFi-connection related variables static to allow for the use of multiple ESP8266WiFiMesh instances on a single node (useful e.g. when communicating with several different mesh networks).
* Make it possible to choose AP port, which is helpful when using multiple ESP8266WiFiMesh AP:s on a single node.
* Add user-customizable network filter.
* Make activation of own AP optional for each mesh node.
* Add ways to change mesh network name and node id for existing ESP8266WiFiMesh instances.
* Add verboseModePrint method to clean up the code.
* Add reactivation of static IP after successful data transfers to speed up re-connection attempts.
* Add empty_IP constant which can be used to check if static IP is disabled for a ESP8266WiFiMesh instance.
* Remove the WiFiClient _client class variable in ESP8266WiFiMesh since there is no need to save _client in the class instance.
* Add transmission status as a return value from attemptTransmission.
* Pass calling ESP8266WiFiMesh instance pointer to callback functions to allow for greater range of actions in callbacks.
* Make transmission message a class variable to allow it to be stored in the class and accessed from callbacks.
* Add getters for mesh name and node id to ESP8266WiFiMesh.
* Add getter and setter for networkFilter to ESP8266WiFiMesh.
* Increase range of available node_id:s by changing the type to String and adding functions to convert between String and uint64_t using a customizable radix between 2 and 36.
* Make it possible to connect to several nodes during each attemptTransmission call.
* Add static connection_queue and latest_transmission_outcomes vectors to the ESP8266WiFiMesh class, a NetworkInfo class and a TransmissionResult class to aid in bookkeeping when connecting to several AP:s during one attemptTransmission call.
* Make wifi_channel and BSSID optional when connecting to an AP (though excluding them will slow down the connection process).
* Add optional scan and static ip optimizations available in Arduino core for ESP8266 version 2.4.2.
* Add functions to check lwIP version in order to enable WiFi optimizations only available with lwIP2.
* Add concluding_disconnect, initial_disconnect and no_scan options to the attemptTransmission method.
* Update documentation.

* Improve README.rst formatting.

* Further improve README.rst.

* Even further improve README.rst.

* Make source code comments Doxygen compatible. Improve README file and change its file format to .md.

* Add temporary compatibility layer to ensure backwards compatibility with the old mesh network library API until the next major core release (2.5.0).

* Polish documentation slightly.

* Add scan_all_wifi_channels option to attemptTransmission method.

* - Add getter and setter for the WiFi channel of a ESP8266WiFiMesh instance.
- Separate methods for changing mesh name and node id from AP control methods.
- Add methods getAPController and isAPController to better handle situations when multiple ESP8266WiFiMesh instances take turns to be in control of the AP.
- Create separate UtilityMethods.cpp file for utility methods.
- Improve code efficiency and robustness, e.g. by passing arguments by reference instead of by value for non-POD types and employing typedefs.
- Update README.md.

* Make the code more stylish.

* Update README.md with the new ESP8266WiFiMesh constructor documentation.

* Make attemptScan method in CompatibilityLayer use reference as argument.

* Make it possible to use const String as argument to attemptScan.

* - Make code use camelCase instead of snake_case.
- Improve documentation.

* Rename Uint64ToString to uint64ToString and StringToUint64 to stringToUint64, since they are methods.
2018-07-31 22:46:20 -04:00
WEMOS Electronics
b1f0435fb3 change "WeMos" to new brand name "LOLIN" (#4984)
* change "WeMos" to new brand name "LOLIN"
2018-07-31 20:55:35 -04:00
Laercio Mendonça
75a6a3f073 Include SetUUID for SSDP (#4981)
* Include SetUUID for SSDP

Inclusion of the SetUUID Method for Custom UUID

* Ajusts PR

* Include IconList Object on XML
2018-07-30 01:52:16 -04:00
Steven Conaway
0899ae9d3e Update a03-library-does-not-work.rst (#4971) 2018-07-28 21:43:17 -04:00
Joseph Spencer
2ee744ecdd Adding Notes in WiFi.begin docs (closes #4949) (#4958)
* Also fixing formatting of unrelated link in station class docs.
2018-07-28 20:52:54 -04:00
WEMOS Electronics
799193888a Fix digitalPinToBitMask(), portOutputRegister(), portInputRegister() … (#4964)
* fix digitalPinToBitMask(), portOutputRegister(), portInputRegister() and portModeRegister() error when the pin is GPIO16.
2018-07-28 10:07:01 -07:00
Earle F. Philhower, III
03ea61a32a Add valgrind and string tests to host_tests (#4939)
* Add valgrind and string tests to host_tests

Valgrind identified an error that was causing intermittent failures in
the host tests, and can check for subtle memory access and allocation bugs.
Add it to the standard host_test suite, and any errors will cause test
failure.

Also start adding string tests, since two undefined behaviors have been
found so far just by inspection.

* Add additional String tests

Looks like a possible bug in the concatenation operator, need to verify
expected behavior.

* Remove verbose from valgrind run

No need to be so chatty on the test.  Errors were a little hard to spot.
Go to normal verbosity.

* Add lcov and more string tests

LCOV and genhtml can generate nice HTML coverage charts hilighting test
coverage issues in a much simpler way than gcov text format.  Generate these
automatically from gcov output.

Add additional string creation and comparison tests.

* Move String coverage to >50%

Additional string tests and checks

* 66% test coverage in String

* Add allocation-unit-sized strings test

Ensure that strings that are right on the edge of the allocation
size are handled properly and account for trailing 0.
2018-07-27 13:10:55 -04:00
david gauchard
3cc12b1e08 arduino API's SPI::transfer(void*, size) (optimized) (#4925)
* SPI::transfer(void*, size) (optimized)

* spi: transfer(): fix checking size

* spi: transferBytes_: 32bits miso transfer

* spi: transferBytes_: fix declaration

* spi: transferBytes: add comments, reduce diff
2018-07-27 10:44:02 -04:00
Earle F. Philhower, III
9c846bd52e
Fix concat not 0-terminating when String shrunk (#4962)
As @devyte noticed, PR #4955 has an issue when you catenate a string to
itself and the string used to hold a longer value because it does not
explicitly 0-terminate the resulting string.  If the string was extended,
however, reserve() would 0-terminate by default.

Always terminate the result of `s += s;` now.
2018-07-26 09:07:28 -07:00
Earle F. Philhower, III
ff74813d54 Fix String creation and concat issues (#4955)
When a string is concatted to itself, the pointer to its c_str can change
due to realloc().  This would invalidate the passed-in pointer being
concatted, and cause a use-after-free error.  Special case this to avoid
the issue.  Now "a += a;" works properly.

Also use sprintf(%{l}d) instead of non-POSIX ltoa/itoa calls to construct a
string from a signed number (in base 10 only).  The non-posix versions don't
handle INT_MIN properly on either host_tests or on the ESP8266.
2018-07-24 16:20:57 -04:00
Earle F. Philhower, III
bde83e8ea2
Fix waveform missing edges on cycle rollover (#4945)
When the ESP cycle counter rolls over, the "now" can be smaller than the
next-edge time of a waveform generator.  This would cause the edge to be
missed on that specific pin, and make it look like PWM was hung.

Use proper comparison between current time and edge time.

Fixes #4944

Also remove the "sigma-delta.c.unused" file which was replaced by a
working one some time ago.
2018-07-21 18:46:51 -07:00
Jack Shao
3906ee4d91 Add support for Seeed Wio Link board (#4943) 2018-07-20 14:51:32 -04:00
LaborEtArs
3f6be5ecc8 Adjusted buffer size algorithm (#4934)
Use cencode.h defined macros to calculate the needed buffer size.
2018-07-19 18:16:51 -04:00
Earle F. Philhower, III
63ab79e549
Fix overlapping memcpy call in String::trim (#4938)
memcpy() is undefined when source and destination overlap.  String::trim
uses it when shifting the string left to remove left padding.

Replace with memmove() which is always safe, even when overlapped.
2018-07-18 18:36:31 -07:00
brendanvanbreda
e5648f3dfd Add support for XinaBox (#4929)
Add support for the XinaBox CW01;
2018-07-17 11:53:26 -07:00
A C SREEDHAR REDDY
79a7ff8263 Update stack_dump.rst (#4933) 2018-07-17 09:22:13 -04:00
Earle F. Philhower, III
96a340eb51 Fix intermittent host tests failure (#4932)
MD5Builder tests have been randomly, non-repeatably failing due to a problem
with the returned value of MD5Builder.

Valgrind detected a strncpy with an overlapping memory range, which is
an undefined operation.  Fix it with a memmove instead, and get rid
of a couple #define redefinitions which were causing compile warnings
on the host side as well.
2018-07-16 23:22:55 -04:00
Earle F. Philhower, III
53091882b8
Fix minor BearSSL API issues (#4901)
Fixes #4882 and updates GitHub certificate fingerprint to the current one
in BearSSL_Validation example.

When setting a authentication mode or stopping, clear all others out in case
the object is being re-used.

Add in a yield during the SSL handshake to allow a graceful timeout and not
a WDT error when the remote server hiccups.  Thanks to @Jeroen88 for
finding and testing this.
2018-07-16 09:35:00 -07:00
Earle F. Philhower, III
fcf2ac5d3d
Optimize waveform stop routines (#4920)
Thanks to ideas from @shimarin for offering ideas to speed up the stopWaveform
calls which may help things like SoftwareSerial run better.

Optimize the stopWaveform routine to abort fast and early whenever possible.

Remove the stopWaveform call from digitalRead().  If you're running a waveform
on a pin and try to read it, that is a logic error and you'll end up reading the
waveform and not the outside world's view of the pin.
2018-07-12 12:45:48 -07:00
teejaydub
60b21ef568 Copy the existing flash mode over the one set in an OTA update image. (#4877) 2018-07-11 12:30:56 -04:00
Tomoatsu Shimada
e6af980b85 Avoid unnecessary waveform de-initialization which corrupts softwareserial (#4913) 2018-07-10 12:40:14 -07:00
david gauchard
ce33c2cffe
informative message on top of boards.txt (#4910) 2018-07-09 18:36:39 +02:00
Earle F. Philhower, III
00c35be985
Update to latest BearSSL library version, fixes #4898 (#4900)
* Update to latest BearSSL library version, fixes #4898

* Actually install the updated BearSSL lib/headers
2018-07-09 06:05:40 -07:00
Earle F. Philhower, III
89d2f42153
Note that CERTS.IDX file is generated on-chip (#4902)
Several users have been worried that they need to generate the IDX file,
but don't know how.  The CertStore code actually writes this file on object
creation, and the user never needs to explicitly generate or upload it.

Add a comment to the example explicitly noting this.
2018-07-08 21:54:40 -07:00
Earle F. Philhower, III
945535ae78
Make ar compatible with GNU and BSD in example (#4907)
Change the "ar" options in the example CertStore.AR archive generator to
make them compatible with both Linux and MacOS.
2018-07-08 21:12:32 -07:00
Earle F. Philhower, III
d948a1ff2a
Don't stop a waveform simply by calling pinMode (#4906)
Setting a pin direction would cause a waveform generator attached to it to stop.
This could cause PWM to stop if pinMode() is called while running (as it was
called in __analogWrite()).

Remove the stopWaveform call from pinMode, the Tone, analogWrite, or Servo
that initiated the waveform has responsibility for stopping it (and it does)
when complete, irrespective of the pinMode.

Fixes #4905
2018-07-08 20:27:13 -07:00
david gauchard
e486887f18
optionally allow WPS (#4889) 2018-07-06 16:45:25 +02:00
A C SREEDHAR REDDY
e0b6242e04 clear mdns.queryservice()'s previous result when called (#4894)
cleared the linkedlist.
* issue #4893
2018-07-05 23:17:53 -04:00
liebman
12d52220ae pin 16 is allowed for analogWrite (#4895) 2018-07-05 18:19:52 -07:00
hreintke
87991aba9f ScheduledInterrupts should still use current schedule_function(..) (#4890) 2018-07-04 12:55:07 -04:00
david gauchard
672c3f8d79
boards updates: nodemcu doc update (@lrmoreno007 #4715) + 512k32spiffs (@carlymx #4871) (#4880)
* boards updates: nodemcu doc update (@lrmoreno007 #4715) + 512k32spiffs (@carlymx #4871)

* sometimes -> usually
2018-07-03 22:14:06 +02:00
david gauchard
7dd2ca355c
scripts for comparing core closed libs against esp-nonos-sdk ones (#4855) 2018-07-03 11:45:22 +02:00
klucsik
b126a9c526 https fingerprint clue (#4863)
Adding a clue on the https part that yo will definitely need the fingerprint. 
(My first commit)
2018-07-03 00:40:50 -04:00
david gauchard
d580f40e44
fix scheduled interrupt #4609 by @shimarin (#4879) 2018-07-02 23:33:55 +02:00
Earle F. Philhower, III
be7a732b9d Compatibility and IRQ fixed for waveform/tone/pwm (#4872)
* Compatibility and IRQ fixed for waveform/tone/pwm

Fix a compiler ambiguity introduced with a floating point frequency option
for tone().  Thanks to @Rob58329 for discovering this and proposing the
fix.

Match original analogWrite behavior by going from 0...1023 (PWMRANGE) and
not 0...1024, and also explicitly set the analogWrite pin to an OUTPUT.
Thanks to @jandrassy for finding this.

Fixes #4380 discovered by @cranphin where interrupts were disabled on a
stopWaveform().  Remove that completely and bracket the update of non-atomic
fields in the structure with disable/enable IRQs for safety.

* Fix tone(int,int,int) infinite loop

Explicitly cast the frequency, when passed in as an int, to an
unsigned int.  Verified with snippet:
  tone(D1, (int)1000, 500);
  tone(D1, (unsigned int)1000, 500);
  tone(D1, 1000.0, 500);
  tone(D1, (int)1000);
  tone(D1, (unsigned int)1000);
  tone(D1, 1000.0);
2018-07-02 13:02:49 -04:00
ZaPpInG
1eb0645dcb Improve the compatibility of the doc between Github and RTD... (#4800)
* Update requirements.txt

* Update conf.py

* Update libraries.rst

* Update libraries.rst

* Update libraries.rst

* Update stack_dump.rst

* Update client-examples.rst

* Update readme.rst

* Update readme.rst

* Update server-class.rst

* Update server-examples.rst

* Update soft-access-point-class.rst

* Update station-class.rst

* Update station-examples.rst

* Update udp-class.rst

* Update udp-examples.rst

* Update a04-board-generic-is-unknown.rst

* Update readme.rst

* Update readme.rst

* Update readme.rst
2018-06-28 10:58:33 -04:00
gojimmypi
0f34bd85d8 Windows 10 instructions (#4797)
* Instructions update

added correction for Windows 10 git install directory

* Update installing.md

* Update installing.rst

* Reminder for VisualMicro

install clarifications

* tidy up links 

markup works differently in rst vs md

* formatting cleanup

* corrected default sketch directory

the default Arduino Sketchbook directory is C:\users\{username}\Documents\Arduino (thanks @Juppit)

https://github.com/esp8266/Arduino/pull/4797#issuecomment-396650538

* check for directory before creating
2018-06-27 18:04:35 -04:00
david gauchard
74819a763b
lwip2: fix disconnection, fix reconnection (#4851) 2018-06-27 10:47:17 +02:00