Browse Source

AP_ADC: fix warning on printf

../../libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp: In function ‘void show_timing()’:
../../libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp:61:88: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 3 has type ‘uint32_t {aka unsigned int}’ [-Wformat=]
     hal.console->printf("timing: mint=%lu maxt=%lu avg=%lu\n", mint, maxt, totalt/count);
                                                                                        ^
../../libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp:61:88: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘uint32_t {aka unsigned int}’ [-Wformat=]
../../libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp:61:88: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘uint32_t {aka unsigned int}’ [-Wformat=]
mission-4.1.18
Lucas De Marchi 9 years ago
parent
commit
b5d3094738
  1. 2
      libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp

2
libraries/AP_ADC/examples/AP_ADC_test/AP_ADC_test.cpp

@ -58,7 +58,7 @@ static void show_timing() @@ -58,7 +58,7 @@ static void show_timing()
count++;
} while ((AP_HAL::millis() - start_time) < 5000);
hal.console->printf("timing: mint=%lu maxt=%lu avg=%lu\n", mint, maxt, totalt/count);
hal.console->printf("timing: mint=%u maxt=%u avg=%u\n", mint, maxt, totalt/count);
}
static void show_data()

Loading…
Cancel
Save