Line | |
---|
1 | import threading
|
---|
2 | import GlobalVariables
|
---|
3 | import serial
|
---|
4 | import time
|
---|
5 | import datetime
|
---|
6 | class ReadTemperatures(threading.Thread):
|
---|
7 |
|
---|
8 |
|
---|
9 |
|
---|
10 |
|
---|
11 | def run(self):
|
---|
12 | time.sleep(0.01)
|
---|
13 | while(GlobalVariables.UserInput[1:]!="exit" and GlobalVariables.UserInput[1:] != "EXIT"):
|
---|
14 | filename="/ct3data/SlowData/CLIM_20090924.slow"
|
---|
15 | file = open(filename, 'r')
|
---|
16 | #ArduinoMessage = self.ser.readline()
|
---|
17 | Lines= file.readlines()
|
---|
18 | lastline=Lines[-1]
|
---|
19 | #print Lines[-1]
|
---|
20 | file.close()
|
---|
21 |
|
---|
22 | Message = lastline[lastline.find('['):]
|
---|
23 | GlobalVariables.ServerMessage = Message
|
---|
24 | #print Message
|
---|
25 | time.sleep(5)
|
---|
26 |
|
---|
27 |
|
---|
28 |
|
---|
29 |
|
---|
30 |
|
---|
31 |
|
---|
32 |
|
---|
33 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.