Skip to content

Commit

Permalink
Client: Add position responce request
Browse files Browse the repository at this point in the history
  • Loading branch information
goldarte committed Sep 19, 2019
1 parent 130ca78 commit 23cf5bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Drone/copter_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,12 @@ def _response_sys_status():
def _response_cal_status():
return get_calibration_status()

@messaging.request_callback("position")
def _response_position():
telem = FlightLib.get_telemetry(client.active_client.FRAME_ID)
return "{:.1f} {:.1f} {:.1f} {:.1f} {}".format(
telem.x, telem.y, telem.z, math.degrees(telem.yaw), client.active_client.FRAME_ID)

@messaging.request_callback("calibrate_gyro")
def _calibrate_gyro():
calibrate('gyro')
Expand Down

0 comments on commit 23cf5bf

Please sign in to comment.