diff --git a/ArduCopterMega/GCS_Mavlink.pde b/ArduCopterMega/GCS_Mavlink.pde index 6a92293889..5216864337 100644 --- a/ArduCopterMega/GCS_Mavlink.pde +++ b/ArduCopterMega/GCS_Mavlink.pde @@ -1041,7 +1041,7 @@ void GCS_MAVLINK::_queued_send() { // Check to see if we are sending parameters - if (NULL != _queued_parameter && (requested_interface == chan) && mavdelay > 1) { + if (NULL != _queued_parameter && (requested_interface == (unsigned)chan) && mavdelay > 1) { AP_Var *vp; float value; @@ -1074,8 +1074,8 @@ GCS_MAVLINK::_queued_send() // request waypoints one by one // XXX note that this is pan-interface if (waypoint_receiving && - (requested_interface == chan) && - waypoint_request_i <= g.waypoint_total && + (requested_interface == (unsigned)chan) && + waypoint_request_i <= (unsigned)g.waypoint_total && mavdelay > 15) { // limits to 3.33 hz mavlink_msg_waypoint_request_send( diff --git a/ArduCopterMega/Log.pde b/ArduCopterMega/Log.pde index 9d7e7585a6..07427fcb1e 100644 --- a/ArduCopterMega/Log.pde +++ b/ArduCopterMega/Log.pde @@ -10,7 +10,7 @@ // These are function definitions so the Menu can be constructed before the functions // are defined below. Order matters to the compiler. -static int8_t print_log_menu(uint8_t argc, const Menu::arg *argv); +static bool print_log_menu(void); static int8_t dump_log(uint8_t argc, const Menu::arg *argv); static int8_t erase_logs(uint8_t argc, const Menu::arg *argv); static int8_t select_logs(uint8_t argc, const Menu::arg *argv); @@ -27,6 +27,7 @@ static int8_t help_log(uint8_t argc, const Menu::arg *argv) " enable | all\n" " disable | all\n" "\n")); + return 0; } // Creates a constant array of structs representing menu options @@ -164,7 +165,7 @@ select_logs(uint8_t argc, const Menu::arg *argv) // bits accordingly. // if (!strcasecmp_P(argv[1].str, PSTR("all"))) { - bits = ~(bits = 0); + bits = ~0; bits = bits ^ MASK_LOG_SET_DEFAULTS; } else { #define TARG(_s) if (!strcasecmp_P(argv[1].str, PSTR(#_s))) bits |= MASK_LOG_ ## _s @@ -753,7 +754,6 @@ void Log_Read(int start_page, int end_page) { byte data; byte log_step = 0; - int packet_count = 0; int page = start_page; DataFlash.StartRead(start_page); diff --git a/ArduCopterMega/commands_logic.pde b/ArduCopterMega/commands_logic.pde index eb399b96f3..d7260e7ae1 100644 --- a/ArduCopterMega/commands_logic.pde +++ b/ArduCopterMega/commands_logic.pde @@ -546,7 +546,7 @@ void do_yaw() bool verify_wait_delay() { //Serial.print("vwd"); - if ((millis() - condition_start) > condition_value){ + if ((unsigned)(millis() - condition_start) > condition_value){ //Serial.println("y"); condition_value = 0; return true; diff --git a/ArduCopterMega/radio.pde b/ArduCopterMega/radio.pde index 84c525707b..ce1b824036 100644 --- a/ArduCopterMega/radio.pde +++ b/ArduCopterMega/radio.pde @@ -152,7 +152,7 @@ void throttle_failsafe(uint16_t pwm) //check for failsafe and debounce funky reads // ------------------------------------------ - if (pwm < g.throttle_fs_value){ + if (pwm < (unsigned)g.throttle_fs_value){ // we detect a failsafe from radio // throttle has dropped below the mark failsafeCounter++; diff --git a/ArduCopterMega/setup.pde b/ArduCopterMega/setup.pde index 8239fce8e6..319a444fd4 100644 --- a/ArduCopterMega/setup.pde +++ b/ArduCopterMega/setup.pde @@ -69,6 +69,7 @@ setup_mode(uint8_t argc, const Menu::arg *argv) // Run the setup menu. When the menu exits, we will return to the main menu. setup_menu.run(); + return 0; } // Print the current configuration. diff --git a/ArduCopterMega/test.pde b/ArduCopterMega/test.pde index 20ec8d86b8..4b868242e2 100644 --- a/ArduCopterMega/test.pde +++ b/ArduCopterMega/test.pde @@ -85,6 +85,7 @@ test_mode(uint8_t argc, const Menu::arg *argv) { //Serial.printf_P(PSTR("Test Mode\n\n")); test_menu.run(); + return 0; } static int8_t