def getBoard(self): board = const.settings.get('board') platform = self.getPlatform() board_lists = self.arduino_info.getBoardLists(platform) all_board_list = utils.simplifyLists(board_lists) if not board in all_board_list: board = all_board_list[0] const.settings.set('board', board) return board
def genProgrammerMenuText(self): platform = self.getPlatform() programmer_lists = self.arduino_info.getProgrammerLists(platform) menu_caption = '%(Programmer)s' command = 'select_programmer' menu_text = self.genSubMenuBlock(menu_caption, programmer_lists, command, menu_base = platform, checkbox = True) if programmer_lists: all_programer_list = utils.simplifyLists(programmer_lists) programmer = const.settings.get('programmer') if not programmer in all_programer_list: programmer = all_programer_list[0] const.settings.set('programmer', programmer) const.save_settings() return menu_text
def genProgrammerMenuText(self): platform = self.getPlatform() programmer_lists = self.arduino_info.getProgrammerLists(platform) menu_caption = '%(Programmer)s' command = 'select_programmer' menu_text = self.genSubMenuBlock(menu_caption, programmer_lists, command, menu_base=platform, checkbox=True) if programmer_lists: all_programer_list = utils.simplifyLists(programmer_lists) programmer = const.settings.get('programmer') if not programmer in all_programer_list: programmer = all_programer_list[0] const.settings.set('programmer', programmer) else: const.settings.set('programmer', '') return menu_text