Changeset 98 for pvMail


Ignore:
Timestamp:
Dec 3, 2009 4:53:48 PM (16 years ago)
Author:
jemian
Message:

tabs vs. spaces war ongoing ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified pvMail/src/wxpvMail.py ΒΆ

    r97 r98  
    342342            flagglobal = 0
    343343        #self.after(200,self.sendMail)
    344                
     344
    345345    def tryCA(self):
    346         try:
    347             TrigPV = TrigPVsv.get()
    348             TrigVal = caget(TrigPV)
    349             print TrigVal
    350         except CaChannelException:
    351             print "can't read " + TrigPV
    352                        
    353         def callback(self, epics_args, user_args):
    354                 global flagglobal
    355                 #print "VAL = ", epics_args['pv_value']
    356                 trigVal = epics_args['pv_value']
    357                 #if (run) and (trigVal)
    358                 #if self.run and trigVal:
    359                 if (trigVal and runglobal):
    360                         #print "running: ", runglobal
    361                         #print trigVal
    362                         #print "send mail"
    363                         flagglobal = 1
    364                         #self.sendMail()  ## couldn't do this because sendMail needs to caget, not allowed within callback
    365                 elif (trigVal):
    366                         self.ltext.set("Trigger detected, no email sent (Stopped)")
    367 
    368                 # CA err check here?
     346    ##    try:
     347    ##        TrigPV = TrigPVsv.get()
     348    ##        TrigVal = caget(TrigPV)
     349    ##        print TrigVal
     350    ##    except CaChannelException:
     351    ##        print "can't read " + TrigPV
     352
     353    def callback(self, epics_args, user_args):
     354        global flagglobal
     355        #print "VAL = ", epics_args['pv_value']
     356        trigVal = epics_args['pv_value']
     357        #if (run) and (trigVal)
     358        #if self.run and trigVal:
     359        if (trigVal and runglobal):
     360            #print "running: ", runglobal
     361            #print trigVal
     362            #print "send mail"
     363            flagglobal = 1
     364            #self.sendMail()  ## couldn't do this because sendMail needs to caget, not allowed within callback
     365        elif (trigVal):
     366            self.ltext.set("Trigger detected, no email sent (Stopped)")
     367
     368        # CA err check here?
    369369       
    370370        def checkTrConnect(self):
Note: See TracChangeset for help on using the changeset viewer.