Index: trunk/Poubelle/archediab.old/archediab.sources/c/dilution.c
===================================================================
--- trunk/Poubelle/archediab.old/archediab.sources/c/dilution.c	(revision 645)
+++ trunk/Poubelle/archediab.old/archediab.sources/c/dilution.c	(revision 649)
@@ -55,5 +55,5 @@
 // la telecommande passe a travers le transputer sans etre traitee par lui
 //  elle arrive directement sur l'EPLD
-
+/*
 void  ecrit_bit_dilution(int valeur,int bit);
 
@@ -82,5 +82,5 @@
 emission_telecommande(tc_dir_transputer,mot_tc);
 }
-
+*/
 //   fonction ecrit un  des dac dilution
 //  c'est une telecommande normale 64 bit  a supprimer
@@ -120,5 +120,15 @@
 
 switch(item)
-    {
+	 {
+	 case dil_switch_helium :	emission_tc_reduite(tc2_dilution,(valeur==1),nbit_switch_helium);	break;
+   	 case dil_EVB :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_vanne_EVB);	break;
+   	 case dil_EVO :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_vanne_EVO);	break;
+    	case dil_EVF :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_vanne_EVF);	break;
+    	case dil_EVV :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_vanne_EVV);	break;
+    	case dil_sw_pp5 :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_switch_pile_par_5);	break;
+    	case dil_sw_pp15 :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_switch_pile_par_15);	break;
+
+  /*  
+    
     case dil_switch_helium :	ecrit_bit_dilution((int)valeur,switch_helium);	break;
     case dil_EVB :		ecrit_bit_dilution((int)valeur,vanne_EVB);	break;
@@ -128,5 +138,5 @@
     case dil_sw_pp5 :		ecrit_bit_dilution((int)valeur,switch_pile_par_5);	break;
     case dil_sw_pp15 :		ecrit_bit_dilution((int)valeur,switch_pile_par_15);	break;
-
+*/
 //  ----   commande directe d'un mot avec les 3 case de codage hexadecimales
 
@@ -137,5 +147,10 @@
 //  ----   telecommande du raz periodique des fets 
     case dil_raz_modul :
-    case dil_fet_raz :
+    case dil_fet_raz :	
+  		 i =0;
+ 		if(litD(fen,dil_fet_raz,0)==2)	i+=1;
+		if(litD(fen,dil_fet_raz,0)==3)	i+=7;
+     		emission_tc_reduite(tc2_raz_fet,0,i);
+/*
     		{
     		char mot_tc[10];
@@ -150,14 +165,14 @@
 		emission_telecommande(tc_dir_transputer,mot_tc);
 		}
-
+*/
                  break;
                  
-    case dil_ch1 :		ecrit_bit_dilution((int)valeur,chauffage1);	break;
-    case dil_ch2 :		ecrit_bit_dilution((int)valeur,chauffage2);	break;
-    case dil_ch3 :		ecrit_bit_dilution((int)valeur,chauffage3);	break;
-    case dil_ch4 :		ecrit_bit_dilution((int)valeur,chauffage4);	break;
-    case dil_ch5 :		ecrit_bit_dilution((int)valeur,chauffage5);	break;
-    case dil_ch6 :		ecrit_bit_dilution((int)valeur,chauffage6);	break;
-    case dil_ch7 :		ecrit_bit_dilution((int)valeur,chauffage7);	break;
+    case dil_ch1 :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_chauffage1);	break;
+    case dil_ch2 :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_chauffage2);	break;
+    case dil_ch3 :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_chauffage3);	break;
+    case dil_ch4 :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_chauffage4);	break;
+    case dil_ch5 :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_chauffage5);	break;
+    case dil_ch6 :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_chauffage6);	break;
+    case dil_ch7 :		emission_tc_reduite(tc2_dilution,(valeur==1),nbit_chauffage7);	break;
     
 //    case dil_dac_1 :
@@ -227,5 +242,7 @@
  // j=numero de bebo	T[k] = R[k+4] en Kelvin
 		if ((R[k]-c(j,6))>1.) 
