Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions src/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
from pyulog.core import ULog
from pyqtgraph.Qt import QtCore, QtGui
import pyqtgraph as pg
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You add this, but it seems that you didn't use it.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry it is my mistake.

from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar


sys.path.append(os.path.dirname(os.path.abspath(__file__)))

Expand Down Expand Up @@ -338,9 +341,11 @@ def animation_update(self):
start, end = self.ROI_region.getRegion()
t = self.current_time + start
# emit data

indexes = list(map(self.getIndex, [self.time_stamp_position, self.time_stamp_attitude, self.time_stamp_output], [t, t, t]))
state_data = [self.position_history[indexes[0]],
self.attitude_history[indexes[1]], self.output_history[indexes[2]]]

self.quadrotorStateChanged.emit(state_data)
# update slider
self.time_slider.setValue(int(dV * (self.current_time + start - self.time_range[0])))
Expand All @@ -354,9 +359,11 @@ def animation_update(self):
t = self.current_time + self.time_range[0]
self.time_slider.setValue(int(dV * self.current_time))
# update quadrotor position and attitude and motor speed

indexes = list(map(self.getIndex, [self.time_stamp_position, self.time_stamp_attitude, self.time_stamp_output], [t, t, t]))
state_data = [self.position_history[indexes[0]],
self.attitude_history[indexes[1]], self.output_history[indexes[2]]]

self.quadrotorStateChanged.emit(state_data)
# update vLine pos
self.vLine.setPos(t)
Expand Down Expand Up @@ -669,6 +676,13 @@ def __init__(self, loading_widget, parent=None, *args, **kwargs):
self.dialog.hide()
self.loading_widget = loading_widget
self.loading_widget.loadFinished.connect(self.callback_close)


#self.connect(self.lineedit, SIGNAL("returnProcessed()"), self.updateUi)
#self.lineedit.returnPressed.connect(self.updateUi)

#self..connect(self.loading_widget,QtCore.SIGNAL('loadFinished(bool)'),self.callback_close)


def run(self):
self.dialog.setText('Loading...')
Expand Down
7 changes: 7 additions & 0 deletions src/widgets.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@
from objloader import WFObject
import numpy as np


//from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavigationToolbar




try:
from OpenGL.GL import *
from OpenGL.GLUT import *
Expand Down