Skip to content

Commit e04f050

Browse files
fix(spelling): Fix misspellings detected by codespell and enable it (#10232)
* fix(spelling): Fix misspellings detected by codespell and enable it * change(tools): Push generated binaries to PR --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 5ecda3a commit e04f050

File tree

41 files changed

+58
-58
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+58
-58
lines changed

.codespellrc

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
[codespell]
22
# Source: https://github.com/arduino/tooling-project-assets/blob/main/workflow-templates/assets/spell-check/.codespellrc
33
# In the event of a false positive, add the problematic word, in all lowercase, to a comma-separated list here:
4-
ignore-words-list = ba,licence,ot,dout,als,exten,acount,totaly,pasttime
4+
ignore-words-list = ba,licence,ot,dout,als,exten
55
skip = ./.git,./.licenses,__pycache__,.clang-format,.codespellrc,.editorconfig,.flake8,.prettierignore,.yamllint.yml,.gitignore,boards.txt,platform.txt,programmers.txt
66
builtin = clear,informal,en-GB_to_en-US
77
check-filenames =
88
check-hidden =
9-
write-changes =

.pre-commit-config.yaml

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
exclude: |
22
(?x)(
33
^\.github\/|
4-
^tests\/performance\/coremark\/.*\.[ch]$
4+
^tests\/performance\/coremark\/.*\.[ch]$|
5+
^tests\/performance\/superpi\/.*\.(cpp|h)$|
6+
LICENSE\.md$
57
)
68
79
default_language_version:
@@ -24,11 +26,10 @@ repos:
2426
- id: trailing-whitespace
2527
args: [--markdown-linebreak-ext=md]
2628
- repo: https://github.com/codespell-project/codespell
27-
rev: "v2.2.4"
29+
rev: "v2.3.0"
2830
hooks:
2931
- id: codespell
3032
exclude: ^.*\.(svd|SVD)$
31-
stages: [manual]
3233
- repo: https://github.com/pre-commit/mirrors-clang-format
3334
rev: "v18.1.3"
3435
hooks:

CODE_OF_CONDUCT.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
We as members, contributors, and leaders pledge to make participation in our
66
community a harassment-free experience for everyone, regardless of age, body
77
size, visible or invisible disability, ethnicity, sex characteristics, gender
8-
identity and expression, level of experience, education, socio-economic status,
8+
identity and expression, level of experience, education, socioeconomic status,
99
nationality, personal appearance, race, religion, or sexual identity
1010
and orientation.
1111

cores/esp32/Arduino.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ void initArduino(void);
179179
unsigned long pulseIn(uint8_t pin, uint8_t state, unsigned long timeout);
180180
unsigned long pulseInLong(uint8_t pin, uint8_t state, unsigned long timeout);
181181

182-
uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder);
182+
uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder); // codespell:ignore shiftin
183183
void shiftOut(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder, uint8_t val);
184184

185185
#ifdef __cplusplus

