예제 #1
0
    def __init__(self, parent,*args, **kwds):
        DAQPanel.__init__(self, *args, **kwds)
        self.parentFrame = parent

        self.sizersize = self.ecg_vertical_sizer.GetSize()
        self.plotter = Plotter(self,(1080,380))
        self.ecg_vertical_sizer.Add(self.plotter.plotpanel,1, wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)

       # self.Calibration_bitmap = wx.StaticBitmap(self, -1, wx.Bitmap("Icons/CalibrationSignal.png", wx.BITMAP_TYPE_ANY))
        #self.Calibration_bitmap.SetBitmap(wx.Bitmap("Icons/CalibrationSignal.png"))
        #self.ecg_vertical_sizer.Add(self.Calibration_bitmap,1, wx.BOTTOM|wx.SHAPED, 4)
        
        
        self.timer1 = wx.Timer(self)
        self.timer2 = wx.Timer(self)
        self.timer3 = wx.Timer(self)
        self.Bind(wx.EVT_TIMER, self.serverCheck, self.timer3)
        
        self.timerEDF = wx.Timer(self)
        self.timerECG = wx.Timer(self)
        

        self.timerPLOT = wx.Timer(self)
        self.Bind(wx.EVT_TIMER, self.plotECG, self.timerPLOT)

        self.plotinterval = wx.Timer(self)
        self.Bind(wx.EVT_TIMER, self.plotnext, self.plotinterval)
        
        self.Bind(wx.EVT_TIMER, self.on_timer1, self.timer1)
        self.Bind(wx.EVT_TIMER, self.on_timer2, self.timer2)
        self.Bind(wx.EVT_TIMER, self.make_edf, self.timerEDF)
        self.Bind(wx.EVT_TIMER, self.getECGdata, self.timerECG)
        
       
        

        self.pressure_timer = wx.Timer(self)
        self.Bind(wx.EVT_TIMER, self.pressure_update, self.pressure_timer)

        self.Biosignals = []
        
        self.spo2data = simsensors.Spo2sim(self)
        self.bpdata = simsensors.BpSim(self)
        self.ECGdata =[]
        for i in range(0,7500):
            self.ECGdata.append(0)
            
        self.ECGcount = 0 #ECG data counter
        self.ECGstart = 0 #ECG start counter
        
        
        self.patient1 = edf.Patient('1','Timothy','Cena','Ebido','Servan',\
                                    'Male','09.27.89','19')
                                    
        self.bp_infolabel.SetLabel('BP ready')
        self.heartrate_infolabel.SetLabel('Pulse Ox Ready')
        self.spo2_infolabel.SetLabel('Pulse Ox ready')
        self.count = 0      #no use as of now

        self.bp_slider.Enable(False)
        self.bp_pressure_indicator.Enable(False)
        self.parentFrame.Layout()
예제 #2
0
    def __init__(self, parent,*args, **kwds):
        DAQPanel.__init__(self, *args, **kwds)
        self.parentFrame = parent

        self.sizersize = self.ecg_vertical_sizer.GetSize()
        self.plotter = Plotter(self,(1120,380))
        self.ecg_vertical_sizer.Add(self.plotter.plotpanel,1,\
                                    wx.LEFT|wx.RIGHT|wx.BOTTOM|wx.EXPAND, 4)

        self.timer1 = wx.Timer(self)
        self.timer2 = wx.Timer(self)
        self.timerEDF = wx.Timer(self)
        self.pressure_timer = wx.Timer(self)
        #self.timerSend = wx.Timer(self)
        #self.timerECG_refresh = wx.Timer(self)
        self.Bind(wx.EVT_TIMER, self.on_timer1, self.timer1)
        self.Bind(wx.EVT_TIMER, self.get_bp, self.timer2)
        self.Bind(wx.EVT_TIMER, self.make_edf, self.timerEDF)
        self.Bind(wx.EVT_TIMER, self.pressure_update, self.pressure_timer)
        #self.Bind(wx.EVT_TIMER, self.onSend, self.timerSend)
        #self.Bind(wx.EVT_TIMER, self.displayECG, self.timerECG_refresh)
        self.parentFrame.isEstimated.Bind(wx.EVT_CHECKBOX, self.onEstimate)

        self.timerECG = wx.Timer(self)
        self.Bind(wx.EVT_TIMER, self.getECGdata, self.timerECG)

        self.plotinterval = wx.Timer(self)
        self.Bind(wx.EVT_TIMER, self.plotnext, self.plotinterval)

        self.ECGdata =[]
        #for i in range(0,7500):
         #   self.ECGdata.append(0)
        
        self.Biosignals = []
        self.ECGcount = 0
        
        self.spo2data = simsensors.Spo2sim(self)
        self.bpdata = simsensors.BpSim(self)
        self.ecgdata = simsensors.EcgSim(self)
        
        self.patient1 = edf.Patient('1','Timothy','Cena','Ebido','Servan',\
                                    'Male','09.27.89','19')
                                    
        self.bp_infolabel.SetLabel('BP ready')
        self.heartrate_infolabel.SetLabel('Pulse Ox Ready')
        self.spo2_infolabel.SetLabel('Pulse Ox ready')
        self.bp_isCyclic = 0
        self.ecg_counter = 0
        self.ecg_first = 0
        self.on_check = 0
        #self.getlead = ECG().ecg_lead()

        self.bp = BP(self,'COM10')
        self.spo2 = SPO2(self,port='COM5')

        self.bp_pressure_indicator = wx.Gauge(self.bpbarpanel,-1, 250, size=(20, 100),style=wx.GA_VERTICAL)
        
        self.parentFrame.AgeValue.Enable(False)
        self.parentFrame.AgeCombo.Enable(False)
        self.bp_pressure_indicator.Enable(False)

        #self.SPO2_status_check()
        self.BP_status_check()