def endTrack(): # Closes connection to FSUIPC/XPUIPC. pyuipc.close()
def shutdown(): pyuipc.close()
#data = [(int('0x3210',16),224)] #rdata = fsuipc.prepare_data(data) #call = fsuipc.read(rdata) #hotkey(call) # MENU OFF # WEATHER START ## metar = requestMETAR('EDDF') ## print(metar) # WEATHER END acft_data = requestAicraftData() print(acft_data) print time.time() - starttime time.sleep(1.0/call_frequency - time.time()%(1/call_frequency)) counter = counter + 1 if counter > stop_counter: flight_in_progress = False # Ok, Closing connection fsuipc.close() except fsuipc.FSUIPCException as e: print e.errorString exit(1)
def close_pyuipc(self): self.pyuipc_open = False pyuipc.close()
def stop(self): self.active = False pyuipc.close()
def disconnectFromSim(ui): fs.close() ui.statusLabel.setText("Not connected to FSUIPC") global isConnectedToSim isConnectedToSim = False
print arduinoSerial.readline() #batteryToSet = pyuipc.prepare_data([(0x281C, "d", 1),], False) #batteryToSet = pyuipc.prepare_data([(0x281c, "d")], False) #pyuipc.write(batteryToSet, [1]) if batteryState[0] == 1: newState = 0 else: newState = 1 pyuipc.write([(0x028c, "h", newState)]) batteryState = pyuipc.read(batteryToRead) print batteryState while True: batteryState = pyuipc.read(batteryToRead) if batteryState[0] == 1: newState = 0 else: newState = 1 pyuipc.write([(0x028c, "h", newState)]) batteryState = pyuipc.read(batteryToRead) arduinoSerial.write(str(batteryState[0])) sleep(1) print arduinoSerial.readline() pyuipc.close()
#fsuipc.write(fdata, [text, 100]) #data = [(int('0x3210',16),224)] #rdata = fsuipc.prepare_data(data) #call = fsuipc.read(rdata) #hotkey(call) # MENU OFF # WEATHER START ## metar = requestMETAR('EDDF') ## print(metar) # WEATHER END acft_data = requestAicraftData() print(acft_data) print time.time() - starttime time.sleep(1.0 / call_frequency - time.time() % (1 / call_frequency)) counter = counter + 1 if counter > stop_counter: flight_in_progress = False # Ok, Closing connection fsuipc.close() except fsuipc.FSUIPCException as e: print e.errorString exit(1)