mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-13 18:14:19 -03:00
AP_Compass: fixes for merge with master
This commit is contained in:
parent
04430457d5
commit
bcd305c821
@ -112,7 +112,7 @@ bool AP_Compass_MMC3416::init()
|
|||||||
|
|
||||||
// call timer() at 100Hz
|
// call timer() at 100Hz
|
||||||
dev->register_periodic_callback(10000,
|
dev->register_periodic_callback(10000,
|
||||||
FUNCTOR_BIND_MEMBER(&AP_Compass_MMC3416::timer, bool));
|
FUNCTOR_BIND_MEMBER(&AP_Compass_MMC3416::timer, void));
|
||||||
|
|
||||||
// wait 250ms for the compass to make it's initial readings
|
// wait 250ms for the compass to make it's initial readings
|
||||||
hal.scheduler->delay(250);
|
hal.scheduler->delay(250);
|
||||||
@ -120,7 +120,7 @@ bool AP_Compass_MMC3416::init()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AP_Compass_MMC3416::timer()
|
void AP_Compass_MMC3416::timer()
|
||||||
{
|
{
|
||||||
const uint16_t measure_count_limit = 50;
|
const uint16_t measure_count_limit = 50;
|
||||||
const uint16_t zero_offset = 32768; // 16 bit mode
|
const uint16_t zero_offset = 32768; // 16 bit mode
|
||||||
@ -280,8 +280,6 @@ bool AP_Compass_MMC3416::timer()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -58,7 +58,7 @@ private:
|
|||||||
* Device periodic callback to read data from the sensor.
|
* Device periodic callback to read data from the sensor.
|
||||||
*/
|
*/
|
||||||
bool init();
|
bool init();
|
||||||
bool timer();
|
void timer();
|
||||||
void accumulate_field(Vector3f &field);
|
void accumulate_field(Vector3f &field);
|
||||||
|
|
||||||
uint8_t compass_instance;
|
uint8_t compass_instance;
|
||||||
|
Loading…
Reference in New Issue
Block a user