mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 14:38:30 -04:00
AP_RPM: example fix travis warning
missing function declaration implicit cast some style fix
This commit is contained in:
parent
7abd22a33e
commit
09364085ed
@ -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("| ");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user