From 965a6a57192d227c01f7e5228d914ed3e1804e34 Mon Sep 17 00:00:00 2001 From: murata Date: Sat, 29 Oct 2016 01:40:07 +0900 Subject: [PATCH] Copter: To nullptr from NULL. --- ArduCopter/GCS_Mavlink.cpp | 6 +++--- ArduCopter/setup.cpp | 2 +- ArduCopter/system.cpp | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/ArduCopter/GCS_Mavlink.cpp b/ArduCopter/GCS_Mavlink.cpp index 016635bebf..18bdf0bc8f 100644 --- a/ArduCopter/GCS_Mavlink.cpp +++ b/ArduCopter/GCS_Mavlink.cpp @@ -692,7 +692,7 @@ GCS_MAVLINK_Copter::data_stream_send(void) copter.gcs_out_of_time = false; - if (_queued_parameter != NULL) { + if (_queued_parameter != nullptr) { if (streamRates[STREAM_PARAMS].get() <= 0) { streamRates[STREAM_PARAMS].set(10); } @@ -2060,9 +2060,9 @@ void Copter::gcs_check_input(void) for (uint8_t i=0; iprintf("no channels chosen"); //cliSerial->printf("\n%d\n",set_mask); diff --git a/ArduCopter/system.cpp b/ArduCopter/system.cpp index 60f6a48651..23411cee27 100644 --- a/ArduCopter/system.cpp +++ b/ArduCopter/system.cpp @@ -50,7 +50,7 @@ void Copter::run_cli(AP_HAL::UARTDriver *port) port->set_blocking_writes(true); // disable the mavlink delay callback - hal.scheduler->register_delay_callback(NULL, 5); + hal.scheduler->register_delay_callback(nullptr, 5); // disable main_loop failsafe failsafe_disable(); @@ -228,10 +228,10 @@ void Copter::init_ardupilot() if (g.cli_enabled) { const char *msg = "\nPress ENTER 3 times to start interactive setup\n"; cliSerial->println(msg); - if (gcs[1].initialised && (gcs[1].get_uart() != NULL)) { + if (gcs[1].initialised && (gcs[1].get_uart() != nullptr)) { gcs[1].get_uart()->println(msg); } - if (num_gcs > 2 && gcs[2].initialised && (gcs[2].get_uart() != NULL)) { + if (num_gcs > 2 && gcs[2].initialised && (gcs[2].get_uart() != nullptr)) { gcs[2].get_uart()->println(msg); } }