Skip to content

Commit

Permalink
Client: modify calibration response and reduce timeout in service check
Browse files Browse the repository at this point in the history
  • Loading branch information
goldarte committed Oct 25, 2019
1 parent 1adade0 commit d33cc0c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Drone/FlightLib/FlightLib.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def _check_nans(*values):

@check("Ros services")
def check_ros_services():
timeout = 5.0
timeout = 0.1
for service in services_list:
try:
service.wait_for_service(timeout=timeout)
Expand Down
6 changes: 5 additions & 1 deletion Drone/copter_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,11 @@ def _response_sys_status(*args, **kwargs):

@messaging.request_callback("cal_status")
def _response_cal_status(*args, **kwargs):
return get_calibration_status()
if check_state_topic(wait_new_status=True):
return get_calibration_status()
else:
stop_subscriber()
return "NOT_CONNECTED_TO_FCU"

@messaging.request_callback("position")
def _response_position(*args, **kwargs):
Expand Down

0 comments on commit d33cc0c

Please sign in to comment.