Rev | Line | |
---|
[643] | 1 | #include "diabolo.h"
|
---|
| 2 | #include "gyroscope.h"
|
---|
| 3 | #include "compress.h"
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 |
|
---|
| 7 | //-------------------- fonction exec de la fenetre : gyroscope -------------------------------
|
---|
| 8 |
|
---|
| 9 |
|
---|
| 10 | void exec_gyroscope(int fen,int item,double valeur,...)
|
---|
| 11 | {
|
---|
| 12 | if(item>1000) item-=1000; // pour appeler le case pour tous les cara d'un edit texte
|
---|
| 13 |
|
---|
| 14 | switch(item)
|
---|
| 15 | {
|
---|
| 16 | case ouverture :
|
---|
| 17 |
|
---|
| 18 | break;
|
---|
| 19 | case fermeture :
|
---|
| 20 | break;
|
---|
| 21 | default : break;
|
---|
| 22 | }
|
---|
| 23 | }
|
---|
| 24 |
|
---|
| 25 |
|
---|
| 26 |
|
---|
| 27 |
|
---|
| 28 |
|
---|
| 29 | void traite_block_gyro_comprime(block_type_gyro_comprime* blk)
|
---|
| 30 | {
|
---|
| 31 | int i;
|
---|
| 32 | block_type_gyro bk_gyro;
|
---|
| 33 | block_type_gyro* blk2=& bk_gyro;
|
---|
| 34 | if(!fenetre(fenetre_gyroscope)) return;
|
---|
| 35 | //printf("*************** decompress data gyro \n");
|
---|
| 36 | for(i=0;i<3;i++) decompress_7_2((long *)blk->gyro[i],blk2->gyro[i],nb_per_block*2);
|
---|
| 37 | blk2->code1=blk->code1;
|
---|
| 38 | blk2->code2=blk->code2;
|
---|
| 39 | traite_block_gyro(blk2);
|
---|
| 40 | }
|
---|
| 41 |
|
---|
| 42 |
|
---|
| 43 | void traite_block_gyro(block_type_gyro* blk)
|
---|
| 44 | {
|
---|
| 45 | int k;
|
---|
| 46 | double y[15];
|
---|
| 47 |
|
---|
| 48 | int temps_cntl;
|
---|
| 49 | double secondes;
|
---|
| 50 |
|
---|
| 51 | if(!fenetre(fenetre_gyroscope)) return;
|
---|
| 52 |
|
---|
| 53 | for(k=0;k<72;k++)
|
---|
| 54 | {
|
---|
| 55 | y[0]=blk->gyro[0][k];
|
---|
| 56 | y[1]=blk->gyro[1][k];
|
---|
| 57 | y[2]=blk->gyro[2][k];
|
---|
| 58 |
|
---|
| 59 | // printf(" y = %g %g %g %g %g \n",y[0],y[1],y[2],y[3],y[4]);
|
---|
| 60 | temps_cntl =numero_block(blk)*nb_per_block*2+k;
|
---|
| 61 | secondes=gg->periode_echantillonage*(double)temps_cntl-gg->temps_origine;
|
---|
| 62 | tracen(fenetre_gyroscope,3,secondes,y);
|
---|
| 63 | // printf("secondes=%g\n",secondes);
|
---|
| 64 | }
|
---|
| 65 | }
|
---|
| 66 |
|
---|
| 67 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.