aerofc: add some fixes to adc driver

- Other channels are irrelevant since they aren't physically
    connected. Avoid the I2C transaction to get invalid data
  - Port the driver to use only one address, as it should be
  - Minor changes here and there
  - Add test() method to read the latest value - helpful during
    debugging.
This commit is contained in:
Lucas De Marchi
2016-12-26 16:11:33 +01:00
committed by Lorenz Meier
parent 53f2c1eb19
commit 0341af4858
2 changed files with 72 additions and 52 deletions
+1 -1
View File
@@ -99,7 +99,7 @@
* ADC defines just to not break sensors.cpp build, battery voltage and current
* will be read in another way in future.
*/
#define ADC_BATTERY_VOLTAGE_CHANNEL 5
#define ADC_BATTERY_VOLTAGE_CHANNEL 1
#define ADC_BATTERY_CURRENT_CHANNEL ((uint8_t)(-1))
#define DIRECT_PWM_OUTPUT_CHANNELS 1