mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-23 04:45:37 +08:00
really updating navgo and umarim imu drivers
This commit is contained in:
@@ -74,13 +74,16 @@ void imu_impl_init(void)
|
||||
void imu_periodic( void )
|
||||
{
|
||||
// Start reading the latest gyroscope data
|
||||
itg3200_periodic();
|
||||
Itg3200Periodic();
|
||||
|
||||
// Start reading the latest accelerometer data
|
||||
adxl345_periodic();
|
||||
// Periodicity is automatically adapted
|
||||
// 3200 is the maximum output freq corresponding to the parameter 0xF
|
||||
// A factor 2 is applied to reduice the delay without overloading the i2c
|
||||
RunOnceEvery((PERIODIC_FREQUENCY/(2*3200>>(0xf-ADXL345_BW_RATE))),Adxl345Periodic());
|
||||
|
||||
// Read HMC58XX at 50Hz (main loop for rotorcraft: 512Hz)
|
||||
RunOnceEvery(10,hmc58xx_periodic());
|
||||
// Read HMC58XX at 100Hz (main loop for rotorcraft: 512Hz)
|
||||
RunOnceEvery(5,Hmc58xxPeriodic());
|
||||
|
||||
//RunOnceEvery(20,imu_navgo_downlink_raw());
|
||||
}
|
||||
|
||||
@@ -51,6 +51,16 @@
|
||||
|
||||
#define DefaultVoltageOfAdc(adc) (0.01837*adc)
|
||||
|
||||
/* SPI (SSP) */
|
||||
#define SPI_SELECT_SLAVE0_PORT 0
|
||||
#define SPI_SELECT_SLAVE0_PIN 20
|
||||
|
||||
#define SPI1_DRDY_PINSEL PINSEL1
|
||||
#define SPI1_DRDY_PINSEL_BIT 0
|
||||
#define SPI1_DRDY_PINSEL_VAL 1
|
||||
#define SPI1_DRDY_EINT 0
|
||||
#define SPI1_DRDY_VIC_IT VIC_EINT0
|
||||
|
||||
/* PWM0 (internal PWM5) */
|
||||
/* P0.21 */
|
||||
#define PWM0_PINSEL PINSEL1
|
||||
@@ -65,4 +75,4 @@
|
||||
|
||||
#define BOARD_HAS_BARO
|
||||
|
||||
#endif /* CONFIG_UMARIM_V1_0_H */
|
||||
#endif /* CONFIG_NAVGO_V1_0_H */
|
||||
|
||||
@@ -69,10 +69,10 @@ void imu_impl_init(void)
|
||||
void imu_periodic( void )
|
||||
{
|
||||
// Start reading the latest gyroscope data
|
||||
itg3200_periodic();
|
||||
Itg3200Periodic();
|
||||
|
||||
// Start reading the latest accelerometer data
|
||||
adxl345_periodic();
|
||||
Adxl345Periodic();
|
||||
|
||||
//RunOnceEvery(10,imu_umarim_downlink_raw());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user