mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 06:13:35 +08:00
linux boards (ocpoc, bbblue, navio2) replace custom adc drivers with simple px4_arch implementation
This commit is contained in:
@@ -39,27 +39,17 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef BOARD_CONFIG_H
|
||||
#define BOARD_CONFIG_H
|
||||
|
||||
#define BOARD_OVERRIDE_UUID "BBBLUEID00000000" // must be of length 16
|
||||
#define PX4_SOC_ARCH_ID PX4_SOC_ARCH_ID_BBBLUE
|
||||
|
||||
#define BOARD_BATTERY1_V_DIV (11.0f)
|
||||
//#define BOARD_BATTERY1_A_PER_V (15.391030303f)
|
||||
|
||||
// Battery ADC channels
|
||||
#define ADC_BATTERY_VOLTAGE_CHANNEL 5
|
||||
#define ADC_BATTERY_CURRENT_CHANNEL ((uint8_t)(-1))
|
||||
#define ADC_AIRSPEED_VOLTAGE_CHANNEL ((uint8_t)(-1))
|
||||
|
||||
#define BOARD_HAS_NO_BOOTLOADER
|
||||
|
||||
#define BOARD_MAX_LEDS 4 // Number external of LED's this board has
|
||||
|
||||
/*
|
||||
* I2C busses
|
||||
*/
|
||||
|
||||
// I2C
|
||||
#define PX4_I2C_BUS_EXPANSION 1 // i2c-1: pins P9 17,18
|
||||
#define PX4_I2C_BUS_ONBOARD 2 // i2c-2: pins P9 19,20 - bmp280, mpu9250
|
||||
|
||||
@@ -68,6 +58,14 @@
|
||||
#define PX4_I2C_OBDEV_MPU9250 0x68
|
||||
#define PX4_I2C_OBDEV_BMP280 0x76
|
||||
|
||||
|
||||
// ADC channels:
|
||||
#define ADC_CHANNELS (1 << 5)
|
||||
|
||||
#define ADC_BATTERY_VOLTAGE_CHANNEL 5
|
||||
#define ADC_BATTERY_CURRENT_CHANNEL ((uint8_t)(-1))
|
||||
|
||||
|
||||
#include <system_config.h>
|
||||
#include <px4_platform_common/board_common.h>
|
||||
|
||||
@@ -87,8 +85,6 @@ void rc_cleaning(void);
|
||||
#define rc_i2c_unlock_bus rc_i2c_release_bus
|
||||
#define rc_i2c_get_lock rc_i2c_get_in_use_state
|
||||
|
||||
#define rc_adc_read_raw rc_adc_raw
|
||||
|
||||
#define rc_servo_send_pulse_us rc_send_servo_pulse_us
|
||||
|
||||
#define rc_filter_empty rc_empty_filter
|
||||
@@ -99,4 +95,3 @@ void rc_cleaning(void);
|
||||
|
||||
#endif
|
||||
|
||||
#endif // BOARD_CONFIG_H
|
||||
|
||||
Reference in New Issue
Block a user