Skip to content

Commit c2d4933

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

File tree

1 file changed

+22
-1
lines changed

1 file changed

+22
-1
lines changed

examples/Braccio_LearnByDoing/Braccio_LearnByDoing.ino

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,19 @@
1+
/*
2+
* @brief Learn the arm an movement and replay it.
3+
*/
4+
5+
/**************************************************************************************
6+
* INCLUDE
7+
**************************************************************************************/
8+
19
#include <Braccio++.h>
210
#include "FlashIAPBlockDevice.h"
311
#include "FATFileSystem.h"
412

13+
/**************************************************************************************
14+
* VARIABLES
15+
**************************************************************************************/
16+
517
enum states {
618
LEARN,
719
REPEAT,
@@ -14,6 +26,10 @@ float values[10000];
1426
float* idx = values;
1527
float* final_idx = 0;
1628

29+
/**************************************************************************************
30+
* FUNCTIONS
31+
**************************************************************************************/
32+
1733
static void event_handler(lv_event_t * e) {
1834
lv_event_code_t code = lv_event_get_code(e);
1935
lv_obj_t * obj = lv_event_get_target(e);
@@ -95,9 +111,14 @@ void customMenu() {
95111
static FlashIAPBlockDevice bd(XIP_BASE + 0x100000, 0x100000);
96112
static mbed::FATFileSystem fs("fs");
97113

98-
void setup() {
114+
/**************************************************************************************
115+
* SETUP/LOOP
116+
**************************************************************************************/
99117

118+
void setup()
119+
{
100120
Serial.begin(115200);
121+
while (!Serial) { }
101122

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

0 commit comments

Comments
 (0)