Skip to content

Commit

Permalink
Server: Add set_z_offset_to_ground and reset_z_offset commands
Browse files Browse the repository at this point in the history
  • Loading branch information
goldarte committed Sep 30, 2019
1 parent 018f4f8 commit 5f0c78f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Server/server_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,8 @@ def init_ui(self):
self.ui.action_update_client_repo.triggered.connect(self.update_client_repo)
self.ui.action_set_start_to_current_position.triggered.connect(self.update_start_to_current_position)
self.ui.action_reset_start.triggered.connect(self.reset_start)
self.ui.action_set_z_offset_to_ground.triggered.connect(self.set_z_offset_to_ground)
self.ui.action_reset_z_offset.triggered.connect(self.reset_z_offset)
self.ui.action_select_music_file.triggered.connect(self.select_music_file)
self.ui.action_play_music.triggered.connect(self.play_music)
self.ui.action_test_music_after.triggered.connect(self.test_music_after)
Expand Down Expand Up @@ -373,6 +375,16 @@ def reset_start(self):
for copter in self.model.user_selected():
copter.client.send_message("reset_start")

@pyqtSlot()
def set_z_offset_to_ground(self):
for copter in self.model.user_selected():
copter.client.send_message("set_z_to_ground")

@pyqtSlot()
def reset_z_offset(self):
for copter in self.model.user_selected():
copter.client.send_message("reset_z_offset")

@pyqtSlot()
def select_music_file(self):
path = QFileDialog.getOpenFileName(self, "Select music file", filter="Music files (*.mp3)")[0]
Expand Down

0 comments on commit 5f0c78f

Please sign in to comment.