Пример #1
0
def setup():
    tft = TFT_G("SSD1963", "LB04301", LANDSCAPE)
    touch = TOUCH("XPT2046", True, confidence=50, margin=50)
    # (-3886,-0.1287,-3812,-0.132,-3797,-0.07685,-3798,-0.07681))
    tft.backlight(
        100
    )  # light on: remove this line if you don't have backlight control hardware
    Screen.setup(tft, touch)
Пример #2
0
 def quit(self, button):
     Screen.shutdown()
Пример #3
0
 def callback(self, obj_listbox):
     if obj_listbox._initial_value is not None:  # a touch has occurred
         val = obj_listbox.textvalue()
         Screen.back()
         if self.dropdown is not None:  # Part of a Dropdown
             self.dropdown.value(obj_listbox.value())  # Update it
Пример #4
0
 def _touched(self, x, y):
     if len(self.elements) > 1:
         location = self.location[0], self.location[1] + self.height + 1
         args = (location, self, self.width - self.height)
         Screen.change(_ListDialog, args=args)
Пример #5
0
def test():
    setup()
    Screen.change(BaseScreen)
Пример #6
0
 def fwd(button):
     Screen.change(cls_screen, args = args, kwargs = kwargs)
Пример #7
0
def pt():
    print('Testing plot module...')
    setup()
    Screen.change(BaseScreen)
Пример #8
0
def quit(button):
    Screen.shutdown()
Пример #9
0
 def fwd(button):
     Screen.change(cls_screen)
Пример #10
0
 def back(button):
     Screen.back()
Пример #11
0
def test():
    print('Test TFT panel...')
    setup()
    Screen.change(BaseScreen)  # Run it!
Пример #12
0
 def back(button):
     for task in self.tasks:
         task.cancel()
     self.tasks = []
     Screen.back()
Пример #13
0
 def fwd(button, screen):
     Screen.change(screen)
Пример #14
0
def test():
    print('Test TFT panel...')
    setup()
    Screen.change(HorizontalSliderScreen)
Пример #15
0
 def cb_style(self, button, desaturate):
     self.lbl_style.value(''.join(
         ('Current style: ', 'grey' if desaturate else 'dim')))
     Screen.set_grey_style(desaturate=desaturate)
Пример #16
0
def test():
    print('Testing TFT...')
    setup()
    Screen.change(IconButtonScreen)
Пример #17
0
def test():
    print('Test TFT panel...')
    setup()
    Screen.change(KnobScreen)
Пример #18
0
 def back(self, button, text):
     Aperture.value(text)
     Screen.back()
Пример #19
0
def test():
    print('Test TFT panel...')
    setup()
    Screen.set_grey_style(desaturate = False) # dim
    Screen.change(VerticalSliderScreen)       # Run it!