From daddb30698b03eebec9672222f2feba76a6831f7 Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Thu, 28 Dec 2017 03:53:17 +0300 Subject: [PATCH] simple_offboard: error on lack of mavros/state --- clever/src/simple_offboard.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clever/src/simple_offboard.py b/clever/src/simple_offboard.py index 63c0fc63..749c146a 100755 --- a/clever/src/simple_offboard.py +++ b/clever/src/simple_offboard.py @@ -307,7 +307,7 @@ handle_lock = Lock() def handle(req): global current_pub, current_msg, current_req - if not state.connected: + if not state or not state.connected: return {'message': 'No connection to the FCU'} if isinstance(req, srv.NavigateRequest) and req.speed <= 0: