Commit Graph

77 Commits

Author SHA1 Message Date
Peter Barker
611dcb694b DataFlash: write CHIBIOS_GIT_VERSION to opened log file
DataFlash: use AP_FWVersion singleton
2018-06-18 19:10:37 +01:00
Peter Barker
8027883734 DataFlash: remove vestiges of CLI functions 2018-04-10 10:27:08 +09:00
Andrew Tridgell
fd14dedcff DataFlash: 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
Peter Barker
d68ba874d0 DataFlash: correct examples with units 2017-11-23 10:40:30 +11:00
Peter Barker
2f9a8ded55 DataFlash: add new int16_t[32] type, designator 'a' 2017-10-27 16:33:45 +11:00
Peter Barker
6536bf39b3 DataFlash: add DataFlash_AllTypes sample output 2017-10-10 16:51:19 +11:00
Peter Barker
466d6e619e DataFlash: correct nanf log output 2017-10-10 16:51:19 +11:00
Lucas De Marchi
53c82b4aaf global: use static method to construct DataFlash_Class 2017-09-26 03:01:21 +01:00
Peter Barker
31083653b2 DataFlash: examples: move starting of new logs into DataFlash 2017-07-19 16:37:28 +01:00
Peter Barker
c1264cf60a DataFlash: Use GCS_Dummy GCS singleton 2017-07-07 16:18:37 +01:00
Peter Barker
7b3db490be DataFlash: correct examples 2017-06-29 15:43:39 +01:00
Peter Barker
9fb4ac2143 DataFlash: update examples for init simplification 2017-06-14 12:20:29 +01:00
Peter Barker
b5029aad4f DataFlash: correct dataflash examples 2017-06-11 20:34:12 +01:00
Pierre Kancir
49c9e3c768 Dataflash: example fix travis warning
missing function declaration
implicit cast
some style fix
2017-04-13 19:56:16 +01:00
murata
1b2ea27a68 DataFlash: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Lucas De Marchi
3ff965a0c0 DataFlash: remove infinite loop from loop() method
Remove the while() loop inside loop() method so the new signal handlers
correctly notify the mainloop to exit.

This makes SIGTERM/SIGINT work again.
2016-11-02 16:28:20 -02:00
Mathieu OTHACEHE
152edf7189 Global: remove mode line from headers
Using a global .dir-locals.el file is a better alternative than
reincluding the same emacs header in every file of the project.
2016-10-24 09:42:01 -02: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
Andrew Tridgell
38965f4617 DataFlash: fixed example build 2016-05-31 08:36:07 +10:00
Peter Barker
cf15bb5f6e DataFlash: AllTypes example also covers Log_Write 2016-05-07 07:21:16 +10:00
Peter Barker
b273514cf9 DataFlash: create example outputting all field types 2016-05-07 07:21:16 +10: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
b85631bec3 DataFlash: 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
Gustavo Jose de Sousa
3035fb282d DataFlash: fix example 2015-12-07 15:42:04 +09:00
Lucas De Marchi
f584543ea1 DataFlash: remove unused AP_ADC_AnalogSource 2015-12-03 13:32:44 +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
578b31e7f8 AP_DataFlash: example uses millis/micros/panic functions 2015-11-20 12:35:17 +09:00
Andrew Tridgell
8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Lucas De Marchi
20c6ffc5e3 Replace use of UARTDriver::printf_P() with UARTDriver::printf()
This also starts to show warnings on places that were already using
wrong printf format strings.
2015-10-30 14:35:25 +09:00
Lucas De Marchi
831d8acca5 Remove use of PROGMEM
Now variables don't have to be declared with PROGMEM anymore, so remove
them. This was automated with:

    git grep -l -z PROGMEM | xargs -0 sed -i 's/ PROGMEM / /g'
    git grep -l -z PROGMEM | xargs -0 sed -i 's/PROGMEM//g'

The 2 commands were done so we don't leave behind spurious spaces.

AVR-specific places were not changed.
2015-10-30 14:35:16 +09:00
Lucas De Marchi
2c38e31c93 Remove use of PSTR
The PSTR is already define as a NOP for all supported platforms. It's
only needed for AVR so here we remove all the uses throughout the
codebase.

This was automated with a simple python script so it also converts
places which spans to multiple lines, removing the matching parentheses.

AVR-specific places were not changed.
2015-10-30 14:35:04 +09:00
Caio Marcelo de Oliveira Filho
b028219c94 DataFlash: remove unnecessary includes from 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
Peter Barker
60010e794e DataFlash: ensure 10% free space when initialising logging 2015-09-09 12:22:35 +10:00
Peter Barker
f9a1102e96 DataFlash: correct compilation for new DataFlash signature 2015-09-09 10:58:27 +10:00
Peter Barker
a2f1bf581a DataFlash: fix test for SITL and linux 2015-09-09 10:58:27 +10:00
unknown
b1ce6136c4 DataFlash_test:make it works with pixhawk2 2015-09-09 10:58:26 +10:00
Gustavo Jose de Sousa
709204c01d DataFlash: 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:38:24 +10:00
Lucas De Marchi
3136b8916c DataFlash: use ARRAY_SIZE macro 2015-07-21 14:25:15 +09:00
Andrew Tridgell
e734f24cc1 DataFlash: convert example from .pde to .cpp 2015-06-01 17:07:07 +10:00
Andrew Tridgell
69f9d25cd0 DataFlash: fix for HAL_SITL rename 2015-05-05 09:45:56 +10:00
Andrew Tridgell
10ec1b8290 DataFlash: example no longer builds with APM2 2015-03-26 06:32:00 -07:00
Randy Mackay
0480828350 Dataflash: fix example sketch 2015-01-28 16:31:50 +09:00
Andrew Tridgell
940966f3e3 DataFlash: fixed example sketch build 2014-12-03 08:39:36 +11:00
Andrew Tridgell
6c19f23ace DataFlash: fixed example build 2014-08-13 21:48:36 +10:00
Andrew Tridgell
e67c468e2d DataFlash: fixed example build 2014-07-25 17:55:16 +10:00