Commit Graph

9 Commits

Author SHA1 Message Date
Andrew Tridgell b1c27407a2 AP_HAL: added voltage_average() interface to AnalogIn
returns voltage in Volts, using averaged reading over samples.

Where possible this should be auto-scaled against a known reference
voltage
2013-03-03 16:16:01 +11:00
Pat Hickey 087b1fa196 AP_HAL_AVR: AnalogIn returns new ADCSource each time a channel is requested
* fixes a bug where multiple sources created as pin -1, then change to
  appropriate pin on mavlink messages. Make treat each creation as distinct
  object.
2012-12-20 14:52:32 +11:00
Pat Hickey 13f7bd1723 AP_HAL_AVR: AnalogIn supports read_average & read_latest 2012-12-20 14:51:34 +11:00
Pat Hickey 2ee214ee36 AP_HAL_AVR: AnalogIn uses only sized int types 2012-12-20 14:51:33 +11:00
Pat Hickey 04d7b5ffe4 AP_HAL_AVR: implement changes to AnalogIn 2012-12-20 14:51:32 +11:00
Pat Hickey 0c3e59a307 AP_HAL_AVR: AnalogIn channels respect pins, obey NONE input, all common
* there's no need for separate APM1/APM2 classes, so that was eliminated
* single class only has special member for vcc. all others created by
  channel interface.
2012-12-20 14:51:30 +11:00
Pat Hickey 72f8667d9c AP_HAL_AVR: AnalogIn implemented 2012-12-20 14:51:23 +11:00
Pat Hickey 8eb9b39a44 AP_HAL_AVR move library classes to their own AP_HAL_AVR namespace 2012-12-20 14:51:19 +11:00
Pat Hickey 00920b0483 AP_HAL_AVR: Stub implementations of AP_HAL_AVR concrete classes 2012-12-20 14:51:18 +11:00