* Implementation of Functional and Scheduled option in Ticker lib
* Update example formatting
* More example updates
* More updates to example
* More updates to example
* 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
* 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
* 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
* 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.
* 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.
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.
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.
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.
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.
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.
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.
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.
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.
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
* 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);