AP_RPM: example fix travis warning

missing function declaration
implicit cast
some style fix
This commit is contained in:
Pierre Kancir 2017-04-13 13:32:52 +02:00 committed by Francisco Ferreira
parent 7abd22a33e
commit 09364085ed

View File

@ -21,6 +21,9 @@
#include <AP_RPM/AP_RPM.h>
#include <AP_HAL/AP_HAL.h>
void setup();
void loop();
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
static AP_RPM RPM;
@ -39,7 +42,7 @@ void loop(void)
{
RPM.update();
for (uint8_t ii = 0; ii<RPM.num_sensors(); ii++) {
for (uint8_t ii = 0; ii < RPM.num_sensors(); ii++) {
// Determine sensor state
if (RPM.healthy(ii)) {
@ -54,9 +57,11 @@ void loop(void)
}
hal.console->printf("%u - (%c) RPM: %8.2f Quality: %.2f ",
ii, sensor_state, RPM.get_rpm(ii), RPM.get_signal_quality(ii));
ii, sensor_state,
(double)RPM.get_rpm(ii),
(double)RPM.get_signal_quality(ii));
if (ii+1<RPM.num_sensors()) {
if (ii+1 < RPM.num_sensors()) {
// Print a seperating bar if more sensors to process
hal.console->printf("| ");
}