Commit Graph

622 Commits

Author SHA1 Message Date
Peter Barker fd87a4f180 DataFlash: fix unused result warning 2016-08-25 15:53:47 +10:00
Peter Barker 8d253dec8e DataFlash: support for mavlink SENSOR message 2016-08-11 17:48:44 -03:00
Murilo Belluzzo e17fdb2aa9 DataFlash: Avoid null pointer dereference
Confirms that the loop successfully found a log structure before using it.

Should fix CID 126742
2016-08-03 00:02:19 -03:00
priseborough a8cd037f56 DataFlash: update to match revised EKF1 and EKF2 interface
Uses separate horz/vert position interfaces
2016-07-19 12:16:49 +10:00
Andrew Tridgell 6776f8ac76 DataFlash: fixed GPS2 log format 2016-07-18 09:19:05 +10:00
priseborough cc7caa27bc DataFlash: Use a unique struct for EKF2 logging 2016-07-09 15:57:35 +10:00
priseborough 772c719df3 DataFlash: log tracking error for active instance of EKF2 2016-07-09 15:57:35 +10:00
priseborough 00b66ddc07 DataFlash: Log EKF2 output predictor tracking data 2016-07-09 15:57:35 +10:00
Lucas De Marchi efb6b4c57e DataFlash: ifdef both __APPLE__ and __MACH__
This is how we do in other places and should mean that we are targetting
MacOS, not other apple products or other OSes using a mach kernel.
2016-07-07 12:41:51 -03:00
Randy Mackay 4bedc57cbe DataFlash: rename SBFE's Long field to Lng
This naming is consistent with the other GPS messages
2016-07-04 11:17:14 +09:00
Randy Mackay 032e834849 Dataflash: log rally points 2016-07-04 11:17:09 +09:00
Andrew Tridgell 4dcff15603 DataFlash: fixed typo 2016-07-01 15:35:45 +10:00
Leonard Hall a5bb3c206e Dataflash: Log rate to degrees 2016-06-24 17:17:16 +09:00
Andrew Tridgell a06e46a84c DataFlash: log 14 output channels in RCOU
unfortunately this means we need to shorten the column headers, but at
least this makes us consistent with RCIN
2016-06-06 15:14:28 +10:00
Tom Pittenger 3ed2fafefa DataFlash: Log new CUR2 entry for battery2 data 2016-06-02 16:59:16 -07:00
Tom Pittenger 43c7b4d518 DataFlash: do not log CURR.Throttle because it's already logged elsewhere 2016-06-02 16:59:07 -07:00
Tom Pittenger 7a397475af DataFlash: log POWR.vcc and Vservo as float in volts instead of int16 mV 2016-06-02 16:59:05 -07:00
Andrew Tridgell 38965f4617 DataFlash: fixed example build 2016-05-31 08:36:07 +10:00
Andrew Tridgell f02c8f732c DataFlash: fixed BAR2 format for drift offset 2016-05-28 15:08:46 +10:00
Andrew Tridgell d90a2f7deb DataFlash: added get_structures() API
used in Replay
2016-05-25 20:46:00 +10:00
Andrew Tridgell 1fd4cbffb2 DataFlash: update for changed AP_Airspeed API 2016-05-24 17:00:56 +10:00
Andrew Tridgell fde0652d81 DataFlash: use HAVE_PAYLOAD_SPACE() 2016-05-21 15:25:17 +10:00
Paul Riseborough 54213ad871 DataFlash: Improve reporting of normalised ekf2 magnetometer innovations
Report the maximum of the x,y,z axis
2016-05-21 15:13:52 +10:00
Paul Riseborough fcee82f9b2 DataFlash: extend ekf fault status reporting coverage 2016-05-21 15:13:51 +10:00
Tom Pittenger 32d51e346d DataFlash: optimize logging climbrate - call function one and reuse result 2016-05-17 18:59:14 -07:00
Rustom Jehangir 39fc17f384 DataFlash: Fix parameter description for param_parse.py 2016-05-16 11:09:31 +10:00
Tom Pittenger 38b7d7e1c6 DataFlash: log baro drift offset 2016-05-13 17:22:12 -07:00
Tom Pittenger d900988a23 DataFlash: Log airspeed.Use 2016-05-13 17:22:02 -07:00
Ricardo de Almeida Gonzaga dc7acdf03f DataFlash: Fix typos 2016-05-13 19:20:05 -03:00
Andrew Tridgell 202eb3af35 DataFlash: added imu_mask to Log_Write_IMUDT 2016-05-09 12:26:30 +10:00
Andrew Tridgell 8ca6ed54c5 DataFlash: added LOG_REPLAY and LOG_DISARMED parameters 2016-05-09 12:00:55 +10:00
Andrew Tridgell 5398283c9b DataFlash: fixed BAR2 and BAR3 log formats 2016-05-09 11:09:44 +10:00
Andrew Tridgell 2f4f38b85f DataFlash: log the last message sample time for GPS 2016-05-07 18:27:23 +10:00
Andrew Tridgell 679b43efc9 DataFlash: make timestamps in EKF messages all match 2016-05-07 18:27:22 +10:00
Andrew Tridgell 35c3adb1ad DataFlash: use caller supplied timestamps for sensor logging
used to support EK2_LOGGING=1
2016-05-07 18:27:22 +10:00
Andrew Tridgell 6aa02f06a9 DataFlash: use INS_USE to prevent logging of unused IMUs 2016-05-07 18:27:22 +10:00
Andrew Tridgell 9300092840 DataFlash: changed GPS ground course to float and add VV for GPA
more accurate replay
2016-05-07 18:27:21 +10:00
Andrew Tridgell 1bf057be45 DataFlash: log last update time in BARO msg 2016-05-07 18:27:21 +10:00
Andrew Tridgell d61ba14037 DataFlash: switched to float for GPS ground speed
same size and more precision
2016-05-07 18:27:21 +10:00
Andrew Tridgell d97074dc9d DataFlash: round baro temp to nearest centi-degree
makes replay logs a tiny bit closer
2016-05-07 18:27:20 +10:00
Andrew Tridgell 61da827c16 DataFlash: added sample timestamp to mag messages
allows for exact mag timings in replay
2016-05-07 18:27:19 +10:00
Andrew Tridgell 7ab1367ec4 DataFlash: removed logging of relative alt in GPS messages
not related to GPS and makes it impossible to do bit-identical replay
2016-05-07 18:27:18 +10:00
Andrew Tridgell 46f257fd9b DataFlash: convert Log_Write() to use a linked list
this saves some memory and means we don't need to know how many we
will need in advance
2016-05-07 07:21:16 +10:00
Andrew Tridgell 9a1cbff850 DataFlash: allow access to DataFlash instance as a static singleton 2016-05-07 07:21:16 +10:00
Peter Barker 11dd254498 DataFlash: Log_Write optimisations 2016-05-07 07:21:16 +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
Peter Barker 518fabe035 DataFlash: StopLogging method, virtual stop_logging on backends 2016-05-07 07:21:16 +10:00
Peter Barker 77dd170e03 DataFlash: Log_Write support
A generic logging method to avoid the need to set up a format and structures etc
2016-05-07 07:21:16 +10:00
Peter Barker 334af1ecd7 DataFlash: base class method for resetting state on log open 2016-05-07 07:21:16 +10:00
Peter Barker eea2d5dcb5 DataFlash_File: avoid integer wrap when checking minimum time 2016-05-07 07:21:15 +10:00
Lucas De Marchi fea084a596 Global: use ap_version.h
This header is used by waf to contain the generated version macros,
particularly using the git hash. For waf it's better to be in a separate
header since it then can keep track of changes on it a trigger
recompilation.

