Browse Source

GCS_MAVLink: Do not compare delegate to NULL

Use the simpler "if (delegate_name)" since it allows simpler
implementation in the class, i.e. the bool operator rather than having
to compare to another object.
master
Lucas De Marchi 10 years ago committed by Andrew Tridgell
parent
commit
82d22992bd
  1. 2
      libraries/GCS_MAVLink/GCS_Common.cpp

2
libraries/GCS_MAVLink/GCS_Common.cpp

@ -840,7 +840,7 @@ GCS_MAVLINK::update(run_cli_fn run_cli) @@ -840,7 +840,7 @@ GCS_MAVLINK::update(run_cli_fn run_cli)
{
uint8_t c = comm_receive_ch(chan);
if (run_cli != NULL) {
if (run_cli) {
/* allow CLI to be started by hitting enter 3 times, if no
* heartbeat packets have been received */
if ((mavlink_active==0) && (hal.scheduler->millis() - _cli_timeout) < 20000 &&

Loading…
Cancel
Save