vibrator

sendVibrator ν•¨μˆ˜ ν…ŒμŠ€νŠΈ

from time import sleep

from e_drone.drone import *
from e_drone.protocol import *


if __name__ == '__main__':

    drone = Drone()
    drone.open()

    drone.sendVibrator(100, 200, 1200)
    sleep(1)

    drone.close()

Vibrator 클래슀 데이터λ₯Ό 직접 μ±„μ›Œμ„œ μ „μ†‘ν•˜κΈ°

from time import sleep

from e_drone.drone import *
from e_drone.protocol import *


if __name__ == '__main__':

    drone = Drone()
    drone.open()


    header = Header()
    
    header.dataType = DataType.Vibrator
    header.length   = Vibrator.getSize()
    header.from_    = DeviceType.Tester
    header.to_      = DeviceType.Controller

    data = Vibrator()

    data.mode       = VibratorMode.Instantally
    data.on         = 100
    data.off        = 200
    data.total      = 1200

    drone.transfer(header, data)
    sleep(1)


    drone.close()

Last updated