]> err.no Git - temper/commitdiff
Remove some commented-out code, whitespace
authorTollef Fog Heen <tfheen@err.no>
Mon, 2 Feb 2009 06:58:37 +0000 (07:58 +0100)
committerTollef Fog Heen <tfheen@err.no>
Mon, 2 Feb 2009 06:58:37 +0000 (07:58 +0100)
TEMPer.c

index 286b9006581586a27382e1fe616dbca687242b2e..737fab0c19eac615bc6a790ead5081c24b87140c 100644 (file)
--- a/TEMPer.c
+++ b/TEMPer.c
@@ -165,7 +165,7 @@ void WriteP1P0(int P0123, char *dataS)
        Delay(100);
        SDin();
        HiLowSCLK();
-       
+
        SDout(0);
        HiLowSCLK();
        SDout(0);
@@ -320,7 +320,6 @@ double ReadTEMP(void)
        HiLowSCLK();
        Stop_IIC();
 
-
        char str_msb[4];
        char str_lsb[9];
        char FuHao = buf[0];
@@ -349,29 +348,6 @@ double ReadTEMP(void)
        fprintf(stderr, "Getting temperature done %16s %f\n", buf, temperature);
 
        return temperature;
-
-/*                String str_data = data.ToString();
-                String FuHao = Strings.Left(str_data, 1);
-                String str_temp = Strings.Left(str_data, 11);
-                String str_msb = Strings.Left(str_temp, 3);
-                String str_lsb = Strings.Right(str_temp, 8);
-                double msb = Bin2Dec(str_msb);
-                double lsb = Bin2Dec(str_lsb);
-                double tempdata = (msb * 256.0) + lsb;
-                switch (FuHao)
-                {
-                    case "0":
-                        ReadTEMP = tempdata * 0.125;
-                        break;
-
-                    case "1":
-                        ReadTEMP = -(2048.0 - tempdata) * 0.125;
-                        break;
-                }
-
-
-                return ReadTEMP;
-*/
 }
 
 int main(int argc, char **argv)
@@ -388,9 +364,8 @@ int main(int argc, char **argv)
        tcgetattr(fd,&oldtio); /* save current port settings */
 
        memcpy(&newtio, &oldtio, sizeof(newtio));
-/*     bzero(&newtio, sizeof(newtio));*/
-       newtio.c_cflag |= (CLOCAL | CREAD);
 
+       newtio.c_cflag |= (CLOCAL | CREAD);
        newtio.c_cflag &= ~PARENB;
        newtio.c_cflag &= ~CSTOPB;
        newtio.c_cflag &= ~CSIZE;