示例#1
0
 def disable_channel(self, channel):
     result = usbtc08.usb_tc08_set_channel(self.handle, channel, ord(' '))
     if result == 0:
         raise usbtc08_error(usbtc08.usb_tc08_get_last_error(self.handle), 'Disabling channel.')
     else:
         if DEBUG:
             print 'Disabled channel %i.' % (channel)
示例#2
0
 def set_channel(self, channel, tc):
     result = usbtc08.usb_tc08_set_channel(self.handle, channel, ord(tc))
     if result == 0:
         raise usbtc08_error(usbtc08.usb_tc08_get_last_error(self.handle), 'Setting channel.')
     else:
         if DEBUG:
             print 'Set channel %i to %s-type thermocouple.' % (channel, tc)
示例#3
0
 def disable_channel(self, channel):
     result = usbtc08.usb_tc08_set_channel(self.handle, channel, ord(' '))
     if result == 0:
         raise usbtc08_error(usbtc08.usb_tc08_get_last_error(self.handle), 'Disabling channel.')
     else:
         if DEBUG:
             print 'Disabled channel %i.' % (channel)
示例#4
0
 def set_channel(self, channel, tc):
     result = usbtc08.usb_tc08_set_channel(self.handle, channel, ord(tc))
     if result == 0:
         raise usbtc08_error(usbtc08.usb_tc08_get_last_error(self.handle), 'Setting channel.')
     else:
         if DEBUG:
             print 'Set channel %i to %s-type thermocouple.' % (channel, tc)
示例#5
0
 def disable_channel(self, channel):
     result = usbtc08.usb_tc08_set_channel(self.handle, channel, ord(' '))
     if result == 0:
         raise usbtc08_error(usbtc08.usb_tc08_get_last_error(self.handle),
                             'Disabling channel.')
     else:
         if self.debugMode:
             cprint('\tDisabled channel %i.' % (channel), 'yellow')
示例#6
0
 def set_channel(self, channel, tc):
     result = usbtc08.usb_tc08_set_channel(self.handle, channel, ord(tc))
     if result == 0:
         raise usbtc08_error(usbtc08.usb_tc08_get_last_error(self.handle),
                             'Setting channel.')
     else:
         if self.debugMode:
             cprint(
                 '\tSet channel %i to %s-type thermocouple.' %
                 (channel, tc), 'green')