Skip to content

Commit 5ebe069

Browse files
committed
Cleaning up Braccio_LearnByDoing.
1 parent 72f2bfe commit 5ebe069

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

examples/Braccio_LearnByDoing/Braccio_LearnByDoing.ino

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,20 @@
1+
/*
2+
* @brief Activating the "MOVE" button by pressing
3+
* the joystick enables a waving motion of the arm.
4+
*/
5+
6+
/**************************************************************************************
7+
* INCLUDE
8+
**************************************************************************************/
9+
110
#include <Braccio++.h>
211
#include "FlashIAPBlockDevice.h"
312
#include "FATFileSystem.h"
413

14+
/**************************************************************************************
15+
* VARIABLES
16+
**************************************************************************************/
17+
518
enum states {
619
LEARN,
720
REPEAT,
@@ -14,6 +27,10 @@ float values[10000];
1427
float* idx = values;
1528
float* final_idx = 0;
1629

30+
/**************************************************************************************
31+
* FUNCTIONS
32+
**************************************************************************************/
33+
1734
static void event_handler(lv_event_t * e) {
1835
lv_event_code_t code = lv_event_get_code(e);
1936
lv_obj_t * obj = lv_event_get_target(e);
@@ -95,9 +112,14 @@ void customMenu() {
95112
static FlashIAPBlockDevice bd(XIP_BASE + 0x100000, 0x100000);
96113
static mbed::FATFileSystem fs("fs");
97114

98-
void setup() {
115+
/**************************************************************************************
116+
* SETUP/LOOP
117+
**************************************************************************************/
99118

119+
void setup()
120+
{
100121
Serial.begin(115200);
122+
while (!Serial) { }
101123

102124
// Mount file system for load/store movements
103125
int err = fs.mount(&bd);

0 commit comments

Comments
 (0)