1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

Add code-spell spelling checks to CI (#8067)

Help find and fix silly spelling errors as they are added to the repo.
This commit is contained in:
Earle F. Philhower, III
2021-05-23 08:53:04 -07:00
committed by GitHub
parent 78a2ed6bd8
commit 60fe7b4ca8
133 changed files with 273 additions and 260 deletions

View File

@ -33,7 +33,7 @@ struct DNSHeader
uint16_t ID; // identification number
unsigned char RD : 1; // recursion desired
unsigned char TC : 1; // truncated message
unsigned char AA : 1; // authoritive answer
unsigned char AA : 1; // authoritative answer
unsigned char OPCode : 4; // message_type
unsigned char QR : 1; // query/response flag
unsigned char RCode : 4; // response code

View File

@ -189,7 +189,7 @@ void ESP8266AVRISP::get_parameter(uint8_t c) {
}
void ESP8266AVRISP::set_parameters() {
// call this after reading paramter packet into buff[]
// call this after reading parameter packet into buff[]
param.devicecode = buff[0];
param.revision = buff[1];
param.progtype = buff[2];

View File

@ -57,7 +57,7 @@ void loop() {
// file found at server
if (httpCode == HTTP_CODE_OK) {
// get lenght of document (is -1 when Server sends no Content-Length header)
// get length of document (is -1 when Server sends no Content-Length header)
int len = http.getSize();
// create buffer for read

View File

@ -68,7 +68,7 @@ void loop() {
// file found at server
if (httpCode == HTTP_CODE_OK) {
// get lenght of document (is -1 when Server sends no Content-Length header)
// get length of document (is -1 when Server sends no Content-Length header)
int len = https.getSize();
// create buffer for read

View File

@ -321,7 +321,7 @@ bool HTTPClient::setURL(const String& url)
}
/**
* set redirect follow mode. See `followRedirects_t` enum for avaliable modes.
* set redirect follow mode. See `followRedirects_t` enum for available modes.
* @param follow
*/
void HTTPClient::setFollowRedirects(followRedirects_t follow)
@ -481,7 +481,7 @@ int HTTPClient::sendRequest(const char * type, const uint8_t * payload, size_t s
// no redirection
break;
}
// redirect using the same request method and payload, diffrent URL
// redirect using the same request method and payload, different URL
redirect = true;
}
break;
@ -703,7 +703,7 @@ const String& HTTPClient::getString(void)
_payload.reset(new StreamString());
if(_size > 0) {
// try to reserve needed memmory
// try to reserve needed memory
if(!_payload->reserve((_size + 1))) {
DEBUG_HTTPCLIENT("[HTTP-Client][getString] not enough memory to reserve a string! need: %d\n", (_size + 1));
return *_payload;

View File

@ -161,7 +161,7 @@ public:
bool begin(WiFiClient &client, const String& url);
bool begin(WiFiClient &client, const String& host, uint16_t port, const String& uri = "/", bool https = false);
// old API is now explicitely forbidden
// old API is now explicitly forbidden
bool begin(String url) __attribute__ ((error("obsolete API, use ::begin(WiFiClient, url)")));
bool begin(String host, uint16_t port, String uri = "/") __attribute__ ((error("obsolete API, use ::begin(WiFiClient, host, port, uri)")));
bool begin(String url, const uint8_t httpsFingerprint[20]) __attribute__ ((error("obsolete API, use ::begin(WiFiClientSecure, ...)")));

View File

@ -72,7 +72,7 @@ void ESP8266HTTPUpdateServerTemplate<ServerType>::setup(ESP8266WebServerTemplate
ESP.restart();
}
},[&](){
// handler for the file upload, get's the sketch bytes, and writes
// handler for the file upload, gets the sketch bytes, and writes
// them through the Update object
HTTPUpload& upload = _server->upload();

View File

@ -7,7 +7,7 @@
* Version 1.1
* Copyright (c) 2013 Tony DiCola (tony@tonydicola.com)
* ESP8266 port (c) 2015 Ivan Grokhotkov (ivan@esp8266.com)
* MDNS-SD Suport 2015 Hristo Gochkov
* MDNS-SD Support 2015 Hristo Gochkov
* Extended MDNS-SD support 2016 Lars Englund (lars.englund@gmail.com)
*
* License (MIT license):

View File

@ -7,7 +7,7 @@
* Version 1.1
* Copyright (c) 2013 Tony DiCola (tony@tonydicola.com)
* ESP8266 port (c) 2015 Ivan Grokhotkov (ivan@esp8266.com)
* MDNS-SD Suport 2015 Hristo Gochkov
* MDNS-SD Support 2015 Hristo Gochkov
* Extended MDNS-SD support 2016 Lars Englund (lars.englund@gmail.com)
*
* License (MIT license):

View File

@ -25,7 +25,7 @@ Usage
file.
2. Include the ESP8266LLMNR library in the sketch.
3. Call the LLMNR.begin() method in the sketch's setup() function, and provide
the hostname to advertize. This should not include any ".local" prefix.
the hostname to advertise. This should not include any ".local" prefix.
4. If ESP8266 AP mode is enabled, disabled, or the WiFi or AP configuration is
changed, call LLMNR.notify_ap_change() after the change is made.
@ -70,7 +70,7 @@ ESP8266 Multicast DNS (port of CC3000 Multicast DNS library)
Version 1.1
Copyright (c) 2013 Tony DiCola (tony@tonydicola.com)
ESP8266 port (c) 2015 Ivan Grokhotkov (ivan@esp8266.com)
MDNS-SD Suport 2015 Hristo Gochkov
MDNS-SD Support 2015 Hristo Gochkov
Extended MDNS-SD support 2016 Lars Englund (lars.englund@gmail.com)
Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -7,7 +7,7 @@
Version 1.1
Copyright (c) 2013 Tony DiCola (tony@tonydicola.com)
ESP8266 port (c) 2015 Ivan Grokhotkov (ivan@esp8266.com)
MDNS-SD Suport 2015 Hristo Gochkov
MDNS-SD Support 2015 Hristo Gochkov
Extended MDNS-SD support 2016 Lars Englund (lars.englund@gmail.com)
License (MIT license):

View File

@ -171,7 +171,7 @@ void handleStatus() {
/*
Return the list of files in the directory specified by the "dir" query string parameter.
Also demonstrates the use of chuncked responses.
Also demonstrates the use of chunked responses.
*/
void handleFileList() {
if (!fsOK) {
@ -479,7 +479,7 @@ void handleFileUpload() {
/*
The "Not Found" handler catches all URI not explicitely declared in code
The "Not Found" handler catches all URI not explicitly declared in code
First try to find and return the requested file from the filesystem,
and if it fails, return a 404 page with debug information
*/
@ -555,7 +555,7 @@ void setup(void) {
DBG_OUTPUT_PORT.println(fsOK ? F("Filesystem initialized.") : F("Filesystem init failed!"));
#ifdef USE_SPIFFS
// Debug: dump on console contents of filessytem with no filter and check filenames validity
// Debug: dump on console contents of filesystem with no filter and check filenames validity
Dir dir = fileSystem->openDir("");
DBG_OUTPUT_PORT.println(F("List of files at root of filesystem:"));
while (dir.next()) {

View File

@ -134,7 +134,7 @@ bool handleFileRead(String path) {
/*
The "Not Found" handler catches all URI not explicitely declared in code
The "Not Found" handler catches all URI not explicitly declared in code
First try to find and return the requested file from the filesystem,
and if it fails, return a 404 page with debug information
*/

View File

@ -73,7 +73,7 @@ int fetchMaxFragmentLength() {
// returns true then you can use the ::setBufferSizes(rx, tx) to shrink
// the needed BearSSL memory while staying within protocol limits.
//
// If MFLN is not supported, you may still be able to mimimize the buffer
// If MFLN is not supported, you may still be able to minimize the buffer
// sizes assuming you can ensure the server never transmits fragments larger
// than the size (i.e. by using HTTP GET RANGE methods, etc.).

View File

@ -142,7 +142,7 @@ GBEnkz4KpKv7TkHoW+j7F5EMcLcSrUIpyw==
#define USE_CACHE // Enable SSL session caching.
// Caching SSL sessions shortens the length of the SSL handshake.
// You can see the performance improvement by looking at the
// Network tab of the developper tools of your browser.
// Network tab of the developer tools of your browser.
//#define DYNAMIC_CACHE // Whether to dynamically allocate the cache.
#if defined(USE_CACHE) && defined(DYNAMIC_CACHE)

View File

@ -135,7 +135,7 @@ vEsXCS+0yx5DaMkHJ8HSXPfqIbloEpw8nL+e/IBcm2PN7EeqJSdnoDfzAIJ9VNep
BearSSL::Session session;
client.setSession(&session);
Serial.printf("Connecting with an unitialized session...");
Serial.printf("Connecting with an uninitialized session...");
start = millis();
client.setTrustAnchors(&cert);
fetchURL(&client, host, port, path);

View File

@ -123,7 +123,7 @@ void setup() {
}
String line = client.readStringUntil('\n');
if (line.startsWith("{\"state\":\"success\"")) {
Serial.println("esp8266/Arduino CI successfull!");
Serial.println("esp8266/Arduino CI successful!");
} else {
Serial.println("esp8266/Arduino CI has failed");
}

View File

@ -149,7 +149,7 @@ void loop() {
//check TCP clients for data
#if 1
// Incredibly, this code is faster than the bufferred one below - #4620 is needed
// Incredibly, this code is faster than the buffered one below - #4620 is needed
// loopback/3000000baud average 348KB/s
for (int i = 0; i < MAX_SRV_CLIENTS; i++)
while (serverClients[i].available() && Serial.availableForWrite() > 0) {

View File

@ -161,7 +161,7 @@ class ServerSessions {
ServerSessions(ServerSession *sessions, uint32_t size) : ServerSessions(sessions, size, false) {}
// Dynamically allocates a cache for the given number of sessions and initializes it.
// If the allocation of the buffer wasn't successfull, the value
// If the allocation of the buffer wasn't successful, the value
// returned by size() will be 0.
ServerSessions(uint32_t size) : ServerSessions(size > 0 ? new ServerSession[size] : nullptr, size, true) {}
@ -178,7 +178,7 @@ class ServerSessions {
// Size of the store in sessions.
uint32_t _size;
// Store where the informations for the sessions are stored.
// Store where the information for the sessions are stored.
ServerSession *_store;
// Whether the store is dynamically allocated.
// If this is true, the store needs to be freed in the destructor.

View File

@ -273,7 +273,7 @@ int8_t ESP8266WiFiMulti::startScan()
* @param connectTimeoutMs
* WiFi connect timeout in ms
* @return
* WiFi conneciton status
* WiFi connection status
*/
wl_status_t ESP8266WiFiMulti::connectWiFiMulti(uint32_t connectTimeoutMs)
{

View File

@ -506,7 +506,7 @@ IPAddress ESP8266WiFiSTAClass::dnsIP(uint8_t dns_no) {
/**
* Get the broadcast ip address.
* @return IPAddress Bradcast IP
* @return IPAddress Broadcast IP
*/
IPAddress ESP8266WiFiSTAClass::broadcastIP()
{

View File

@ -947,7 +947,7 @@ extern "C" {
uint16_t suites[cipher_cnt];
memcpy_P(suites, cipher_list, cipher_cnt * sizeof(cipher_list[0]));
br_ssl_client_zero(cc);
br_ssl_engine_add_flags(&cc->eng, BR_OPT_NO_RENEGOTIATION); // forbid SSL renegociation, as we free the Private Key after handshake
br_ssl_engine_add_flags(&cc->eng, BR_OPT_NO_RENEGOTIATION); // forbid SSL renegotiation, as we free the Private Key after handshake
br_ssl_engine_set_versions(&cc->eng, BR_TLS10, BR_TLS12);
br_ssl_engine_set_suites(&cc->eng, suites, (sizeof suites) / (sizeof suites[0]));
br_ssl_client_set_default_rsapub(cc);
@ -973,7 +973,7 @@ extern "C" {
uint16_t suites[cipher_cnt];
memcpy_P(suites, cipher_list, cipher_cnt * sizeof(cipher_list[0]));
br_ssl_server_zero(cc);
br_ssl_engine_add_flags(&cc->eng, BR_OPT_NO_RENEGOTIATION); // forbid SSL renegociation, as we free the Private Key after handshake
br_ssl_engine_add_flags(&cc->eng, BR_OPT_NO_RENEGOTIATION); // forbid SSL renegotiation, as we free the Private Key after handshake
br_ssl_engine_set_versions(&cc->eng, BR_TLS10, BR_TLS12);
br_ssl_engine_set_suites(&cc->eng, suites, (sizeof suites) / (sizeof suites[0]));
#ifndef BEARSSL_SSL_BASIC

View File

@ -34,7 +34,7 @@ extern "C" {
// lwIP-v2 backlog facility allows to keep memory safe by limiting the
// maximum number of incoming *pending clients*. Default number of possibly
// simultaneously pending clients is defined in WiFiServer.cpp
// (MAX_PENDING_CLIENTS_PER_PORT=5). User can overide it at runtime from
// (MAX_PENDING_CLIENTS_PER_PORT=5). User can override it at runtime from
// sketch:
// WiFiServer::begin(port, max-simultaneous-pending-clients);
//

View File

@ -44,7 +44,7 @@ public:
// initialize, start listening on specified port.
// Returns 1 if successful, 0 if there are no sockets available to use
uint8_t begin(uint16_t port) override;
// Finish with the UDP connetion
// Finish with the UDP connection
void stop() override;
// join a multicast group and listen on the given port
uint8_t beginMulticast(IPAddress interfaceAddr, IPAddress multicast, uint16_t port);
@ -58,7 +58,7 @@ public:
// Returns 1 if successful, 0 if there was a problem resolving the hostname or port
int beginPacket(const char *host, uint16_t port) override;
// Start building up a packet to send to the multicast address
// multicastAddress - muticast address to send to
// multicastAddress - multicast address to send to
// interfaceAddress - the local IP address of the interface that should be used
// use WiFi.localIP() or WiFi.softAPIP() depending on the interface you need
// ttl - multicast packet TTL (default is 1)

View File

@ -1,5 +1,5 @@
/*
* empty wrappers to play with linker and reenable wifi at boot time
* empty wrappers to play with linker and re-enable wifi at boot time
*/
#include "coredecls.h"
@ -21,7 +21,7 @@ extern "C" void __disableWiFiAtBootTime()
// Does (almost) nothing: WiFi is enabled by default in nonos-sdk
// ... but restores legacy WiFi credentials persistence to true at boot time
// (can be still overriden by user before setting up WiFi, like before)
// (can be still overrisden by user before setting up WiFi, like before)
// (note: c++ ctors not called yet at this point)
ESP8266WiFiClass::persistent(true);

View File

@ -186,7 +186,7 @@ public:
// this helper is ready to be used when debugging UDP
void printChain (const pbuf* pb, const char* msg, size_t n) const
{
// printf the pb pbuf chain, bufferred and all at once
// printf the pb pbuf chain, buffered and all at once
char buf[128];
int l = snprintf(buf, sizeof(buf), "UDP: %s %u: ", msg, n);
while (pb)
@ -266,7 +266,7 @@ public:
return true;
}
// We have interleaved informations on addresses within received pbuf chain:
// We have interleaved information on addresses within received pbuf chain:
// (before ipv6 code we had: (data-pbuf) -> (data-pbuf) -> (data-pbuf) -> ... in the receiving order)
// Now: (address-info-pbuf -> chained-data-pbuf [-> chained-data-pbuf...]) ->
// (chained-address-info-pbuf -> chained-data-pbuf [-> chained...]) -> ...

View File

@ -286,7 +286,7 @@ It is important to realize that there is no global message ID counter, only the
### <a name="FAQStartupCrash"></a>My ESP8266 crashes on start-up when I use the library!
This could be caused by incorrect arguments to the constructors of the library. Usually you would get a Serial Monitor print of the error in question, but if the constructor is called before you call `Serial.begin(115200)` then there will be nothing to print to. The solution is first to check so that all constructor arguments are valid, e.g. that the mesh password has the correct length and does not contain any forbidden characters. If everything checks out you can try to move all the library contructors you use into the `setup()` function of your sketch, after the position where `Serial.begin(115200)` is called. That should give you a proper error message in the Serial Monitor, so you can locate the problem.
This could be caused by incorrect arguments to the constructors of the library. Usually you would get a Serial Monitor print of the error in question, but if the constructor is called before you call `Serial.begin(115200)` then there will be nothing to print to. The solution is first to check so that all constructor arguments are valid, e.g. that the mesh password has the correct length and does not contain any forbidden characters. If everything checks out you can try to move all the library constructors you use into the `setup()` function of your sketch, after the position where `Serial.begin(115200)` is called. That should give you a proper error message in the Serial Monitor, so you can locate the problem.
### <a name="FAQSSIDAmnesia"></a>The node does not remember the SSID I assign to it!
@ -395,4 +395,4 @@ There has been some reports about this happening when the ESP8266 is in AP+STA m
A possible workaround is to use only AP mode or STA mode (see "[I want to control the WiFi mode myself](#FAQModeControl)"), perhaps with an extra ESP8266 in one of these modes as a buffer between your ESP8266 mesh network and your router. Remember that the ESP8266 must have the AP active in order to receive ESP-NOW broadcast messages.
Another possible workaround is to try with a different router or router firmware.
Another possible workaround is to try with a different router or router firmware.

View File

@ -53,7 +53,7 @@ EspnowMeshBackend espnowNode = EspnowMeshBackend(manageRequest, manageResponse,
@param request The request string received from another node in the mesh
@param meshInstance The MeshBackendBase instance that called the function.
@return The string to send back to the other node. For ESP-NOW, return an empy string ("") if no response should be sent.
@return The string to send back to the other node. For ESP-NOW, return an empty string ("") if no response should be sent.
*/
String manageRequest(const String &request, MeshBackendBase &meshInstance) {
// To get the actual class of the polymorphic meshInstance, do as follows (meshBackendCast replaces dynamic_cast since RTTI is disabled)
@ -346,7 +346,7 @@ void loop() {
espnowDelay(100); // Wait for responses (broadcasts can receive an unlimited number of responses, other transmissions can only receive one response).
// If you have a data array containing null values it is possible to transmit the raw data by making the array into a multiString as shown below.
// You can use String::c_str() or String::begin() to retreive the data array later.
// You can use String::c_str() or String::begin() to retrieve the data array later.
// Note that certain String methods such as String::substring use null values to determine String length, which means they will not work as normal with multiStrings.
uint8_t dataArray[] = {0, '\'', 0, '\'', ' ', '(', 'n', 'u', 'l', 'l', ')', ' ', 'v', 'a', 'l', 'u', 'e'};
String espnowMessage = TypeCast::uint8ArrayToMultiString(dataArray, sizeof dataArray) + F(" from ") + espnowNode.getMeshName() + espnowNode.getNodeID() + String('.');

View File

@ -37,7 +37,7 @@ TcpIpMeshBackend tcpIpNode = TcpIpMeshBackend(manageRequest, manageResponse, net
@param request The request string received from another node in the mesh
@param meshInstance The MeshBackendBase instance that called the function.
@return The string to send back to the other node. For ESP-NOW, return an empy string ("") if no response should be sent.
@return The string to send back to the other node. For ESP-NOW, return an empty string ("") if no response should be sent.
*/
String manageRequest(const String &request, MeshBackendBase &meshInstance) {
// To get the actual class of the polymorphic meshInstance, do as follows (meshBackendCast replaces dynamic_cast since RTTI is disabled)

View File

@ -84,7 +84,7 @@ bool ESP8266WiFiMesh::waitForClient(WiFiClient &currClient, int maxWait)
* and pass that to the user-supplied handler.
*
* @message The string to send to the node.
* @returns: True if the exchange was a succes, false otherwise.
* @returns: True if the exchange was a success, false otherwise.
*
*/
// DEPRECATED!
@ -178,4 +178,4 @@ template<size_t Size>
void ESP8266WiFiMesh::attemptScan(char (&message)[Size])
{
attemptScanKernel(message);
}
}

View File

@ -182,7 +182,7 @@ public:
* A vector that contains the NetworkInfo for each WiFi network to connect to.
* The connectionQueue vector is cleared before each new scan and filled via the networkFilter callback function once the scan completes.
* WiFi connections will start with connectionQueue[0] and then incrementally proceed to higher vector positions.
* Note that old network indicies often are invalidated whenever a new WiFi network scan occurs.
* Note that old network indices often are invalidated whenever a new WiFi network scan occurs.
*/
static std::vector<NetworkInfo> connectionQueue;
@ -190,7 +190,7 @@ public:
* A vector with the TransmissionResult for each AP to which a transmission was attempted during the latest attemptTransmission call.
* The latestTransmissionOutcomes vector is cleared before each new transmission attempt.
* Connection attempts are indexed in the same order they were attempted.
* Note that old network indicies often are invalidated whenever a new WiFi network scan occurs.
* Note that old network indices often are invalidated whenever a new WiFi network scan occurs.
*/
static std::vector<TransmissionResult> latestTransmissionOutcomes;

View File

@ -172,7 +172,7 @@ public:
* This vector is unique for each mesh backend, but NetworkInfo elements can be directly transferred between the vectors as long as both SSID and BSSID are present.
* The connectionQueue vector is cleared before each new scan and filled via the networkFilter callback function once the scan completes.
* WiFi connections will start with connectionQueue[0] and then incrementally proceed to higher vector positions.
* Note that old network indicies often are invalidated whenever a new WiFi network scan occurs.
* Note that old network indices often are invalidated whenever a new WiFi network scan occurs.
*
* Since the connectionQueue() is iterated over during transmissions, always use constConnectionQueue() from callbacks other than NetworkFilter.
*/
@ -188,7 +188,7 @@ public:
* This vector is unique for each mesh backend.
* The latestTransmissionOutcomes vector is cleared before each new transmission attempt.
* Connection attempts are indexed in the same order they were attempted.
* Note that old network indicies often are invalidated whenever a new WiFi network scan occurs.
* Note that old network indices often are invalidated whenever a new WiFi network scan occurs.
*/
static std::vector<TransmissionOutcome> & latestTransmissionOutcomes();
@ -260,7 +260,7 @@ public:
/*
* Will ensure that an encrypted connection exists to each target node before sending the message,
* establishing a temporary encrypted connection with duration getAutoEncryptionDuration() first if neccessary.
* establishing a temporary encrypted connection with duration getAutoEncryptionDuration() first if necessary.
* If an encrypted connection cannot be established to a target node, no message will be sent to that node.
* Note that if an encrypted connection to a target node is not present before this method is called, the response from said node will likely not be received
* since it will be encrypted and the auto encrypted connection to the node is immediately removed after transmission (unless the requestPermanentConnections argument is set to true).
@ -808,7 +808,7 @@ public:
* @param peerMac The MAC of the other node to which the request should be sent.
* @param durationMs The desired duration of the connection.
*
* @return EncryptedConnectionStatus::CONNECTION_ESTABLISHED if the request was succesful. EncryptedConnectionStatus::SOFT_LIMIT_CONNECTION_ESTABLISHED if only a temporary soft limit connection could be established (see the setEncryptedConnectionsSoftLimit method documentation for details). Otherwise another status code based on the outcome.
* @return EncryptedConnectionStatus::CONNECTION_ESTABLISHED if the request was successful. EncryptedConnectionStatus::SOFT_LIMIT_CONNECTION_ESTABLISHED if only a temporary soft limit connection could be established (see the setEncryptedConnectionsSoftLimit method documentation for details). Otherwise another status code based on the outcome.
*/
EncryptedConnectionStatus requestTemporaryEncryptedConnection(const uint8_t *peerMac, const uint32_t durationMs);
@ -825,7 +825,7 @@ public:
* @param peerMac The MAC of the other node to which the request should be sent.
* @param minDurationMs The desired minimum duration of the connection.
*
* @return EncryptedConnectionStatus::CONNECTION_ESTABLISHED if the request was succesful. EncryptedConnectionStatus::SOFT_LIMIT_CONNECTION_ESTABLISHED if only a temporary soft limit connection could be established (see the setEncryptedConnectionsSoftLimit method documentation for details). Otherwise another status code based on the outcome.
* @return EncryptedConnectionStatus::CONNECTION_ESTABLISHED if the request was successful. EncryptedConnectionStatus::SOFT_LIMIT_CONNECTION_ESTABLISHED if only a temporary soft limit connection could be established (see the setEncryptedConnectionsSoftLimit method documentation for details). Otherwise another status code based on the outcome.
*/
EncryptedConnectionStatus requestFlexibleTemporaryEncryptedConnection(const uint8_t *peerMac, const uint32_t minDurationMs);

View File

@ -317,7 +317,7 @@ TransmissionStatusType EspnowTransmitter::espnowSendToNodeUnsynchronized(const S
transmission[transmissionsRemainingIndex] = (char)transmissionsRemaining;
}
// Fills indicies in range [transmissionMacIndex, transmissionMacIndex + 5] (6 bytes) with the MAC address of the WiFi AP interface.
// Fills indices in range [transmissionMacIndex, transmissionMacIndex + 5] (6 bytes) with the MAC address of the WiFi AP interface.
// We always transmit from the station interface (due to using ESP_NOW_ROLE_CONTROLLER), so this makes it possible to always know both interface MAC addresses of a node that sends a transmission.
WiFi.softAPmacAddress(transmission + transmissionMacIndex);
@ -391,7 +391,7 @@ TransmissionStatusType EspnowTransmitter::espnowSendToNodeUnsynchronized(const S
return TransmissionStatusType::TRANSMISSION_FAILED;
}
--transmissionsRemaining; // This is used when transfering multi-transmission messages.
--transmissionsRemaining; // This is used when transferring multi-transmission messages.
} while(transmissionsRemaining >= 0);

View File

@ -386,7 +386,7 @@ void FloodingMesh::restoreDefaultResponseTransmittedHook()
*
* @param request The request string received from another node in the mesh
* @param meshInstance The MeshBackendBase instance that called the function.
* @return The string to send back to the other node. For ESP-NOW, return an empy string ("") if no response should be sent.
* @return The string to send back to the other node. For ESP-NOW, return an empty string ("") if no response should be sent.
*/
String FloodingMesh::_defaultRequestHandler(const String &request, MeshBackendBase &meshInstance)
{

View File

@ -182,7 +182,7 @@ public:
*
* ########## WARNING! This an experimental feature. API may change at any time. Only use if you like it when things break. ##########
* Will be very slow compared to unencrypted broadcasts. Probably works OK in a small mesh with a maximum of 2-3 new messages transmitted in the mesh every second.
* Because of the throughput difference, mixing encypted and unencrypted broadcasts is not recommended if there are frequent mesh broadcasts (multiple per second),
* Because of the throughput difference, mixing encrypted and unencrypted broadcasts is not recommended if there are frequent mesh broadcasts (multiple per second),
* since a lot of unencrypted broadcasts can build up while a single encrypted broadcast is sent.
*
* It is recommended that verboseMode is turned off if using this, to avoid slowdowns due to excessive Serial printing.

View File

@ -70,7 +70,7 @@ public:
* This vector is unique for each mesh backend, but NetworkInfo elements can be directly transferred between the vectors as long as both SSID and BSSID are present.
* The connectionQueue vector is cleared before each new scan and filled via the networkFilter callback function once the scan completes.
* WiFi connections will start with connectionQueue[0] and then incrementally proceed to higher vector positions.
* Note that old network indicies often are invalidated whenever a new WiFi network scan occurs.
* Note that old network indices often are invalidated whenever a new WiFi network scan occurs.
*
* Since the connectionQueue() is iterated over during transmissions, always use constConnectionQueue() from callbacks other than NetworkFilter.
*/
@ -86,7 +86,7 @@ public:
* This vector is unique for each mesh backend.
* The latestTransmissionOutcomes vector is cleared before each new transmission attempt.
* Connection attempts are indexed in the same order they were attempted.
* Note that old network indicies often are invalidated whenever a new WiFi network scan occurs.
* Note that old network indices often are invalidated whenever a new WiFi network scan occurs.
*/
static std::vector<TransmissionOutcome> & latestTransmissionOutcomes();

View File

@ -93,7 +93,7 @@ public:
_followRedirects = follow ? HTTPC_STRICT_FOLLOW_REDIRECTS : HTTPC_DISABLE_FOLLOW_REDIRECTS;
}
/**
* set redirect follow mode. See `followRedirects_t` enum for avaliable modes.
* set redirect follow mode. See `followRedirects_t` enum for available modes.
* @param follow
*/
void setFollowRedirects(followRedirects_t follow)

View File

@ -3,7 +3,7 @@
This example demonstrates two features of the LEA MDNSResponder:
1. The host and service domain negotiation process that ensures
the uniqueness of the finally choosen host and service domain name.
the uniqueness of the finally chosen host and service domain name.
2. The dynamic MDNS service TXT feature
A 'clock' service in announced via the MDNS responder and the current
@ -11,7 +11,7 @@
The time value is updated every second!
The ESP is initially announced to clients as 'esp8266.local', if this host domain
is already used in the local network, another host domain is negociated. Keep an
is already used in the local network, another host domain is negotiated. Keep an
eye to the serial output to learn the final host domain for the clock service.
The service itself is is announced as 'host domain'._espclk._tcp.local.
As the service uses port 80, a very simple HTTP server is installed also to deliver
@ -57,7 +57,7 @@
const char* ssid = STASSID;
const char* password = STAPSK;
char* pcHostDomain = 0; // Negociated host domain
char* pcHostDomain = 0; // Negotiated host domain
bool bHostDomainConfirmed = false; // Flags the confirmation of the host domain
MDNSResponder::hMDNSService hMDNSService = 0; // The handle of the clock service in the MDNS responder
@ -90,7 +90,7 @@ void setClock(void) {
configTime((TIMEZONE_OFFSET * 3600), (DST_OFFSET * 3600), "pool.ntp.org", "time.nist.gov", "time.windows.com");
Serial.print("Waiting for NTP time sync: ");
time_t now = time(nullptr); // Secs since 01.01.1970 (when uninitalized starts with (8 * 3600 = 28800)
time_t now = time(nullptr); // Secs since 01.01.1970 (when uninitialized starts with (8 * 3600 = 28800)
while (now < 8 * 3600 * 2) { // Wait for realistic value
delay(500);
Serial.print(".");

View File

@ -3,7 +3,7 @@
This example demonstrates two features of the LEA MDNSResponder:
1. The host and service domain negotiation process that ensures
the uniqueness of the finally choosen host and service domain name.
the uniqueness of the finally chosen host and service domain name.
2. The dynamic MDNS service lookup/query feature.
A list of 'HTTP' services in the local network is created and kept up to date.
@ -11,7 +11,7 @@
and announced as a service.
The ESP itself is initially announced to clients as 'esp8266.local', if this host domain
is already used in the local network, another host domain is negociated. Keep an
is already used in the local network, another host domain is negotiated. Keep an
eye to the serial output to learn the final host domain for the HTTP service.
The service itself is is announced as 'host domain'._http._tcp.local.
The HTTP server delivers a short greeting and the current list of other 'HTTP' services (not updated).
@ -49,7 +49,7 @@
const char* ssid = STASSID;
const char* password = STAPSK;
char* pcHostDomain = 0; // Negociated host domain
char* pcHostDomain = 0; // Negotiated host domain
bool bHostDomainConfirmed = false; // Flags the confirmation of the host domain
MDNSResponder::hMDNSService hMDNSService = 0; // The handle of the http service in the MDNS responder
MDNSResponder::hMDNSServiceQuery hMDNSServiceQuery = 0; // The handle of the 'http.tcp' service query in the MDNS responder

View File

@ -55,9 +55,9 @@ const char* ap_default_psk = APPSK; ///< Default PSK.
@param pass String pointer for storing PSK.
@return True or False.
The config file have to containt the WiFi SSID in the first line
The config file has to contain the WiFi SSID in the first line
and the WiFi PSK in the second line.
Line seperator can be \r\n (CR LF) \r or \n.
Line separator can be \r\n (CR LF) \r or \n.
*/
bool loadConfig(String *ssid, String *pass) {
// open file for reading.
@ -74,7 +74,7 @@ bool loadConfig(String *ssid, String *pass) {
content.trim();
// Check if ther is a second line available.
// Check if there is a second line available.
int8_t pos = content.indexOf("\r\n");
uint8_t le = 2;
// check for linux and mac line ending.

View File

@ -3,7 +3,7 @@ version=1.2
author=multiple, see files
maintainer=LaborEtArs
sentence=Creates a mDNS responder.
paragraph=Creates a mDNS responder to ensure host domain uniqueness in local networks and to allow for mDNS service discovery and announcment.
paragraph=Creates a mDNS responder to ensure host domain uniqueness in local networks and to allow for mDNS service discovery and announcement.
category=Communication
url=https://github.com/LaborEtArs/ESP8266mDNS
architectures=esp8266

View File

@ -3,7 +3,7 @@
This file is part of the esp8266 core for Arduino environment.
Legacy_ESP8266mDNS:
The well known, thouroughly tested (yet no flawless) default mDNS library for the ESP8266 family
The well known, thoroughly tested (yet no flawless) default mDNS library for the ESP8266 family
LEA_ESP8266mDNS:
An (currently) experimental mDNS implementation, that supports a lot more of mDNS features than Legacy_ESP8266mDNS, like:
@ -19,7 +19,7 @@
- Dynamic queries for DNS-SD services with cached and updated answers and user notifications
- Support for multi-homed client host domains
See 'LEA_ESP8266mDNS/EPS8266mDNS.h' for more implementation details and usage informations.
See 'LEA_ESP8266mDNS/EPS8266mDNS.h' for more implementation details and usage information.
See 'examples/mDNS_Clock' and 'examples/mDNS_ServiceMonitor' for implementation examples of the advanced features.
LEA_ESP8266mDNS is (mostly) client source code compatible to 'Legacy_ESP8266mDNS', so it could be

View File

@ -1132,7 +1132,7 @@ bool MDNSResponder::hasAnswerTxts(const MDNSResponder::hMDNSServiceQuery p_hServ
MDNSResponder::answerTxts
Returns all TXT items for the given service as a ';'-separated string.
If not already existing; the string is alloced, filled and attached to the answer.
If not already existing; the string is allocated, filled and attached to the answer.
*/
const char* MDNSResponder::answerTxts(const MDNSResponder::hMDNSServiceQuery p_hServiceQuery,
@ -1165,7 +1165,7 @@ const char* MDNSResponder::answerTxts(const MDNSResponder::hMDNSServiceQuery p_h
Set a global callback for probe results. The callback is called, when probing
for the host domain (or a service domain, without specific probe result callback)
failes or succeedes.
fails or succeeds.
In the case of failure, the domain name should be changed via 'setHostname' or 'setServiceName'.
When succeeded, the host or service domain will be announced by the MDNS responder.
@ -1191,7 +1191,7 @@ bool MDNSResponder::setHostProbeResultCallback(MDNSHostProbeFn1 pfn)
MDNSResponder::setServiceProbeResultCallback
Set a service specific callback for probe results. The callback is called, when probing
for the service domain failes or succeedes.
for the service domain fails or succeeds.
In the case of failure, the service name should be changed via 'setServiceName'.
When succeeded, the service domain will be announced by the MDNS responder.

View File

@ -8,7 +8,7 @@
Essentially, this is an rewrite of the original EPS8266 Multicast DNS code (ESP8266mDNS).
The target of this rewrite was to keep the existing interface as stable as possible while
adding and extending the supported set of mDNS features.
A lot of the additions were basicly taken from Erik Ekman's lwIP mdns app code.
A lot of the additions were basically taken from Erik Ekman's lwIP mdns app code.
Supported mDNS features (in some cases somewhat limited):
- Presenting a DNS-SD service to interested observers, eg. a http server by presenting _http._tcp service
@ -52,7 +52,7 @@
Static:
Call 'uint32_t u32AnswerCount = MDNS.queryService("http", "tcp");'
Iterate answers by: 'for (uint32_t u=0; u<u32AnswerCount; ++u) { const char* pHostname = MDNS.answerHostname(u); }'
You should call MDNS.removeQuery() sometimes later (when the answers are nott needed anymore)
You should call MDNS.removeQuery() sometimes later (when the answers are not needed anymore)
Dynamic:
Install a dynamic query by calling 'DNSResponder::hMDNSServiceQuery hServiceQuery = MDNS.installServiceQuery("http", "tcp", serviceQueryCallback, &userData);'
@ -195,7 +195,7 @@ public:
// Finish MDNS processing
bool close(void);
// for esp32 compatability
// for esp32 compatibility
bool end(void);
// Change hostname (probing is restarted)
bool setHostname(const char* p_pcHostname);
@ -241,7 +241,7 @@ public:
{
setHostname(p_pcHostname);
}
// for esp32 compatibilty
// for esp32 compatibility
void setInstanceName(const String& s_pcHostname)
{
setInstanceName(s_pcHostname.c_str());
@ -1180,7 +1180,7 @@ protected:
uint8_t m_u8HostReplyMask; // Flags for reply components/answers
bool m_bLegacyQuery; // Flag: Legacy query
bool m_bResponse; // Flag: Response to a query
bool m_bAuthorative; // Flag: Authorative (owner) response
bool m_bAuthorative; // Flag: Authoritative (owner) response
bool m_bCacheFlush; // Flag: Clients should flush their caches
bool m_bUnicast; // Flag: Unicast response
bool m_bUnannounce; // Flag: Unannounce service

View File

@ -395,7 +395,7 @@ bool MDNSResponder::_parseQuery(const MDNSResponder::stcMDNS_MsgHeader& p_MsgHea
IPAddress localIPAddress(m_pUDPContext->getInputNetif()->ip_addr);
if (((stcMDNS_RRAnswerA*)pKnownRRAnswer)->m_IPAddress == localIPAddress)
{
// SAME IP address -> We've received an old message from ourselfs (same IP)
// SAME IP address -> We've received an old message from ourselves (same IP)
DEBUG_EX_RX(DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _parseQuery: Tiebreak (IP4) WON (was an old message)!\n")););
m_HostProbeInformation.m_bTiebreakNeeded = false;
}
@ -410,7 +410,7 @@ bool MDNSResponder::_parseQuery(const MDNSResponder::stcMDNS_MsgHeader& p_MsgHea
}
else // WON tiebreak
{
//TiebreakState = TiebreakState_Won; // We received an 'old' message from ourselfs -> Just ignore
//TiebreakState = TiebreakState_Won; // We received an 'old' message from ourselves -> Just ignore
DEBUG_EX_RX(DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _parseQuery: Tiebreak (IP4) WON (higher IP)!\n")););
m_HostProbeInformation.m_bTiebreakNeeded = false;
}
@ -501,7 +501,7 @@ bool MDNSResponder::_parseQuery(const MDNSResponder::stcMDNS_MsgHeader& p_MsgHea
(hostDomain == ((stcMDNS_RRAnswerSRV*)pKnownRRAnswer)->m_SRVDomain)) // Host domain match
{
// We've received an old message from ourselfs (same SRV)
// We've received an old message from ourselves (same SRV)
DEBUG_EX_RX(DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _parseQuery: Tiebreak (SRV) won (was an old message)!\n")););
pService->m_ProbeInformation.m_bTiebreakNeeded = false;
}
@ -516,7 +516,7 @@ bool MDNSResponder::_parseQuery(const MDNSResponder::stcMDNS_MsgHeader& p_MsgHea
}
else // WON tiebreak
{
//TiebreakState = TiebreakState_Won; // We received an 'old' message from ourselfs -> Just ignore
//TiebreakState = TiebreakState_Won; // We received an 'old' message from ourselves -> Just ignore
DEBUG_EX_RX(DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _parseQuery: Tiebreak (SRV) won (higher)!\n")););
pService->m_ProbeInformation.m_bTiebreakNeeded = false;
}
@ -1560,7 +1560,7 @@ bool MDNSResponder::_announce(bool p_bAnnounce,
bResult = true;
sendParameter.m_bResponse = true; // Announces are 'Unsolicited authorative responses'
sendParameter.m_bResponse = true; // Announces are 'Unsolicited authoritative responses'
sendParameter.m_bAuthorative = true;
sendParameter.m_bUnannounce = !p_bAnnounce; // When unannouncing, the TTL is set to '0' while creating the answers
@ -1612,7 +1612,7 @@ bool MDNSResponder::_announceService(stcMDNSService& p_rService,
if (ProbingStatus_Done == p_rService.m_ProbeInformation.m_ProbingStatus)
{
sendParameter.m_bResponse = true; // Announces are 'Unsolicited authorative responses'
sendParameter.m_bResponse = true; // Announces are 'Unsolicited authoritative responses'
sendParameter.m_bAuthorative = true;
sendParameter.m_bUnannounce = !p_bAnnounce; // When unannouncing, the TTL is set to '0' while creating the answers

View File

@ -245,7 +245,7 @@ bool MDNSResponder::_removeServiceQuery(MDNSResponder::stcMDNSServiceQuery* p_pS
delete p_pServiceQuery;
bResult = true;
}
else // No predecesor
else // No predecessor
{
if (m_pServiceQueries == p_pServiceQuery)
{
@ -275,7 +275,7 @@ bool MDNSResponder::_removeLegacyServiceQuery(void)
/*
MDNSResponder::_findServiceQuery
'Convert' hMDNSServiceQuery to stcMDNSServiceQuery* (ensure existance)
'Convert' hMDNSServiceQuery to stcMDNSServiceQuery* (ensure existence)
*/
MDNSResponder::stcMDNSServiceQuery* MDNSResponder::_findServiceQuery(MDNSResponder::hMDNSServiceQuery p_hServiceQuery)
@ -458,7 +458,7 @@ bool MDNSResponder::_releaseService(MDNSResponder::stcMDNSService* p_pService)
delete p_pService;
bResult = true;
}
else // No predecesor
else // No predecessor
{
if (m_pServices == p_pService)
{

View File

@ -122,7 +122,7 @@ namespace MDNSImplementation
#define MDNS_SERVICE_TTL 4500
/*
Compressed labels are flaged by the two topmost bits of the length byte being set
Compressed labels are flagged by the two topmost bits of the length byte being set
*/
#define MDNS_DOMAIN_COMPRESS_MARK 0xC0
/*
@ -156,7 +156,7 @@ namespace MDNSImplementation
/*
Enable/disable the usage of the F() macro in debug trace printf calls.
There needs to be an PGM comptible printf function to use this.
There needs to be an PGM compatible printf function to use this.
USE_PGM_PRINTF and F
*/

View File

@ -283,12 +283,12 @@ size_t MDNSResponder::stcMDNSServiceTxt::length(void) const
A TXT item can be looke up by its 'key' member.
Export as ';'-separated byte array is supported.
Export as 'length byte coded' byte array is supported.
Comparision ((all A TXT items in B and equal) AND (all B TXT items in A and equal)) is supported.
Comparison ((all A TXT items in B and equal) AND (all B TXT items in A and equal)) is supported.
*/
/*
MDNSResponder::stcMDNSServiceTxts::stcMDNSServiceTxts contructor
MDNSResponder::stcMDNSServiceTxts::stcMDNSServiceTxts constructor
*/
MDNSResponder::stcMDNSServiceTxts::stcMDNSServiceTxts(void)
: m_pTxts(0)
@ -387,7 +387,7 @@ bool MDNSResponder::stcMDNSServiceTxts::remove(stcMDNSServiceTxt* p_pTxt)
delete p_pTxt;
bResult = true;
}
else if (m_pTxts == p_pTxt) // No predecesor, but first item
else if (m_pTxts == p_pTxt) // No predecessor, but first item
{
m_pTxts = p_pTxt->m_pNext;
delete p_pTxt;
@ -646,7 +646,7 @@ bool MDNSResponder::stcMDNSServiceTxts::operator!=(const stcMDNSServiceTxts& p_O
/**
MDNSResponder::stcMDNS_MsgHeader
A MDNS message haeder.
A MDNS message header.
*/
@ -1328,7 +1328,7 @@ bool MDNSResponder::stcProbeInformation::clear(bool p_bClearUserdata /*= false*/
and the flag m_bAutoName is set. If the hostname changes, all 'auto-
named' services are renamed also.
m_u8Replymask is used while preparing a response to a MDNS query. It is
resetted in '_sendMDNSMessage' afterwards.
reset in '_sendMDNSMessage' afterwards.
*/
/*
@ -1504,7 +1504,7 @@ bool MDNSResponder::stcMDNSService::releaseProtocol(void)
- an IP4 address
(- an IP6 address)
- a MDNS TXTs
The existance of a component is flaged in 'm_u32ContentFlags'.
The existence of a component is flagged in 'm_u32ContentFlags'.
For every answer component a TTL value is maintained.
Answer objects can be connected to a linked list.
@ -1899,7 +1899,7 @@ bool MDNSResponder::stcMDNSServiceQuery::stcAnswer::removeIP4Address(MDNSRespond
delete p_pIP4Address;
bResult = true;
}
else if (m_pIP4Addresses == p_pIP4Address) // No predecesor, but first item
else if (m_pIP4Addresses == p_pIP4Address) // No predecessor, but first item
{
m_pIP4Addresses = p_pIP4Address->m_pNext;
delete p_pIP4Address;
@ -2036,7 +2036,7 @@ bool MDNSResponder::stcMDNSServiceQuery::stcAnswer::removeIP6Address(MDNSRespond
delete p_pIP6Address;
bResult = true;
}
else if (m_pIP6Addresses == p_pIP6Address) // No predecesor, but first item
else if (m_pIP6Addresses == p_pIP6Address) // No predecessor, but first item
{
m_pIP6Addresses = p_pIP6Address->m_pNext;
delete p_pIP6Address;
@ -2123,7 +2123,7 @@ MDNSResponder::stcMDNSServiceQuery::stcAnswer::stcIP6Address* MDNSResponder::stc
MDNSResponder::stcMDNSServiceQuery
A service query object.
A static query is flaged via 'm_bLegacyQuery'; while the function 'queryService'
A static query is flagged via 'm_bLegacyQuery'; while the function 'queryService'
is waiting for answers, the internal flag 'm_bAwaitingAnswers' is set. When the
timeout is reached, the flag is removed. These two flags are only used for static
service queries.
@ -2282,7 +2282,7 @@ bool MDNSResponder::stcMDNSServiceQuery::removeAnswer(MDNSResponder::stcMDNSServ
delete p_pAnswer;
bResult = true;
}
else if (m_pAnswers == p_pAnswer) // No predecesor, but first item
else if (m_pAnswers == p_pAnswer) // No predecessor, but first item
{
m_pAnswers = p_pAnswer->m_pNext;
delete p_pAnswer;

View File

@ -154,7 +154,7 @@ bool MDNSResponder::_sendMDNSMessage_Multicast(MDNSResponder::stcMDNSSendParamet
MDNSResponder::_prepareMDNSMessage
The MDNS message is composed in a two-step process.
In the first loop 'only' the header informations (mainly number of answers) are collected,
In the first loop 'only' the header information (mainly number of answers) are collected,
while in the seconds loop, the header and all queries and answers are written to the UDP
output buffer.
@ -214,7 +214,7 @@ bool MDNSResponder::_prepareMDNSMessage(MDNSResponder::stcMDNSSendParameter& p_r
DEBUG_EX_ERR(if (!bResult) DEBUG_OUTPUT.printf_P(PSTR("[MDNSResponder] _prepareMDNSMessage: _writeMDNSQuestion FAILED!\n")););
}
// Answers and authorative answers
// Answers and authoritative answers
#ifdef MDNS_IP4_SUPPORT
if ((bResult) &&
(p_rSendParameter.m_u8HostReplyMask & ContentFlag_A))
@ -397,7 +397,7 @@ bool MDNSResponder::_sendMDNSQuery(const MDNSResponder::stcMDNS_RRDomain& p_Quer
// It seems, that some mDNS implementations don't support 'unicast response' questions...
sendParameter.m_pQuestions->m_Header.m_Attributes.m_u16Class = (/*0x8000 |*/ DNS_RRCLASS_IN); // /*Unicast &*/ INternet
// TODO: Add knwon answer to the query
// TODO: Add known answer to the query
(void)p_pKnownAnswers;
bResult = _sendMDNSMessage(sendParameter);
@ -655,13 +655,13 @@ bool MDNSResponder::_readRRAnswerTXT(MDNSResponder::stcMDNS_RRAnswerTXT& p_rRRAn
}
if ((bResult) &&
(pTxt)) // Everythings fine so far
(pTxt)) // Everything is fine so far
{
// Link TXT item to answer TXTs
pTxt->m_pNext = p_rRRAnswerTXT.m_Txts.m_pTxts;
p_rRRAnswerTXT.m_Txts.m_pTxts = pTxt;
}
else // At least no TXT (migth be OK, if length was 0) OR an error
else // At least no TXT (might be OK, if length was 0) OR an error
{
if (!bResult)
{
@ -1226,9 +1226,9 @@ bool MDNSResponder::_readMDNSMsgHeader(MDNSResponder::stcMDNS_MsgHeader& p_rMsgH
(_udpRead16(p_rMsgHeader.m_u16ARCount)))
{
p_rMsgHeader.m_1bQR = (u8B1 & 0x80); // Query/Responde flag
p_rMsgHeader.m_1bQR = (u8B1 & 0x80); // Query/Respond flag
p_rMsgHeader.m_4bOpcode = (u8B1 & 0x78); // Operation code (0: Standard query, others ignored)
p_rMsgHeader.m_1bAA = (u8B1 & 0x04); // Authorative answer
p_rMsgHeader.m_1bAA = (u8B1 & 0x04); // Authoritative answer
p_rMsgHeader.m_1bTC = (u8B1 & 0x02); // Truncation flag
p_rMsgHeader.m_1bRD = (u8B1 & 0x01); // Recursion desired
@ -1430,7 +1430,7 @@ bool MDNSResponder::_writeMDNSServiceDomain(const MDNSResponder::stcMDNSService&
// Found cached domain -> mark as compressed domain
? ((MDNS_DOMAIN_COMPRESS_MARK > ((u16CachedDomainOffset >> 8) & ~MDNS_DOMAIN_COMPRESS_MARK)) && // Valid offset
((!p_bPrependRDLength) ||
(_write16(2, p_rSendParameter))) && // Lenght of 'Cxxx'
(_write16(2, p_rSendParameter))) && // Length of 'Cxxx'
(_write8(((u16CachedDomainOffset >> 8) | MDNS_DOMAIN_COMPRESS_MARK), p_rSendParameter)) && // Compression mark (and offset)
(_write8((uint8_t)(u16CachedDomainOffset & 0xFF), p_rSendParameter)))
// No cached domain -> add this domain to cache and write full domain name

View File

@ -30,9 +30,9 @@ in Git.
* Modify your Makefile. You'll need to include the gdbstub sources: if your Makefile is structured like the
ones in the Espressif examples, you can add `gdbstub` to the `SUBDIRS` define and `gdbstub/libgdbstub.a` to the
`COMPONENTS_eagle.app.v6` define. Also, you probably want to add `-ggdb` to your compiler flags (`TARGET_LDFLAGS`)
and, if you are debugging, change any optimation flags (-Os, -O2 etc) into `-Og`. Finally, make sure your Makefile
and, if you are debugging, change any optimization flags (-Os, -O2 etc) into `-Og`. Finally, make sure your Makefile
also compiles .S files.
* Configure gdbstub by editting `gdbstub-cfg.h`. There are a bunch of options you can tweak: FreeRTOS or bare SDK,
* Configure gdbstub by editing `gdbstub-cfg.h`. There are a bunch of options you can tweak: FreeRTOS or bare SDK,
private exception/breakpoint stack, console redirection to GDB, wait till debugger attachment etc. You can also
configure the options by including the proper -Dwhatever gcc flags in your Makefiles.
* In your user_main.c, add an `#include <../gdbstub/gdbstub.h>` and call `gdbstub_init();` somewhere in user_main.

View File

@ -458,7 +458,7 @@ static inline int gdbHandleCommand() {
return ST_CONT;
} else if (cmd[0] == 's') { //single-step instruction
//Single-stepping can go wrong if an interrupt is pending, especially when it is e.g. a task switch:
//the ICOUNT register will overflow in the task switch code. That is why we disable interupts when
//the ICOUNT register will overflow in the task switch code. That is why we disable interrupts when
//doing single-instruction stepping.
singleStepPs=gdbstub_savedRegs.ps;
gdbstub_savedRegs.ps=(gdbstub_savedRegs.ps & ~0xf) | (XCHAL_DEBUGLEVEL - 1);

View File

@ -1,4 +1,4 @@
// Can't place library in ths src/ directory, Arduino will attempt to build the tests/etc.
// Can't place library in this src/ directory, Arduino will attempt to build the tests/etc.
// Just have a stub here that redirects to the actual source file
#pragma GCC diagnostic ignored "-Wmissing-field-initializers"

View File

@ -3,7 +3,7 @@ version=2
author=Herman Reintke
maintainer=Herman Reintke
sentence=tcpdump-like logger for esp8266/Arduino
paragraph=Dumps input / output packets on "Print"able type, or provide a TCP server for the real tcpdump. Check examples. Some other unrelated and independant tools are included.
paragraph=Dumps input / output packets on "Print"able type, or provide a TCP server for the real tcpdump. Check examples. Some other unrelated and independent tools are included.
category=Communication
url=https://
architectures=esp8266

View File

@ -183,7 +183,7 @@ private:
};
// Expose FatStructs.h helpers for MSDOS date/time for use with dateTimeCallback
// Expose FatStructs.h helpers for MS-DOS date/time for use with dateTimeCallback
static inline uint16_t FAT_DATE(uint16_t year, uint8_t month, uint8_t day) {
return (year - 1980) << 9 | month << 5 | day;
}

View File

@ -26,14 +26,14 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
uint32_t Servo::_servoMap = 0;
// similiar to map but will have increased accuracy that provides a more
// similar to map but will have increased accuracy that provides a more
// symmetrical api (call it and use result to reverse will provide the original value)
int improved_map(int value, int minIn, int maxIn, int minOut, int maxOut)
{
const int rangeIn = maxIn - minIn;
const int rangeOut = maxOut - minOut;
const int deltaIn = value - minIn;
// fixed point math constants to improve accurancy of divide and rounding
// fixed point math constants to improve accuracy of divide and rounding
constexpr int fixedHalfDecimal = 1;
constexpr int fixedDecimal = fixedHalfDecimal * 2;

View File

@ -47,7 +47,7 @@
// The following values are in us (microseconds).
// Since the defaults can be overwritten in the new attach() member function,
// they were modified from the Arduino AVR defaults to be in the safe range
// of publically available specifications. While this implies that many 180°
// of publicly available specifications. While this implies that many 180°
// servos do not operate the full 0° to 180° sweep using these, it also prevents
// unsuspecting damage. For Arduino AVR, the same change is being discussed.
#define DEFAULT_MIN_PULSE_WIDTH 1000 // uncalibrated default, the shortest duty cycle sent to a servo

View File

@ -27,7 +27,7 @@ void loop() {
// a point object holds x y and z coordinates.
Point p = ts.getPoint();
//map the ADC value read to into pixel co-ordinates
//map the ADC value read to into pixel coordinates
p.x = map(p.x, TS_MINX, TS_MAXX, 0, 240);
p.y = map(p.y, TS_MINY, TS_MAXY, 0, 320);

View File

@ -22,7 +22,7 @@
const int PIN_SD_CS = 4; // pin of sd card
const int __Gnbmp_height = 320; // bmp hight
const int __Gnbmp_height = 320; // bmp height
const int __Gnbmp_width = 240; // bmp width
unsigned char __Gnbmp_image_offset = 0; // offset
@ -66,7 +66,7 @@ void loop() {
for (unsigned char i = 0; i < __Gnfile_num; i++) {
bmpFile = SD.open(__Gsbmp_files[i]);
if (! bmpFile) {
Serial.println("didnt find image");
Serial.println("didn't find image");
while (1);
}
@ -86,7 +86,7 @@ void loop() {
/*********************************************/
// This procedure reads a bitmap and draws it to the screen
// its sped up by reading many pixels worth of data at a time
// instead of just one pixel at a time. increading the buffer takes
// instead of just one pixel at a time. increasing the buffer takes
// more RAM but makes the drawing a little faster. 20 pixels' worth
// is probably a good place

View File

@ -23,7 +23,7 @@
const int PIN_SD_CS = 4; // pin of sd card
const long __Gnbmp_height = 320; // bmp hight
const long __Gnbmp_height = 320; // bmp height
const long __Gnbmp_width = 240; // bmp width
long __Gnbmp_image_offset = 0;;
@ -132,7 +132,7 @@ void loop() {
bmpFile = SD.open(__Gsbmp_files[i]);
if (! bmpFile)
{
Serial.println("didnt find image");
Serial.println("didn'`t find image");
while (1);
}
@ -154,7 +154,7 @@ void loop() {
bmpFile = SD.open("pfvm_1.bmp");
if (! bmpFile) {
Serial.println("didnt find image");
Serial.println("didn't find image");
while (1);
}
@ -172,7 +172,7 @@ void loop() {
/*********************************************/
// This procedure reads a bitmap and draws it to the screen
// its sped up by reading many pixels worth of data at a time
// instead of just one pixel at a time. increading the buffer takes
// instead of just one pixel at a time. increasing the buffer takes
// more RAM but makes the drawing a little faster. 20 pixels' worth
// is probably a good place

View File

@ -1,5 +1,5 @@
/*
Passing paramters to Ticker callbacks
Passing parameters to Ticker callbacks
Apart from void(void) functions, the Ticker library supports
functions taking one argument. This argument's size has to be less or

View File

@ -8,7 +8,7 @@
extern "C" {
#include "spi_flash.h"
}
// Artificially create a space in PROGMEM that fills multipe sectors so
// Artificially create a space in PROGMEM that fills multiple sectors so
// we can corrupt one without crashing the system
const int corruptme[SPI_FLASH_SEC_SIZE * 4] PROGMEM = { 0 };

View File

@ -43,7 +43,7 @@ void setup(void) {
// more of the SYS stack.
WiFi.mode(WIFI_STA);
WiFi.begin(ssid, password);
Serial.println(F("A WiFi connection attmpt has been started."));
Serial.println(F("A WiFi connection attempt has been started."));
Serial.println();
// #define DEMO_NOEXTRA4K

View File

@ -70,7 +70,7 @@ void processKey(Print& out, int hotKey) {
out.println(F("This line will not be printable w/o running GDB"));
break;
case '0':
out.println(F("Crashing at an embeded 'break 1, 15' instruction that was generated"));
out.println(F("Crashing at an embedded 'break 1, 15' instruction that was generated"));
out.println(F("by the compiler after detecting a divide by zero."));
out.printf_P(PSTR("This should not print %d\n"), divideA_B_bp(1, 0));
break;

View File

@ -70,7 +70,7 @@ void processKey(Print& out, int hotKey) {
out.println(F("This line will not be printable w/o running GDB"));
break;
case '0':
out.println(F("Crashing at an embeded 'break 1, 15' instruction that was generated"));
out.println(F("Crashing at an embedded 'break 1, 15' instruction that was generated"));
out.println(F("by the compiler after detecting a divide by zero."));
out.printf_P(PSTR("This should not print %d\n"), divideA_B_bp(1, 0));
break;

View File

@ -241,7 +241,7 @@ void setup() {
// install callback - called when settimeofday is called (by SNTP or user)
// once enabled (by DHCP), SNTP is updated every hour by default
// ** optional boolean in callback function is true when triggerred by SNTP **
// ** optional boolean in callback function is true when triggered by SNTP **
settimeofday_cb(time_is_set);
// setup RTC time
@ -251,7 +251,7 @@ void setup() {
timeval tv = { rtc, 0 };
settimeofday(&tv, nullptr);
// NTP servers may be overriden by your DHCP server for a more local one
// NTP servers may be overridden by your DHCP server for a more local one
// (see below)
// ----> Here is the ONLY ONE LINE needed in your sketch

View File

@ -38,7 +38,7 @@ void testStreamString() {
// By default, reading a S2Stream(String) or a StreamString will consume the String.
// It can be disabled by calling ::resetPointer(), (not default)
// and reenabled by calling ::setConsume(). (default)
// and re-enabled by calling ::setConsume(). (default)
//
// In default consume mode, reading a byte or a block will remove it from
// the String. Operations are O(n²).
@ -110,7 +110,7 @@ void testStreamString() {
result.clear();
S2Stream input(inputString);
// reading stream will consume the string
input.setConsume(); // can be ommitted, this is the default
input.setConsume(); // can be omitted, this is the default
input.sendSize(result, 1);
input.sendSize(result, 2);

View File

@ -107,7 +107,7 @@ protected:
@param buffer a pointer to a buffer to write the frame to
@param framesize readFrameSize()'s result
@return the length of the received frame
or 0 if a problem occured
or 0 if a problem occurred
*/
uint16_t readFrameData(uint8_t *frame, uint16_t framesize);

View File

@ -108,7 +108,7 @@ protected:
@param buffer a pointer to a buffer to write the frame to
@param framesize readFrameSize()'s result
@return the length of the received frame
or 0 if a problem occured
or 0 if a problem occurred
*/
uint16_t readFrameData(uint8_t *frame, uint16_t framesize);

View File

@ -110,7 +110,7 @@ protected:
@param buffer a pointer to a buffer to write the frame to
@param framesize readFrameSize()'s result
@return the length of the received frame
or 0 if a problem occured
or 0 if a problem occurred
*/
uint16_t readFrameData(uint8_t *frame, uint16_t framesize);
@ -356,7 +356,7 @@ private:
MR_WOL = 0x20, ///< Wake on LAN
MR_PB = 0x10, ///< Ping block
MR_PPPOE = 0x08, ///< Enable PPPoE
MR_FARP = 0x02, ///< Enable UDP_FORCE_ARP CHECHK
MR_FARP = 0x02, ///< Enable UDP_FORCE_ARP CHECK
};
/* Interrupt Register values */