Changeset 651 in Sophya


Ignore:
Timestamp:
Nov 25, 1999, 3:05:04 PM (26 years ago)
Author:
ansari
Message:

archediab 29

Location:
trunk/Poubelle/archediab.old
Files:
5 added
1 deleted
14 edited

Legend:

Unmodified
Added
Removed
  • trunk/Poubelle/archediab.old/archediab.sources/c/acquisition_archeops.c

    r649 r651  
    339339//  -------------     block type 8 : block_bolo   ------------------    ------------
    340340//-----------------------------------------------------------------------------------------     
     341#define  temps_UT(block)        (8.0609925+0.00011673636*(double)(block))
     342
    341343void    traite_block_bolo(block_type_bolo*      blk)
    342344{
     
    354356//printf("numblock=%d  sec=%d \n",num_block_local,secondes);
    355357ecritD(fenetre_controle,con_time,"%d",secondes);
     358ecritD(fenetre_controle,con_time,"%6.3f",temps_UT(num_block_local));
    356359
    357360nb_coups= gg->reglage.horloge.nb_mesures/2 - gg->reglage.horloge.temp_mort;
  • trunk/Poubelle/archediab.old/archediab.sources/c/auto.c

    r643 r651  
    22#include "bolo.h"
    33#include "auto.h"
     4#include "arcunit.h"
    45#include "tm.h"
    56
  • trunk/Poubelle/archediab.old/archediab.sources/c/corel.c

    r649 r651  
    11#include "diabolo.h"
    22#include "corel.h"
     3#include "arcunit.h"
    34
    45/*
  • trunk/Poubelle/archediab.old/archediab.sources/c/courbeVI.c

    r639 r651  
    44#include "courbeVI.h"
    55#include "fenetres_diabolo.h"
     6#include "arcunit.h"
    67
    78int voie_bit;           // octet contenant dans chaque bit le flag qui dit si on equiloibre cette voie
  • trunk/Poubelle/archediab.old/archediab.sources/c/diabolo.c

    r649 r651  
    4646//flag=alerte(3,"   Archeops ou Planck  \r\r acquisition avec carte PCI ??"); // vaut 1 pour acquisition PCI
    4747//flag=2;       // en mode simulation
    48 if(clavier(touche_alt) ) flag=2; else flag=1;           // en mode acquisition
     48flag=2;
     49if(clavier(touche_alt) ) flag=1;                                        // en mode acquisition
    4950if(clavier(touche_controle) ) flag=4;                           // avec emission des telecommandes au demarrage
    5051if(clavier(touche_alt) && clavier(touche_controle) ) {
     
    5455#endif
    5556
    56 
     57//alerte(1,"on a flag=%d ",flag);
    5758
    5859init_struct(flag);
     
    7172nouveautypefichier('DIA2',exec_DIA2);
    7273nouveautypefichier('ARCH',exec_ARCH);
     74nouveautypefichier('TEXT',exec_ARCH);
    7375
    7476//nouveautypefichier('TEXT',exec_DIA2);
  • trunk/Poubelle/archediab.old/archediab.sources/c/dilution.c

    r649 r651  
    22#include "dilution.h"
    33#include "controle.h"
     4#include "arcunit.h"
    45
    56
  • trunk/Poubelle/archediab.old/archediab.sources/c/fichier_archeops.c

    r637 r651  
    151151                        {
    152152#ifdef _archeops
    153                         ouvre('ACTI',0,10,"lit_fichier_arch",exec_lit_fichier_ARCH,(void*)fen);
     153                        ouvre('ACTI',0,1,"lit_fichier_arch",exec_lit_fichier_ARCH,(void*)fen);
    154154#else
    155155                        printf(" ne peut pas relire les fichiers archeops \n");
  • trunk/Poubelle/archediab.old/archediab.sources/c/fichier_relit_ARCH.c

    r637 r651  
    2121        {
    2222        case ouverture  :       printf("\nlecture du fichier %s  \n",titre(fich));
     23                                        {
     24                                        char cc[12];
     25                                        litF(fich,12,cc);
     26                                        printf("debut fich= %x %x %x %x %x %x %x %x \n",cc[0],cc[1],cc[2],cc[3],cc[4],cc[5],cc[6],cc[7]);
     27                                        }
    2328                                pos=0;
     29                                select(fen);
    2430                                break;
    2531
     
    3036        case tache_de_fond :
    3137
    32                         if (  (pos+12) >  longueur(fich) )
    33                                 {
    34                                 printf("fin du fichier \n");
    35                                 ferme(fen);
     38                        {
     39                        int u;
     40                        int nn,nb,ll;
     41                        def_nom_block
     42                               
     43                        nn=0;
     44                        do      {
     45                               
     46                                if (  (pos+12) >  longueur(fich) )
     47                                        {
     48                                        printf("fin du fichier \n");
     49                                        ferme(fen);nn=-1;nb=0;
     50                                        }
     51                                else    {
     52
     53                                        position(fich,pos);
     54                                        litF(fich,sizeof(block_type_modele),&bkt);
     55                                        type=type_block(&bkt);
     56                                        ll=longueur_block(&bkt);
     57                                        if( (ll<16) ou (ll>50000) ) {pos+=4;printf(" erreur longueur ");nn=-1;nb=0;}
     58                                        else    {
     59                                                pos+=ll;
     60                                                printf("block %d  :  %s \n",numero_block(&bkt),nom_block[type]);
     61                                                if(!nn) nn=numero_block(&bkt);
     62                                                u=tt->tm.pos_ecrit;
     63                                                tt->tm.btm[u].tmtrx=bkt;
     64                                                u++; if(u>=longueur_table_tm) u=0;
     65                                                tt->tm.pos_ecrit=u;
     66                                                nb=numero_block(&bkt);
     67                                                }
     68                                        }
    3669                                }
    37 
    38                         else
    39                                 {
    40                                 int u;
    41                                 def_nom_block
    42                                
    43                                 position(fich,pos);
    44                                 litF(fich,sizeof(block_type_modele),&bkt);
    45                                 type=type_block(&bkt);
    46                                 pos+=longueur_block(&bkt);
    47                                 printf("block %d  :  %s \n",numero_block(&bkt),nom_block[type]);
    48                                
    49                                 u=tt->tm.pos_ecrit;
    50                                 tt->tm.btm[u].tmtrx=bkt;
    51                                 u++; if(u>=longueur_table_tm) u=0;
    52                                 tt->tm.pos_ecrit=u;
    53                                 }
     70                        while(nb==nn);
     71                        }
    5472
    5573                        break;
  • trunk/Poubelle/archediab.old/archediab.sources/c/fichier_relit_DIA2.c

    r637 r651  
    22#include "fichier.h"
    33#include "bolo.h"
     4#include "arcunit.h"
    45
    56
  • trunk/Poubelle/archediab.old/archediab.sources/c/mesures_bolo.c

    r649 r651  
    11#include "diabolo.h"
    22#include "bolo.h"
     3#include "arcunit.h"
    34
    45//*********  coefficients  pour  les  mesures  bolo    ***************************************************
  • trunk/Poubelle/archediab.old/archediab.sources/c/telecommande.c

    r649 r651  
    253253                                if(ss[16]!='7') erreur("adresse not equal to 7");
    254254                                if(ss[25]!='7') erreur("adresse not equal to 7");
    255                                 while( (TickCount()>t) et (TickCount()<(t+60*15)) )     // 15sec
     255/*                              while( (TickCount()>t) et (TickCount()<(t+60*15)) )     // 15sec
    256256                                        {
    257257                                        static int q;
     
    261261                                        controlemanip(0);
    262262                                        }
    263                                 son(133);
     263*/                              son(133);
    264264
    265265                                printf(" envoi de la telecommande : %s \n",ss);
     
    267267                                t=TickCount();                  //  10 secondes  (tick = 1/60 sec)
    268268                                }
    269 /*                      else    {
    270                                 tc_char(0x11);  //  synchro
    271                                 tc_int(debut_telecommande);
    272                                 for(j=0;j<8;j++)        tc_char(mot[j]);
    273                                 tc_int(fin_telecommande);
    274                                 tc_char(0x00);tc_char(0x00);    //  synchro
    275                                 }
    276 */
    277269                        break;
    278270
  • trunk/Poubelle/archediab.old/archeops.c

    r649 r651  
    121121/* ------------------------ configuration de vol 5 juillet 99-----------------------------*/
    122122
     123/* ---------------------- modifié les indices de bolo  le 15 septembre 1999-------------------*/
     124
    123125param_bolo  parametr={28,24,36,88,18,
    124126
     
    127129{
    128130
    129 { 11    , 2,10, 1 , 200, 22000  ,  200 },       /*      1       */
     131{ 11    , 2,10, 1 , 200, 22000  ,  200 },       /*      0       */
    130132
    131133{  9    , 1,10, 2 , 200, 22000  ,  200 },
     
    137139
    138140
    139 {  5    , 1,10, 5 ,1000,  4700  , 1000 },       /*      5       */
     141{  5    , 1,10, 5 ,1000,  4700  , 1000 },       /*      4       */
    140142
    141143{  0    , 2,10, 6 ,1000,  4700  , 1000 },
     
    147149
    148150
    149 {  2    , 1,10,11, 1000,  4700  , 1000 },       /*      9       */
     151{  2    , 1,10,11, 1000,  4700  , 1000 },       /*      8       */
    150152
    151153{  4    , 1,10,12, 1000,  4700  , 1000 },
     
    157159
    158160
    159 { 13    , 1,10,17, 1000,  4700  , 1000 },       /*      13      */
     161{ 13    , 1,10,17, 1000,  4700  , 1000 },       /*      12      */
    160162
    161163{  3    , 1,10,18, 1000,  4700  , 1000 },
     
    167169
    168170
    169 { 15    , 1,10,21,  200, 22000  ,  200 },       /*      17      */
     171{ 15    , 1,10,21,  200, 22000  ,  200 },       /*      16      */
    170172
    171173{ 16    , 1,10,22,  200, 22000  ,  200 },
     
    177179
    178180
    179 { 20    , 3,10,27, 1000, 22000  ,    0 },       /*      21      */
     181{ 20    , 3,10,27, 1000, 22000  ,    0 },       /*      20      */
    180182
    181183{ 21    , 3,10,28, 1000,  1000  ,    0 },
     
    19131915
    19141916
    1915 /* ------------------------------------   corps  des fonctions   ------------------------------ */
    1916 
    1917 /* -------------------------------------------------------------------------------------------- */
    1918 
    1919 
    1920 
    1921 
    1922 
    1923 
    1924 
    1925 unsigned int4   val_long(char x)
     1917
     1918
     1919
     1920
     1921
     1922
     1923int     calcul_somme_block(block_type_modele* blk,int longueur)
    19261924
    19271925{
    19281926
    1929 unsigned long a,xl;
    1930 
    1931 char aa;
    1932 
    1933 aa=x-2;
    1934 
    1935 a=aa;
    1936 
    1937 if(x<3)  xl=x;  else    xl=((a&1) + 2)<<(a>>1);
    1938 
    1939 return(xl);
     1927int i,so=0;;
     1928
     1929for(i=0;i<(longueur/4-4);i++)  so^=(int)blk->mot[i];
     1930
     1931/* somme sur tous les mots internes     : on exclus le dbut, les codes et la fin        */
     1932
     1933return((so^(so>>16))&0xffff);
    19401934
    19411935}
     
    19451939
    19461940
    1947 double  val_double(char x)
     1941
     1942
     1943
     1944
     1945void  valide_block(block_type_modele* blk,int type,int block_num)
    19481946
    19491947{
    19501948
    1951 unsigned long a,xl;
    1952 
    1953 if(x<0) x=-x;   a=x;    if(!a)  xl=0;   else    xl=((a&1) + 2)<<(a>>1);
    1954 
    1955 if(x>0) return(1e-4*(double)xl);        else    return(-1e-4*(double)xl);
     1949int somme,longueur;
     1950
     1951def_long_block
     1952
     1953longueur=long_block[type];
     1954
     1955/*printf("valide block adresse %x  type %d  numblock %d  longueur=%d \n" */
     1956
     1957/*              ,(unsigned)blk,type,block_num,longueur);*/
     1958
     1959blk->debut              =       debut_block_mesure;
     1960
     1961somme=0;blk->code1              =       (((long)longueur)<<16)  |       somme;
     1962
     1963blk->code2              =       (((long)block_num) & 0xffffff ) | ( (((long)type)<<24)&0xff000000 );
     1964
     1965
     1966
     1967blk->mot[longueur/4-4]  =       fin_block_mesure;
     1968
     1969
     1970
     1971#if defined(_ECC_LIB_H_)
     1972
     1973{
     1974
     1975int place_ecc;
     1976
     1977place_ecc=(longueur-4-ECC_SIZE-SIZE_HEAD-((longueur-4-SIZE_HEAD)/ECC_TOTAL)*ECC_SIZE)/4;
     1978
     1979SetEcc( blk, (unsigned char *) &(blk->mot[place_ecc] ) ) ;
    19561980
    19571981}
    19581982
    1959 
    1960 
    1961 int     new_val_dac(int a,char  code)
     1983#endif
     1984
     1985
     1986
     1987somme=calcul_somme_block(blk,longueur);
     1988
     1989blk->code1              =       (((long)longueur)<<16)  |       somme;
     1990
     1991/* l'ecc est faux car on a change la somme: mettre la somme a zero avant de tester ecc  */
     1992
     1993}
     1994
     1995
     1996
     1997/* Quand on est sur une machine swappee, on ne cherche pas a verifier */
     1998
     1999/* le checksum, puisqu'on a modifie les blocs, sans swapper par exemple */
     2000
     2001/* les chars des noms de bolometres et des chaines GPS... */
     2002
     2003#ifdef __alpha
     2004
     2005#define SWAP
     2006
     2007#endif
     2008
     2009#if defined(Linux)  || defined(linux)
     2010
     2011#define SWAP
     2012
     2013#endif
     2014
     2015
     2016
     2017
     2018
     2019
     2020
     2021int  verifie_block(block_type_modele* blk)
    19622022
    19632023{
    19642024
    1965 if(code&0x80)   a=(code&0x7f) <<5 ;
    1966 
    1967 else    {
    1968 
    1969         if(code&0x40)   a+=code&0x3f;   
    1970 
    1971         else            a-=code&0x3f;   
     2025int type,lg,som;
     2026
     2027def_long_block
     2028
     2029if(blk->debut != debut_block_mesure)                                    return(block_debut_erreur);
     2030
     2031type=type_block(blk);           if( (type<0) ||(type>=nb_type_blocks) ) return(block_type_inconnu);     
     2032
     2033lg=longueur_block(blk);         if( lg != long_block[type] )            return(block_longueur_erreur); 
     2034
     2035if( blk->mot[(lg/4)-4]  !=      fin_block_mesure)                       return(block_fin_erreur);       
     2036
     2037#ifndef SWAP
     2038
     2039som=calcul_somme_block(blk,lg); if( som!= somme_block(blk))             return(block_somme_erreur);
     2040
     2041#endif
     2042
     2043return(block_correct);
     2044
     2045}
     2046
     2047
     2048
     2049
     2050
     2051int  verifie_block_printf(block_type_modele* blk)
     2052
     2053{
     2054
     2055int type,lg,som;
     2056
     2057def_long_block
     2058
     2059def_nom_block
     2060
     2061if(blk->debut != debut_block_mesure)
     2062
     2063        {
     2064
     2065        printf(" erreur dans le code debut de block      \n");
     2066
     2067        return(block_debut_erreur);
     2068
     2069        }       
     2070
     2071
     2072
     2073type=type_block(blk);
     2074
     2075if( (type<0) || (type>nb_type_blocks) )
     2076
     2077        {
     2078
     2079        printf(" block de type %d  inconnu\n",type);
     2080
     2081        return(block_type_inconnu);
    19722082
    19732083        }
    19742084
    1975 return(a);
     2085
     2086
     2087lg=longueur_block(blk);
     2088
     2089if( lg!=long_block[type] )     
     2090
     2091        {
     2092
     2093        printf(" block type %s  erreur de longueur (nominal=%d , dans le block=%d \n"
     2094
     2095                        ,nom_block[type],long_block[type],lg);
     2096
     2097        return(block_longueur_erreur);
     2098
     2099        }
     2100
     2101
     2102
     2103som=calcul_somme_block(blk,lg);
     2104
     2105if( som!=somme_block(blk) )     
     2106
     2107        {
     2108
     2109        printf(" block type %s   :  erreur de somme (calculee=%d , dans le block=%d \n"
     2110
     2111                        ,nom_block[type],som,somme_block(blk) );
     2112
     2113        return(block_somme_erreur);
     2114
     2115        }
     2116
     2117       
     2118
     2119if(blk->mot[(lg/4)-4]   != fin_block_mesure)   
     2120
     2121        {
     2122
     2123        printf(" block type %s  erreur de code fin de block : trouve %x au lieu de %x \n"
     2124
     2125                        ,nom_block[type],(int)blk->mot[(lg/4)-4],fin_block_mesure);
     2126
     2127        return(block_fin_erreur);
     2128
     2129        }
     2130
     2131
     2132
     2133return(block_correct);
    19762134
    19772135}
     
    19852143
    19862144
    1987 int     calcul_somme_block(block_type_modele* blk,int longueur)
    1988 
    1989 {
    1990 
    1991 int i,so=0;;
    1992 
    1993 for(i=0;i<(longueur/4-4);i++)  so^=(int)blk->mot[i];
    1994 
    1995 /* somme sur tous les mots internes     : on exclus le dbut, les codes et la fin        */
    1996 
    1997 return((so^(so>>16))&0xffff);
    1998 
    1999 }
    2000 
    2001 
    2002 
    2003 
    2004 
    2005 
    2006 
    2007 
    2008 
    2009 void  valide_block(block_type_modele* blk,int type,int block_num)
    2010 
    2011 {
    2012 
    2013 int somme,longueur;
    2014 
    2015 def_long_block
    2016 
    2017 longueur=long_block[type];
    2018 
    2019 /*printf("valide block adresse %x  type %d  numblock %d  longueur=%d \n" */
    2020 
    2021 /*              ,(unsigned)blk,type,block_num,longueur);*/
    2022 
    2023 blk->debut              =       debut_block_mesure;
    2024 
    2025 somme=0;blk->code1              =       (((long)longueur)<<16)  |       somme;
    2026 
    2027 blk->code2              =       (((long)block_num) & 0xffffff ) | ( (((long)type)<<24)&0xff000000 );
    2028 
    2029 
    2030 
    2031 blk->mot[longueur/4-4]  =       fin_block_mesure;
    2032 
    2033 
    2034 
    2035 #if defined(_ECC_LIB_H_)
    2036 
    2037 {
    2038 
    2039 int place_ecc;
    2040 
    2041 place_ecc=(longueur-4-ECC_SIZE-SIZE_HEAD-((longueur-4-SIZE_HEAD)/ECC_TOTAL)*ECC_SIZE)/4;
    2042 
    2043 SetEcc( blk, (unsigned char *) &(blk->mot[place_ecc] ) ) ;
    2044 
    2045 }
    2046 
    2047 #endif
    2048 
    2049 
    2050 
    2051 somme=calcul_somme_block(blk,longueur);
    2052 
    2053 blk->code1              =       (((long)longueur)<<16)  |       somme;
    2054 
    2055 /* l'ecc est faux car on a change la somme: mettre la somme a zero avant de tester ecc  */
    2056 
    2057 }
    2058 
    2059 
    2060 
    2061 /* Quand on est sur une machine swappee, on ne cherche pas a verifier */
    2062 
    2063 /* le checksum, puisqu'on a modifie les blocs, sans swapper par exemple */
    2064 
    2065 /* les chars des noms de bolometres et des chaines GPS... */
    2066 
    2067 #ifdef __alpha
    2068 
    2069 #define SWAP
    2070 
    2071 #endif
    2072 
    2073 #if defined(Linux)  || defined(linux)
    2074 
    2075 #define SWAP
    2076 
    2077 #endif
    2078 
    2079 
    2080 
    2081 
    2082 
    2083 
    2084 
    2085 int  verifie_block(block_type_modele* blk)
    2086 
    2087 {
    2088 
    2089 int type,lg,som;
    2090 
    2091 def_long_block
    2092 
    2093 if(blk->debut != debut_block_mesure)                                    return(block_debut_erreur);
    2094 
    2095 type=type_block(blk);           if( (type<0) ||(type>=nb_type_blocks) ) return(block_type_inconnu);     
    2096 
    2097 lg=longueur_block(blk);         if( lg != long_block[type] )            return(block_longueur_erreur); 
    2098 
    2099 if( blk->mot[(lg/4)-4]  !=      fin_block_mesure)                       return(block_fin_erreur);       
    2100 
    2101 #ifndef SWAP
    2102 
    2103 som=calcul_somme_block(blk,lg); if( som!= somme_block(blk))             return(block_somme_erreur);
    2104 
    2105 #endif
    2106 
    2107 return(block_correct);
    2108 
    2109 }
    2110 
    2111 
    2112 
    2113 
    2114 
    2115 int  verifie_block_printf(block_type_modele* blk)
    2116 
    2117 {
    2118 
    2119 int type,lg,som;
    2120 
    2121 def_long_block
    2122 
    2123 def_nom_block
    2124 
    2125 if(blk->debut != debut_block_mesure)
    2126 
    2127         {
    2128 
    2129         printf(" erreur dans le code debut de block      \n");
    2130 
    2131         return(block_debut_erreur);
    2132 
    2133         }       
    2134 
    2135 
    2136 
    2137 type=type_block(blk);
    2138 
    2139 if( (type<0) || (type>nb_type_blocks) )
    2140 
    2141         {
    2142 
    2143         printf(" block de type %d  inconnu\n",type);
    2144 
    2145         return(block_type_inconnu);
    2146 
    2147         }
    2148 
    2149 
    2150 
    2151 lg=longueur_block(blk);
    2152 
    2153 if( lg!=long_block[type] )     
    2154 
    2155         {
    2156 
    2157         printf(" block type %s  erreur de longueur (nominal=%d , dans le block=%d \n"
    2158 
    2159                         ,nom_block[type],long_block[type],lg);
    2160 
    2161         return(block_longueur_erreur);
    2162 
    2163         }
    2164 
    2165 
    2166 
    2167 som=calcul_somme_block(blk,lg);
    2168 
    2169 if( som!=somme_block(blk) )     
    2170 
    2171         {
    2172 
    2173         printf(" block type %s   :  erreur de somme (calculee=%d , dans le block=%d \n"
    2174 
    2175                         ,nom_block[type],som,somme_block(blk) );
    2176 
    2177         return(block_somme_erreur);
    2178 
    2179         }
    2180 
    2181        
    2182 
    2183 if(blk->mot[(lg/4)-4]   != fin_block_mesure)   
    2184 
    2185         {
    2186 
    2187         printf(" block type %s  erreur de code fin de block : trouve %x au lieu de %x \n"
    2188 
    2189                         ,nom_block[type],(int)blk->mot[(lg/4)-4],fin_block_mesure);
    2190 
    2191         return(block_fin_erreur);
    2192 
    2193         }
    2194 
    2195 
    2196 
    2197 return(block_correct);
    2198 
    2199 }
    2200 
    2201 
    2202 
    2203 
    2204 
    2205 
    2206 
    2207 
    2208 
    2209 
    2210 
     2145
     2146
  • trunk/Poubelle/archediab.old/archeops.h

    r649 r651  
    390390/*  ---------   structures N° 2 :  reglage_bolo , regul etc..   --------        */
    391391/*  ------------------------------------------------------------------------------------------  */
    392 #define bol_micro_volt(val,gain)        ((1e7*(double)val)/(65536.*gain))
    393 /*  avec  gain = (double)parametr.bolo[bolo].bolo_gain*gain_ampli(reglage.bolo[bolo])                           */
    394                
    395 
    396 /* gains 0 .. 15 pour MLPA  ///   gain 16..19  pour BEBO   ///   gain 20..22  pour BEDIF        */             
    397 #define def_gains       double gains_reels[32]={1,2,4,8,10,20,40,80,100,200,400,800,1000,2000,4000,8000,0.5,2.5,10,50,0.93,3.777,18.974};
    398                 /*                      gain bediff    10->9.3    40->37.77     200->189.74             */
    399392
    400393
    401394/*  les definitions suivantes s'appliquent a une variable de type    reglage.bolo[bol]          */
    402395#define         gainbrut(aa)    ((char)(((aa).mot1&0x1f)))             
    403 #define         gain_ampli(aa)  gains_reels[gainbrut(aa)]               
    404396#define         phase(aa)       ((char)(((aa).mot1&0x60)>>5))           
    405397#define         comm(aa)        ((char)(((aa).mot1&0x80)>>7))           
     
    585577
    586578
    587 /*      signification des bit lus dans switch_dil       */
    588 #define switch_EVF              0x00000080      /*      contact fin de course vanne fermee      */
    589 #define switch_EVO              0x00000040      /*      contact fin de course vanne ouverte     */
    590 
    591 /* les bit suivants sont envoyés par telecommande et relus dans switch_dil      */
    592 #define switch_helium           0x00200000      /*  13: commande sond niveau helium     */
    593 #define switch_pile_par_5       0x00100000      /*  12: mise en parallele des piles pour le 5V  */
    594 #define switch_pile_par_15      0x00080000      /*  11: mise en parallele des piles pour le 15V */
    595 #define vanne_EVB               0x00008000      /*  7: commande vanne brooks    */
    596 #define vanne_EVO               0x00010000      /*  8: commande vanne EVO       */
    597 #define vanne_EVV               0x00020000      /*  9: commande vanne EVV       */
    598 #define vanne_EVF               0x00040000      /*  10: commande vanne EVF      */
    599 #define chauffage1              0x00004000      /*  6: chauffage 1      */
    600 #define chauffage2              0x00002000      /*  5: chauffage 1      */
    601 #define chauffage3              0x00001000      /*  4: chauffage 1      */
    602 #define chauffage4              0x00000800      /*  3: chauffage 1      */
    603 #define chauffage5              0x00000400      /*  2: chauffage 1      */
    604 #define chauffage6              0x00000200      /*  1: chauffage 1      */
    605 #define chauffage7              0x00000100      /*  0: chauffage 7      */
    606 
    607 enum{nbit_chauffage7,nbit_chauffage6,nbit_chauffage5,nbit_chauffage4,nbit_chauffage3
    608         ,nbit_chauffage2,nbit_chauffage1,nbit_vanne_EVB,nbit_vanne_EVO
    609         ,nbit_vanne_EVV,nbit_vanne_EVF,nbit_switch_pile_par_15,nbit_switch_pile_par_5,nbit_switch_helium};
    610 
    611 /*  position des mesures sur les multiplexeurs          */
    612 /* J10A  ->  temperatures basses t_b1 t_b2,t_b3 t_b4 36 37 41 35        */
    613 /* J10B  ->  temperatures basses t_a1 t_a2,t_a3 t_a4 38 11 34 28        */
    614 /* J1??  ->  temperatures hautes t_h1 t_h2,t_h3 t_h4    */
    615 
    616 enum{
    617 /* multiplex11..18:*/   t_a2    ,mul12_ ,p_haut ,p_memb ,t_h1   ,t_h4   ,t_h3   ,t_h2   
    618 /* multiplex21..28:*/,  mul21_  ,mul22  ,p_charb,p_R4   ,mul25_ ,p_C3   ,p_R3   ,t_a4   
    619 /* multiplex31..38:*/,  mul31_  ,p_C4   ,p_air  ,t_a3   ,t_b4   ,t_b1   ,t_b2   ,t_a1   
    620 /* multiplex41..48:*/,  t_b3    ,d_4He  ,RP_He  ,t_pile ,d_3He  ,j_he3  ,j_he7  ,j_he4 
    621 /* multiplex51..58:*/,  j_he5   ,j_he1  ,j_he8  ,j_he2  ,j_he6  ,pirani ,mul57  ,mul58 
    622 /* multiplex61..68:*/,  p_m18B  ,p_10B  ,p_m18D ,mul64  ,p_p18B ,p_10T  ,p_Ch   ,p_p18D         
    623         };
    624 /* reste libres :  mul   12 - 21 - 22 - 25 -  31 - 44 - 57 - 58 - 64    */
    625 /* T_A1 EST AUSSI LE DRIVER DU MOTEUR DE PIVOT   */
    626 
    627 #define  val_multiplex(qq)      (0.0003052*(double)((qq)-0x8000))       
    628 #define  val_temperature(qq)    ((val_multiplex(qq)<0.2)?-99:((1146.3/(val_multiplex(qq)-0.1)) - 245.13))
    629 
    630 
    631579/*  ---------------------   structures N° 4 :     gps           ------------------------------- */
    632580/*  ------------------------------------------------------------------------------------------- */
Note: See TracChangeset for help on using the changeset viewer.