Commit Graph

520 Commits

Author SHA1 Message Date
Peter Barker feb30b3b9b DataFlash: add mutex for WritePrioritisedBlock
Multiple threads attempt to write blocks; don't let
them interfere
2017-04-06 22:09:18 +10:00
Peter Barker 2fa97c9906 DataFlash: improve privacy aspects of instance variables 2017-04-06 22:09:18 +10:00
Peter Barker 3defe584e7 DataFlash: extract common labels and formats into defines 2017-04-05 19:16:21 +10:00
Peter Barker 510aa587ef DataFlash: add validation for logging structures 2017-04-04 20:03:33 +01:00
Peter Barker 2746edfd32 DataFlash: move Init from LogFile.cpp to Dataflash.cpp (NFC) 2017-04-04 20:03:33 +01:00
Peter Barker d3b442d8b6 DataFlash_MAVLink: remove dead comments 2017-03-31 15:02:14 +01:00
Peter Barker d8c475ad04 DataFlash: use override keyword on many methods 2017-03-31 15:02:14 +01:00
Andrew Tridgell 6c31a6982b DataFlash: added Log_Write_AttitudeView 2017-03-31 11:30:44 +11:00
Peter Barker 4cb43b1c27 DataFlash: correct repeated FMT logging bug 2017-03-30 20:19:15 +11:00
Francisco Ferreira ec5bbbd2d0
DataFlash: fix BAR2 and BAR3 message format after baro log struct changed 2017-03-30 00:42:10 +01:00
Michael du Breuil 16433cbf7a DataFlash: Log the ground temperature used for baro calculations 2017-03-28 11:25:46 +11:00
Randy Mackay 2f21e3b40c DataFlash: rename GPS3/GPA3 to GPSB/GPAB 2017-03-13 11:31:51 +11:00
priseborough a82b6929f1 DataFlash: Allow logging of blended GPS instance
Add GPS and GPA reporting for blended solution
Allow GPS library to manage reporting for the blended solution
2017-03-13 11:31:51 +11:00
Michael du Breuil ed359a5833 Dataflash: Add landing PID logging 2017-03-02 12:38:59 +11:00
Randy Mackay 2b43c6aeed DataFlash: log range finder orientation 2017-02-27 15:18:40 +09:00
Peter Barker 057819ccef DataFlash: zero-pad the number in the log filename
This helps with collating when reviewing log files

Closes #2212
2017-02-15 07:23:49 +11:00
Peter Barker 58d74230d5 DataFlash: correct error detection for asprintf 2017-02-15 07:23:49 +11:00
Michael du Breuil 31f1545223 DataFlash: Update for AHRS NED changes
Report both origin and home NED altitudes to the log file
2017-02-13 09:23:14 +11:00
Lucas De Marchi dd1646aefc DataFlash: remove dangling semicolon 2017-02-12 01:22:35 +00:00
priseborough a02a84560f DataFlash: log 3-state range beacon estimator states for EKF3 2017-01-27 16:57:42 +09:00
murata 1b2ea27a68 DataFlash: Unify from print or println to printf. 2017-01-27 18:20:22 +11:00
Andrew Tridgell 0e14992b34 DataFlash: hide direct EK2/EK3 logging
should call Log_Write_EKF and let it choose the types
2016-12-19 08:07:14 +11:00
Andrew Tridgell b00ec26957 DataFlash: Add EKF3 and remove EKF1 2016-12-19 08:07:09 +11:00
priseborough fd8916ef38 DataFlash: fix Baro 3 labels 2016-12-18 10:28:04 +11:00
Randy Mackay d41467424b DataFlash: fix to suppressing comment for case fall through
no functional change
eclipse stops complaining if no-break is used in place of fall-through
2016-12-14 13:25:15 +09:00
priseborough 431a74e0b4 DataFlash: log range beacon fusion data 2016-11-30 17:56:53 +09:00
priseborough bbdf3982c6 DataFlash: remove Log_Write_EKF 2016-11-30 17:56:52 +09:00
Peter Barker bc45ab5409 DataFlash: add a heartbeat for the io thread in DataFlash_File 2016-11-29 15:14:09 -08:00
Peter Barker e11c276b35 DataFlash_File: stop trying to stuff a uint64_t into a uint32_t 2016-11-29 15:14:09 -08:00
Peter Barker 2c8a0a9123 DataFlash: rotate files when vehicle is disarmed 2016-11-28 09:42:09 -08:00
Peter Barker fc79fb4ab4 DataFlash: know about armed state of vehicle 2016-11-28 09:42:09 -08:00
murata ae927e1775 DataFlash: Adjust the return value to the type of the method.
DataFlash: Adjust the return value to the type of the method.
2016-11-22 10:07:16 -08:00
Lucas De Marchi c9eff28c44 DataFlash: add O_CLOEXEC in places missing it
By opening with O_CLOEXEC we make sure we don't leak the file descriptor
when we are exec'ing or calling out subprograms. Right now we currently
don't do it so there's no harm, but it's good practice in Linux to have
it.
2016-11-07 12:37:30 -03: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
murata c808ee2f49 Global: To nullptr from NULL.
RC_Channel: To nullptr from NULL.

