def layoutDevice(self): sizer = wx.StaticBoxSizer(wx.VERTICAL, self.panel, label="Tank Controller v" + libTC.version()) sizer.Add(self.layoutDisplay(), flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=self.border) sizer.Add(self.layoutKeypad(), flag=wx.EXPAND | wx.LEFT | wx.RIGHT, border=self.border) return sizer
#!python3 import datetime import threading import time try: import libTC print('TankController version ', libTC.version()) except ImportError: print('libTC not found!') exit() try: import wx except ImportError: print('wxpython is not installed!') exit() class TankController(wx.Frame): def __init__(self, parent, title): super(TankController, self).__init__( parent, title=title, size=(850, 600)) self.InitUI() self.Centre() self.Show() self.startLoop() def InitUI(self):
#!python3 import libTC print('Version:', libTC.version()) print('LCD: ', libTC.lcd(0)) print(' ', libTC.lcd(1))