Skip to content

Commit

Permalink
[boards] Fix PX4FMu ADC defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
fvantienen committed Mar 5, 2019
1 parent 60d0769 commit 4f54ae0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions sw/airborne/boards/px4fmu/chibios/v4.0/px4fmu.h
Expand Up @@ -88,9 +88,14 @@
#define ADC_CHANNEL_VSUPPLY ADC_1
#endif

/* allow to define ADC_CHANNEL_CURRENT in the airframe file*/
#ifndef ADC_CHANNEL_CURRENT
#define ADC_CHANNEL_CURRENT ADC_2
#endif

/* Default powerbrick values */
#define DefaultVoltageOfAdc(adc) ((3.3f/4096.0f) * 13.653333333f * adc)
#define MilliAmpereOfAdc(adc) ((3.3f/4096.0f) * 36.367515152f * adc)
#define DefaultVoltageOfAdc(adc) ((3.3f/4096.0f) * 10.27708149f * adc)
#define MilliAmpereOfAdc(adc) ((3.3f/4096.0f) * 36367.51556f * adc)

/*
* PWM defines TODO
Expand Down

0 comments on commit 4f54ae0

Please sign in to comment.