Skip to content

Commit eb7b019

Browse files
committed
fix(openthread): Typo, start/stop console
1 parent 2aaa575 commit eb7b019

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

Diff for: CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ set(ARDUINO_LIBRARY_OpenThread_SRCS
163163
libraries/OpenThread/src/OThreadCLI.cpp
164164
libraries/OpenThread/src/OThreadCLI_Util.cpp)
165165

166-
set(ARDUINO_LIBRARY_PPP_SRCS
166+
set(ARDUINO_LIBRARY_PPP_SRCS
167167
libraries/PPP/src/PPP.cpp
168168
libraries/PPP/src/ppp.c)
169169

Diff for: libraries/OpenThread/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ public:
2828
operator bool() const;
2929

3030
// Starts a task to read/write otStream. Default prompt is "ot> ". Set it to NULL to make it invisible.
31-
void startOpenThreadConsole(Stream& otStream, bool echoback = true, const char* prompt = "ot> ");
32-
void stopOpenThreadConsole();
31+
void startConsole(Stream& otStream, bool echoback = true, const char* prompt = "ot> ");
32+
void stopConsole();
3333
void setPrompt(char* prompt); // Changes the console prompt. NULL is an empty prompt.
3434
void setEchoBack(bool echoback); // Changes the console echoback option
3535
void setStream(Stream& otStream); // Changes the console Stream object
@@ -59,8 +59,8 @@ extern OpenThreadCLI OThreadCLI;
5959
- You can customize the console behavior by adjusting parameters such as echoback and buffer sizes.
6060
6161
## Public Methods
62-
- `startOpenThreadConsole(Stream& otStream, bool echoback = true, const char* prompt = "ot> ")`: Starts the OpenThread console with the specified stream, echoback option, and prompt.
63-
- `stopOpenThreadConsole()`: Stops the OpenThread console.
62+
- `startConsole(Stream& otStream, bool echoback = true, const char* prompt = "ot> ")`: Starts the OpenThread console with the specified stream, echoback option, and prompt.
63+
- `stopConsole()`: Stops the OpenThread console.
6464
- `setPrompt(char* prompt)`: Changes the console prompt (set to NULL for an empty prompt).
6565
- `setEchoBack(bool echoback)`: Changes the console echoback option.
6666
- `setStream(Stream& otStream)`: Changes the console Stream object.

Diff for: libraries/OpenThread/examples/SimpleCLI/SimpleCLI.ino

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ void setup() {
1414
Serial.begin(115200);
1515
OThreadCLI.begin(false); // No AutoStart - fresh start
1616
Serial.println("OpenThread CLI started - type 'help' for a list of commands.");
17-
OThreadCLI.startOpenThreadConsole(Serial);
17+
OThreadCLI.startConsole(Serial);
1818
}
1919

2020
void loop() {

Diff for: libraries/OpenThread/keywords.txt

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ ot_device_role_t KEYWORD1
1515
# Methods and Functions (KEYWORD2)
1616
#######################################
1717

18-
startOpenThreadConsole KEYWORD2
19-
stopOpenThreadConsole KEYWORD2
18+
startConsole KEYWORD2
19+
stopConsole KEYWORD2
2020
setPrompt KEYWORD2
2121
setEchoBack KEYWORD2
2222
setStream KEYWORD2

Diff for: libraries/OpenThread/src/OThreadCLI.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ void OpenThreadCLI::onReceive(OnReceiveCb_t func) {
187187
}
188188

189189
// Stream object shall be already started and configured before calling this function
190-
void OpenThreadCLI::startOpenThreadConsole(Stream& otStream, bool echoback, const char *prompt) {
190+
void OpenThreadCLI::startConsole(Stream& otStream, bool echoback, const char *prompt) {
191191
if (!otStarted) {
192192
log_e("OpenThread CLI has not started. Please begin() it before starting the console.");
193193
return;
@@ -204,7 +204,7 @@ void OpenThreadCLI::startOpenThreadConsole(Stream& otStream, bool echoback, cons
204204
}
205205
}
206206

207-
void OpenThreadCLI::stopOpenThreadConsole() {
207+
void OpenThreadCLI::stopConsole() {
208208
if (s_console_cli_task) {
209209
vTaskDelete(s_console_cli_task);
210210
s_console_cli_task = NULL;

Diff for: libraries/OpenThread/src/OThreadCLI.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class OpenThreadCLI : public Stream {
3131
operator bool() const;
3232

3333
// starts a task to read/write otStream. Default prompt is "ot> ". Set it to NULL to make it invisible.
34-
void startOpenThreadConsole(Stream& otStream, bool echoback = true, const char *prompt = "ot> ");
35-
void stopOpenThreadConsole();
34+
void startConsole(Stream& otStream, bool echoback = true, const char *prompt = "ot> ");
35+
void stopConsole();
3636
void setPrompt(char *prompt); // changes the console prompt. NULL is an empty prompt.
3737
void setEchoBack(bool echoback); // changes the console echoback option
3838
void setStream(Stream& otStream); // changes the console Stream object

0 commit comments

Comments
 (0)