mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-07 00:13:59 -04:00
AP_Compass: init never fails; return void rather than bool
This commit is contained in:
parent
d53f787a14
commit
f8be4efed4
@ -498,8 +498,7 @@ Compass::Compass(void)
|
|||||||
|
|
||||||
// Default init method
|
// Default init method
|
||||||
//
|
//
|
||||||
bool
|
void Compass::init()
|
||||||
Compass::init()
|
|
||||||
{
|
{
|
||||||
if (_compass_count == 0) {
|
if (_compass_count == 0) {
|
||||||
// detect available backends. Only called once
|
// detect available backends. Only called once
|
||||||
@ -518,7 +517,6 @@ Compass::init()
|
|||||||
for (uint8_t i=_compass_count; i<COMPASS_MAX_INSTANCES; i++) {
|
for (uint8_t i=_compass_count; i<COMPASS_MAX_INSTANCES; i++) {
|
||||||
_state[i].dev_id.set(0);
|
_state[i].dev_id.set(0);
|
||||||
}
|
}
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Register a new compass instance
|
// Register a new compass instance
|
||||||
|
@ -70,7 +70,7 @@ public:
|
|||||||
/// @returns True if the compass was initialized OK, false if it was not
|
/// @returns True if the compass was initialized OK, false if it was not
|
||||||
/// found or is not functioning.
|
/// found or is not functioning.
|
||||||
///
|
///
|
||||||
bool init();
|
void init();
|
||||||
|
|
||||||
/// Read the compass and update the mag_ variables.
|
/// Read the compass and update the mag_ variables.
|
||||||
///
|
///
|
||||||
|
Loading…
Reference in New Issue
Block a user