From fc436ee5aff70fe6e7379f6e3786fea26a3b4d11 Mon Sep 17 00:00:00 2001 From: Triatmoko Date: Mon, 14 Nov 2011 16:40:11 +0100 Subject: clean odd comment --- Code/Box1-Code/GSMClass.py | 13 +++---------- Code/Box1-Code/serverHandler.py | 2 -- 2 files changed, 3 insertions(+), 12 deletions(-) (limited to 'Code/Box1-Code') diff --git a/Code/Box1-Code/GSMClass.py b/Code/Box1-Code/GSMClass.py index b932ab5..d89f652 100644 --- a/Code/Box1-Code/GSMClass.py +++ b/Code/Box1-Code/GSMClass.py @@ -14,7 +14,7 @@ class serialPort(): self.ser = 0 self.baudRate = baudRate self.signalStrength = 0 - #self.callerConnected = -1 + self.timer = timeout self.timer1 = timeout self.start = 0 @@ -35,12 +35,6 @@ class serialPort(): bytesize=EIGHTBITS, parity=PARITY_NONE, stopbits=STOPBITS_ONE - #timeout=0, - #writeTimeout=0 - #xonxoff=0, - #rtscts=0 - #interCharTimeout=None - #I didn't need to set these variables :) ) self.ser.flushOutput() #clean the output buffer from the serial port self.ser.flushInput() #clean the input buffer for serial port @@ -251,7 +245,7 @@ class serialPort(): signal.alarm(0) return 'RING' - elif line[0:5] == '+CSQ:': #+CSQ: + elif line[0:5] == '+CSQ:': space = int(string.find(line,' '))+1 #find the (space) sign coma = int(string.find(line,',')) #find the , (coma) sign self.signalStrength = (int(line[space:coma])*2)-113 @@ -270,8 +264,7 @@ class serialPort(): return 'BUSY' elif line[0:6] == '+CLCC:': - #+CLCC: 1,0, - #self.ser.flushInput() + if line[11:12] == '0': signal.signal(signal.SIGALRM, old_handler) signal.alarm(0) diff --git a/Code/Box1-Code/serverHandler.py b/Code/Box1-Code/serverHandler.py index fc17234..accfc1d 100644 --- a/Code/Box1-Code/serverHandler.py +++ b/Code/Box1-Code/serverHandler.py @@ -82,7 +82,6 @@ def initSystem(): elif anyConnection == 1 and initDevice != 0: logger.logEvent('$connection established but device not working: ' + str(handlerSocket.connectedTo())) - #resetState = 1 return 2 else: logger.logEvent('$no connection') @@ -167,7 +166,6 @@ def receiveMessage(timeout): logger.logEvent('other appeared') return 1 - #return 0 ########INIT TALK PART######## def initTalk(): -- cgit v1.2.3-55-g7522