MAVLink app: Provide function for connected state

If we have not received an inbound heartbeat we are probably not connected and so user-facing output (which is even buffered) should go only out once we are connected.
This commit is contained in:
Lorenz Meier 2017-07-09 13:51:46 +02:00
parent 4ca7187e42
commit 5a8062e646
1 changed files with 2 additions and 0 deletions

View File

@ -214,6 +214,8 @@ public:
void set_config_link_on(bool on) { _config_link_on = on; }
bool is_connected() { return ((_rstatus.heartbeat_time > 0) && (hrt_absolute_time() - _rstatus.heartbeat_time < 3000000)); }
bool broadcast_enabled() { return _broadcast_mode > BROADCAST_MODE_OFF; }
/**