summaryrefslogtreecommitdiffstats
path: root/For Weekly Test/tricode/GSMHandler.py
diff options
context:
space:
mode:
Diffstat (limited to 'For Weekly Test/tricode/GSMHandler.py')
-rwxr-xr-xFor Weekly Test/tricode/GSMHandler.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/For Weekly Test/tricode/GSMHandler.py b/For Weekly Test/tricode/GSMHandler.py
index e8781a6..a7c995f 100755
--- a/For Weekly Test/tricode/GSMHandler.py
+++ b/For Weekly Test/tricode/GSMHandler.py
@@ -60,14 +60,15 @@ def initSystem():
handlerSocket = ServerClass.ServerHandler(portListen)
logger.logEvent('LISTEN ON PORT: '+str(portListen))
+ anyConnection = handlerSocket.openSocket()
#add this if you need it
- gsmDevice = GSMClass.serialPort(portAddress, baudRate, 60)
+ gsmDevice = GSMClass.serialPort(portAddress, baudRate, 15)
initDevice = gsmDevice.portInit()
########################################################
#add nice formating to the log file :)
- anyConnection = handlerSocket.openSocket()
+ #anyConnection = handlerSocket.openSocket()
if anyConnection == 1 and initDevice == 1:
@@ -267,6 +268,12 @@ while 1:
receivedMessage = 0
while receivedMessage < 4 and resetState!= 1:
receivedMessage += receiveMessage(30)
+ if test == 2:
+ print 'initialized system'
+ receivedMessage = 0
+ while receivedMessage < 4 and resetState!= 1:
+ handlerSocket.sendData('DEVICE NOT READY')
+ receivedMessage += receiveMessage(30)
del handlerSocket
del gsmDevice