def setup(): loop = asyncio.get_event_loop() 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)
def setup(): objsched = Sched( True, 1) # Instantiate the scheduler with GC and heartbeat on red LED tft = TFT_G("SSD1963", "LB04301", LANDSCAPE) touch = TOUCH("XPT2046", objsched, 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(objsched, tft, touch)
def test(): setup() Screen.change(BaseScreen)
def pt(): print('Testing plot module...') setup() Screen.change(BaseScreen)
def test(): print('Test TFT panel...') setup() Screen.change(BaseScreen) # Run it!
def back(self, button, text): Aperture.value(text) Screen.back()
def fwd(button): Screen.change(cls_screen)
def cb_style(self, button, desaturate): self.lbl_style.value(''.join( ('Current style: ', 'grey' if desaturate else 'dim'))) Screen.set_grey_style(desaturate=desaturate)
def test(): print('Test TFT panel...') setup() Screen.change(KnobScreen)
def back(button): Screen.back()
def test(): print('Testing TFT...') setup() Screen.change(IconButtonScreen)
def test(): print('Test TFT panel...') setup() Screen.change(HorizontalSliderScreen)
def quit(button): Screen.shutdown()
def test(): print('Test TFT panel...') setup() Screen.set_grey_style(desaturate=False) # dim Screen.change(VerticalSliderScreen) # Run it!
def fwd(button, screen): Screen.change(screen)
def clear(self): tft = Screen.get_tft() self.curves = set() tft.fill_rectangle(self.x0, self.y0, self.x1, self.y1, self.bgcolor) self.show()
def quit(self, button): Screen.shutdown()
def cb_style(self, button, desaturate): self.lbl_style.value(''.join(('Current style: ', 'grey' if desaturate else 'dim'))) Screen.set_grey_style(desaturate = desaturate)
def fwd(button): Screen.change(cls_screen, args = args, kwargs = kwargs)