For the make build system, a dummy ap_version.h file has been added in
the missing/ folder so both implementations can co-exist.
2016-05-06 13:11:28 -03:00
Andrew Tridgell bcefb45e0a DataFlash: added DelaT to delta-angle logs 2016-04-26 15:50:29 +10:00
Randy Mackay 39560f9af8 DataFlash: remove unused num_format_types and _structures
resolves compiler warning
2016-04-23 23:06:26 -07:00
Andrew Tridgell c765979f9a DataFlash: expose the number of lost log messages
will be logged in PM message
2016-04-21 16:45:02 +10:00
Jonathan Challinger a0e291bf89 DataFlash: add reason to MODE 2016-04-14 12:24:04 +09:00
Andrew Tridgell 075dd49afe DataFlash: added Log_Write_Rate()
needed for quadplane as well as copter so should be in common code
2016-03-25 12:13:58 +11:00
Lucas De Marchi ec36e06c63 DataFlash: replace header guard with pragma once 2016-03-16 18:40:44 +11:00
Will Sackfield 6f43b7121c DataFlash: Cast msg to uint8
* Clang requires this explicit cast
2016-02-29 14:14:37 +11:00
Peter Barker 4548466701 DataFlash: correct use of #defines
HIL_BOARD_AVR_SITL was renamed
Move use of define to after include where it is defined
2016-01-30 12:46:25 -02:00
Andrew Tridgell 6f59c4ae53 DataFlash: added GPSAlt to CAM and TRIG log messages
useful for people with RTK GPS
2016-01-29 10:01:51 +11:00
Jaime Machuca 1001e53140 DataFlash: added TRIGGER message to Logs
DataFlash.h: added support for Trigger MSG, supressed TAB separations
and file reorganized LogFile.cpp: included Trigger packet
2016-01-29 09:19:43 +11:00
Jonathan Challinger 02d8b28fa3 DataFlash: add GMB1, GMB2, GMB3 2016-01-23 10:35:37 +09: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
Peter Barker ff8008d81a DataFlash: remove unused callbacks, unimplemented functions
Closes #3269
2016-01-05 17:08:07 -02:00
Jonathan Challinger b85631bec3 DataFlash: fix example build 2015-12-29 10:46:35 -08:00
Andrew Tridgell fe8070bd51 DataFlash: move lock to protect just buffer IO 2015-12-29 09:10:28 +11: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 5d07e5bdbf DataFlash: stop using Progmem.h 2015-12-27 15:58:12 -02:00
Andrew Tridgell b967140572 DataFlash: enable minimal file mode
This adds a "minimal" dataflash mode with a board specific macro. The
QURT port uses this to avoid problematic system calls that are buggy
in the QURT RTOS

