pyaidrone 2.2__tar.gz → 2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pyaidrone-2.2 → pyaidrone-2.3}/PKG-INFO +1 -1
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone/aiDrone.py +1 -1
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone/deflib.py +4 -4
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone/ikeyevent.py +20 -14
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone/parse.py +1 -1
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone.egg-info/PKG-INFO +1 -1
- {pyaidrone-2.2 → pyaidrone-2.3}/setup.py +1 -1
- {pyaidrone-2.2 → pyaidrone-2.3}/README.md +0 -0
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone/__init__.py +0 -0
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone/aidrone_mavlink_bridge.py +0 -0
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone/edu.py +0 -0
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone/packet.py +0 -0
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone/sensor.py +0 -0
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone/vision_ai.py +0 -0
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone.egg-info/SOURCES.txt +0 -0
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone.egg-info/dependency_links.txt +0 -0
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone.egg-info/requires.txt +0 -0
- {pyaidrone-2.2 → pyaidrone-2.3}/pyaidrone.egg-info/top_level.txt +0 -0
- {pyaidrone-2.2 → pyaidrone-2.3}/setup.cfg +0 -0
|
@@ -35,7 +35,7 @@ class AIDrone(Parse, Packet):
|
|
|
35
35
|
while self.isThreadRun:
|
|
36
36
|
readData = self.serial.read(self.serial.in_waiting or 1)
|
|
37
37
|
packet = self.parse.packetArrange(readData)
|
|
38
|
-
if not
|
|
38
|
+
if packet is not None:
|
|
39
39
|
if self.receiveCallback is not None:
|
|
40
40
|
self.receiveCallback(packet)
|
|
41
41
|
self.serial.write(self.makepkt.getPacket())
|
|
@@ -9,7 +9,7 @@ LEFT = 3
|
|
|
9
9
|
class DefLib:
|
|
10
10
|
|
|
11
11
|
@classmethod
|
|
12
|
-
def checksum(
|
|
12
|
+
def checksum(cls, packet):
|
|
13
13
|
len = packet[4]
|
|
14
14
|
sum = 0
|
|
15
15
|
for n in range(6, len):
|
|
@@ -18,7 +18,7 @@ class DefLib:
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
@classmethod
|
|
21
|
-
def _print(
|
|
21
|
+
def _print(cls, data):
|
|
22
22
|
for n in range(0, len(data)):
|
|
23
23
|
h = hex(data[n])
|
|
24
24
|
# print(h, end=" ")
|
|
@@ -26,7 +26,7 @@ class DefLib:
|
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
@classmethod
|
|
29
|
-
def constrain(
|
|
29
|
+
def constrain(cls, val , max, min):
|
|
30
30
|
if val > max:
|
|
31
31
|
val = max
|
|
32
32
|
if val < min:
|
|
@@ -35,7 +35,7 @@ class DefLib:
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
@classmethod
|
|
38
|
-
def comp(
|
|
38
|
+
def comp(cls, data):
|
|
39
39
|
data = data&0xFF
|
|
40
40
|
if data < 0:
|
|
41
41
|
return 256 + data
|
|
@@ -14,20 +14,23 @@ class IKeyEvent:
|
|
|
14
14
|
self.keyRight = True
|
|
15
15
|
if key == keyboard.Key.left:
|
|
16
16
|
self.keyLeft = True
|
|
17
|
-
|
|
17
|
+
|
|
18
|
+
char = getattr(key, 'char', None)
|
|
19
|
+
if char == "w":
|
|
18
20
|
self.keyGoUp = True
|
|
19
|
-
if
|
|
21
|
+
if char == "x":
|
|
20
22
|
self.keyGoDown = True
|
|
21
|
-
if
|
|
23
|
+
if char == "a":
|
|
22
24
|
self.keyLTurn = True
|
|
23
|
-
if
|
|
25
|
+
if char == "d":
|
|
24
26
|
self.keyRTurn = True
|
|
25
|
-
if
|
|
27
|
+
if char == "r":
|
|
26
28
|
self.keyRecording = True
|
|
27
|
-
if
|
|
29
|
+
if char == "s":
|
|
28
30
|
self.keyPicture = True
|
|
29
|
-
if
|
|
31
|
+
if char == "t":
|
|
30
32
|
self.keyTracking = True
|
|
33
|
+
|
|
31
34
|
if key == keyboard.Key.esc:
|
|
32
35
|
self.keyEsc = True
|
|
33
36
|
|
|
@@ -44,20 +47,23 @@ class IKeyEvent:
|
|
|
44
47
|
self.keyRight = False
|
|
45
48
|
if key == keyboard.Key.left:
|
|
46
49
|
self.keyLeft = False
|
|
47
|
-
|
|
50
|
+
|
|
51
|
+
char = getattr(key, 'char', None)
|
|
52
|
+
if char == "w":
|
|
48
53
|
self.keyGoUp = False
|
|
49
|
-
if
|
|
54
|
+
if char == "x":
|
|
50
55
|
self.keyGoDown = False
|
|
51
|
-
if
|
|
56
|
+
if char == "a":
|
|
52
57
|
self.keyLTurn = False
|
|
53
|
-
if
|
|
58
|
+
if char == "d":
|
|
54
59
|
self.keyRTurn = False
|
|
55
|
-
if
|
|
60
|
+
if char == "r":
|
|
56
61
|
self.keyRecording = False
|
|
57
|
-
if
|
|
62
|
+
if char == "s":
|
|
58
63
|
self.keyPicture = False
|
|
59
|
-
if
|
|
64
|
+
if char == "t":
|
|
60
65
|
self.keyTracking = False
|
|
66
|
+
|
|
61
67
|
if key == keyboard.Key.esc:
|
|
62
68
|
self.keyEsc = False
|
|
63
69
|
|
|
@@ -2,7 +2,7 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="pyaidrone",
|
|
5
|
-
version="2.
|
|
5
|
+
version="2.3",
|
|
6
6
|
description="Library for AIDrone Products",
|
|
7
7
|
long_description=open("README.md").read(), # README.md 내용을 long_description으로 사용
|
|
8
8
|
long_description_content_type="text/markdown", # README 파일이 markdown 형식임을 지정
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|