Commit Graph

16 Commits

Author SHA1 Message Date
Gustavo Jose de Sousa 12423814ef AP_HAL_AVR: standardize inclusion of libaries headers
This commit changes the way libraries headers are included in source files:

 - If the header is in the same directory the source belongs to, so the
 notation '#include ""' is used with the path relative to the directory
 containing the source.

 - If the header is outside the directory containing the source, then we use
 the notation '#include <>' with the path relative to libraries folder.

Some of the advantages of such approach:

 - Only one search path for libraries headers.

 - OSs like Windows may have a better lookup time.
2015-08-11 16:28:43 +10:00
Andrew Tridgell 1849db7074 AP_HAL: added board_voltage AnalogIn method
this makes it easier to get the board voltage from any library,
without having to allocate another analog channel object
2014-02-14 21:25:38 +11:00
Andrew Tridgell 0ade02a624 HAL_AVR: updates for new scheduler API 2013-09-28 21:24:02 +10:00
Andrew Tridgell a80d3344f5 AP_HAL_AVR: support voltage_latest() 2013-09-12 13:25:17 +10:00
Andrew Tridgell a5b20b4dfc AP_HAL: removed scaling factor on analog sources
these are not use anymore, as voltage_average() is used instead
2013-05-13 15:29:42 +10:00
Andrew Tridgell 589b8cdb58 AP_HAL: added voltage_average_ratiometric() call to AnalogIn
this is for ratiometric sensors such as the 3DR airspeed sensor and
the Maxbotix analog sonar
2013-05-13 15:12:43 +10:00
Andrew Tridgell e7a6b12ac1 HAL_AVR: support set_stop_pin() and set_settle_time() for analogin
useful for dual sonar support
2013-05-03 09:45:19 +10:00
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