Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit f3635ee

Browse files
committedMay 2, 2022
Adding separators for better readability.
1 parent 4af7cc1 commit f3635ee

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed
 

‎examples/Braccio_Learn_and_Repeat/Braccio_Learn_and_Repeat.ino

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,34 @@
1+
/**************************************************************************************
2+
* INCLUDE
3+
**************************************************************************************/
4+
15
#include <Braccio++.h>
26

3-
// Colors
7+
/**************************************************************************************
8+
* DEFINE
9+
**************************************************************************************/
10+
411
#define COLOR_TEAL 0x00878F
512
#define COLOR_LIGHT_TEAL 0x62AEB2
613
#define COLOR_ORANGE 0xE47128
714

8-
// ENTER button
915
#define BUTTON_ENTER 6
1016

17+
/**************************************************************************************
18+
* TYPEDEF
19+
**************************************************************************************/
20+
1121
enum class State
1222
{
1323
RECORD,
1424
REPLAY,
1525
ZERO_POSITION
1626
};
1727

28+
/**************************************************************************************
29+
* GLOBAL VARIABLES
30+
**************************************************************************************/
31+
1832
State state = State::ZERO_POSITION;
1933

2034
static int const MAX_SAMPLES = 6*100*2; /* 20 seconds. */
@@ -29,6 +43,9 @@ static lv_obj_t * btnm;
2943

3044
static const char * btnm_map[] = { "RECORD", "\n", "REPLAY", "\n", "ZERO_POSITION", "\n", "\0" };
3145

46+
/**************************************************************************************
47+
* FUNCTIONS
48+
**************************************************************************************/
3249

3350
static void eventHandlerMenu(lv_event_t * e)
3451
{
@@ -135,6 +152,10 @@ void mainMenu()
135152
Braccio.connectJoystickTo(btnm);
136153
}
137154

155+
/**************************************************************************************
156+
* SETUP/LOOP
157+
**************************************************************************************/
158+
138159
void setup() {
139160
Braccio.begin(mainMenu);
140161
delay(500);

0 commit comments

Comments
 (0)
Please sign in to comment.