git.droids-corp.org
/
fpv.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
qtosd: port in pyqt5
[fpv.git]
/
qtosd
/
serialfpv.py
diff --git
a/qtosd/serialfpv.py
b/qtosd/serialfpv.py
index
6153a3d
..
f089d1c
100644
(file)
--- a/
qtosd/serialfpv.py
+++ b/
qtosd/serialfpv.py
@@
-49,7
+49,7
@@
class SerialFPV():
self.prev_reftime = None
self.data = ""
self.prev_reftime = None
self.data = ""
- def update(self):
+ def update
_state
(self):
# read from file/serial
while len(self.data) < 16384:
data = self.f.read(1024)
# read from file/serial
while len(self.data) < 16384:
data = self.f.read(1024)
@@
-75,7
+75,7
@@
class SerialFPV():
"\| magnet %s %s %s " % (FLOAT, FLOAT, FLOAT) +
"\| angles %s %s %s"% (FLOAT, FLOAT, FLOAT), l)
if m:
"\| magnet %s %s %s " % (FLOAT, FLOAT, FLOAT) +
"\| angles %s %s %s"% (FLOAT, FLOAT, FLOAT), l)
if m:
- cur_time = float(m.groups()[0]) /
2
0.
+ cur_time = float(m.groups()[0]) /
100
0.
# first time, init prev_time and prev_reftime
if self.realtime == False and self.prev_time == None:
self.prev_time = cur_time
# first time, init prev_time and prev_reftime
if self.realtime == False and self.prev_time == None:
self.prev_time = cur_time
@@
-88,7
+88,6
@@
class SerialFPV():
break
roll, pitch, yaw = (
map(lambda x: float(x), m.groups()[10:13]))
break
roll, pitch, yaw = (
map(lambda x: float(x), m.groups()[10:13]))
- print roll, pitch, yaw
self.roll = math.degrees(roll) + 180.
self.pitch = math.degrees(pitch)
self.yaw = math.degrees(yaw)
self.roll = math.degrees(roll) + 180.
self.pitch = math.degrees(pitch)
self.yaw = math.degrees(yaw)