mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-04 13:55:40 +08:00
[fix] fix warning, missing include, and more configuration
This commit is contained in:
@@ -68,7 +68,7 @@ void uart_periph_set_baudrate(struct uart_periph* p, uint32_t baud) {
|
||||
uart_enable_interrupts(p);
|
||||
}
|
||||
|
||||
void uart_periph_set_bits_stop_parity(struct uart_periph* p, uint8_t __attribute__((unused)) bits, uint8_t __attribute__((unused)) stop, uint8_t __attribute__((unused)) parity) {
|
||||
void uart_periph_set_bits_stop_parity(struct uart_periph* __attribute__((unused)) p, uint8_t __attribute__((unused)) bits, uint8_t __attribute__((unused)) stop, uint8_t __attribute__((unused)) parity) {
|
||||
// TBD
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
#include <math.h>
|
||||
#include "imu_umarim.h"
|
||||
#include "mcu_periph/i2c.h"
|
||||
#include "led.h"
|
||||
#include "generated/airframe.h"
|
||||
|
||||
// Downlink
|
||||
#include "mcu_periph/uart.h"
|
||||
@@ -43,6 +43,11 @@
|
||||
#define DOWNLINK_DEVICE DOWNLINK_AP_DEVICE
|
||||
#endif
|
||||
|
||||
#ifndef UMARIM_ACCEL_RANGE
|
||||
#define UMARIM_ACCEL_RANGE ADXL345_RANGE_16G
|
||||
#endif
|
||||
PRINT_CONFIG_VAR(UMARIM_ACCEL_RANGE)
|
||||
|
||||
#ifndef UMARIM_ACCEL_RATE
|
||||
#define UMARIM_ACCEL_RATE ADXL345_RATE_50HZ
|
||||
#endif
|
||||
@@ -74,6 +79,7 @@ void imu_impl_init(void)
|
||||
adxl345_i2c_init(&imu_umarim.adxl, &(IMU_UMARIM_I2C_DEV), ADXL345_ADDR_ALT);
|
||||
// change the default data rate
|
||||
imu_umarim.adxl.config.rate = UMARIM_ACCEL_RATE;
|
||||
imu_umarim.adxl.config.range = UMARIM_ACCEL_RANGE;
|
||||
|
||||
imu_umarim.gyr_valid = FALSE;
|
||||
imu_umarim.acc_valid = FALSE;
|
||||
|
||||
@@ -74,6 +74,9 @@ uint8_t joystick_block;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined RADIO_CONTROL && defined RADIO_CONTROL_TYPE_DATALINK
|
||||
#include "subsystems/radio_control/rc_datalink.h"
|
||||
#endif
|
||||
|
||||
#define MOfCm(_x) (((float)(_x))/100.)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user