Пример #1
0
    def __init__(self):
        tk.Tk.__init__(self)
        self.black_button_image = tk.PhotoImage(file='icons/black_button.png')
        self.green_button_image = tk.PhotoImage(file='icons/green_button.png')
        self.green_zero_button_image = tk.PhotoImage(
            file='icons/green_zero_button.png')
        self.green_one_button_image = tk.PhotoImage(
            file='icons/green_one_button.png')
        self.red_button_image = tk.PhotoImage(file='icons/red_button.png')
        self.red_zero_button_image = tk.PhotoImage(
            file='icons/red_zero_button.png')
        self.red_one_button_image = tk.PhotoImage(
            file='icons/red_one_button.png')

        # initialize the window
        w = 1250
        h = 930
        self.wm_title("GreatFET Test Panel")
        self.geometry("%dx%d+%d+%d" %
                      (w, h, 0, 0))  # set size and position of window
        self.resizable(width=False, height=False)

        menubar = PanelMenu(self)
        self.config(menu=menubar)
        self.canvas = PanelCanvas(self)
        self.status = StatusBar(self)

        self.gf = GreatFET()
        hardware._init_board(self)
Пример #2
0
    def __init__(self):
        tk.Tk.__init__(self)
        self.black_button_image       = tk.PhotoImage(file='icons/black_button.png')
        self.green_button_image       = tk.PhotoImage(file='icons/green_button.png')
        self.green_zero_button_image  = tk.PhotoImage(file='icons/green_zero_button.png')
        self.green_one_button_image   = tk.PhotoImage(file='icons/green_one_button.png')
        self.red_button_image         = tk.PhotoImage(file='icons/red_button.png')
        self.red_zero_button_image    = tk.PhotoImage(file='icons/red_zero_button.png')
        self.red_one_button_image     = tk.PhotoImage(file='icons/red_one_button.png')
        self.icon_image               = tk.PhotoImage(file='icons/gsg.png')
        self.help_image               = tk.PhotoImage(file='icons/help_icon.png')

        # initialize the window
        w = 1250
        h = 930
        menubar = PanelMenu(self)
        self.wm_title("GreatFET Test Panel")        
        self.tk.call('wm', 'iconphoto', self._w, self.icon_image)
        # REVERT 500 BACK TO 0
        self.geometry("%dx%d+%d+%d" % (w, h, 500, 0)) # set size and position of window
        self.resizable(width=False, height=False)
        self.config(menu=menubar)
        self.canvas = PanelCanvas(self)
        self.status = StatusBar(self)
        
        hardware._init_board()
Пример #3
0
 def load_project(self):
     config_file = filedialog.askopenfile(initialdir = "/GreatFET-testpanel",title = "Select File",filetypes = (("JSON files","*.json"),("all files","*.*")))
     if config_file is None:
         return
     loaded_pins = json.load(config_file)
     config_file.close()
     hardware._init_board()
     self.deserialize_board(loaded_pins)
     self.status.config(text="Configuration loaded from file")
Пример #4
0
 def reset_board(self):
     hardware._init_board()