Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: training.cpp
- Revision:
- 1:aa8497b98ef4
- Parent:
- 0:0c6d1b9144af
- Child:
- 2:0df0d0be0664
--- a/training.cpp Tue Apr 28 12:58:54 2020 +0000
+++ b/training.cpp Tue Apr 28 14:00:18 2020 +0000
@@ -19,9 +19,25 @@
void training::load_training(string name)
{
+ int i = 0;
tr_name = name;
- //loading.AuslesenPositionsdaten()
-
+ int sice = 50;
+ //sice = loading.size(tr_name)
+
+ for(i = 0; i<sice; i++) { // loads the whole trainings data into data vector
+ loading.AuslesenPositionsdaten(tr_name,i);
+
+ temp.time = loading.zahl[0];
+ temp.pos[0] = loading.zahl[1];
+ temp.pos[1] = loading.zahl[2];
+ temp.pos[2] = loading.zahl[3];
+ temp.start = loading.zahl[4]; // fragen wegen status eintrag
+ temp.end = loading.zahl[5];
+
+
+ data_vec.push_back(temp);
+
+ }
}
void training::start_training(void)
@@ -41,7 +57,7 @@
if(data_vec[point_count].start) { // counts the repetitions
repet++;
-
+
}
temp_pos[0] = posx - data_vec[point_count].pos[0]; // calculates distance curent to needed
@@ -63,12 +79,12 @@
time_short++;
}
}
-
+
point_count++;
-
- if(point_count>= data_vec.size()){ // resets the piontecount after a complet cycle
+
+ if(point_count>= data_vec.size()) { // resets the piontecount after a complet cycle
point_count = 0;
- }
+ }
}