mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-20 19:36:19 +08:00
allow definition of ADC_CHANNEL_VSUPPLY in firmware section of airframe file
This commit is contained in:
@@ -91,11 +91,14 @@
|
||||
#endif
|
||||
|
||||
/* battery */
|
||||
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
|
||||
#ifndef ADC_CHANNEL_VSUPPLY
|
||||
#define ADC_CHANNEL_VSUPPLY AdcBank0(2)
|
||||
#ifndef USE_AD0
|
||||
#define USE_AD0
|
||||
#endif
|
||||
#define USE_AD0_2
|
||||
#endif
|
||||
|
||||
#define DefaultVoltageOfAdc(adc) (0.0183*adc)
|
||||
|
||||
|
||||
@@ -114,11 +114,14 @@
|
||||
#define USE_AD1_4
|
||||
#endif
|
||||
|
||||
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
|
||||
#ifndef ADC_CHANNEL_VSUPPLY
|
||||
#define ADC_CHANNEL_VSUPPLY AdcBank1(6)
|
||||
#ifndef USE_AD1
|
||||
#define USE_AD1
|
||||
#endif
|
||||
#define USE_AD1_6
|
||||
#endif
|
||||
|
||||
|
||||
#define DefaultVoltageOfAdc(adc) (0.032362123*adc)
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
|
||||
|
||||
/* PA0 - ADC0 */
|
||||
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
|
||||
#ifndef ADC_CHANNEL_VSUPPLY
|
||||
#define ADC_CHANNEL_VSUPPLY 2
|
||||
#endif
|
||||
#define DefaultVoltageOfAdc(adc) (0.0059*adc)
|
||||
/* Onboard ADCs */
|
||||
#define BOARD_ADC_CHANNEL_1 ADC_Channel_8
|
||||
|
||||
@@ -30,8 +30,10 @@
|
||||
#define IMU_ACC_DRDY_GPIO GPIOB
|
||||
#define IMU_ACC_DRDY_GPIO_PORTSOURCE GPIO_PortSourceGPIOB
|
||||
|
||||
|
||||
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
|
||||
#ifndef ADC_CHANNEL_VSUPPLY
|
||||
#define ADC_CHANNEL_VSUPPLY 2
|
||||
#endif
|
||||
#define DefaultVoltageOfAdc(adc) (0.00485*adc)
|
||||
|
||||
/* Onboard ADCs */
|
||||
|
||||
@@ -43,11 +43,14 @@
|
||||
/* ADC */
|
||||
|
||||
/* battery */
|
||||
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
|
||||
#ifndef ADC_CHANNEL_VSUPPLY
|
||||
#define ADC_CHANNEL_VSUPPLY AdcBank1(3)
|
||||
#ifndef USE_AD1
|
||||
#define USE_AD1
|
||||
#endif
|
||||
#define USE_AD1_3
|
||||
#endif
|
||||
|
||||
#define DefaultVoltageOfAdc(adc) (0.01837*adc)
|
||||
|
||||
|
||||
@@ -116,11 +116,14 @@
|
||||
#define USE_AD1_2
|
||||
#endif
|
||||
|
||||
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
|
||||
#ifndef ADC_CHANNEL_VSUPPLY
|
||||
#define ADC_CHANNEL_VSUPPLY AdcBank1(6)
|
||||
#ifndef USE_AD1
|
||||
#define USE_AD1
|
||||
#endif
|
||||
#define USE_AD1_6
|
||||
#endif
|
||||
|
||||
#define DefaultVoltageOfAdc(adc) (0.01787109375*adc)
|
||||
|
||||
|
||||
@@ -124,11 +124,14 @@
|
||||
#define USE_AD1_5
|
||||
#endif
|
||||
|
||||
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
|
||||
#ifndef ADC_CHANNEL_VSUPPLY
|
||||
#define ADC_CHANNEL_VSUPPLY AdcBank1(6)
|
||||
#ifndef USE_AD1
|
||||
#define USE_AD1
|
||||
#endif
|
||||
#define USE_AD1_6
|
||||
#endif
|
||||
|
||||
#define DefaultVoltageOfAdc(adc) (0.01787109375*adc)
|
||||
|
||||
|
||||
@@ -122,11 +122,14 @@
|
||||
#define USE_AD1_3
|
||||
#endif
|
||||
|
||||
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
|
||||
#ifndef ADC_CHANNEL_VSUPPLY
|
||||
#define ADC_CHANNEL_VSUPPLY AdcBank1(5)
|
||||
#ifndef USE_AD1
|
||||
#define USE_AD1
|
||||
#endif
|
||||
#define USE_AD1_5
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef VoltageOfAdc
|
||||
|
||||
@@ -148,11 +148,14 @@
|
||||
#define USE_AD1_3
|
||||
#endif
|
||||
|
||||
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
|
||||
#ifndef ADC_CHANNEL_VSUPPLY
|
||||
#define ADC_CHANNEL_VSUPPLY AdcBank1(5)
|
||||
#ifndef USE_AD1
|
||||
#define USE_AD1
|
||||
#endif
|
||||
#define USE_AD1_5
|
||||
#endif
|
||||
|
||||
|
||||
#define DefaultVoltageOfAdc(adc) (0.01787109375*adc)
|
||||
|
||||
@@ -122,11 +122,14 @@
|
||||
#endif
|
||||
|
||||
/* #define ADC_3 AdcBank1(7) Used for VSUPPLY */
|
||||
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
|
||||
#ifndef ADC_CHANNEL_VSUPPLY
|
||||
#define ADC_CHANNEL_VSUPPLY AdcBank1(7)
|
||||
#ifndef USE_AD1
|
||||
#define USE_AD1
|
||||
#endif
|
||||
#define USE_AD1_7
|
||||
#endif
|
||||
|
||||
|
||||
#define DefaultVoltageOfAdc(adc) (0.01787109375*adc)
|
||||
|
||||
@@ -78,11 +78,14 @@
|
||||
|
||||
|
||||
/* battery */
|
||||
/* allow to define ADC_CHANNEL_VSUPPLY in the airframe file*/
|
||||
#ifndef ADC_CHANNEL_VSUPPLY
|
||||
#define ADC_CHANNEL_VSUPPLY AdcBank0(2)
|
||||
#ifndef USE_AD0
|
||||
#define USE_AD0
|
||||
#endif
|
||||
#define USE_AD0_2
|
||||
#endif
|
||||
|
||||
#define DefaultVoltageOfAdc(adc) (0.0247*adc)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user