AP_InertialSensor: update to support esp32
- Remove whitespace - Remove instance checks in AP_InertialSensor_NONE timer update Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
This commit is contained in:
parent
062f82b3af
commit
732b074bee
@ -255,17 +255,10 @@ void AP_InertialSensor_NONE::generate_gyro()
|
||||
|
||||
void AP_InertialSensor_NONE::timer_update(void)
|
||||
{
|
||||
|
||||
uint64_t now = AP_HAL::micros64();
|
||||
|
||||
static uint64_t last_msg_sent = 0;
|
||||
if (now > last_msg_sent + 2000000) { //2sec= 2000ms = 2000000us
|
||||
//gcs().send_text(MAV_SEVERITY_WARNING, "NO IMU FOUND");
|
||||
DEV_PRINTF("INS: NO IMU FOUND\n");
|
||||
last_msg_sent = now;
|
||||
}
|
||||
if (now >= next_accel_sample) {
|
||||
if (((1U << accel_instance) ) == 0) {
|
||||
{
|
||||
generate_accel();
|
||||
if (next_accel_sample == 0) {
|
||||
next_accel_sample = now + 1000000UL / accel_sample_hz;
|
||||
@ -277,7 +270,7 @@ void AP_InertialSensor_NONE::timer_update(void)
|
||||
}
|
||||
}
|
||||
if (now >= next_gyro_sample) {
|
||||
if (((1U << gyro_instance) ) == 0) {
|
||||
{
|
||||
generate_gyro();
|
||||
if (next_gyro_sample == 0) {
|
||||
next_gyro_sample = now + 1000000UL / gyro_sample_hz;
|
||||
|
Loading…
Reference in New Issue
Block a user