cores/esp32/HWCDC.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ size_t HWCDC::write(const uint8_t *buffer, size_t size) {
443443
if (connected) {
444444
usb_serial_jtag_ll_ena_intr_mask(USB_SERIAL_JTAG_INTR_SERIAL_IN_EMPTY);
445445
}
446-
// tracks CDC trasmission progress to avoid hanging if CDC is unplugged while still sending data
446+
// tracks CDC transmission progress to avoid hanging if CDC is unplugged while still sending data
447447
size_t last_toSend = to_send;
448448
uint32_t tries = tx_timeout_ms; // waits 1ms per sending data attempt, in case CDC is unplugged
449449
while (connected && to_send) {
@@ -479,7 +479,7 @@ size_t HWCDC::write(const uint8_t *buffer, size_t size) {
479479
}
480480
}
481481
}
482-
// CDC was diconnected while sending data ==> flush the TX buffer keeping the last data
482+
// CDC was disconnected while sending data ==> flush the TX buffer keeping the last data
483483
if (to_send && !usb_serial_jtag_ll_txfifo_writable()) {
484484
connected = false;
485485
flushTXBuffer(buffer + so_far, to_send);

cores/esp32/HardwareSerial.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,7 @@ class HardwareSerial : public Stream {
228228

229229
// onReceive will setup a callback that will be called whenever an UART interruption occurs (UART_INTR_RXFIFO_FULL or UART_INTR_RXFIFO_TOUT)
230230
// UART_INTR_RXFIFO_FULL interrupt triggers at UART_FULL_THRESH_DEFAULT bytes received (defined as 120 bytes by default in IDF)
231-
// UART_INTR_RXFIFO_TOUT interrupt triggers at UART_TOUT_THRESH_DEFAULT symbols passed without any reception (defined as 10 symbos by default in IDF)
231+
// UART_INTR_RXFIFO_TOUT interrupt triggers at UART_TOUT_THRESH_DEFAULT symbols passed without any reception (defined as 10 symbols by default in IDF)
232232
// onlyOnTimeout parameter will define how onReceive will behave:
233233
// Default: true -- The callback will only be called when RX Timeout happens.
234234
// Whole stream of bytes will be ready for being read on the callback function at once.

cores/esp32/esp32-hal-uart.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ struct uart_struct_t {
4545
bool has_peek; // flag to indicate that there is a peek byte pending to be read
4646
uint8_t peek_byte; // peek byte that has been read but not consumed
4747
QueueHandle_t uart_event_queue; // export it by some uartGetEventQueue() function
48-
// configuration data:: Arduino API tipical data
48+
// configuration data:: Arduino API typical data
4949
int8_t _rxPin, _txPin, _ctsPin, _rtsPin; // UART GPIOs
5050
uint32_t _baudrate, _config; // UART baudrate and config
5151
// UART ESP32 specific data

cores/esp32/wiring_shift.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "esp32-hal.h"
2121
#include "wiring_private.h"
2222

23-
uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) {
23+
uint8_t shiftIn(uint8_t dataPin, uint8_t clockPin, uint8_t bitOrder) { // codespell:ignore shiftin
2424
uint8_t value = 0;
2525
uint8_t i;
2626

docs/en/api/gpio.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ One of the most used and versatile peripheral in a microcontroller is the GPIO.
99

1010
GPIO stands to General Purpose Input Output, and is responsible to control or read the state of a specific pin in the digital world. For example, this peripheral is widely used to create the LED blinking or to read a simple button.
1111

12-
.. note:: There are some GPIOs with special restrictions, and not all GPIOs are accessible through the developemnt board. For more information about it, see the corresponding board pin layout information.
12+
.. note:: There are some GPIOs with special restrictions, and not all GPIOs are accessible through the development board. For more information about it, see the corresponding board pin layout information.
1313

1414
GPIOs Modes
1515
***********

docs/en/tutorials/preferences.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ If you need to access a different namespace, close the one before opening the ot
565565
566566
currentNamespace.end(); // closes 'myNamespace'
567567
568-
currentNamespace.begin("myOtherNamespace", false); // opens a different Preferences namesspace.
568+
currentNamespace.begin("myOtherNamespace", false); // opens a different Preferences namespace.
569569
// do other stuff...
570570
571571
currentNamespace.end(); // closes 'myOtherNamespace'
@@ -644,7 +644,7 @@ Returning to the example above:
644644
645645
..
646646
647-
will assign to the variable ``dessert`` the String ``gravel`` if an error occurred, or the value stored against the key ``favourites`` if not.
647+
will assign to the variable ``dessert`` the String ``gravel`` if an error occurred, or the value stored against the key ``favorites`` if not.
648648

649649
If we predetermine a default value that is outside all legitimate values, we now have a way to test if an error actually occurred.
650650

libraries/ArduinoOTA/library.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version=3.0.4
33
author=Ivan Grokhotkov and Hristo Gochkov
44
maintainer=Hristo Gochkov <[email protected]>
55
sentence=Enables Over The Air upgrades, via wifi and espota.py UDP request/TCP download.
6-
paragraph=With this library you can enable your sketch to be upgraded over network. Includes mdns anounces to get discovered by the arduino IDE.
6+
paragraph=With this library you can enable your sketch to be upgraded over network. Includes mdns announces to get discovered by the arduino IDE.
77
category=Communication
88
url=
99
architectures=esp32

libraries/BLE/examples/BLE5_extended_scan/BLE5_extended_scan.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class MyBLEExtAdvertisingCallbacks : public BLEExtAdvertisingCallbacks {
2525
// here we can receive regular advertising data from BLE4.x devices
2626
Serial.println("BLE4.2");
2727
} else {
28-
// here we will get extended advertising data that are advertised over data channel by BLE5 divices
28+
// here we will get extended advertising data that are advertised over data channel by BLE5 devices
2929
Serial.printf("Ext advertise: data_le: %d, data_status: %d \n", report.adv_data_len, report.data_status);
3030
}
3131
}

libraries/BLE/src/BLERemoteCharacteristic.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ void BLERemoteCharacteristic::gattClientEventHandler(esp_gattc_cb_event_t event,
177177
}
178178

179179
// At this point, we have determined that the event is for us, so now we save the value
180-
// and unlock the semaphore to ensure that the requestor of the data can continue.
180+
// and unlock the semaphore to ensure that the requester of the data can continue.
181181
if (evtParam->read.status == ESP_GATT_OK) {
182182
m_value = String((char *)evtParam->read.value, evtParam->read.value_len);
183183
if (m_rawData != nullptr) {

libraries/BLE/src/BLERemoteDescriptor.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ void BLERemoteDescriptor::gattClientEventHandler(esp_gattc_cb_event_t event, esp
6969
} else {
7070
m_value = "";
7171
}
72-
// Unlock the semaphore to ensure that the requestor of the data can continue.
72+
// Unlock the semaphore to ensure that the requester of the data can continue.
7373
m_semaphoreReadDescrEvt.give();
7474
break;
7575

libraries/BluetoothSerial/examples/DiscoverConnect/DiscoverConnect.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ void setup() {
8080
Serial.println("Didn't find any devices");
8181
}
8282
} else {
83-
Serial.println("Error on discoverAsync f.e. not workin after a \"connect\"");
83+
Serial.println("Error on discoverAsync f.e. not working after a \"connect\"");
8484
}
8585
}
8686

libraries/ESP32/examples/Camera/CameraWebServer/app_httpd.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,7 @@ static esp_err_t win_handler(httpd_req_t *req) {
11011101
int offsetX = parse_get_var(buf, "offx", 0);
11021102
int offsetY = parse_get_var(buf, "offy", 0);
11031103
int totalX = parse_get_var(buf, "tx", 0);
1104-
int totalY = parse_get_var(buf, "ty", 0);
1104+
int totalY = parse_get_var(buf, "ty", 0); // codespell:ignore totaly
11051105
int outputX = parse_get_var(buf, "ox", 0);
11061106
int outputY = parse_get_var(buf, "oy", 0);
11071107
bool scale = parse_get_var(buf, "scale", 0) == 1;
@@ -1110,10 +1110,10 @@ static esp_err_t win_handler(httpd_req_t *req) {
11101110

11111111
log_i(
11121112
"Set Window: Start: %d %d, End: %d %d, Offset: %d %d, Total: %d %d, Output: %d %d, Scale: %u, Binning: %u", startX, startY, endX, endY, offsetX, offsetY,
1113-
totalX, totalY, outputX, outputY, scale, binning
1113+
totalX, totalY, outputX, outputY, scale, binning // codespell:ignore totaly
11141114
);
11151115
sensor_t *s = esp_camera_sensor_get();
1116-
int res = s->set_res_raw(s, startX, startY, endX, endY, offsetX, offsetY, totalX, totalY, outputX, outputY, scale, binning);
1116+
int res = s->set_res_raw(s, startX, startY, endX, endY, offsetX, offsetY, totalX, totalY, outputX, outputY, scale, binning); // codespell:ignore totaly
11171117
if (res) {
11181118
return httpd_resp_send_500(req);
11191119
}

libraries/ESP32/examples/DeepSleep/ExternalWakeUp/ExternalWakeUp.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ void setup() {
8181
/*
8282
If there are no external pull-up/downs, tie wakeup pins to inactive level with internal pull-up/downs via RTC IO
8383
during deepsleep. However, RTC IO relies on the RTC_PERIPH power domain. Keeping this power domain on will
84-
increase some power comsumption. However, if we turn off the RTC_PERIPH domain or if certain chips lack the RTC_PERIPH
84+
increase some power consumption. However, if we turn off the RTC_PERIPH domain or if certain chips lack the RTC_PERIPH
8585
domain, we will use the HOLD feature to maintain the pull-up and pull-down on the pins during sleep.
8686
*/
8787
rtc_gpio_pulldown_en(WAKEUP_GPIO); // GPIO33 is tie to GND in order to wake up in HIGH

libraries/ESP32/examples/Serial/OnReceiveError_BREAK_Demo/OnReceiveError_BREAK_Demo.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
before reading data, if necessary.
3636
3737
In long UART transmissions, some data will be received based on FIFO Full parameter, and whenever
38-
an error ocurs, it will raise the UART error interrupt.
38+
an error occurs, it will raise the UART error interrupt.
3939
4040
This sketch produces BREAK UART error in the beginning of a transmission and also at the end of a
4141
transmission. It will be possible to understand the order of the events in the logs.

libraries/ESP32/examples/Serial/RxFIFOFull_Demo/RxFIFOFull_Demo.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,9 @@ void testAndReport(uint8_t fifoFull) {
9191
}
9292
}
9393

94-
uint32_t pastTime = millis() - now;
94+
uint32_t pastTime = millis() - now; // codespell:ignore pasttime
9595
Serial.printf("\nIt has sent %d bytes from Serial1 TX to Serial1 RX\n", sentBytes);
96-
Serial.printf("It took %lu milliseconds to read %d bytes\n", pastTime, bytesReceived);
96+
Serial.printf("It took %lu milliseconds to read %d bytes\n", pastTime, bytesReceived); // codespell:ignore pasttime
9797
Serial.printf("Per execution Serial.read() number of bytes data and time information:\n");
9898
for (i = 0; i < DATA_SIZE; i++) {
9999
Serial.printf("#%03d - Received %03lu bytes after %lu ms.\n", i, bytesJustReceived[i], i > 0 ? timeStamp[i] - timeStamp[i - 1] : timeStamp[i] - now);

libraries/ESP32/examples/Serial/RxTimeout_Demo/RxTimeout_Demo.ino

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ void testAndReport(uint8_t rxTimeout) {
8585
}
8686
}
8787

88-
uint32_t pastTime = millis() - now;
88+
uint32_t pastTime = millis() - now; // codespell:ignore pasttime
8989
Serial.printf("\nIt has sent %d bytes from Serial1 TX to Serial1 RX\n", sentBytes);
90-
Serial.printf("It took %lu milliseconds to read %d bytes\n", pastTime, bytesReceived);
90+
Serial.printf("It took %lu milliseconds to read %d bytes\n", pastTime, bytesReceived); // codespell:ignore pasttime
9191
Serial.print("Received data: [");
9292
Serial.write(dataReceived, DATA_SIZE);
9393
Serial.println("]");

libraries/ESP32/examples/Touch/TouchButton/TouchButton.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This is an example how to use Touch Intrrerupts
4-
The sketh will tell when it is touched and then relesased as like a push-button
4+
The sketch will tell when it is touched and then released as like a push-button
55
66
This method based on touchInterruptSetThresholdDirection() is only available for ESP32
77
*/

libraries/ESP32/examples/Touch/TouchButtonV2/TouchButtonV2.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
33
This is an example how to use Touch Intrrerupts
4-
The sketh will tell when it is touched and then relesased as like a push-button
4+
The sketch will tell when it is touched and then released as like a push-button
55
66
This method based on touchInterruptGetLastStatus() is only available for ESP32 S2 and S3
77
*/

libraries/ESP32/examples/Zigbee/Zigbee_Light_Bulb/Zigbee_Light_Bulb.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ static void esp_zb_task(void *pvParameters) {
127127
esp_zb_set_primary_network_channel_set(ESP_ZB_PRIMARY_CHANNEL_MASK);
128128

129129
//Erase NVRAM before creating connection to new Coordinator
130-
esp_zb_nvram_erase_at_start(true); //Comment out this line to erase NVRAM data if you are conneting to new Coordinator
130+
esp_zb_nvram_erase_at_start(true); //Comment out this line to erase NVRAM data if you are connecting to new Coordinator
131131

132132
ESP_ERROR_CHECK(esp_zb_start(false));
133133
esp_zb_main_loop_iteration();

libraries/ESP32/examples/Zigbee/Zigbee_Light_Switch/Zigbee_Light_Switch.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct) {
159159
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_FORMATION);
160160
} else {
161161
log_i("Device rebooted");
162-
log_i("Openning network for joining for %d seconds", 180);
162+
log_i("Opening network for joining for %d seconds", 180);
163163
esp_zb_bdb_open_network(180);
164164
}
165165
} else {

libraries/ESP32/examples/Zigbee/Zigbee_Temperature_Sensor/Zigbee_Temperature_Sensor.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ static void esp_zb_task(void *pvParameters) {
255255
esp_zb_set_primary_network_channel_set(ESP_ZB_PRIMARY_CHANNEL_MASK);
256256

257257
//Erase NVRAM before creating connection to new Coordinator
258-
//esp_zb_nvram_erase_at_start(true); //Comment out this line to erase NVRAM data if you are conneting to new Coordinator
258+
//esp_zb_nvram_erase_at_start(true); //Comment out this line to erase NVRAM data if you are connecting to new Coordinator
259259

260260
ESP_ERROR_CHECK(esp_zb_start(false));
261261
esp_zb_main_loop_iteration();

libraries/ESP32/examples/Zigbee/Zigbee_Thermostat/Zigbee_Thermostat.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ void esp_zb_app_signal_handler(esp_zb_app_signal_t *signal_struct) {
279279
esp_zb_bdb_start_top_level_commissioning(ESP_ZB_BDB_MODE_NETWORK_FORMATION);
280280
} else {
281281
log_i("Device rebooted");
282-
log_i("Openning network for joining for %d seconds", 180);
282+
log_i("Opening network for joining for %d seconds", 180);
283283
esp_zb_bdb_open_network(180);
284284
}
285285
} else {

libraries/NetBIOS/src/NetBIOS.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ typedef struct {
1212
uint8_t flags1;
1313
uint8_t flags2;
1414
uint16_t qcount;
15-
uint16_t acount;
15+
uint16_t acount; // codespell:ignore acount
1616
uint16_t nscount;
1717
uint16_t adcount;
1818
uint8_t name_len;
@@ -26,7 +26,7 @@ typedef struct {
2626
uint8_t flags1;
2727
uint8_t flags2;
2828
uint16_t qcount;
29-
uint16_t acount;
29+
uint16_t acount; // codespell:ignore acount
3030
uint16_t nscount;
3131
uint16_t adcount;
3232
uint8_t name_len;
@@ -84,7 +84,7 @@ void NetBIOS::_onPacket(AsyncUDPPacket &packet) {
8484
nbnsa.flags1 = 0x85;
8585
nbnsa.flags2 = 0;
8686
append_16((void *)&nbnsa.qcount, 0);
87-
append_16((void *)&nbnsa.acount, 1);
87+
append_16((void *)&nbnsa.acount, 1); // codespell:ignore acount
8888
append_16((void *)&nbnsa.nscount, 0);
8989
append_16((void *)&nbnsa.adcount, 0);
9090
nbnsa.name_len = question->name_len;

libraries/NetworkClientSecure/examples/WiFiClientTrustOnFirstUse/WiFiClientTrustOnFirstUse.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
https://en.wikipedia.org/wiki/Trust_on_first_use).
2323
2424
In this scheme; we start the very first time without any security checks
25-
but once we have our first connection; we store the public crytpographic
25+
but once we have our first connection; we store the public cryptographic
2626
details (or a proxy, such as a sha256 of this). And then we use this for
2727
any subsequent connections.
2828

libraries/OpenThread/examples/COAP/coap_lamp/coap_lamp.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ bool otDeviceSetup(const char **otSetupCmds, uint8_t nCmds1, const char **otCoap
9090
}
9191

9292
void setupNode() {
93-
// tries to set the Thread Network node and only returns when succeded
93+
// tries to set the Thread Network node and only returns when succeeded
9494
bool startedCorrectly = false;
9595
while (!startedCorrectly) {
9696
startedCorrectly |=

libraries/OpenThread/examples/COAP/coap_switch/coap_switch.ino

+5-5
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,12 @@ bool otDeviceSetup(
7979
}
8080
Serial.println("OpenThread setup done. Node is ready.");
8181
// all fine! LED goes and stays Blue
82-
rgbLedWrite(RGB_BUILTIN, 0, 0, 64); // BLUE ... Swtich is ready!
82+
rgbLedWrite(RGB_BUILTIN, 0, 0, 64); // BLUE ... Switch is ready!
8383
return true;
8484
}
8585

8686
void setupNode() {
87-
// tries to set the Thread Network node and only returns when succeded
87+
// tries to set the Thread Network node and only returns when succeeded
8888
bool startedCorrectly = false;
8989
while (!startedCorrectly) {
9090
startedCorrectly |= otDeviceSetup(
@@ -138,19 +138,19 @@ bool otCoapPUT(bool lampState) {
138138
return false;
139139
}
140140

141-
// this fucntion is used by the Switch mode to check the BOOT Button and send the user action to the Lamp node
141+
// this function is used by the Switch mode to check the BOOT Button and send the user action to the Lamp node
142142
void checkUserButton() {
143143
static long unsigned int lastPress = 0;
144144
const long unsigned int debounceTime = 500;
145-
static bool lastLampState = true; // first button press will turn the Lamp OFF from inital Green
145+
static bool lastLampState = true; // first button press will turn the Lamp OFF from initial Green
146146

147147
pinMode(USER_BUTTON, INPUT_PULLUP); // C6/H2 User Button
148148
if (millis() > lastPress + debounceTime && digitalRead(USER_BUTTON) == LOW) {
149149
lastLampState = !lastLampState;
150150
if (!otCoapPUT(lastLampState)) { // failed: Lamp Node is not responding due to be off or unreachable
151151
// timeout from the CoAP PUT message... restart the node.
152152
rgbLedWrite(RGB_BUILTIN, 255, 0, 0); // RED ... something failed!
153-
Serial.println("Reseting the Node as Switch... wait.");
153+
Serial.println("Resetting the Node as Switch... wait.");
154154
// start over...
155155
setupNode();
156156
}

libraries/OpenThread/src/OThreadCLI_Util.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ bool otExecCommand(const char *cmd, const char *arg, ot_cmd_return_t *returnCode
117117
i--; // search for ' ' before ":'
118118
}
119119
if (*i == ' ') {
120-
i++; // move it forward to the number begining
120+
i++; // move it forward to the number beginning
121121
returnCode->errorCode = atoi(i);
122122
returnCode->errorMessage = m;
123123
} // otherwise, it will keep the "bad error message" information

0 commit comments

Comments
 (0)