mirror of https://github.com/ArduPilot/ardupilot
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.
This commit is contained in:
parent
ff398dbf0c
commit
82d22992bd
|
@ -840,7 +840,7 @@ GCS_MAVLINK::update(run_cli_fn run_cli)
|
||||||
{
|
{
|
||||||
uint8_t c = comm_receive_ch(chan);
|
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
|
/* allow CLI to be started by hitting enter 3 times, if no
|
||||||
* heartbeat packets have been received */
|
* heartbeat packets have been received */
|
||||||
if ((mavlink_active==0) && (hal.scheduler->millis() - _cli_timeout) < 20000 &&
|
if ((mavlink_active==0) && (hal.scheduler->millis() - _cli_timeout) < 20000 &&
|
||||||
|
|
Loading…
Reference in New Issue