Easy Training / Mbed 2 deprecated Teach_demo

Dependencies:   mbed Teach memory

Revision:
1:33fdaabcdeda
Parent:
0:ad924d8a2f98
Child:
2:6dc660d146b7
diff -r ad924d8a2f98 -r 33fdaabcdeda teach.h
--- a/teach.h	Wed Mar 25 21:36:24 2020 +0000
+++ b/teach.h	Tue Apr 21 15:49:22 2020 +0000
@@ -8,29 +8,48 @@
 the autor is not responsible for any spelling mistakes
 
 */
+#include <vector>
 
 #ifndef teach_H                                         // no idea what this does
 #define teach_H                                         // seems important
 
+#define MAX_SIZE 500000000
+
+struct posdata{
+    int time;
+    int hi, low;
+    bool end, start;
+    float pos[3];
+};
+
+struct temp_arry{
+    int time;
+    float pos[3];
+};
+
+
 
 class teach
 {
 public:
-    teach(void);                                        // Sets all parameters for the class teach constructor
-
-    //values to be used outside of class --> aka global variabels
-    //int initvalue;                                    //startvalue for sum
-    //int inc;                                          //the value to increment by
+    teach(void);                                                // Sets all parameters for the class teach constructor
+    
                     
-    //functions to be used outside of class            
-    void start(void);                                   //Starts the teach function
-    void decide(bool b);                                //wen calld from main skips out of pause decides
-    void stop(void);                                    //abort abord danger
+    //functions to be used outside of class
+    void setstart(float posx,float posy,float posz, int time); // creates a temporary begin of line point       
+    void setpoint(float posx,float posy,float posz, int time); // creates a temporary position point
+    void setend(float posx,float posy,float posz, int time);   // creates a temporary end of line point
+    void save(void);                                           // wen calld from main stores the whole training in memory
+    void stop(void);                                           // deleats all temp data and resets counters/pointers
     
 private:
-    int k,i;                                             // Counters for data recording
-    void temp_store(int k, int i, float* Data);          // Stors data temporary; Data==Pointer to a Data Array (position(x,y,z),time)
-    void hose_builder(float*,float*,int length);         // Creates a hose out of al the points in th room
+    std::vector<posdata> data_vec;                       // Vektor mit allen datenpunkten 
+    int  highcount,lowcount;                             // Counters for data recording
+    void temp_store(void);                               // Stors data temporary; Data==Pointer to a Data Array (position(x,y,z),time)
+    void process(void);                                  // rounds the houses to trainings
+    void contr_sice(void);                               // controlls the sice of temp array
+    struct posdata temp;                                 // temporary data storage
+    
     // objekte von display,memory,position               // für interaktion mit anderen Klassen
     
 };