[637] | 1 | #include "diabolo.h"
|
---|
| 2 | #include "config_transputer.h"
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 |
|
---|
| 6 | //-------------------- fonction exec de la fenetre : config_transputer -------------------------------
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 9 | void exec_config_transputer(int fen,int item,double valeur,...)
|
---|
| 10 | {
|
---|
| 11 | int i;
|
---|
| 12 | if(item>1000) item-=1000;
|
---|
| 13 | if( (item!=ouverture) && (item<0) )return;
|
---|
| 14 | if(gg->flag_tc_reduite)
|
---|
| 15 | // for(i=0;i<nb_type_blocks;i++)
|
---|
| 16 | for(i=0;i<14;i++)
|
---|
| 17 | {
|
---|
| 18 | int a;
|
---|
| 19 | a=litD(fen,ct_cadence+i,0);
|
---|
| 20 | if((gg->reglage.vitesse[i]!=a)
|
---|
| 21 | ou (clavier(touche_alt) && (item==ct_cadence+i) ) )
|
---|
| 22 | emission_tc_reduite(tc2_horloge,tc3_vitesse+i,a);
|
---|
| 23 | // gg->reglage.vitesse[i]=a;
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | else {
|
---|
| 27 | char mot_tc[10];
|
---|
| 28 | if(item>0)
|
---|
| 29 | {
|
---|
| 30 | mot_tc[0]=tc_cadence1;
|
---|
| 31 | for(i=0;i<7;i++) mot_tc[i+1]=litD(fen,ct_cadence+i,0);
|
---|
| 32 | emission_telecommande(tc_dir_transputer,mot_tc);
|
---|
| 33 | mot_tc[0]=tc_cadence2;
|
---|
| 34 | for(i=0;i<7;i++) mot_tc[i+1]=litD(fen,ct_cadence+7+i,0);
|
---|
| 35 | emission_telecommande(tc_dir_transputer,mot_tc);
|
---|
| 36 | mot_tc[0]=tc_cadence3;
|
---|
| 37 | for(i=0;i<2;i++) mot_tc[i+1]=litD(fen,ct_cadence+14+i,0);
|
---|
| 38 | emission_telecommande(tc_dir_transputer,mot_tc);
|
---|
| 39 | /*
|
---|
| 40 | mot_tc[0]=tc_switch_dil;
|
---|
| 41 | for(i=0;i<7;i++) mot_tc[i+1]=litD(fen,ct_dil+i,0);
|
---|
| 42 | emission_telecommande(tc_dir_transputer,mot_tc);
|
---|
| 43 | */
|
---|
| 44 | }
|
---|
| 45 | for(i=0;i<16;i++)
|
---|
| 46 | gg->reglage.vitesse[i]=litD(fen,ct_cadence+i,0);
|
---|
| 47 |
|
---|
| 48 | }
|
---|
| 49 |
|
---|
| 50 |
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 |
|
---|