summaryrefslogtreecommitdiffstats
path: root/Code/Box1-Code
diff options
context:
space:
mode:
authorTriatmoko2011-11-14 16:40:11 +0100
committerTriatmoko2011-11-14 16:40:11 +0100
commitfc436ee5aff70fe6e7379f6e3786fea26a3b4d11 (patch)
tree67d445b0a434d49f9c329effd8fd0c3ceaf339b3 /Code/Box1-Code
parentadd and clean unused comment (diff)
downloadgsm-selftest-fc436ee5aff70fe6e7379f6e3786fea26a3b4d11.tar.gz
gsm-selftest-fc436ee5aff70fe6e7379f6e3786fea26a3b4d11.tar.xz
gsm-selftest-fc436ee5aff70fe6e7379f6e3786fea26a3b4d11.zip
clean odd comment
Diffstat (limited to 'Code/Box1-Code')
-rw-r--r--Code/Box1-Code/GSMClass.py13
-rw-r--r--Code/Box1-Code/serverHandler.py2
2 files changed, 3 insertions, 12 deletions
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():