mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 10:44:08 +08:00
MindPX: Support RSSI.
This commit is contained in:
parent
d8ac044414
commit
2b23835d56
@ -170,13 +170,14 @@
|
||||
*
|
||||
* These are the channel numbers of the ADCs of the microcontroller that can be used by the Px4 Firmware in the adc driver
|
||||
*/
|
||||
#define ADC_CHANNELS (1 << 2) | (1 << 3) | (1 << 4) | (1 << 10) | (1 << 11) | (1 << 12) | (1 << 13) | (1 << 14) | (1 << 15)
|
||||
#define ADC_CHANNELS (1 << 4) | (1 << 10) | (1 << 11) | (1 << 12) | (1 << 13) | (1 << 14) | (1 << 15)
|
||||
|
||||
// ADC defines to be used in sensors.cpp to read from a particular channel
|
||||
#define ADC_BATTERY_VOLTAGE_CHANNEL 3
|
||||
#define ADC_BATTERY_CURRENT_CHANNEL 2
|
||||
#define ADC_5V_RAIL_SENSE 4
|
||||
#define ADC_AIRSPEED_VOLTAGE_CHANNEL 15
|
||||
#define ADC_5V_RAIL_SENSE 4
|
||||
#define ADC_BATTERY_CURRENT_CHANNEL 10
|
||||
#define ADC_BATTERY_VOLTAGE_CHANNEL 12
|
||||
#define ADC_RC_RSSI_CHANNEL 11
|
||||
#define ADC_AIRSPEED_VOLTAGE_CHANNEL 15
|
||||
|
||||
/* User GPIOs
|
||||
*
|
||||
@ -284,6 +285,7 @@
|
||||
|
||||
#define RC_SERIAL_PORT "/dev/ttyS0"
|
||||
|
||||
// #define GPIO_RSSI_IN (GPIO_INPUT|GPIO_PULLUP|GPIO_PORTC|GPIO_PIN1)
|
||||
#define GPIO_SBUS_INV (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTA|GPIO_PIN10)
|
||||
#define INVERT_RC_INPUT(_s) px4_arch_gpiowrite(GPIO_SBUS_INV, _s);
|
||||
|
||||
|
||||
@ -164,14 +164,11 @@ __EXPORT int matherr(struct exception *e)
|
||||
|
||||
__EXPORT int nsh_archinitialize(void)
|
||||
{
|
||||
|
||||
/* configure ADC pins */
|
||||
px4_arch_configgpio(GPIO_ADC1_IN3); /* BATT_VOLTAGE_SENS */
|
||||
px4_arch_configgpio(GPIO_ADC1_IN2); /* BATT_CURRENT_SENS */
|
||||
px4_arch_configgpio(GPIO_ADC1_IN4); /* VDD_5V_SENS */
|
||||
px4_arch_configgpio(GPIO_ADC1_IN10); /* used by VBUS valid */
|
||||
// px4_arch_configgpio(GPIO_ADC1_IN11); /* unused */
|
||||
// px4_arch_configgpio(GPIO_ADC1_IN12); /* used by MPU6000 CS */
|
||||
px4_arch_configgpio(GPIO_ADC1_IN10); /* BATT_CURRENT_SENS */
|
||||
px4_arch_configgpio(GPIO_ADC1_IN12); /* BATT_VOLTAGE_SENS */
|
||||
px4_arch_configgpio(GPIO_ADC1_IN11); /* RSSI analog in */
|
||||
px4_arch_configgpio(GPIO_ADC1_IN13); /* FMU_AUX_ADC_1 */
|
||||
px4_arch_configgpio(GPIO_ADC1_IN14); /* FMU_AUX_ADC_2 */
|
||||
px4_arch_configgpio(GPIO_ADC1_IN15); /* PRESSURE_SENS */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user