diff --git a/sw/airborne/boards/booz_1.0.h b/sw/airborne/boards/booz_1.0.h index db7e8069b6..2d6d2a5b8a 100644 --- a/sw/airborne/boards/booz_1.0.h +++ b/sw/airborne/boards/booz_1.0.h @@ -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) diff --git a/sw/airborne/boards/hb_1.1.h b/sw/airborne/boards/hb_1.1.h index 317efcffc8..4599681f72 100644 --- a/sw/airborne/boards/hb_1.1.h +++ b/sw/airborne/boards/hb_1.1.h @@ -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) diff --git a/sw/airborne/boards/lisa_l_1.0.h b/sw/airborne/boards/lisa_l_1.0.h index 0923a56a40..5cf7ef8e27 100644 --- a/sw/airborne/boards/lisa_l_1.0.h +++ b/sw/airborne/boards/lisa_l_1.0.h @@ -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 diff --git a/sw/airborne/boards/lisa_m_1.0.h b/sw/airborne/boards/lisa_m_1.0.h index a9dfc3bff4..fbc668aae8 100644 --- a/sw/airborne/boards/lisa_m_1.0.h +++ b/sw/airborne/boards/lisa_m_1.0.h @@ -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 */ diff --git a/sw/airborne/boards/navgo_1.0.h b/sw/airborne/boards/navgo_1.0.h index da87c56b1c..17a6fbf118 100644 --- a/sw/airborne/boards/navgo_1.0.h +++ b/sw/airborne/boards/navgo_1.0.h @@ -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) diff --git a/sw/airborne/boards/tiny_0.99.h b/sw/airborne/boards/tiny_0.99.h index a2891e70f7..f618356e65 100644 --- a/sw/airborne/boards/tiny_0.99.h +++ b/sw/airborne/boards/tiny_0.99.h @@ -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) diff --git a/sw/airborne/boards/tiny_1.1.h b/sw/airborne/boards/tiny_1.1.h index bec08225e0..d24360cb36 100644 --- a/sw/airborne/boards/tiny_1.1.h +++ b/sw/airborne/boards/tiny_1.1.h @@ -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) diff --git a/sw/airborne/boards/tiny_2.0.h b/sw/airborne/boards/tiny_2.0.h index 23bc02f777..1e2c48ead0 100644 --- a/sw/airborne/boards/tiny_2.0.h +++ b/sw/airborne/boards/tiny_2.0.h @@ -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 diff --git a/sw/airborne/boards/tiny_2.1.h b/sw/airborne/boards/tiny_2.1.h index 772834da7c..d80dad8efa 100644 --- a/sw/airborne/boards/tiny_2.1.h +++ b/sw/airborne/boards/tiny_2.1.h @@ -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) diff --git a/sw/airborne/boards/tiny_sim.h b/sw/airborne/boards/tiny_sim.h index ff3845ca86..0c6fc3da1c 100644 --- a/sw/airborne/boards/tiny_sim.h +++ b/sw/airborne/boards/tiny_sim.h @@ -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) diff --git a/sw/airborne/boards/umarim_1.0.h b/sw/airborne/boards/umarim_1.0.h index f4c87cbb96..eb47a0545c 100644 --- a/sw/airborne/boards/umarim_1.0.h +++ b/sw/airborne/boards/umarim_1.0.h @@ -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)