Beispiel #1
0
def endTrack():  # Closes connection to FSUIPC/XPUIPC.
    pyuipc.close()
Beispiel #2
0
def shutdown():
    pyuipc.close()
Beispiel #3
0
        #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)


Beispiel #4
0
 def close_pyuipc(self):
     self.pyuipc_open = False
     pyuipc.close()
Beispiel #5
0
def shutdown():
    pyuipc.close()
Beispiel #6
0
 def stop(self):
     self.active = False
     pyuipc.close()
Beispiel #7
0
def disconnectFromSim(ui):
    fs.close()
    ui.statusLabel.setText("Not connected to FSUIPC")
    global isConnectedToSim
    isConnectedToSim = False
Beispiel #8
0
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()


Beispiel #9
0
 def stop(self):
     self.active = False
     pyuipc.close()
Beispiel #10
0
        #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)