@@ -114,7 +114,7 @@ class Commander{
114
114
const char *name; // Name of the command
115
115
const char *desc; // Description of the command
116
116
117
- void (*func)( char *, Stream *response ); // Function pointer to the command function
117
+ void (*func)( char *, Stream *response, void * parent ); // Function pointer to the command function
118
118
119
119
#ifdef __AVR__
120
120
__FlashStringHelper *name_P; // Name of the command( stored in PROGMEM )
@@ -184,25 +184,28 @@ class Commander{
184
184
// / be visible.
185
185
void execute ( const char *cmd );
186
186
187
- // / Execution function for Serial response.
187
+ // / Execution function for Stream response.
188
188
// /
189
189
// / This function tries to execute a command.
190
- // / It uses the Serial response channel, so
190
+ // / It uses the Stream response channel, so
191
191
// / the messages from the command handler
192
- // / will be passed to the selected Serial
192
+ // / will be passed to the selected Stream
193
193
// / object.
194
194
void execute ( char *cmd, Stream *resp );
195
195
196
- // / Execution function for Serial response.
196
+ // / Execution function for Stream response.
197
197
// /
198
198
// / This function tries to execute a command.
199
- // / It uses the Serial response channel, so
199
+ // / It uses the Stream response channel, so
200
200
// / the messages from the command handler
201
- // / will be passed to the selected Serial
201
+ // / will be passed to the selected Stream
202
202
// / object.
203
203
void execute ( const char *cmd, Stream *resp );
204
204
205
- // / Debug channel for Serial.
205
+ void execute ( char *cmd, Stream *resp, void * parent );
206
+ void execute ( const char *cmd, Stream *resp, void * parent );
207
+
208
+ // / Debug channel for Stream.
206
209
// /
207
210
// / This function attaches a Serial channel
208
211
// / for debug messages. It also enables
@@ -217,7 +220,7 @@ class Commander{
217
220
218
221
// / Prints out the help string to the specified Stream.
219
222
// / @param out The help information will be printed to this Stream.
220
- void printHelp ( Stream* out );
223
+ void printHelp ( Stream* out, bool style = false );
221
224
222
225
private:
223
226
@@ -326,7 +329,7 @@ class Commander{
326
329
// / This function executes a command. Before calling this
327
330
// / function, the response pointer and it's channel has to
328
331
// / be configured correctly.
329
- void executeCommand ( char *cmd );
332
+ void executeCommand ( char *cmd, void * parent = NULL );
330
333
331
334
// / Help function
332
335
// /
0 commit comments