Skip to content
Snippets Groups Projects
Commit a6e56724 authored by Michael DM Dryden's avatar Michael DM Dryden
Browse files

Remove superfluous classes.

parent 22ac4c4d
Branches
Tags
No related merge requests found
......@@ -13,28 +13,6 @@ class delayedSerial(serial.Serial): #overrides normal serial write so that chara
serial.Serial.write(self, i)
time.sleep(.001)
class linearData:
# constr
def __init__(self):
self.xdata = []
self.ydata = []
self.first = 1
# add data
def add(self, data):
if self.first == 1:
self.first = 0
return
assert(len(data) == 2)
self.x.append(data[0])
self.y.append(data[1])
# clear data
def clear(self):
self.first = 1
self.ax = []
self.ay = []
class dataCapture(mp.Process):
def __init__(self, ser_instance, pipe):
mp.Process.__init__(self)
......@@ -53,22 +31,12 @@ class dataCapture(mp.Process):
elif line.lstrip().startswith("no"):
self.serial.flushInput()
self.send_p.close()
self.send_p.close() #causes EOF at other end of pipe
print "closed"
break
break
class dataUpdate(mp.Process):
def __init__(self, ser_instance):
mp.Process.__init__(self)
def run(self):
sys.stdout.write('[%s] running ... process id: %s\n'
% (self.name, os.getpid()))
class SerialDevices:
def __init__(self):
self.ports, _, _ = zip(*list_ports.comports())
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment