mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-03 06:28:27 -04:00
AP_Rangefinder: example fix travis warning
missing function declaration implicit cast some style fix
This commit is contained in:
parent
09364085ed
commit
4a2b90b707
@ -5,6 +5,9 @@
|
|||||||
#include <AP_HAL/AP_HAL.h>
|
#include <AP_HAL/AP_HAL.h>
|
||||||
#include <AP_RangeFinder/AP_RangeFinder.h>
|
#include <AP_RangeFinder/AP_RangeFinder.h>
|
||||||
|
|
||||||
|
void setup();
|
||||||
|
void loop();
|
||||||
|
|
||||||
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
const AP_HAL::HAL& hal = AP_HAL::get_HAL();
|
||||||
|
|
||||||
static AP_SerialManager serial_manager;
|
static AP_SerialManager serial_manager;
|
||||||
@ -17,8 +20,8 @@ void setup()
|
|||||||
|
|
||||||
// setup for analog pin 13
|
// setup for analog pin 13
|
||||||
AP_Param::set_object_value(&sonar, sonar.var_info, "_TYPE", RangeFinder::RangeFinder_TYPE_PLI2C);
|
AP_Param::set_object_value(&sonar, sonar.var_info, "_TYPE", RangeFinder::RangeFinder_TYPE_PLI2C);
|
||||||
AP_Param::set_object_value(&sonar, sonar.var_info, "_PIN", -1);
|
AP_Param::set_object_value(&sonar, sonar.var_info, "_PIN", -1.0f);
|
||||||
AP_Param::set_object_value(&sonar, sonar.var_info, "_SCALING", 1.0);
|
AP_Param::set_object_value(&sonar, sonar.var_info, "_SCALING", 1.0f);
|
||||||
|
|
||||||
// initialise sensor, delaying to make debug easier
|
// initialise sensor, delaying to make debug easier
|
||||||
hal.scheduler->delay(2000);
|
hal.scheduler->delay(2000);
|
||||||
|
Loading…
Reference in New Issue
Block a user