1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-10 14:42:08 +03:00
Commit Graph

2314 Commits

Author SHA1 Message Date
2126146e20 Fix warnings (#2881)
* Suppressed -Wunused-parameter and -Wunused-function by casting to void unused identifiers.

* Explicit initialization of all fields to suppress -Wmissing-field-initializers.

* Fixed signed/unsigned integer comparison.

* memset initialization of structs.

* More -Wunused-parameter fixes.
2017-01-31 10:07:59 +03:00
d85e783806 Fixed libb64 decoder. (#2883)
* Fixed libb64 decoder.

Libb64 decoder works when "char" type is signed. In esp8266 xtensa gcc "char" is unsigned, so libb64 decoder does not work. In the implementation file I replaced "char" to "int8_t" and created function wrappers in order to keep existing interface.

* For style consistency.
2017-01-20 16:37:53 +08:00
9791a48d4a Fixed incorrect usage of memset() in PWM code which leads to incomplete initialization of struct. Thanks to GCC warning -Wsizeof-pointer-memaccess. 2017-01-19 20:18:31 +08:00
a444898900 Prevent divide by zero error causing tone() to crash (#2780)
* Prevent divide by zero error causing code to crash

As per the issue at #2491, there is a divide by error issue resulting from the specification of 0 as the frequency. This does not appear to affect the AVR implementation, but it crashes on ESP8266s. I have merely removed the division if the frequency is zero, which appears to be giving the expected results (no tone), without any code crashes. 

To test, simply load the toneMelody sketch included with the Arduino IDE (Examples -> 02. Digital -> toneMelody) and change the piezo to something else if you need to. On the Witty module used to test this, I could also tell by the wifi led blinking every time the code crashed as the ESP8266 immediately rebooted.

* Use noTone when frequency is zero

When a frequency of zero is given to tone(), instead call noTone() and exit. Placed after some of the initialisation stuff to ensure the pin is mapped as a output, etc. Tested as functional against a Node MCU 1.0 board and the toneMelody example sketch, using GPIO5 (pin D1).

* Errant tab in formatting

* Rest of tabs that crept in from web editor

Defaulted to tabs and 8 indent :sigh:
2017-01-17 10:09:08 +08:00
f18b18d53d move libstdc++ to flash (#2804)
* move stdc++ to flash

* Update : change tab to leading spaces, correct indentation
2017-01-17 10:08:11 +08:00
cdad2849c5 Added a section on filesystem limitations due to issue #2858 (#2860) 2017-01-17 10:07:08 +08:00
a546d64e07 ESP8266mDNS: support AP and STA interfaces at once
Bind the UDP connection to IP_ADDR_ANY rather than a specific interface
IP, so that it can receive queries from all interfaces at once.

When processing a query, detect which interface it was received on, and
pass this information to the reply code. Set the IP multicast interface
before each transmission, so that we can route each packet to a
different interface if required. These changes enable the code to
respond correctly on both AP and STA interfaces at once. The original
code only worked correctly for the STA interface if both were enabled.

When advertizing all services, do it on both AP and STA interfaces if
they're both enabled.

Provide an API for the application to notify the MDNS code if the AP
configuration changes (enabled, disabled, IP changed). Ideally, the WiFi
core would provide an event callback for this purpose, as it does for
STA changes, but it does not appear to, so the application must provide
this information.
2017-01-17 10:06:01 +08:00
eb1ac103e4 Revert "ESP8266mDNS using the provided IP in the begin method (#2349)"
Manually specifying the AP IP isn't required; the next change will modify
the MDNS code to correctly handle any combination of AP and STA modes, and
correctly respond to requests on all active interfaces.

This reverts commit b682d597c5.
2017-01-17 10:06:01 +08:00
0291a6e32a Update Blink.ino
Typo
2017-01-05 11:50:43 -06:00
b4368ba870 Update curl command 2017-01-05 11:43:26 -06:00
c6c54e710f Use correct cast for downcasting reference.
For downcasting, static_cast<> is the appropriate cast. Using reinterpret_cast<> will NOT correctly adjust the `this` pointer and dereferencing such a value is undefined by spec. See [expr.reinterpret.cast]p7 for the relevant passage. The only legal use of this pointer is in another set of reinterpret_cast expressions that either land it into a numeric value, or back to the original type.
2017-01-05 11:36:56 -06:00
7b32e6ad37 Merge pull request #2534 from jabelone/patch-1
Corrected a typo and improved grammar
2016-11-14 11:03:37 -06:00
da4cab5b27 Merge pull request #2554 from Makuna/SPIFFSFileSeek
Add Arduino File standard seek call
2016-11-14 11:02:46 -06:00
7ccafadb41 Merge pull request #2649 from WereCatf/WiFiClientExamples
Use WIFI_STA in WiFiClient-examples
2016-11-14 11:02:00 -06:00
2f9b13ce1a Merge pull request #2646 from gadgeteer/patch-1
Fixed PUT(String) method, it called POST in error
2016-11-14 11:01:27 -06:00
209c877157 Merge pull request #2444 from krzychb/master
New FAQ - How to resolve "Board generic (platform esp8266, package esp8266) is unknown" error?
2016-11-14 10:55:58 -06:00
3e7b4b8e0c Merge pull request #2640 from Lauszus/variants
Add PIN defines, so the pins can easily be used by external libraries
2016-11-14 10:55:20 -06:00
f4c391032a const-correctness IPAddress::toString() (#2507)
it doesn't modify any member variables, should be safe to be const.
2016-11-14 10:43:40 -06:00
d46d742db1 Use WIFI_STA in WiFiClient-examples
Many people have problems with using ESP8266 as WiFi-client due to
none of the examples mentioning that you should use WIFI_STA if you
only want the ESP8266 to act as a WiFi-client. Many WiFi-devices
will randomly try to connect to the ESP8266 if used as STA+AP and
complain about not being able to access the Internet or other devices
on the network.
2016-10-29 12:40:06 +03:00
4dd9fef491 Fixed PUT(String) method, it called POST in error
About the simplest change possible, just delete two characters and add one. The PUT(String) convenience method called the full POST method instead of calling the PUT method
2016-10-28 14:12:38 -04:00
6d6f22e6be Add PIN defines, so the pins can easily be used by external libraries
See: arduino/Arduino#4814

For instance this is used by the USB Host library: 231fb542a8
2016-10-26 01:29:14 -05:00
b5b7169e51 Add Arduino File standard seek call 2016-09-26 23:54:53 -07:00
bdc43a0206 Corrected some typos and improved grammar
Corrected some typos and improved grammar
2016-09-18 04:07:42 +10:00
5666ec2ec1 const-correctness IPAddress::toString()
it doesn't modify any member variables, should be safe to be const.
2016-09-13 00:32:29 +08:00
cd2e04b6dd Extended troubleshooting section
* Missing reset after serial upload, ref. #2438, #2465
* Port not visible in IDE, ref. #2415
* `[alt text]` added
* Typo corrections
2016-09-02 19:15:30 +02:00
4897e0006b match headers using equalsIgnoreCase (#2474)
Should fix: https://github.com/esp8266/Arduino/issues/2131
2016-09-02 11:49:14 +03:00
c2414a2252 Update axTLS to 144994c
https://github.com/igrr/axtls-8266/pull/23
2016-08-29 13:48:54 +08:00
889775c6fe ArduinoOTA optimizations (#2445)
- Added option to control if the ESP should be rebooted on success
- Added delay before ESP.restart() is called
- Added some comments to the header
2016-08-27 18:32:26 +03:00
28b0c7b98f Desription of new FAQ item
How to resolve "Board generic (platform esp8266, package esp8266) is
unknown" error?
2016-08-27 12:50:09 +02:00
27854bc9b4 New FAQ added to the index
How to resolve "Board generic (platform esp8266, package esp8266) is
unknown" error?

Ref. #2297, #2156, #2022, #1802, #1514, #1387, #1377, #1251, #1247, #948
2016-08-27 12:35:36 +02:00
b41266097f WiFiClientSecure: certificate loading refactoring, support for CA root cert verification 2016-08-25 13:01:10 +08:00
7f6e0c98f6 core: fix bug in gettimeofday
gettimeofday used to return timestamps which had tv_sec 1000 times smaller than the correct value.
s_bootTime is in seconds, so no need to divide it by 1000.
2016-08-25 12:51:57 +08:00
35ee060c09 axTLS: update to d26f23a (2.0.0+) 2016-08-25 12:49:32 +08:00
d6e38f0abd ESP8266WiFi library documentation (#2388)
* New section with ESP8266WiFi library documentation

* ESP8266WiFi library documentation

1. Introduction - example, diagnostic, doxygen
2. Station - examples, new doc
3. Soft Access Point - examples, new doc
4. Scan - examples, new doc
5. Client - examples, ref. Arduino, setNoDelay, list of functions
6. Client Secure - examples, loadCertificate, setCertificate, list of
functions
7. Server- examples, ref. Arduino, setNoDelay, list of functions
8. UDP - examples, ref. Arduino, Multicast UDP
9. Generic - examples, onEvent, WiFiEventHandler, persistent, mode, list
of functions

* Fixed numbered list
2016-08-25 11:01:05 +08:00
45f177f985 weaken axTLS methods so they can be overwritten by the async library (#2423) 2016-08-23 01:11:06 +03:00
4754f4317c SD: change 'char *' parameters to 'const char *' to fix bad recursion (#2398) 2016-08-22 21:11:34 +08:00
497d19d039 out_min should not be in divisor (#2408)
fixes fb00e64a6f error
2016-08-18 12:38:01 +03:00
fb00e64a6f detect division by zero in map() to prevent exceptions (#2397)
Will return -1 like AVR would
2016-08-18 10:50:59 +03:00
7746288b41 fix mdns.h guard defines (#2396) 2016-08-18 10:19:56 +03:00
b250381d80 make updater fail if there is not enough space to fit the new firmware (#2405) 2016-08-18 09:59:35 +03:00
4ececda82b fixed crash in mDNS destructor (#2389) 2016-08-12 21:51:11 +03:00
8cd331a8ba optimize uart rx isr and lower fifo full treshold (#2355) 2016-08-01 12:34:32 +03:00
0718188264 fix NetBIOS example file name (#2354) 2016-08-01 11:52:44 +03:00
b682d597c5 ESP8266mDNS using the provided IP in the begin method (#2349)
this fix forces the mDNS to use the provided IP in the begin method
instead of the auto detected IP. this is required if the ESP8266 starts
in the AP_STA mode and activates only the AP initially.
2016-08-01 11:49:47 +08:00
c4c207a85e Optimize MDNS to prevent overflow and endless loop (#2333)
* Optimize MDNS to prevent overflow and endless loop

* Handle better non-esp services

* leave debug off

* better name resolution for external devices

* strip name length (did not show in IDE)
2016-08-01 11:48:23 +08:00
db5e20f237 proposal for issue #1845 wifi_wps_status_cb get an undefined status 4 and missed wifi_wps_disable (#2312) 2016-08-01 11:46:29 +08:00
c52088c774 set max_connection from code (when less than 4 is needed) (#2326)
* Update ESP8266WiFiAP.cpp

It is not very common but some might require to set the maximum number of clients, from code, to smaller than 4.
in my case i must allow only one client at a time (TESTED WORKING)

* Update ESP8266WiFiAP.h

as discussed in the .cpp (set max connections)

* Update ESP8266WiFiAP.cpp

corrected indentation @70 
add param comment @86

* Update ESP8266WiFiAP.cpp
2016-08-01 11:45:34 +08:00
be3727c71f Use stable documentation of PlatformIO (#2337) 2016-08-01 11:45:05 +08:00
18297458be allows global object instances be switch off with defines (#2344) 2016-08-01 11:21:50 +08:00
bd01e44c76 fix link list bug in ESP8266mDNS (#2347) 2016-08-01 11:21:21 +08:00