args=lower_letters[26]) Space_button.bg = "light gray" Space_button.text_size = 10 Hide_button = PushButton(Keyboard_box, grid=[8, 3, 6, 1], width=5, height=2, padx=5, pady=1, text="Hide", command=Destroy_keys) Hide_button.text_size = 10 Hide_button.bg = "light gray" #Destroy Keyboard box def Destroy_keys(): global Keyboard_box global app global keys_exist keys_exist = 0 Keyboard_box.destroy() app.focus() Add_textbox.when_clicked = Make_keys Time_display.repeat(1000, time_update) Weather_drawing.repeat(600000, update_weather) app.display()
DisplayLong + 10, "Spd-" + str(v[2]), size=8, color="white") d.text(DisplayLat - 15, DisplayLong + 20, "Alt-" + str(v[1]), size=8, color="white") #Clean up dictionary try: CleanUpAirplaneDict = AirplaneDict for key, value in CleanUpAirplaneDict.items(): if int(time.time()) - value[6] > 10: AirplaneDict.pop(key) except: pass Processing = False except KeyboardInterrupt: print('Shutting Down') process.kill() process.terminate() os.system("taskkill /f /im dump1090.exe") sys.exit(0) d = Drawing(a, height=ScreenHeight, width=ScreenWidth) d.bg = "black" d.repeat(100, RTLData) a.display()
FlightName, size=8, color="white") d.text(DisplayLat - 15, DisplayLong + 10, "Spd-" + str(v[2]), size=8, color="white") d.text(DisplayLat - 15, DisplayLong + 20, "Alt-" + str(v[1]), size=8, color="white") except: print("error") pass AirplaneDict = {} Processing = False d = Drawing(a, height=ScreenHeight, width=ScreenWidth) d.bg = "black" d.repeat(500, RTLData) a.display() except KeyboardInterrupt: print('Shutting Down') process.kill() process.terminate() os.system('pkill dump1090') sys.exit(0)
WB2x1 = 100 WB2y1 = 300 WB2x2 = 200 WB2y2 = 400 WB2Color = "black" WB2 = GaugeCluster.rectangle(WB2x1, WB2y1, WB2x2, WB2y2, color="white") WB2 = GaugeCluster.rectangle(WB2x1+5, WB2y1+5, WB2x2-5, WB2y2-5, color=WB2Color) #Warning Bar 3 WB3x1 = 200 WB3y1 = 300 WB3x2 = 300 WB3y2 = 400 WB3Color = "black" WB3 = GaugeCluster.rectangle(WB3x1, WB3y1, WB3x2, WB3y2, color="white") WB3 = GaugeCluster.rectangle(WB3x1+5, WB3y1+5, WB3x2-5, WB3y2-5, color=WB1Color) GaugeCluster.repeat(250, Track_Data) GPSMode= PushButton(TRACK, command=GPSMode_Pressed, text="OBC", width="20") GPSMode.bg = "white" #****************************************** #----------------GPS MENU---------------- #****************************************** GPS = Window(OBC, title = "GPS") GPS.bg = "BLACK" #Gauge Face Cluster DrawingWidth = 300 DrawingHeight = 300 NumberOfGauges = 2 GaugeWidth = DrawingWidth GaugeHeight = 300 GPSGaugeCluster = Drawing(GPS, width=DrawingWidth, height=DrawingHeight)