petrone for python / Examples / Test Flight

Modified : 2018.11.26



테스트 비행 실행

테스트 비행을 실행합니다.

from time import sleep

from petrone.drone import *
from petrone.protocol import *
from petrone.system import *

if __name__ == '__main__':
    
    # Drone의 객체 생성
    drone = Drone(True, True, True, True, True)

    # 장치에 연결
    drone.connect()
    sleep(2)
    
    # 장치에 연결된 경우
    if drone.isConnected():

        drone.sendStartTestFlight();
        sleep(3)

        # 장치 연결 해제
        print("Disconnect device.")
        drone.sendLinkDisconnect()
        sleep(0.2)

    drone.close()


실행 결과는 다음과 같습니다.

example1 result

테스트 비행



petrone for python

  1. Intro
  2. System
  3. Protocol
  4. Drone
  5. Examples - Information
  6. Examples - Imu
  7. Examples - Test Flight
  8. Examples - Light


Index