mirror of
https://github.com/OSURoboticsClub/Rover_2017_2018.git
synced 2025-11-08 18:21:15 +00:00
Corrected signal and emitter, and then changed emit value into floats
This commit is contained in:
@@ -4,11 +4,11 @@ import rospy
|
|||||||
|
|
||||||
|
|
||||||
class WaypointsCoordinator(QtCore.QThread):
|
class WaypointsCoordinator(QtCore.QThread):
|
||||||
new_manual_waypoint_entry = QtCore.pyqtSignal(str, str, str, int)
|
new_manual_waypoint_entry = QtCore.pyqtSignal(str, float, float, int)
|
||||||
update_waypoint_entry = QtCore.pyqtSignal(str, str, int)
|
update_waypoint_entry = QtCore.pyqtSignal(str, str, str, int)
|
||||||
|
|
||||||
def __init__(self, shared_objects):
|
def __init__(self, shared_objects):
|
||||||
super(WaypointsCoordinator, self).init()
|
super(WaypointsCoordinator, self).__init__()
|
||||||
self.run_thread_flag = True
|
self.run_thread_flag = True
|
||||||
|
|
||||||
self.shared_objects = shared_objects
|
self.shared_objects = shared_objects
|
||||||
@@ -48,27 +48,30 @@ class WaypointsCoordinator(QtCore.QThread):
|
|||||||
signals_and_slots_signal.connect(self.connect_signals_and_slots)
|
signals_and_slots_signal.connect(self.connect_signals_and_slots)
|
||||||
kill_signal.connect(self.on_kill_threads_requested_slot)
|
kill_signal.connect(self.on_kill_threads_requested_slot)
|
||||||
|
|
||||||
def on_kill_threads_requested__slot(self):
|
def on_kill_threads_requested_slot(self):
|
||||||
self.run_thread_flag = False
|
self.run_thread_flag = False
|
||||||
|
|
||||||
def update_manual_entry(self, name, lat, lng, table):
|
def update_manual_entry(self, name, lat, lng, table):
|
||||||
self.name_edit_label.readOnly(table % 2)
|
print name, lat, lng, table
|
||||||
|
self.name_edit_label.setReadOnly(table+1 % 2)
|
||||||
self.name_edit_label.setText(name)
|
self.name_edit_label.setText(name)
|
||||||
self.latitude_label.setText(lat)
|
self.latitude_label.setValue(lat)
|
||||||
self.longitude_label.set(lng)
|
self.longitude_label.setValue(lng)
|
||||||
|
|
||||||
def _on_nav_clicked(self, row, col):
|
def _on_nav_clicked(self, row, col):
|
||||||
self.update_waypoint_entry.emit(
|
print "nav" + str(row), str(col)
|
||||||
self.navigation_label.item(row, 0),
|
self.new_manual_waypoint_entry.emit(
|
||||||
self.navigation_label.item(row, 1),
|
self.navigation_label.item(row, 0).text(),
|
||||||
self.navigation_label.item(row, 2),
|
float(self.navigation_label.item(row, 1).text()),
|
||||||
|
float(self.navigation_label.item(row, 2).text()),
|
||||||
0
|
0
|
||||||
)
|
)
|
||||||
|
|
||||||
def _on_land_clicked(self, row, col):
|
def _on_land_clicked(self, row, col):
|
||||||
self.update_waypoint_entry.emit(
|
print "land" + str(row), str(col)
|
||||||
self.landmark_label.item(row, 0),
|
self.new_manual_waypoint_entry.emit(
|
||||||
self.landmark_label.item(row, 1),
|
self.landmark_label.item(row, 0).text(),
|
||||||
self.landmark_label.item(row, 2),
|
float(self.landmark_label.item(row, 1).text()),
|
||||||
|
float(self.landmark_label.item(row, 2).text()),
|
||||||
1
|
1
|
||||||
)
|
)
|
||||||
Reference in New Issue
Block a user