from Acc_class import Accel import time x = Accel() x.start() try: while True: time.sleep(1) print "hello" #print x.pitch, x.yaw except KeyboardInterrupt: print "nick ta mere" x.join(1)
import time from keyboard import KBHit from mavproxy_decode import UAVgps from GPS_thread import UartGPS import os from file import gpsreader anttxt = gpsreader('antgps.txt') uavtxt = gpsreader('uavgps.txt') #classkbhit contains actions relatives to the keyboard kb=KBHit() antenna = Antenna() antennaGps = UartGPS() Accel = Accel() #defien both the servos YawServo = NewServo(-180,180,1.1,1.9,1.5,100,0,0.8) PitchServo = NewServo(0,90,1.1,1.9,1.5,100,1,0.5) uav = UAVgps() uav.set_telemetry_IP("") uav.set_telemetry_port(5006) uav.create_bind_socket() print "bind done" #init Antenna Gps coordinates