def __init__(self): try: self.srv = pysos.sossrv() except: print "Please run sos_server first" try: thread.start_new_thread(self.getSOSmsg,()) except thread.error: pass try: thread.start_new_thread(self.getSloggingRFID, ()) except thread.error: pass try: thread.start_new_thread(self.getSloggingPM, ()) except thread.error: pass self.TID=['00000000','00000000','00000000','00000000','000000000','00000000','00000000','00000000'] self.PM = ['000000','00000','000000','000000','000000','000000','000000'] try: thread.start_new_thread(self.timerOUT, ()) except thread.error: pass
def __init__(self): wx.Frame.__init__(self, None, title="Double Buffered Drawing", size=(800, 800)) self.plot = RadarGraph(self, "2D Accel Emulator") # Set some random initial data values self.plot.SetData((100, 100, 20, 200, 200, 20)) # Create a timer to update the data values self.Bind(wx.EVT_TIMER, self.OnTimeout) self.timer = wx.Timer(self) self.timer.Start(20) try: self.srv = pysos.sossrv() except: print "Please run sos_server first" try: thread.start_new_thread(self.getSOSmsg, ()) except thread.error: pass self.py = 0 self.px = 0 self.pz = 10 self.follower = [200, 200, 20]
def __init__(self): wx.Frame.__init__(self, None, title="Double Buffered Drawing", size=(800,800)) self.plot = RadarGraph(self, "2D Accel Emulator") # Set some random initial data values self.plot.SetData((100,100,20,200,200,20)) # Create a timer to update the data values self.Bind(wx.EVT_TIMER, self.OnTimeout) self.timer = wx.Timer(self) self.timer.Start(20) try: self.srv = pysos.sossrv() except: print "Please run sos_server first" try: thread.start_new_thread(self.getSOSmsg,()) except thread.error: pass self.py = 0 self.px = 0 self.pz = 10 self.follower = [200, 200, 20]
def __init__(self): wx.Frame.__init__(self, None, -1, "SpotLight", size=(800, 600)) panel = wx.Panel(self, -1) #self.SetPosition((0,0)) wx.StaticText(self, -1, "Pos:", pos=(10, 12)) self.posCtrl = wx.TextCtrl(self, -1, "", pos=(40, 10)) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) self.Bind(wx.EVT_TIMER, self.OnTimeout) self.timer = wx.Timer(self) self.timer.Start(1000) self.panel = wx.Panel(self, -1, pos=(601, 0), size=(200, 600)) self.INIKim = wx.Button(self.panel, -1, "Enter Kim", pos=(0, 0)) self.INIKim.Bind(wx.EVT_LEFT_DOWN, self.EnterKim, self.INIKim) self.INICho = wx.Button(self.panel, -1, "Enter Cho", pos=(0, 30)) self.INICho.Bind(wx.EVT_LEFT_DOWN, self.EnterCho, self.INICho) self.KimPlot = wx.Button(self.panel, -1, "Kim Profile", pos=(80, 0)) self.ChoPlot = wx.Button(self.panel, -1, "Cho Profile", pos=(80, 30)) self.KimPlot.Bind(wx.EVT_LEFT_DOWN, self.KimFigure, self.KimPlot) self.ChoPlot.Bind(wx.EVT_LEFT_DOWN, self.ChoFigure, self.ChoPlot) self.Lampbutton = wx.Button(self.panel, -1, "Lamp Energy", pos=(0, 90)) self.Lampbutton.Bind(wx.EVT_LEFT_DOWN, self.Lamppop, self.Lampbutton) self.Lamp2button = wx.Button(self.panel, -1, "Lamp2 Energy", pos=(0, 150)) self.Lamp2button.Bind(wx.EVT_LEFT_DOWN, self.Lamp2pop, self.Lamp2button) self.TVbutton = wx.Button(self.panel, -1, "TV Energy", pos=(0, 180)) self.TVbutton.Bind(wx.EVT_LEFT_DOWN, self.TVpop, self.TVbutton) self.Coffeebutton = wx.Button(self.panel, -1, "Coffee Energy", pos=(0, 120)) self.Coffeebutton.Bind(wx.EVT_LEFT_DOWN, self.Coffeepop, self.Coffeebutton) self.Lamp = AppButton(self, "Lamp", (450, 50), (60, 30), 80, 20) self.Coffee = AppButton(self, "Coffee", (50, 200), (60, 30), 30, 200) self.Lamp2 = AppButton(self, "Lamp2", (500, 500), (60, 30), 80, 20) self.TV = AppButton(self, "TV", (400, 300), (60, 30), 80, 20) try: self.srv = pysos.sossrv() except: print "Please run sos_server first" try: self.srv.register_trigger(self.getSOSmsg) except: pass try: thread.start_new_thread(self.DataSlog, ()) except thread.error: pass
def __init__(self): try: self.srv = pysos.sossrv() except: print "Please run sos_server first" try: thread.start_new_thread(self.getSOSmsg,()) except thread.error: pass
def __init__(self): wx.Frame.__init__(self, None, -1, "SpotLight", size=(800, 600)) panel = wx.Panel(self, -1) #self.SetPosition((0,0)) wx.StaticText(self, -1, "Pos:", pos=(10, 12)) self.posCtrl = wx.TextCtrl(self, -1, "", pos=(40, 10)) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) self.Bind(wx.EVT_TIMER, self.OnTimeout) self.timer = wx.Timer(self) self.timer.Start(1000) self.panel = wx.Panel(self, -1, pos=(601,0), size=(200,600)) self.INIKim = wx.Button(self.panel, -1, "Enter Kim", pos=(0,0)) self.INIKim.Bind(wx.EVT_LEFT_DOWN, self.EnterKim, self.INIKim) self.INICho = wx.Button(self.panel, -1, "Enter Cho", pos=(0,30)) self.INICho.Bind(wx.EVT_LEFT_DOWN, self.EnterCho, self.INICho) self.KimPlot = wx.Button(self.panel, -1, "Kim Profile", pos=(80,0)) self.ChoPlot = wx.Button(self.panel, -1, "Cho Profile", pos=(80,30)) self.KimPlot.Bind(wx.EVT_LEFT_DOWN, self.KimFigure, self.KimPlot) self.ChoPlot.Bind(wx.EVT_LEFT_DOWN, self.ChoFigure, self.ChoPlot) self.Lampbutton = wx.Button(self.panel, -1, "Lamp Energy", pos=(0,90)) self.Lampbutton.Bind(wx.EVT_LEFT_DOWN, self.Lamppop, self.Lampbutton) self.Lamp2button = wx.Button(self.panel, -1, "Lamp2 Energy", pos=(0,150)) self.Lamp2button.Bind(wx.EVT_LEFT_DOWN, self.Lamp2pop, self.Lamp2button) self.TVbutton = wx.Button(self.panel, -1, "TV Energy", pos=(0,180)) self.TVbutton.Bind(wx.EVT_LEFT_DOWN, self.TVpop, self.TVbutton) self.Coffeebutton = wx.Button(self.panel, -1, "Coffee Energy", pos=(0,120)) self.Coffeebutton.Bind(wx.EVT_LEFT_DOWN, self.Coffeepop, self.Coffeebutton) self.Lamp = AppButton(self, "Lamp", (450,50), (60,30), 80, 20) self.Coffee = AppButton(self, "Coffee", (50,200), (60,30), 30, 200) self.Lamp2 = AppButton(self, "Lamp2", (500, 500), (60,30), 80, 20) self.TV = AppButton(self, "TV", (400,300), (60,30), 80,20) try: self.srv = pysos.sossrv() except: print "Please run sos_server first" try: self.srv.register_trigger(self.getSOSmsg) except: pass try: thread.start_new_thread(self.DataSlog,()) except thread.error: pass
def __init__(self): wx.Frame.__init__(self, None, -1, "SpotLight", size=(800, 600)) self.SetPosition((0,0)) wx.StaticText(self, -1, "Pos:", pos=(10, 12)) self.posCtrl = wx.TextCtrl(self, -1, "", pos=(40, 10)) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) self.Bind(wx.EVT_TIMER, self.OnTimeout) self.timer = wx.Timer(self) self.timer.Start(1000) self.panel = wx.Panel(self, -1, pos=(601,0), size=(200,600)) self.INIKim = wx.Button(self.panel, -1, "Enter Kim", pos=(0,0)) self.INIKim.Bind(wx.EVT_LEFT_DOWN, self.EnterKim, self.INIKim) self.INICho = wx.Button(self.panel, -1, "Enter Cho", pos=(0,30)) self.INICho.Bind(wx.EVT_LEFT_DOWN, self.EnterCho, self.INICho) self.KimPlot = wx.Button(self.panel, -1, "Kim Profile", pos=(80,0)) self.ChoPlot = wx.Button(self.panel, -1, "Cho Profile", pos=(80,30)) self.KimPlot.Bind(wx.EVT_LEFT_DOWN, self.KimFigure, self.KimPlot) self.ChoPlot.Bind(wx.EVT_LEFT_DOWN, self.ChoFigure, self.ChoPlot) self.TVbutton = wx.Button(self.panel, -1, "TV Energy", pos=(0,60)) self.TVbutton.Bind(wx.EVT_LEFT_DOWN, self.TVpop, self.TVbutton) self.Ironbutton = wx.Button(self.panel, -1, "Iron Energy", pos=(0,90)) self.Ironbutton.Bind(wx.EVT_LEFT_DOWN, self.Ironpop, self.Ironbutton) self.Light1button = wx.Button(self.panel, -1, "Light1 Energy", pos=(0,120)) self.Light1button.Bind(wx.EVT_LEFT_DOWN, self.Light1pop, self.Light1button) self.Light2button = wx.Button(self.panel, -1, "Light2 Energy", pos=(0,150)) self.Light2button.Bind(wx.EVT_LEFT_DOWN, self.Light2pop, self.Light2button) self.Light3button = wx.Button(self.panel, -1, "Light3 Energy", pos=(0,180)) self.Light3button.Bind(wx.EVT_LEFT_DOWN, self.Light3pop, self.Light3button) self.TV = AppButton(self, "Television", (400,300), (60,30), 50, 100) self.Iron = AppButton(self, "Iron", (450,200), (60,30), 80, 20) self.Light1 = AppButton(self, "Light1", (300,350), (60,30), 30, 200) self.Light2 = AppButton(self, "Light2", (400,100), (60,30), 30, 200) self.Light3 = AppButton(self, "Light3", (200,100), (60,30), 30, 200) try: self.srv = pysos.sossrv() except: print "Please run sos_server first" try: thread.start_new_thread(self.getSOSmsg,()) except thread.error: pass
def __init__(self): try: self.srv = pysos.sossrv() except: print "Please run sos_server first" try: thread.start_new_thread(self.getSOSmsg, ()) except thread.error: pass self.middle = 511.735 self.position = 0 self.velocity = 0 self.samplingtime = 0.02 self.constant = 10
def __init__(self): try: self.srv = pysos.sossrv() except: print "Please run sos_server first" try: thread.start_new_thread(self.getSOSmsg,()) except thread.error: pass self.middle = 511.735 self.position = 0 self.velocity = 0 self.samplingtime = 0.02 self.constant = 10
def __init__(self): wx.Frame.__init__(self, None, -1, "SpotLight", size=(800, 600)) self.SetPosition((0, 0)) wx.StaticText(self, -1, "Pos:", pos=(10, 12)) self.posCtrl = wx.TextCtrl(self, -1, "", pos=(40, 10)) self.Bind(wx.EVT_CLOSE, self.OnCloseWindow) self.Bind(wx.EVT_TIMER, self.OnTimeout) self.timer = wx.Timer(self) self.timer.Start(1000) self.panel = wx.Panel(self, -1, pos=(601, 0), size=(200, 600)) self.INIKim = wx.Button(self.panel, -1, "Enter Kim", pos=(0, 0)) self.INIKim.Bind(wx.EVT_LEFT_DOWN, self.EnterKim, self.INIKim) self.INICho = wx.Button(self.panel, -1, "Enter Cho", pos=(0, 30)) self.INICho.Bind(wx.EVT_LEFT_DOWN, self.EnterCho, self.INICho) self.KimPlot = wx.Button(self.panel, -1, "Kim Profile", pos=(80, 0)) self.ChoPlot = wx.Button(self.panel, -1, "Cho Profile", pos=(80, 30)) self.KimPlot.Bind(wx.EVT_LEFT_DOWN, self.KimFigure, self.KimPlot) self.ChoPlot.Bind(wx.EVT_LEFT_DOWN, self.ChoFigure, self.ChoPlot) self.TVbutton = wx.Button(self.panel, -1, "TV Energy", pos=(0, 60)) self.TVbutton.Bind(wx.EVT_LEFT_DOWN, self.TVpop, self.TVbutton) self.Ironbutton = wx.Button(self.panel, -1, "Iron Energy", pos=(0, 90)) self.Ironbutton.Bind(wx.EVT_LEFT_DOWN, self.Ironpop, self.Ironbutton) self.Light1button = wx.Button(self.panel, -1, "Light1 Energy", pos=(0, 120)) self.Light1button.Bind(wx.EVT_LEFT_DOWN, self.Light1pop, self.Light1button) self.Light2button = wx.Button(self.panel, -1, "Light2 Energy", pos=(0, 150)) self.Light2button.Bind(wx.EVT_LEFT_DOWN, self.Light2pop, self.Light2button) self.Light3button = wx.Button(self.panel, -1, "Light3 Energy", pos=(0, 180)) self.Light3button.Bind(wx.EVT_LEFT_DOWN, self.Light3pop, self.Light3button) self.TV = AppButton(self, "Television", (400, 300), (60, 30), 50, 100) self.Iron = AppButton(self, "Iron", (450, 200), (60, 30), 80, 20) self.Light1 = AppButton(self, "Light1", (300, 350), (60, 30), 30, 200) self.Light2 = AppButton(self, "Light2", (400, 100), (60, 30), 30, 200) self.Light3 = AppButton(self, "Light3", (200, 100), (60, 30), 30, 200) try: self.srv = pysos.sossrv() except: print "Please run sos_server first" try: thread.start_new_thread(self.getSOSmsg, ()) except thread.error: pass
def __init__(self): wx.Frame.__init__(self, None, -1, 'Text Entry Example', size=(400, 150)) panel = wx.Panel(self, -1) basicLabel = wx.StaticText(panel, -1, "Position index") self.basicText = wx.TextCtrl(panel, -1, "1", size=(175, -1)) self.basicText.SetInsertionPoint(0) pwdLabel = wx.StaticText(panel, -1, "Position Description") self.pwdText = wx.TextCtrl(panel, -1, "password", size=(175, -1)) sizer = wx.FlexGridSizer(cols=2, hgap=6, vgap=6) sizer.AddMany([basicLabel, self.basicText, pwdLabel, self.pwdText]) panel.SetSizer(sizer) self.button = wx.Button(panel, -1, "Start", pos=(300,50)) self.Bind(wx.EVT_BUTTON, self.OnClick, self.button) self.button.SetDefault() self.Bind(wx.EVT_TIMER, self.OnTimeout) self.timer = wx.Timer(self) try: self.srv = pysos.sossrv() except: print "Please run sos_server first" try: self.srv.register_trigger(self.getSOSmsg) except: pass try: thread.start_new_thread(self.DataSlog,()) except thread.error: pass self.Chorssi = [-200,-200,-200,-200] self.Kimrssi = [-200,-200,-200,-200] self.counter = 0 self.hys = hysAlgorithm.SpotCali() self.cali = caliAlgorithm.SpotCali() self.base = baseAlgorithm.SpotBase()
def __init__(self): self.srv = pysos.sossrv() self.srv.register_trigger(self.getSOSmsg)
def __init__(self): self.srv = pysos.sossrv() try: thread.start_new_thread(self.getSOSmsg, ()) except thread.error: pass
def __init__(self): self.srv = pysos.sossrv() try: thread.start_new_thread(self.getSOSmsg,()) except thread.error: pass