hi
i am diving into the Ardupilot code and i got a bit blocked on using the HAL library to get the attitude and gps data.
on some tutorial i have found it:
for the setup()
// Disable barometer to stop it corrupting bus
hal.gpio->pinMode(40, GPIO_OUTPUT);
hal.gpio->write(40, 1);
// Initialise MPU6050 sensor
ins.init(AP_InertialSensor::COLD_START,
AP_InertialSensor::RATE_100HZ,
NULL);
// Initialise MPU6050's internal sensor fusion (aka DigitalMotionProcessing)
hal.scheduler->suspend_timer_procs(); // stop bus collisions
ins.dmp_init();
ins.push_gyro_offsets_to_dmp();
hal.scheduler->resume_timer_procs();
and for accessing to the giro data the loop()
ins.get_gyro();
but i see somethings like "Disable baro to stop corrupting buss" I understand that there is a incompability with the baro and MPU6050 but i wonder how the official code handel it.
does the code do some kind of fussion with the baro , imu and gps data. if so how do i implement it ?
well as you can see i am a bit lost, so if some of you can give to me a hand on all of this, i would advanse much faster.
thanks, and sorry for my english
Replies
imu and baro are using the same spi bus.
I also wonder no one knows here