Ultima versão da banca de ensaios ECU Fev2017

Dependencies:   CANnucleo mbed

Fork of Can_sniffer_BMS4 by Gerardo Antonio

Revision:
40:54d07c794d87
Parent:
39:90a56ddcdf4a
Child:
41:dcd47ac5ffdf
--- a/main.cpp	Thu Nov 10 11:15:45 2016 +0000
+++ b/main.cpp	Fri Nov 25 23:26:37 2016 +0000
@@ -193,23 +193,33 @@
     
     
     for(n=95; n>=0; n--){
-        
+      
+      
+      //mascara:-----------------------------
+      if(cellst[n]>125||cellst[n]<-40){
+         cellst[n]=273.15*-1;
+         //cellst[n]=1;
+          }
+      
+      //-------------------------------------
+      
+      
+    //    temp=cellst[n]/1000;
         
-        temp=cellst[n]/1000;
-        
-        r=(temp*10000)/(3.3-temp);
+    //    r=(temp*10000)/(3.3-temp);
         
     /*    
         current=(temp/10000);
         r = (3300/current)-10000;
       */
       
-        temp = 3380/log(r/0.119228);
-        temp = temp-273.15;
+     //   temp = 3380/log(r/0.119228);
+      //  temp = temp-273.15;
       
         
         //printf("celtemplsv0: %f    cvprint\r\n", cellsv[0]);    
-        printf("ntc: %d   temperature: %f   ntc resistance:%f \r\n", n+1,temp,r);
+        //printf("ntc: %d   temperature: %f \r\n", n+1,temp);
+        printf("ntc: %d   temperature: %f \r\n", n+1,cellst[n]);
     }
     printf("\r\n""""""""""""""""""""""""""""""""""""""""""""""""\r\n");
 }