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.
Dependents: Teach_demo Easyfit
Diff: teach.cpp
- Revision:
- 11:995f62d934b2
- Parent:
- 10:333f82852d69
--- a/teach.cpp Tue May 26 20:08:31 2020 +0000 +++ b/teach.cpp Wed May 27 19:19:16 2020 +0000 @@ -104,12 +104,12 @@ float tempsum[3] = {}; float empty[3] = {}; int max = data_vec.size(); - printf("max sice %d \n", max); + printf("Anzahl Datenpunkte: %d \n", max); for(i=0; i<max; i++) { // avrage starting Point - printf("--%d->",data_vec[i].start); + //printf("--%d->",data_vec[i].start); if(data_vec[i].start) { tempsum[0] += data_vec[i].pos[0]; tempsum[1] += data_vec[i].pos[1]; @@ -124,6 +124,7 @@ empty[0] = 1; // status: 000 standart point empty[1] = 0; // 001 start point empty[2] = 0; // 010 end point + printf("Startpunkt"); store.SpeichernPosition(tr_name,0,tempsum,empty,empty); // save startpoint to memory @@ -165,7 +166,7 @@ k++; } if(count<backward) { - // Catching to short / fails trainings + backward = count; } @@ -174,7 +175,7 @@ } - printf("forward points %d backward points %d \n", forward, backward); + printf("Durchschnittliche Punkte: Vorwerts Punkte %d Rückwärts Punkte %d \n", forward, backward); @@ -232,7 +233,7 @@ } } - printf("\n\n k: %d", k); + printf("Vorwärts Repetitionen: %d \n" , k); tempsum[0] = tempsum[0]/k; tempsum[1] = tempsum[1]/k; tempsum[2] = tempsum[2]/k; @@ -241,6 +242,7 @@ empty[0] = 0; // status: 000 standart point empty[1] = 1; // 001 start point empty[2] = 0; // 010 end point + printf("Endpunkt"); store.SpeichernPosition(tr_name,0,tempsum,empty,empty); // save endpoint to memory i = 0, k = 0, tempsum[0] = 0, tempsum[1] = 0, tempsum[2] = 0; // reset counters @@ -265,12 +267,12 @@ backw[p].pos[1] += data_vec[k].pos[1]; backw[p].pos[2] += data_vec[k].pos[2]; k++; - printf("data_vec[k].pos[0]: %f,data_vec[k].time: %d, k:%d \n",data_vec[k].pos[0],data_vec[k].time,k); + //printf("data_vec[k].pos[0]: %f,data_vec[k].time: %d, k:%d \n",data_vec[k].pos[0],data_vec[k].time,k); } i = k; count++; } - printf("count: %d \n", count); + printf("Rückwärts repetitionen: %d \n", count); for(i=0; i<backward; i++) { backw[i].time = (backw[i].time)/count; backw[i].pos[0] = (backw[i].pos[0])/count;