class Uploader(object): """Universal uploader class""" #---------------------------------------------------------------------- def __init__(self, hex_file, board): debugger.Debugger(sys) if board.bldr == "noboot": # TODO : interface here something like PICpgm (http://www.members.aon.at/electronics/pic/picpgm/) #self.logwindow("You choose a board without bootloader.\nYou should either change your board type\nor use a programmer to upload your application on your board", 1) raise Exception, "You choose a board without bootloader.\nYou should either change your board type\nor use a programmer to upload your application on your board" elif board.bldr == "boot2": from uploaderVSC import uploaderVSC as Uploader #elif board.bldr == 'boot3': # self.uploader = self.uploaderDLN(*parameters) elif board.bldr == "boot4": from uploader8 import uploader8 as Uploader elif board.bldr == "microchip": from uploader32 import uploader32 as Uploader self.uploader = Uploader(hex_file, board) #---------------------------------------------------------------------- def write_hex(self): self.uploader.writeHex() return self.uploader.report
class Uploader(object): """Universal uploader class""" #---------------------------------------------------------------------- def __init__(self, hex_file, board): debugger.Debugger(sys) if board.bldr == "noboot": # TODO : interface here something like PICpgm (http://www.members.aon.at/electronics/pic/picpgm/) #self.logwindow("You choose a board without bootloader.\nYou should either change your board type\nor use a programmer to upload your application on your board", 1) raise Exception( "You choose a board without bootloader.\nYou should either change your board type\nor use a programmer to upload your application on your board" ) elif board.bldr == "boot2": from uploaderVSC import uploaderVSC as Uploader #elif board.bldr == 'boot3': # self.uploader = self.uploaderDLN(*parameters) elif board.bldr == "boot4": from uploader8 import uploader8 as Uploader elif board.bldr == "microchip": from uploader32 import uploader32 as Uploader self.uploader = Uploader(hex_file, board) #---------------------------------------------------------------------- def write_hex(self): self.uploader.writeHex() return self.uploader.report
def __init__(self, hexfile, board): #debugger.Debugger(sys) self.hexfile = hexfile #self.filename = hexfile self.board = board if board.bldr == "noboot": # TODO : interface here something like PICpgm (http://www.members.aon.at/electronics/pic/picpgm/) #self.logwindow("You choose a board without bootloader.\nYou should either change your board type\nor use a programmer to upload your application on your board", 1) raise Exception( "You choose a board without bootloader.\nYou should either change your board type\nor use a programmer to upload your application on your board" ) elif board.bldr == "boot2": from uploaderVSC import uploaderVSC as Uploader #elif board.bldr == 'boot3': # self.uploader = self.uploaderDLN(*parameters) elif board.bldr == "boot4": from uploader8 import uploader8 as Uploader elif board.bldr == "microchip": from uploader32 import uploader32 as Uploader #self.uploader = Uploader(hexfile, board) self.uploader = Uploader()
def __init__(self, hexfile, board): #debugger.Debugger(sys) self.hexfile = hexfile #self.filename = hexfile self.board = board if board.bldr == "noboot": # TODO : interface here something like PICpgm (http://www.members.aon.at/electronics/pic/picpgm/) #self.logwindow("You choose a board without bootloader.\nYou should either change your board type\nor use a programmer to upload your application on your board", 1) raise Exception("You choose a board without bootloader.\nYou should either change your board type\nor use a programmer to upload your application on your board") elif board.bldr == "boot2": from uploaderVSC import uploaderVSC as Uploader #elif board.bldr == 'boot3': # self.uploader = self.uploaderDLN(*parameters) elif board.bldr == "boot4": from uploader8 import uploader8 as Uploader elif board.bldr == "microchip": from uploader32 import uploader32 as Uploader self.uploader = Uploader(hexfile, board)