Randy Mackay
150faafaf4
Dataflash: add Log_Write_Cmd method
2014-03-19 12:12:07 +09:00
Andrew Tridgell
ecdd74d580
DataFlash: return number of logs as zero correctly
...
when we have no file based logs, report no logs :)
2014-03-11 17:11:58 +11:00
Andrew Tridgell
e410733682
DataFlash: added GPS2 logging
2014-02-26 09:19:00 +11:00
Andrew Tridgell
f222f2ef1e
DataFlash: fixed logging on PX4v1
...
large writes break IO, a NuttX bug
2014-02-20 06:55:35 +11:00
Andrew Tridgell
6618bdae67
DataFlash: periodically use lseek to avoid NuttX seek bug
2014-02-16 13:21:35 +11:00
Paul Riseborough
17e24521e8
DataFlash : Added logging of NavEKF innovations and variances
2014-02-15 05:48:21 +11:00
Andrew Tridgell
45177df354
DataFlash: moved EKF logging to common code
2014-02-15 05:48:16 +11:00
Andrew Tridgell
d0a25b53f2
DataFlash: added logging of AHRS2
2014-02-15 05:48:09 +11:00
Andrew Tridgell
e7cf07dfb7
DataFlash: added Columns column to FMT
2014-02-15 05:27:51 +11:00
Andrew Tridgell
ce43e674fe
DataFlash: added power status logging
2014-02-15 05:00:09 +11:00
Andrew Tridgell
63910bf8cd
DataFlash: work around a NuttX bug
...
the seek offset of files can get badly mucked up when it crosses
cluster boundaries. We need to fix this in NuttX, but meanwhile this
works around the bug. It seems that doing a lseek(fd, 0, SEEK_CUR)
fixes the seek offset in the file.
The bug seems to first happen at an offset of 315392. It also
doesn't happen every time - it is more likely to happen on the first
log download after booting
2014-02-15 05:00:08 +11:00
Andrew Tridgell
fc3ed61e67
DataFlash: added baro dataflash logging
2014-01-28 10:35:18 +11:00
Andrew Tridgell
921f923c5f
DataFlash: reset write log on new log
2014-01-14 14:28:56 +11:00
Andrew Tridgell
ef28d087d2
DataFlash: added logging_started() API
2014-01-14 13:51:06 +11:00
Andrew Tridgell
f6db03dfb0
DataFlash: don't fsync on SITL
...
this makes it much faster on virtual machines
2014-01-14 12:46:26 +11:00
Andrew Tridgell
b4b66210ff
DataFlash: improve reliability of microSD for logs
2014-01-14 12:46:26 +11:00
Andrew Tridgell
cb23298384
DataFlash: try to keep dataflash writes aligned
...
also rename lastlog.txt to LASTLOG.TXT as NuttX seems to get less
corruption with VFAT filenames that don't need uppercase mappings
2014-01-14 12:46:26 +11:00
Randy Mackay
a53d1075ec
DataFlash: add EnableWrites method
...
This method allows temporarily suspending writes to the dataflash which
will be used in ArduCopter to ensure no messages are written while the
copter is disarmed
2014-01-07 22:43:44 +09:00
Andrew Tridgell
4519aa8867
DataFlash: only fsync every 10 seconds
...
prevents too much work in SITL
2014-01-04 08:15:38 +11:00
Andrew Tridgell
8019d45200
DataFlash: use HAL_OS_POSIX_IO
2013-12-31 10:28:38 +11:00
Andrew Tridgell
a43e0f6f31
DataFlash: stop logging when erasing logs
2013-12-29 15:00:15 +11:00
Andrew Tridgell
e1a86440bb
DataFlash: stop write logging while reading
...
prevents nuttx getting confused
2013-12-28 14:25:54 +11:00
Andrew Tridgell
a37a6d68f3
DataFlash: zero-fill FMT packet before logging
...
this prevents uninitialised data appearing at the end of strings in
logs
2013-12-21 13:56:54 +11:00
Andrew Tridgell
599edeeafb
DataFlash: removed debug code for creating logs with no headers
2013-12-17 12:15:41 +11:00
Andrew Tridgell
0641159660
DataFlash: fixed example build
2013-12-17 11:51:37 +11:00
Andrew Tridgell
93140bd956
DataFlash: auto-add FMT headers to binary logs if needed
...
this copes with dataflash wrapping
2013-12-17 11:51:36 +11:00
Andrew Tridgell
e6bafa2d8f
DataFlash: added structures to Init() of dataflash
...
this will allow the get_log_data() call to add FMT headers if a log
has wrapped
2013-12-17 11:51:36 +11:00
Andrew Tridgell
5d53b780ba
DataFlash: added functions for load download support
2013-12-17 11:51:35 +11:00
Andrew Tridgell
4ce2555a65
DataFlash: don't try to create a directory that exists
...
this is an attempt to avoid microSD card corruption. The most common
corruption is two 'logs' directories, which may indicate an issue with
trying to create it a 2nd time.
2013-12-14 15:47:49 +11:00
Andrew Tridgell
513f4074ce
DataFlash: fixed dual sensor dataflash logging
2013-12-10 15:32:11 +11:00
Andrew Tridgell
08658909ad
DataFlash: log both IMU packets at once
2013-12-09 17:34:07 +11:00
Andrew Tridgell
a6b3d4217c
DataFlash: fixes for INS API change
2013-12-09 17:34:06 +11:00
Andrew Tridgell
eb883fbb0c
DataFlash: added Log_Write_IMU2() for logging 2nd INS sensors
2013-12-09 17:34:06 +11:00
Randy Mackay
ef2597a626
DataFlash: rename Log_Write_SERVO to Log_Write_RCOU
2013-11-27 20:17:41 +09:00
Andrew Tridgell
825b360fb0
DataFlash: added RCIN and SRVO log methods
2013-11-26 09:04:43 +11:00
Andrew Tridgell
0a2f2619de
DataFlash: fixed SITL dataflash logging
...
block numbers are 1 based
2013-11-26 09:04:43 +11:00
Andrew Tridgell
3262022195
DataFlash: print FMT messages for wrapped logs
...
this ensures we have FMT messages in every log, even if the log was
wrapped and the FMT messages were overwritten
2013-11-09 11:09:42 +11:00
Andrew Tridgell
900ea5dde0
DataFlash: make the SITL dataflash log 4x larger
2013-11-07 10:18:38 +11:00
Andrew Tridgell
1fb636d57f
DataFlash: added APM time and GPS velz to logged GPS messages
2013-11-04 21:37:10 +11:00
Andrew Tridgell
5e915fbde3
DataFlash: added timestamp to IMU and VelZ to GPS logging
...
both are very useful for analysis
2013-11-04 21:21:42 +11:00
Andrew Tridgell
4e82a8e1d4
DataFlash: use const ins reference
...
save some pointer dereferences
2013-11-04 21:21:42 +11:00
Andrew Tridgell
6b2222c32e
DataFlash: show timestamps on flash logs
2013-10-24 14:22:48 +11:00
Andrew Tridgell
d7a9888e26
DataFlash: updates for new GPS API
2013-10-24 14:22:47 +11:00
Andrew Tridgell
2422b94292
DataFlash: prevent valgrind errors from Empty driver
2013-10-08 11:50:53 +11:00
Andrew Tridgell
99a8ba4634
DataFlash: fixed display of last page of flash logs
2013-10-03 12:21:08 +10:00
Andrew Tridgell
89f121ea77
DataFlash: wait for blocks to finish writing to flash on log read
2013-10-03 12:21:08 +10:00
Andrew Tridgell
a86bb15a05
DataFlash: updates for AP_HAL::MemberProc
2013-09-30 21:06:42 +10:00
Andrew Tridgell
19e9c95983
DataFlash: use new scheduler API
2013-09-28 21:24:03 +10:00
Andrew Tridgell
49d3d624d7
DataFlash: enabled DataFlash_File for Linux
2013-09-28 21:24:02 +10:00
Andrew Tridgell
7de47931a8
DataFlash: use %f not %.6f
2013-09-21 15:48:39 +10:00
Randy Mackay
4b18c670e3
DataFlash: explicitly print floats to 6 dec places
...
C++ default is to print 6 decimal places but nuttx displays none by
default
2013-09-20 22:13:02 +09:00
Andrew Tridgell
645eb711cb
DataFlash: changed to AP_Vehicle.h
2013-09-13 11:44:42 +10:00
Andrew Tridgell
97b7130bb9
libraries: update license header to GPLv3
...
we switched to GPLv3 a long time ago, but neglected to update the
per-file license headers
2013-08-30 13:01:39 +10:00
Andrew Tridgell
b57af23933
DataFlash: fixed example build
2013-08-30 13:01:36 +10:00
Andrew Tridgell
dd747505c5
DataFlash: report when DataFlash write fails
2013-08-30 13:01:34 +10:00
Andrew Tridgell
4662858077
DataFlash: we don't need AP_AHRS.h
2013-08-30 13:01:34 +10:00
Andrew Tridgell
2874ec67c7
DataFlash: slight efficiency improvement
...
fixes issue #314
thanks Dongfang!
2013-07-23 09:46:02 +10:00
Andrew Tridgell
032cc513ca
DataFlash: fixed example build
2013-07-15 14:10:58 +10:00
Andrew Tridgell
469736e6bc
DataFlash: changes for GPS field changes
2013-07-10 14:04:22 +10:00
Andrew Tridgell
411e940342
DataFlash: prevent the dataflash erase problem
...
only allow writes to dataflash block devices once StartNewLog() has
been called
2013-05-14 16:31:45 +10:00
Andrew Tridgell
095505129c
DataFlash: hopefully fixed cause of frequent dataflash erase
...
Wait for 0.1s after erase and before we start writing parameters to
the log
Pair-Programmed-With: Randy Mackay <rmackay9@yahoo.com>
2013-05-08 17:00:36 +10:00
Andrew Tridgell
7fdf1b6f78
DataFlash: fixed example build
2013-05-08 16:45:40 +10:00
Andrew Tridgell
0242d50ad4
DataFlash: added Log_Write_Message()
...
useful for logging general messages
2013-05-03 09:18:14 +10:00
Andrew Tridgell
709a277c7f
DataFlash: chamged FMT message to include labels
...
this makes it easier for MP to parse and display
2013-04-23 19:46:22 +10:00
Andrew Tridgell
9ef34943af
DataFlash: change log extension to *.bin
2013-04-23 15:03:10 +10:00
Andrew Tridgell
844e1b9ef9
DataFlash: added support for printing flight mode as a string
...
makes analysing logs easier.
Pair-Programmed-With: Randy
2013-04-20 15:17:49 +10:00
Andrew Tridgell
b5ae588341
DataFlash_File: fixed creation of 0.log
2013-04-20 13:52:37 +10:00
Andrew Tridgell
735d60c493
DataFlash: convert example sketch to new API
2013-04-20 13:52:37 +10:00
Andrew Tridgell
62f190ed15
DataFlash: simplify code now that copter is converted
...
no longer need as many public functions
2013-04-20 13:52:37 +10:00
Andrew Tridgell
cf0c8331c2
DataFlash: use print_latlon()
2013-04-20 13:52:36 +10:00
Andrew Tridgell
c29d870497
DataFlash: dump the format of logs at the start of the log
2013-04-20 13:52:36 +10:00
Andrew Tridgell
916e8d0992
DataFlash: new dataflash logging system
...
this allows us to remove the display functions in the vehicle code,
and also allows us to store the format of a log file in the log. It
also stores the parameters used in a flight, rather than the
parameters set at the time the log is dumped
2013-04-20 13:52:36 +10:00
Andrew Tridgell
da5a5ea368
DataFlash: added file based 'dataflash' logging
2013-04-17 21:32:53 +10:00
Andrew Tridgell
310a5a6be1
DataFlash: don't try to write if no card inserted
2013-04-02 13:08:38 +11:00
Andrew Tridgell
c1c967f3bf
DataFlash: fixed test sketch build and run
2013-03-15 07:30:40 +11:00
Andrew Tridgell
a7541e9ad3
DataFlash: report log number when starting a new log
...
helps with test sketch
2013-03-15 07:30:23 +11:00
Andrew Tridgell
ba8d830754
DataFlash: start to fix example build
2013-03-11 13:02:08 +11:00
Andrew Tridgell
987cdaf3e1
DataFlash: make it safe to do DataFlash logging from timers
...
this uses a non-blocking semaphore take if we are in a timer
process. Useful for logging failsafe events
2013-03-02 17:42:06 +11:00
Andrew Tridgell
efd2da3eb8
DataFlash: started on file interface
2013-03-01 07:18:26 +11:00
Andrew Tridgell
7b524d15fa
DataFlash: added log_num to dump interface
...
this will be used by the file oriented logging code
2013-03-01 07:18:25 +11:00
Andrew Tridgell
c52ef80f06
DataFlash: added Block layer in classes
...
this will allow the addition of a DataFlash_File implementation of the
DataFlash API which will store logs in a traditional filesystem. That
will align better with the PX4 design, and be more useful for fast
transfer of logs to a host computer
2013-03-01 07:18:25 +11:00
Andrew Tridgell
0ffcffa81c
DataFlash: fixed signed/unsigned errors in API
2013-03-01 07:18:25 +11:00
Andrew Tridgell
9b551f162c
DataFlash: make the public interface much narrower
...
make many variables private, to simplify interface ready for PX4
2013-03-01 07:18:25 +11:00
Andrew Tridgell
20825cc903
DataFlash: removed the byte and word based interfaces
...
simplifing ready for PX4 flash logging
2013-03-01 07:18:25 +11:00
Andrew Tridgell
c6b006cf5f
DataFlash: move log reading logic into common library
2013-01-15 14:03:51 +11:00
Andrew Tridgell
f683cff9e2
DataFlash: speed up SPI transfers in DataFlash_APM1
2013-01-13 19:26:43 +11:00
Andrew Tridgell
8015f0f626
DataFlash: update SITL implementaion for new API
2013-01-13 17:31:43 +11:00
Andrew Tridgell
9ef1f8509b
DataFlash: update test code for new macros
2013-01-13 17:31:42 +11:00
Andrew Tridgell
83b074dd87
DataFlash: moved macros into common header
2013-01-13 17:31:42 +11:00
Andrew Tridgell
f3005c4267
DataFlash: use bulk SPI transfer() method
...
this reduces the per-byte overhead of flash logging to about 3.9 usec
2013-01-13 17:31:42 +11:00
Pat Hickey
3d0a4394b6
DataFlash Empty: conform to blockread/write virtual if
2013-01-12 10:44:05 -08:00
Andrew Tridgell
7274d847f8
DataFlash: update for new block API
2013-01-12 17:21:21 +11:00
Andrew Tridgell
28a0ba6c4a
DataFlash: added block based dataflash writes
...
these are about 10x faster than the old writes
2013-01-12 17:21:04 +11:00
Andrew Tridgell
44285cfbad
DataFlash: fixed a semaphore bug in APM1 dataflash code
2013-01-08 14:37:39 -08:00
Pat Hickey
390e96311e
DataFlash: change to new style Semaphore library
2013-01-03 13:48:07 -08:00
Andrew Tridgell
374af1cd14
build: change from Arduino.mk to apm.mk
2013-01-02 17:29:37 +11:00
Andrew Tridgell
fb4540a349
DataFlash: disable some debug code
2012-12-20 14:53:24 +11:00
Andrew Tridgell
a1187519a8
AP_HAL: use AP_HAL_BOARD_DRIVER in remaining test sketches
2012-12-20 14:52:37 +11:00
Pat Hickey
eb530b86e8
move Arduino.mk to /mk/Arduino.mk
2012-12-20 14:52:35 +11:00
Andrew Tridgell
448fc6719f
HAL_Empty: fixed return in dataflash
2012-12-20 14:52:33 +11:00