Skip to content

Commit 39cd7a1

Browse files
committed
Prepare for v3 release
1 parent 56a9541 commit 39cd7a1

File tree

9 files changed

+112
-311
lines changed

9 files changed

+112
-311
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ This was one of our biggest tasks! The command storage system, previously tied t
2121
### ⌨️ Auto-Complete (Experimental)
2222
We’re working on it! Early results are promising, but for now, **we don’t recommend using it yet**. Stay tuned!
2323

24-
### 🔌 Abstraction Layers
24+
### 📦 Abstraction Layers
2525
As the project grew, we realized it was time to **increase abstraction** for better integration into complex systems. For example, that’s why we introduced the **CommandCaller interface**, making it easier to integrate Commander-API into larger projects.
2626

2727
### 📡 Pipe Module (Almost Ready!)
@@ -66,7 +66,7 @@ If this project has been helpful to you and you’d like to **buy us a coffee**,
6666

6767
Have a question? Need help? Just want to say hi?
6868
- 🗨️ [Join the discussions](https://github.com/dani007200964/Commander-API/discussions)
69-
- 🎧 [Find us on Discord](https://github.com/dani007200964/Commander-API/discussions)
69+
- 🎧 [Find us on Discord](https://discord.gg/GhMGqhBS)
7070

7171
We’d love to hear from you! 🚀
7272

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/*
2+
* Created on Aug 10 2020
3+
*
4+
* Copyright (c) 2023 - Daniel Hajnal
5+
6+
* This file is part of the Commander-API project.
7+
* Modified 2025.02.22
8+
*/
9+
10+
#include "Commander-API.hpp"
11+
12+
#define COMMAND_SIZE 30
13+
14+
// We have to create an object from Commander class.
15+
Commander commander;
16+
17+
// Command callbacks
18+
bool cat_func( char *args, CommandCaller* caller );
19+
bool dog_func( char *args, CommandCaller* caller );
20+
21+
// Command tree
22+
Commander::systemCommand_t API_tree[] = {
23+
systemCommand( "cat", "Description for cat command.", cat_func ),
24+
systemCommand( "dog", "Description for dog command.", dog_func )
25+
};
26+
27+
// This buffer is used to store command from Serial port.
28+
char commandBuffer[ COMMAND_SIZE ];
29+
30+
// System init section.
31+
void setup(){
32+
Serial.begin(115200);
33+
34+
commander.attachTree( API_tree );
35+
commander.init();
36+
37+
Serial.println();
38+
Serial.println( "---- Init Finished ----" );
39+
Serial.println();
40+
41+
Serial.println( "Type something" );
42+
Serial.print( "$: " );
43+
}
44+
45+
// Infinite loop.
46+
void loop(){
47+
commander.update( commandBuffer, COMMAND_SIZE, &Serial );
48+
}
49+
50+
/// This is an example function for the cat command
51+
bool cat_func(char *args, CommandCaller* caller ){
52+
caller -> print( "Hello from cat function!\r\n" );
53+
return true;
54+
}
55+
56+
/// This is an example function for the dog command
57+
bool dog_func(char *args, CommandCaller* caller ){
58+
caller -> print( "Hello from dog function!\r\n" );
59+
return true;
60+
}

examples/Arduino UNO/Memory/Memory.ino

Lines changed: 0 additions & 75 deletions
This file was deleted.

extras/Assets/DocuPages/supported_boards_page.md

Lines changed: 0 additions & 11 deletions
This file was deleted.

extras/Assets/DoxygenLayout.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
<navindex>
55
<tab type="mainpage" visible="yes" title=""/>
66
<tab type="usergroup" visible="yes" url="@ref installation_page" title="📥 Installation" intro=""/>
7-
<tab type="usergroup" visible="yes" url="@ref supported_boards_page" title="✅ Supported Boards" intro=""/>
87
<tab type="usergroup" visible="yes" url="@ref bug_report_page" title="🐛 Bug Report" intro=""/>
98
<tab type="usergroup" visible="yes" url="@ref faq_page" title="❓ FAQ" intro=""/>
109
<tab type="usergroup" visible="yes" url="@ref developer_zone_page" title="🚧 Developer Zone" intro=""/>

extras/Assets/supported_boards.html

Lines changed: 0 additions & 204 deletions
This file was deleted.

0 commit comments

Comments
 (0)