Commit Graph

30 Commits

Author SHA1 Message Date
Andrew Tridgell
a4c56fcb82 AP_BattMonitor: removed create() method for objects
See discussion here:

  https://github.com/ArduPilot/ardupilot/issues/7331

we were getting some uninitialised variables. While it only showed up in
AP_SbusOut, it means we can't be sure it won't happen on other objects,
so safest to remove the approach

Thanks to assistance from Lucas, Peter and Francisco
2017-12-14 08:12:28 +11:00
Lucas De Marchi
b022c02029 global: use static method to construct AP_BattMonitor 2017-09-26 03:01:21 +01:00
Pierre Kancir
9c587d8d67 AP_BattMonitor: fix warning in example 2017-04-13 19:56:16 +01:00
Randy Mackay
bad8910b93 AP_BattMonitor: example sketch uses Solo battery 2017-02-09 09:21:55 +09:00
murata
f18b8844bf AP_BattMonitor: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Lucas De Marchi
ae53920e5b build: don't build examples with old build system
We currently check examples are buildable with waf which doesn't need
the libraries to be specified in a make.inc file.  Having the makefiles
there is misleading since people try to build and realize the build is
broken.
2016-10-11 13:03:08 +11:00
Gustavo Jose de Sousa
c2e3f05dbf waf: ardupilotwaf: prefix build context methods with ap_
It helps to distinguish between things from waf and things from ardupilotwaf.
2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
3d22490397 waf: examples: use methods from bld instead of ardupilotwaf 2016-01-22 20:10:29 -02:00
Gustavo Jose de Sousa
d281067bcc waf: make example binaries be placed in 'examples' dir
This commit makes examples' wscripts use ardupilotwaf.example() instead of
ardupilot.program().
2016-01-15 16:46:41 -02:00
Jonathan Challinger
a3789542cd AP_BattMonitor: fix example build 2015-12-29 10:46:35 -08:00
Lucas De Marchi
a096703b06 Global: don't link with AP_Progmem
AP_Progmem is not used anymore.
2015-12-27 15:58:12 -02:00
Lucas De Marchi
0a1dbab24e AP_BattMonitor: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:42 +11:00
Caio Marcelo de Oliveira Filho
6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Caio Marcelo de Oliveira Filho
3b4e18043b AP_BattMonitor: examples use millis/micros/panic functions 2015-11-20 12:29:52 +09:00
Andrew Tridgell
8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Caio Marcelo de Oliveira Filho
8e1e77007e AP_BattMonitor: remove unnecessary includes in example 2015-10-21 09:16:10 +11:00
Caio Marcelo de Oliveira Filho
ec52df991c build: compile only the HAL files needed by the board
Instead of requiring every program to specify the HAL related modules,
let the build system do it (in practice everything we compiled depended
on HAL anyway). This allow including only the necessary files in the
compilation.
2015-10-21 09:16:07 +11:00
Caio Marcelo de Oliveira Filho
2e464a53c2 AP_HAL: make code not depend on concrete HAL implementations
The switching between different AP_HAL was happening by giving different
definitions of AP_HAL_BOARD_DRIVER, and the programs would use it to
instantiate.

A program or library code would have to explicitly include (and depend)
on the concrete implementation of the HAL, even when using it only via
interface.

The proposed change move this dependency to be link time. There is a
AP_HAL::get_HAL() function that is used by the client code. Each
implementation of HAL provides its own definition of this function,
returning the appropriate concrete instance.

Since this replaces the job of AP_HAL_BOARD_DRIVER, the definition was
removed.

The static variables for PX4 and VRBRAIN were named differently to avoid
shadowing the extern symbol 'hal'.
2015-10-21 09:16:07 +11:00
Gustavo Jose de Sousa
ff20124f1d AP_BattMonitor: 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:42 +10:00
mirkix
a1d478909a AP_BattMonitor: Add Linux support for example 2015-06-18 09:00:01 +10:00
Andrew Tridgell
debe7db861 AP_BattMonitor: convert example from .pde to .cpp 2015-06-01 16:58:11 +10:00
Randy Mackay
5560d3dba1 BattMonitor: fix example sketch 2015-05-12 21:34:24 +09:00
Randy Mackay
3951e4d99b BattMon: example sketch reads from SMBus 2014-12-31 15:22:58 +09:00
Randy Mackay
909d525206 BattMon: fix example sketch compile error 2014-12-31 15:22:51 +09:00
Andrew Tridgell
40709f655e AP_BattMonitor: fixed example build 2014-08-13 21:46:22 +10:00
Andrew Tridgell
93f2d81ff4 AP_BattMonitor: fixed example build 2014-07-25 17:54:19 +10:00
Kevin Hester
80cb13e222 BattMon: fixup line endings 2014-04-15 15:56:43 +09:00
Andrew Tridgell
dcb42af3e9 AP_BattMonitor: fixed example build 2014-04-03 07:49:06 +11:00
Andrew Tridgell
f34b1c280d AP_BattMonitor: added set_monitoring() API
needed for test sketch
2013-10-23 09:40:42 +11:00
Randy Mackay
8b06a12fa4 BattMonitor: initial draft lib 2013-10-03 11:16:01 +09:00