-			{if((log(R[k]-c(j,6))-c(j,0))>0.001) llR= log(log(R[k]-c(j,6))-c(j,0)) ; else llR=0;} 
+			{if((log(R[k]-c(j,6))-c(j,0))>0.001) llR= log(log(R[k]-c(j,6))-c(j,0)) ; else llR=0; 
+//			printf("\nk=%d j=%d R=%g c2=%g c3=%g llR=%g",k,j,R[k],c(j,2),c(j,3),llR);
+			} 
 		else llR=0;
 		R[k+4]	= exp( 	c(j,1) + c(j,2)* llR + c(j,3)* llR* llR + c(j,4)* llR* llR* llR + c(j,5)* llR* llR* llR* llR) ; 
@@ -235,4 +252,6 @@
 	}
 
+gg->temperature_cryo=R[4];     // Charge la temperature_cryo (0.1K) pour les calculs futurs avec les bolos 
+/* La germanium doit toujours etre en premier par rapport aux autres thermos absolus */
 
 if(R[0]<90.)	ecritD(fenetre_dilution,dil_temp
@@ -298,21 +317,17 @@
 
 
-ecritD(fenetre_dilution,dil_temperatures,"temp-Haut =   %4.1f°   %4.1f°   %4.1f°   %4.1f° \rtemp-Bas  =   %4.1f°   %4.1f°   %4.1f°   %4.1f°  "
-	,val_temperature(blk->ADC_dil[ t_h1]),val_temperature(blk->ADC_dil[ t_h2]),val_temperature(blk->ADC_dil[ t_h3]),val_temperature(blk->ADC_dil[ t_h4])
-	,val_temperature(blk->ADC_dil[ t_b1]),val_temperature(blk->ADC_dil[ t_b2]),val_temperature(blk->ADC_dil[ t_b3]),val_temperature(blk->ADC_dil[ t_b4])	
+ecritD(fenetre_dilution,dil_temperatures,"temp-Haut =  %4.1f°  %4.1f° Base  =  %4.1f°  %4.1f° \r tube He: %4.1f° piles %4.1f° driver %4.1f°"
+	,val_temperature(blk->ADC_dil[ t_h2]),val_temperature(blk->ADC_dil[ t_h4])
+	,val_temperature(blk->ADC_dil[ t_b1]),val_temperature(blk->ADC_dil[ t_b2]),val_temperature(blk->ADC_dil[ t_b3])	
+	,val_temperature(blk->ADC_dil[ t_pile]),val_temperature(blk->ADC_dil[ t_a1])
 	);
 
-ecritD(fenetre_dilution,dil_t_h1,cnt_temperature(t_h1));
-ecritD(fenetre_dilution,dil_t_h2,cnt_temperature(t_h2));
-ecritD(fenetre_dilution,dil_t_h3,cnt_temperature(t_h3));
-ecritD(fenetre_dilution,dil_t_h4,cnt_temperature(t_h4));
-ecritD(fenetre_dilution,dil_t_a1,cnt_temperature(t_a1));
-ecritD(fenetre_dilution,dil_t_a2,cnt_temperature(t_a2));
-ecritD(fenetre_dilution,dil_t_a3,cnt_temperature(t_a3));
-ecritD(fenetre_dilution,dil_t_a4,cnt_temperature(t_a4));
-ecritD(fenetre_dilution,dil_t_b1,cnt_temperature(t_b1));
-ecritD(fenetre_dilution,dil_t_b2,cnt_temperature(t_b2));
-ecritD(fenetre_dilution,dil_t_b3,cnt_temperature(t_b3));
-ecritD(fenetre_dilution,dil_t_b4,cnt_temperature(t_b4));
+ecritD(fenetre_dilution,dil_t_h1,cnt_temperature(t_h2));
+ecritD(fenetre_dilution,dil_t_h2,cnt_temperature(t_h4));
+ecritD(fenetre_dilution,dil_t_h3,cnt_temperature(t_b1));
+ecritD(fenetre_dilution,dil_t_h4,cnt_temperature(t_b2));
+ecritD(fenetre_dilution,dil_t_a1,cnt_temperature(t_b3));
+ecritD(fenetre_dilution,dil_t_a2,cnt_temperature(t_pile));
+ecritD(fenetre_dilution,dil_t_a3,cnt_temperature(t_a1));
 
 
