Skip to content

Commit 432812e

Browse files
committed
Actions Fix
1 parent b2c8600 commit 432812e

File tree

3 files changed

+16
-23
lines changed

3 files changed

+16
-23
lines changed

README.md

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,14 @@
11
## Commander-API library
2-
**Version V2.0.2**
2+
**Version V2.1.0**
33

44
Commander-API is a simple-to-use parser library, and you can easily use it to process character based commands and link them to a specified function. It is designed mainly to work with low memory capacity devices, for example, __small ARM or AVR processors__.
55

6-
__Key changes in V1.2:__
7-
* New shortcut keys.
8-
* Option to set the timeout of the internal client.
9-
* Advanced search functions( Ctrl-R, Page-Up, Page-Down )
10-
* Banner text change option.
11-
* Path text change option. Also change it to blue color
12-
* Websocket channel
13-
* Terminal buzzer command, with mute option
14-
* QR-code generation
15-
* History command
16-
* Help command
17-
18-
__Breaking changes in V1.2:__
6+
__Key changes in V2.1.0:__
7+
* AVR PROGMEM support.
8+
* Piping
9+
* Ready to use built-in commands
10+
11+
__Breaking changes in V2.1.0:__
1912
* The response channel is now uses the Stream class.
2013
This way it is more flexible and you doesn't have to
2114
create a class for every peripheral.

examples/Commander_simple_ESP32/Commander_simple_ESP32.ino

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ Commander commander;
2424

2525
// We have to create the prototypes functions for our commands.
2626
// The arguments have to be the same for all command functions.
27-
void cat_func( char *args, commandResponse *response );
28-
void dog_func( char *args, commandResponse *response );
29-
void sum_func( char *args, commandResponse *response );
30-
void led_func( char *args, commandResponse *response );
27+
void cat_func( char *args, Stream *response );
28+
void dog_func( char *args, Stream *response );
29+
void sum_func( char *args, Stream *response );
30+
void led_func( char *args, Stream *response );
3131

3232
// To tell Commander how many commands we have, it is necessary
3333
// to create an array, that holds some data that represents our
@@ -310,31 +310,31 @@ void loop() {
310310

311311

312312
/// This is an example function for the cat command
313-
void cat_func(char *args, commandResponse *response )
313+
void cat_func(char *args, Stream *response )
314314
{
315315

316316
response -> print("Hello from cat function!\r\n");
317317

318318
}
319319

320320
/// This is an example function for the dog command
321-
void dog_func(char *args, commandResponse *response )
321+
void dog_func(char *args, Stream *response )
322322
{
323323

324324
response -> print("Hello from dog function!\r\n");
325325

326326
}
327327

328328
/// This is an example function for the led command
329-
void led_func(char *args, commandResponse *response )
329+
void led_func(char *args, Stream *response )
330330
{
331331

332332
digitalWrite( LED_PIN, !digitalRead( LED_PIN ) );
333333

334334
}
335335

336336
/// This is an example function for the sum command
337-
void sum_func(char *args, commandResponse *response )
337+
void sum_func(char *args, Stream *response )
338338
{
339339

340340
// These variables will hold the value of the

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=Commander-API
2-
version=2.0.2
2+
version=2.1.0
33
author=Daniel Hajnal <[email protected]>
44
maintainer=Daniel Hajnal <[email protected]>
55
sentence=This library can be used to create a simple command parser.

0 commit comments

Comments
 (0)