AC_Fence: To nullptr from NULL.

AC_Avoidance: To nullptr from NULL.

AC_PrecLand: To nullptr from NULL.

DataFlash: To nullptr from NULL.

SITL: To nullptr from NULL.

GCS_MAVLink: To nullptr from NULL.

DataFlash: To nullptr from NULL.

AP_Compass: To nullptr from NULL.

Global: To nullptr from NULL.

Global: To nullptr from NULL.
2016-11-02 16:04:47 -02:00
Murilo Belluzzo a91da2e803 DataFlash: Change ::bufferspace_available return type
from 'uint16_t' to 'uint32_t' to avoid overflow (possible in at least
two implementations: Block and File).
2016-10-27 14:24:11 +11:00
Murilo Belluzzo c112e1c889 DataFlash: Make use of ByteBuffer class
This patch replaces the 'old style' ringbuffer by the ByteBuffer class.
An effort was made to keep the exchange as close as possible from a
drop-in replacement to minimize the risk of introducing bugs.

Although the exchange opens opportunities for improvement and
simplification of this class.
2016-10-27 14:24:10 +11:00
Francisco Ferreira 5a7f9a38fe DataFlash: fix RCIN and RCOU structure types 2016-10-26 10:10:19 +09: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
Peter Barker 64154feaef DataFlash: remove unused semaphore variables 2016-10-24 08:57:56 -02:00
Peter Barker 5dad8745d5 DataFlash: remove bogus function declaration 2016-10-24 08:57:55 -02:00
Randy Mackay 9722c3a1c3 DataFlash: fix logging of ekf core 2016-10-13 15:22:59 +09: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
Peter Barker a10cde35f5 DataFlash: stop logging before filling SD card on PX4
Filling the SD card causes NuttX to have conniptions, including
data loss and failure to boot
2016-09-26 14:02:58 -07:00
Jonathan Challinger 25bee93fcc DataFlash: fix EKF5 message 2016-09-26 13:42:00 -07:00
Peter Barker 8f376944aa DataFlash: immediately restart logging after erasing logs 2016-09-19 17:57:59 +09:00
Peter Barker fce798bc7a DataFlash: avoid integer underflow
Thanks to mbelluzzo: f44b1b3556
2016-09-13 13:32:09 +09:00
Peter Barker 95d4475d45 DataFlash: avoid time going backwards in logs
WriteBlockCheckStartupMessages returned true if finished writing out
all startup messages.  However, that may have allowed the caller to
then write out their message - but the timestamp on that message would
almost certainly be lower than the messages we've just written out.
2016-09-13 13:32:06 +09:00
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