With some pending updates to QURT we may be able to remove some (or
all) of this
2015-12-27 16:21:26 +11:00
Peter Barker 2f1297f30c DataFlash_File: Check return values of lseek 2015-12-21 16:07:23 +11:00
Peter Barker ce84ba049f DataFlash_File: protect against fopen failing 2015-12-21 16:07:23 +11:00
Peter Barker 15265a45ed DataFlash_File: check fname before using it 2015-12-21 16:07:23 +11:00
Andrew Tridgell 025e4edd17 DataFlash: fixed warning 2015-12-20 17:55:40 +11:00
Andrew Tridgell 02d7867d79 DataFlash: added locking for multi-thread logging support 2015-12-20 17:55:39 +11:00
Peter Barker 326e68544c DataFlash: remove unused functions 2015-12-10 10:45:51 +09:00
Peter Barker 7900359fac DataFlash: LOG_FILE_BUFSIZE sets buffer size for DataFlash_File 2015-12-08 10:59:57 +11:00
Tom Pittenger c118130dda DataFlash: fixed mispelling
@param label was different than everywhere else that did not use plurl
2015-12-08 08:23:07 +09:00
Tom Pittenger 4e3864049a DataFlash: compile warning - float to double promotion 2015-12-07 15:50:03 +09: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
Peter Barker 4f1a7c6427 DataFlash: remove use of AddLogFormats 2015-12-03 13:21:52 +11:00
Peter Barker 0ca07e5245 DataFlash: DataFlash-over-MAVLink support 2015-12-03 13:21:51 +11:00
Peter Barker faabe0b83d DataFlash: support multiple simultaneous backends 2015-12-03 13:21:51 +11:00
Peter Barker 121967d1b1 DataFlash: factor log structures into LogStructures.h (no functional change 2015-12-03 13:21:51 +11:00
Caio Marcelo de Oliveira Filho 6e7b73610d waf: add waf support 2015-12-03 07:54:30 +11:00
Lucas De Marchi 2591261af6 Global: rename min and max macros to uppercase
The problem with using min() and max() is that they conflict with some
C++ headers. Name the macros in uppercase instead. We may go case by
case later converting them to be typesafe.

Changes generated with:

	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)max(/\1MAX(/g'
	git ls-files '*.cpp' '*.h' -z | xargs -0 sed -i 's/\([^_[:alnum:]]\)min(/\1MIN(/g'
2015-12-01 16:28:09 -02:00
Caio Marcelo de Oliveira Filho 578b31e7f8 AP_DataFlash: example uses millis/micros/panic functions 2015-11-20 12:35:17 +09:00
Caio Marcelo de Oliveira Filho 753956bd77 AP_Dataflash: use millis/micros/panic functions 2015-11-20 12:35:00 +09:00
Andrew Tridgell 8f4ce7f20b build: removed all nocore.inoflag files
these were APM2 specific
2015-11-16 08:05:17 +11:00
Peter Barker fc05ad81eb DataFlash_File: cache oldest log to avoid directory scans when downloading 2015-11-12 12:23:46 +11:00
Paul Riseborough 42b47acdfc DataFlash: Fix logging error for EKF second instance 2015-11-09 22:07:10 +11:00
Paul Riseborough 88cc1e2ffe DataFlash: Publish the EKF2 magnetometer selection index 2015-11-09 22:07:10 +11:00
Paul Riseborough 138315af21 DataFlash: Add logging for second NKF instance 2015-11-08 15:37:28 +11:00
Paul Riseborough 5b1d6f2aa2 DataFlash: accomodate change in EKF2 interface 2015-11-08 15:37:28 +11:00
Paul Riseborough 46e4c45537 DataFlash: Only log EKF messages when enabled 2015-11-08 15:37:27 +11:00
Paul Riseborough 987d261109 DataFlash: Update logging of EKF2 primary core index
Changes made in response to review comments
2015-11-08 15:37:27 +11:00
Paul Riseborough 4884b2d38a DataFlash: Log the primary EKF2 index 2015-11-08 15:37:27 +11:00
Lucas De Marchi c74b1a660d DataFlash: remove DATAFLASH_NO_CLI
This is not used anymore since the removal of AVR CPUs.
2015-11-04 12:14:15 +11:00
Lucas De Marchi 1e839f97ed DataFlash: remove check for AVR CPUs
Remove the checks for HAL_CPU_CLASS > HAL_CPU_CLASS_16 and
HAL_CPU_CLASS >= HAL_CPU_CLASS_75. Corresponding dead code will be
removed on separate commits.
2015-11-04 12:14:14 +11:00
Lucas De Marchi 0dfeae2556 DataFlash: remove checks for HAL_BOARD_APM2 and HAL_BOARD_APM1 2015-11-04 12:14:13 +11:00
Lucas De Marchi d2a259cef0 DataFlash: fix wrong printf format for printf
"%S" is used for wide string, but we are passing a char*. Use lowercase
in this case to remove warnings like this:

libraries/AP_InertialSensor/AP_InertialSensor.cpp: In member function
'bool AP_InertialSensor::calibrate_accel(AP_InertialSensor_UserInteract*, float&, float&)':
libraries/AP_InertialSensor/AP_InertialSensor.cpp:620:61: warning:
format '%S' expects argument of type 'wchar_t*', but argument 3 has type 'const char*' [-Wformat=]
                 "Place vehicle %S and press any key.\n", msg);
                                                             ^
2015-10-30 14:35:42 +09:00
Lucas De Marchi 5244559010 Minimize AP_Progmem.h includes
Most of AP_Progmem is already gone so we can stop including it in most
of the places. The only places that need it are the ones using
pgm_read_*() APIs.

In some cases the header needed to be added in the .cpp since it was
removed from the .h to reduce scope. In those cases the headers were
also reordered.
2015-10-30 14:35:32 +09:00
Lucas De Marchi 1b07dabeb7 Replace prog_char and prog_char_t with char
prog_char and prog_char_t are now the same as char on supported
platforms. So, just change all places that use them and prefer char
instead.

AVR-specific places were not changed.
2015-10-30 14:35:30 +09:00
Lucas De Marchi b52d1cfabb DataFlash: remove DataFlash.Log_Write_Message_P() 2015-10-30 14:35:29 +09:00
Lucas De Marchi 4ab9821624 Replace use of Log_Write_Message_P() with Log_Write_Message() 2015-10-30 14:35:28 +09: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 6f4904189b Replace use of println_P() with println() 2015-10-30 14:35:22 +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 1336d621be Replace use of strcpy_P() with strcpy() 2015-10-30 14:35:12 +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
Paul Riseborough 61d556afb1 DataFlash: Fix shorthand variable names for EKF position reset delta 2015-10-30 12:24:18 +09:00
Peter Barker e481497574 DataFlash: delete oldest file rather than the lowest-numbered file
Also reference log numbers by their list index to accomodate log number
wrapping in DataFlash_File
2015-10-21 10:50:32 +11:00
Lucas De Marchi 19b31ccff1 DataFlash: remove check for max compass instances
For all supported boards the maximum number of instances is 3.
2015-10-21 10:05:18 +11:00
Lucas De Marchi d83609b24c DataFlash: remove check for max BARO instances
For all supported boards we allow more than 1 baro instance.
2015-10-21 10:05:18 +11:00
Lucas De Marchi 121eeb4b58 DataFlash: remove check for vibe check
For all supported boards we have vibration check.
2015-10-21 10:05:17 +11:00
Lucas De Marchi f99d64e621 DataFlash: remove check for max INS instances
For all supported boards the maximum number of instances is 3.
2015-10-21 10:05:17 +11: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
Andrew Tridgell b0aa7cb990 DataFlash: use new perf API 2015-10-20 18:16:16 +11:00
Paul Riseborough 2d44441d6b DataFlash: Make EKF2 PosDownDerivative interface follow coding conventions
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough 1323db10e8 DataFlash: Make EKF2 PosDownDerivative interface follow coding conventions
Updates arising from peer review.
2015-10-20 15:21:37 +11:00
Paul Riseborough 9e3d9d15fc DataFlash: Log vertical position derivative output 2015-10-20 15:21:35 +11:00
Gustavo Jose de Sousa 363f9cf82a DataFlash: use compass get_{field,offsets}() functions
Both functions are equivalent, so we're going to simply use
get_{field,offsets}() instead of get_{field,offsets}_milligauss().
2015-10-15 19:56:07 +09:00
Paul Riseborough a82c8b241f DataFlash: Update NKF4 data logging
Add roll/pitch error metric
Reduce normalised magnetometer vector with a vector length
2015-10-10 21:22:57 +09:00
Paul Riseborough ba6387f206 DataFlash: Add logging of EKF GPS check status 2015-10-10 14:49:03 +09:00
Randy Mackay e9254ca1a9 DataFlash: log compass as milligauss 2015-10-07 21:35:19 +09:00
Peter Barker af4ad01f23 DataFlash: make CAM a critical message 2015-10-06 15:20:08 +11:00
Paul Riseborough 73686dfa89 DataFlash: fix error in NKF descriptor 2015-09-25 19:20:52 +10:00
Michael du Breuil cf6e6b7e82 DataFlash: Remove stale UBX3 message 2015-09-23 20:42:42 -07:00
Andy Piper 5adb6d2b89 AP_GPS: Support UBX messages for dual UBLOX GPS setups.
Add extra DOP information to UBX precision messages.
2015-09-23 20:41:50 -07:00
Paul Riseborough 80e182f827 AP_NavEKF2: Update EKF2 data logging 2015-09-24 12:58:44 +10:00
Paul Riseborough 86ad1e6e66 DataFlash: Update EKF2 data logging 2015-09-24 12:58:44 +10:00
Andrew Tridgell ba8e63d8e7 DataFlash: handle unitialised EKF2 in logging 2015-09-23 18:54:46 +10:00
Andrew Tridgell ce9fa45b3a DataFlash: added logging of EKF2 2015-09-23 12:09:48 +10:00
Andrew Tridgell eabdee2b3c DataFlash: only log two rangefinders
this prevents a array index build error on PX4
2015-09-22 09:24:55 +10:00
Peter Barker 8f1471c137 DataFlash: leave room in buffer for non-startup messages 2015-09-18 09:13:45 +10:00
Peter Barker 63a45000b4 DataFlash: take log messages after putting FMTs out 2015-09-18 09:13:45 +10:00
Stewart Loving-Gibbard 4dcf6b8dc3 DataFlash: Adding Logging of RSSI data. 2015-09-16 16:41:31 +09:00
Andrew Tridgell eea54c9e09 DataFlash: fixed flymaple build 2015-09-14 16:44:45 +10:00
Andrew Tridgell 43ac3f86c5 DataFlash: added RNFD logging and 3 baros 2015-09-13 11:29:59 +10:00
Andrew Tridgell c5cd310818 DataFlash: added GPA and GPA2 messages for GPS accuracy
this reverts the GPS format to the old format, thus fixing log
analysers
2015-09-09 14:53:11 +10:00
Buzz 684dfaf26f DataFlash: fix OSX build 2015-09-09 13:09:01 +09:00
Peter Barker 60010e794e DataFlash: ensure 10% free space when initialising logging 2015-09-09 12:22:35 +10:00
Michael du Breuil a88e10d3a0 DataFlash: Log vDOP with GPS messages.
Due to the description string getting to long HDop was renamed as EPH with VDop as EPV (Which is the same terimnology  used to describe the MAVLink side). Status was shortened to stat as well.
2015-09-09 11:38:12 +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
Andrew Tridgell 5710697847 DataFlash: fixed some build warnings 2015-09-03 20:25:14 +10:00
Michael Oborne 52577e4105 DataFlash: add sbf event message 2015-09-03 19:43:31 +10:00
Peter Barker 2b02911546 DataFlash: make mode and messages critical 2015-09-03 15:20:20 +10:00
Peter Barker 8f8493225c DataFlash: DFMessageWriter; ability to trickle messages out to DF 2015-09-03 09:54:55 +10:00
Lucas De Marchi 327a3a4298 DataFlash: standardize inclusion of libaries headers
Do the missing header changes due to changing the code before the pr
getting accepted.
2015-08-18 17:12:52 +10:00
Andrew Tridgell ab7e400a89 DataFlash: added RPM logging 2015-08-12 15:03:50 +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
Randy Mackay 5776620062 DataFlash: consolidate GPS, GPS2 messages
Remove unused dgps_numch, dgps_age from GPS2
Add U field (for use) to both GPS and GPS2
2015-08-05 15:46:46 +09:00
Grant Morphett 08f5305519 DataFlash: fix coverity warnings - add param init in constructor 2015-07-30 12:37:09 +10:00
Peter Barker 1ee330ebb2 DataFlash: CLI log dumping - don't truncate lines that contain doubles
We currently print doubles out as if they were floats.  The ftoa_engine isn't something to replicate for doubles lightly!
2015-07-24 08:08:51 +10:00
Lucas De Marchi 3136b8916c DataFlash: use ARRAY_SIZE macro 2015-07-21 14:25:15 +09:00
Peter Barker 65813f308e DataFlash: fix incorrect comment 2015-07-21 13:11:00 +09:00
Randy Mackay ad1f9c4829 DataFlash: add ORGN message 2015-07-06 12:11:49 +09:00
Peter Barker 844f050cf3 DataFlash: correct zero-byte-file handling in CLI
-rw-rw-r-- 1 pbarker pbarker   2105344 Jul  1 16:10 1.BIN
-rw-rw-r-- 1 pbarker pbarker         0 Jul  1 19:35 2.BIN
-rw-rw-r-- 1 pbarker pbarker   2494464 Jul  1 16:58 3.BIN
-rw-rw-r-- 1 pbarker pbarker 128503808 Jul  1 20:22 4.BIN
-rw-rw-r-- 1 pbarker pbarker         3 Jul  1 19:46 LASTLOG.TXT

Before fix:

2 logs
Log 3 in logs/3.BIN of size 2494464 2015/7/1 6:58
Log 4 in logs/4.BIN of size 128503808 2015/7/1 10:22

After Fix:

4 logs
Log 1 in logs/1.BIN of size 2105344 2015/7/1 6:10
Log 2 in logs/2.BIN of size 0 2015/7/1 9:35
Log 3 in logs/3.BIN of size 2494464 2015/7/1 6:58
Log 4 in logs/4.BIN of size 128503808 2015/7/1 10:22

If the last file was zero bytes, no files would be shown.
2015-07-02 08:53:18 +10:00
Peter Barker cabea266e7 DataFlash: pull out common mission logging code 2015-06-30 16:23:35 +10:00
Peter Barker d85b247706 DataFlash: Log_Write_SysInfo - pull out common logging startup messages 2015-06-30 16:23:34 +10:00
Peter Barker c5c39a77a3 DataFlash: method to flush ringbuffer to fd 2015-06-30 16:19:22 +10:00
Víctor Mayoral Vilches c06abeb02e DataFlash_File: Support custom_log_directory 2015-06-30 14:36:42 +10:00
Michael du Breuil d665c85c20 DataFlash: Add RXM-RAWX logging messages 2015-06-30 09:05:48 +10:00
Peter Barker 723c37bcf7 DataFlash: backend/frontend split 2015-06-26 16:02:50 +10:00
Michael du Breuil 225c946af0 DataFlash: Add PIDS for steering logging 2015-06-22 15:41:44 +10:00
Andrew Tridgell a424686d2f DataFlash: reduce future merge conflicts
an enum makes it easier to merge new messages
2015-06-20 16:18:50 +10:00
Andrew Tridgell feb928dcd3 DataFlash: fixed build warnings 2015-06-17 13:10:26 +10:00
Randy Mackay 384755e271 Dataflash: add IMT messages 2015-06-17 12:46:54 +10:00
Randy Mackay 0d239d2746 DataFlash: disable vibration logging on APM2
Also remove unnecessary include
2015-06-12 21:36:59 +09:00
Randy Mackay f0f262eb04 DataFlash: add Log_Write_Vibration 2015-06-12 21:36:28 +09:00
Grant Morphett 7d1bf75aa8 DataFlash: Moving parameter logging to be after all systems have started
Moved Log_Write_Parameters to be public so we can call it from the
vehcile code at the end of the startup sequence.
We needed to do this because parameters like COMPASS_EXTERNAL are
modified by the startup code and if we log the parameters too early we
will be recording the wrong value.
2015-06-01 20:22:43 +09:00
Andrew Tridgell e734f24cc1 DataFlash: convert example from .pde to .cpp 2015-06-01 17:07:07 +10:00
Andrew Tridgell 9379e79489 DataFlash: all vehicles now use functors 2015-06-01 15:18:32 +10:00
Andrew Tridgell 73445fdae9 DataFlash: added error checking and fixed a warning 2015-05-30 22:16:22 +10:00
Andrew Tridgell f39063e023 DataFlash: don't do PID logging on APM2 2015-05-29 16:32:05 +10:00
Andrew Tridgell b6eba0842a DataFlash: fixed CAM message format 2015-05-27 22:10:39 +10:00
Andrew Tridgell 95ff71940c DataFlash: fixed rebase errors 2015-05-27 14:28:50 +10:00
Andrew Tridgell 8f34ed5b76 DataFlash: added PIDA message
for logging Z accel PID in copter
2015-05-27 14:28:50 +10:00
Andrew Tridgell b45ab52015 DataFlash: added desired rate to PID logging 2015-05-27 14:28:48 +10:00
Robert Lefebvre 7ab628521e DataFlash: Add Acceleration Feedforward to PID_Info. 2015-05-27 14:28:47 +10:00
Andrew Tridgell d148c38f68 DataFlash: added desired rate to PID_Info 2015-05-27 14:28:45 +10:00
Robert Lefebvre 753be18c17 DataFlash: Add PID Logging Method 2015-05-27 14:28:44 +10:00
Andrew Tridgell 2a22ae5404 DataFlash: support 64 bit TimeUS log dumping 2015-05-27 11:54:18 +10:00
Peter Barker 988f3277de DataFlash: 64-bit timestamps for ACCx and GYRx messages 2015-05-27 11:54:17 +10:00
Peter Barker 617043f468 DataFlash: convert GPS and CAM dataflash messages to 64-bit timestamps
GPS structures remove 32-bit apm_time and replace with standard time_us
Significant change to GPS and GPS2 messages:
	    Add TimeUS as first field
	    Remove T field
	    Due to length restrictions on labels:
	    	Renamed TimeMS to GMS (Gps MilliSeconds)
		Renamed Week to GWk (Gps WeeK)
		Renamed RelAlt to RAlt
Significant change to CAM messages:
	    Removed GPSTime (uin32_t), added TimeUS (uint64_t)
2015-05-27 11:54:15 +10:00
Peter Barker 769982b8f2 DataFlash: use 64-bit timestamps for dataflash logs 2015-05-27 11:54:14 +10:00
Andrew Tridgell 8624a262e7 DataFlash: removed BUILD_DELEGATES code
no longer needed
2015-05-26 14:35:04 +10:00
Lucas De Marchi c894a1349e DataFlash: use functor macros
Functor is not yet being used but let's make is macro fallback to the
previous Delegate implementation for easy of transition between the two.
2015-05-26 13:46:54 +10:00
Lucas De Marchi cd308b5e2f DataFlash: allow to use functor 2015-05-26 13:46:50 +10:00
Andrew Tridgell 4486ddc53e DataFlash: changed TimeUS to SampleUS for raw IMU logging
this prevents a problem with an upcoming patch from Peter
2015-05-22 17:58:18 +10:00
Andrew Tridgell f8aef57ec3 DataFlash: use APM_BUILD_DELEGATES 2015-05-21 07:48:51 +10:00
Andrew Tridgell b5d930be61 DataFlash: support member functions for rover 2015-05-21 07:48:47 +10:00
Andy Piper c600c1a746 DataFlash: log Gyro and Accel Health for IMUs.
Log the health of the various IMUs under GyHlt and AcHlt.
(Names are shortened to get inside the string array limit).
2015-05-19 13:13:35 +09:00