From fddcffe5c2dca5e0ef33adb7b982e5a8a817042c Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Mon, 2 Feb 2009 07:58:37 +0100 Subject: [PATCH] Remove some commented-out code, whitespace --- TEMPer.c | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/TEMPer.c b/TEMPer.c index 286b900..737fab0 100644 --- 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; -- 2.39.5