Andrew Tridgell
10ec1b8290
DataFlash: example no longer builds with APM2
2015-03-26 06:32:00 -07:00
Andrew Tridgell
ecd2a6f515
DataFlash: log temperature of IMUs
...
this is the first step towards supporting temperature calibration of
IMUs
2015-03-17 13:33:26 +11:00
Andrew Tridgell
73782c41a9
DataFlash: disable CLI on APM2
2015-03-13 22:52:55 +11:00
Andrew Tridgell
af5f84f4e4
DataFlash: fixed example builds
2015-02-09 13:09:16 +11:00
Emile Castelnuovo
ebc3dcd142
DataFlash: Clean up, VRBRAIN deleted unused boards.
2015-02-02 08:44:01 +11:00
Emile Castelnuovo
ffd26e59cd
DataFlash: added new VRBRAIN boards
2015-02-02 08:43:59 +11:00
Holger Steinhaus
8911dfd791
DataFlash: fix out-of-bounds read when logging
...
Checked in my rmackay9
2015-01-31 13:24:34 +09:00
Randy Mackay
0480828350
Dataflash: fix example sketch
2015-01-28 16:31:50 +09:00
Randy Mackay
842efe71be
DataFlash: move COMPASS2,3 formats to extra structures
2015-01-21 14:38:13 +09:00
Randy Mackay
e7471c5fe5
DataFlash: fix message id and CURR formatting
2015-01-21 14:38:03 +09:00
Randy Mackay
09e3dcd821
DataFlash: pass ahrs, batt, targets by reference
2015-01-21 14:38:01 +09:00
Randy Mackay
f23959b5fa
DataFlash: fix missing slash lost in merge
2015-01-21 14:37:59 +09:00
Robert Lefebvre
80929c389e
DataFlash: Handle multiple compass instances natively inside the Library.
2015-01-21 14:37:50 +09:00
Robert Lefebvre
5b70550b73
DataFlash: Fix potentially uninitialized variable compiler warning.
2015-01-21 14:37:27 +09:00
Robert Lefebvre
be803f4f39
DataFlash: Minor whitespace changes/cleanup. No effect.
2015-01-21 14:37:25 +09:00
Robert Lefebvre
2657610373
DataFlash: Add common-vehicle Mode logging method.
...
Conflicts:
libraries/DataFlash/DataFlash.h
2015-01-21 14:37:18 +09:00
Robert Lefebvre
12c3593bc3
DataFlash: Add common-vehicle Compass logging method.
2015-01-21 14:37:14 +09:00
Robert Lefebvre
2fdcd99db2
Arducopter: Move Attitude Message structure definition to the Base Structures section.
...
Conflicts:
libraries/DataFlash/DataFlash.h
2015-01-21 14:37:12 +09:00
Robert Lefebvre
d2adf2cdd7
DataFlash.h: Move format characters string to a more convenient location.
2015-01-21 14:37:10 +09:00
Robert Lefebvre
392e5257cc
DataFlash: Add voltage2 data to Current log, to be used by plane.
2015-01-21 14:37:07 +09:00
Robert Lefebvre
50b5376945
DataFlash: Add common-vehicle Current logging message.
2015-01-21 14:37:01 +09:00
Robert Lefebvre
db1a066f43
DataFlash: Add common-vehicle Attitude logging message.
2015-01-21 14:36:56 +09:00
Andrew Tridgell
5d83124675
DataFlash: moved airspeed msg to DataFlash
...
so it can be used by Replay
2015-01-20 09:10:33 +11:00
Andrew Tridgell
e8b1fc72e0
DataFlash: fixed build warning
2015-01-09 12:43:15 +11:00
Andrew Tridgell
b85001bf4a
DataFlash: added logging of 2nd baro
2015-01-09 11:51:51 +11:00
Randy Mackay
3e583e3650
DataFlash: fix EKF4 logging
2015-01-09 10:51:24 +11:00
Randy Mackay
3896dadc77
DataFlash: EKF logs filter status as uint16
2015-01-09 10:51:23 +11:00
Randy Mackay
54cff29fc2
DataFlash: EKF logging uses nav_filter_status
2015-01-09 10:51:23 +11:00
priseborough
873860e810
DataFlash: Allow negative HAGL values in the EKF optical flow debug log
2015-01-09 10:51:22 +11:00
priseborough
d470d55234
DataFlash: Update EKF optical flow debug logging
2015-01-09 10:51:21 +11:00
Andrew Tridgell
2ddf3e728a
DataFlash: use common RingBuffer.h
2015-01-07 08:41:14 +11:00
priseborough
a9eec29e45
DataFlash: Update EKF optical flow data logging
2015-01-03 14:09:15 +11:00
priseborough
b99b3c7b9d
DataFlash: Don't log EKF optical flow data if not required
2014-12-31 13:16:09 +09:00
priseborough
685fa383e4
DataFlash: Log EKF solution status message
...
This message is a bitmasked integer that will be used by control software to determine what data is available from the EKF and decide what control modes are available.
Duplicate static mode message removed. Static mode is now contained in the bitmasked solution status message
2014-12-31 13:13:33 +09:00
Andrew Tridgell
e0943851d6
DataFlash: log gyro and accel error counts
2014-12-30 12:16:02 +11:00
Andrew Tridgell
c93ae67541
DataFlash: don't try and open logfile on failure more than once
...
this prevents a corrupted microSD card from causing a continuous
attempt to open a log file while in flight, which can cause large
scheduler delays
Pair-Programmed-With: Grant Morphett <grant@gmorph.com>
2014-12-21 14:50:42 +11:00
Andrew Tridgell
abd1ece6e3
DataFlash: don't write out parameters if log open fails
2014-12-21 14:50:42 +11:00
priseborough
7d27a22f77
DataFlash : Fix EKF optical flow logging bug
2014-12-06 18:16:48 +11:00
priseborough
2baa1e56ed
Dataflash : Fix bug in EKF opt flow logging
2014-12-06 18:16:48 +11:00
priseborough
cc8e6dbfad
DataFlash : Add EKF additional fault and timeout logging
2014-12-06 18:16:47 +11:00
priseborough
4616721b0d
DataFlash : Update EKF debug logging
2014-12-06 18:16:47 +11:00
priseborough
f358d5e20f
DataFlash : Add range measurement to EKF debug message
2014-12-06 18:16:45 +11:00
priseborough
a07e402ebf
DataFlash : Update names in EKF optical flow logging
2014-12-06 18:16:45 +11:00
priseborough
bc74abcd00
DataFlash : EKF optical flow fusion support preliminary changes
2014-12-06 18:16:44 +11:00
Andrew Tridgell
940966f3e3
DataFlash: fixed example sketch build
2014-12-03 08:39:36 +11:00
Andrew Tridgell
d0087c91e9
DataFlash: prevent build errors on non-PX4 targets
2014-11-26 11:14:44 +11:00
Andrew Tridgell
1d0122e6c2
DataFlash: log each ESC separately
...
this saves log space for ESCs that are not initialised (eg. only 3rd
ESC on fixed wing) and is a bit easier to deal with as a user
2014-11-26 11:14:44 +11:00
Holger Steinhaus
294d944cbd
DataFlash: added logging of ESC feedback (currently only available with UAVCAN ESCs)
2014-11-26 11:14:44 +11:00
Andrew Tridgell
09547c40cb
DataFlash: added staticmode to EKF4 message
...
useful when diagnosing logs
2014-11-22 18:27:51 +11:00
priseborough
d57c99f1cc
DataFlash: Fix bug in logging of EKF IMU1 Z accel bias
2014-11-18 13:39:42 +11:00
Jonathan Challinger
9be7039be1
DataFlash: add UBX3 message for accuracy logging
2014-11-06 07:38:41 +11:00
Jonathan Challinger
84da5d2d98
DataFlash: use new interface functions for EKF IMU weighting and accel biases
2014-10-30 18:17:38 +11:00
Jonathan Challinger
ac2e5f644c
DataFlash: fix bug in ekf gyro bias logging
2014-10-30 18:17:37 +11:00
priseborough
aca78d321f
DataFlash : Remove unused numerical divergence metric
2014-10-30 18:17:37 +11:00
priseborough
638d63aa90
DataFlash : Change to more descriptive EKF logging names
2014-10-30 18:17:37 +11:00
Jonathan Challinger
6848897999
AP_GPS: Add agcCnt to UBX1 message
2014-10-29 08:18:04 +11:00
Randy Mackay
04eb1073e8
DataFlash: log baro climbrate
2014-10-22 17:29:27 +09:00
Andrew Tridgell
9d846d5f2a
DataFlash: allow use of a smaller writebuf for PX4v1
...
this fixes logging on PX4v1
2014-09-09 17:32:44 +10:00
Andrew Tridgell
2b02fdbbc9
DataFlash: moved UBX logging headers to DataFlash
2014-08-19 10:08:15 +10:00
Emile Castelnuovo
bbb9925c47
DataFlash: Added four more channels for logging
2014-08-16 20:28:46 +10:00
Andrew Tridgell
6c19f23ace
DataFlash: fixed example build
2014-08-13 21:48:36 +10:00
Andrew Tridgell
47655ee78e
DataFlash: removed more unusued BufferRead functions
2014-08-11 09:39:02 +10:00
Daniel Frenzel
74460cd526
DataFlash: Delete unused BufferRead function
...
Signed-off-by: Daniel Frenzel <dgdanielf@gmail.com>
2014-08-11 09:24:42 +10:00
Andrew Tridgell
cd8fca40fb
DataFlash: added TERR log message for terrain data
2014-08-06 17:59:19 +10:00
Randy Mackay
f12d06d76b
DataFlash: typo fix in ListAvailableLogs
2014-08-01 15:14:44 +09:00
Andrew Tridgell
3fa30f91db
DataFlash: avoid CLI functions on APM2 for copter
2014-08-01 15:57:15 +10:00
Andrew Tridgell
e67c468e2d
DataFlash: fixed example build
2014-07-25 17:55:16 +10:00
Andrew Tridgell
fd87f28a07
DataFlash: save some flash space on APM2
...
don't include log message headers that are not used on APM2
2014-06-30 07:58:42 +10:00
Andrew Tridgell
e6d8e329d5
DataFlash: allow logging of 3 accels/gyros
2014-06-30 07:58:30 +10:00
LukeMike
8f552d5758
VRBRAIN: Changed the management of VirtualRobotix's boards.
2014-06-19 11:27:38 +02:00
Randy Mackay
11e08e1492
DataFlash: common Log_Write_Camera
...
pair programmed with Craig Elder
2014-06-17 14:11:36 +10:00
Andrew Tridgell
1e2214f8d1
DataFlash: fix for HAL_GPIO_*
2014-06-02 10:42:36 +10:00
priseborough
f01cc78d37
DataFlash: Add EKF fault status logging
2014-05-15 21:14:21 +10:00
Andrew Tridgell
4f250579db
DataFlash: added LOG_ATRP_MSG define
2014-04-30 21:22:28 +10:00
Andrew Tridgell
7f5eeabadc
DataFlash: reserve a range of msg types for autotuning logs
2014-04-12 18:21:31 +10:00
Andrew Tridgell
95304e27c9
DataFlash: added separate logging of each GPS
2014-04-10 10:29:30 +10:00
Emile Castelnuovo
ab9a320187
DataFlash: added #ifdefs for VRBRAIN board
2014-04-08 16:19:19 +10:00
Andrew Tridgell
067bbf5b5c
DataFlash: hdop is unsigned
2014-04-02 07:55:28 +11:00
priseborough
09c5ba1aed
Dataflash : Improved logging of EKF sensor health checks
...
This changes the definition sof the messages in the EKF4 message to make it more useful
The values shown now relate directly to how much margin there is before a measurement
is rejected, enabling better tuning of error trap parameters
2014-04-01 21:27:07 +11:00
Andrew Tridgell
31d3b6555f
DataFlash: convert to new GPS API
2014-04-01 06:38:23 +11:00
Andrew Tridgell
6bf2b5033e
DataFlash: support logging up to 14 RC input channels
2014-03-25 16:39:19 +11:00
Andrew Tridgell
27dbf608c8
DataFlash: fixed a build warning
2014-03-25 13:31:21 +11:00
Andrew Tridgell
1b1a92251f
DataFlash: allow drivers to setup their own logging formats
...
this allows drivers to ask the dataflash driver to add new log formats
2014-03-24 12:03:31 +11:00
Michael Day
68dbfd6315
DataFlash: Add Log_Write_Radio to store RSSI and noise on board.
2014-03-20 09:56:37 +11:00
Andrew Tridgell
5f85792224
DataFlash: fixed example build
2014-03-19 12:13:53 +09:00
Randy Mackay
869f325c66
DataFlash: Log_Write_MavCmd replaces Log_Write_Cmd
2014-03-19 12:12:43 +09:00
Randy Mackay
ebf72f5beb
Dataflash: example sketch includes AP_Mission.h
2014-03-19 12:12:10 +09:00
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
Pat Hickey
4c930b77a4
DataFlash_Empty defined
2012-12-20 14:52:31 +11:00
Andrew Tridgell
7d27e420ae
AP_HAL: remove unnecessary Arduino.h includes
2012-12-20 14:52:30 +11:00
Andrew Tridgell
964bc56aa2
DataFlash: reinstate SITL dataflash code
2012-12-20 14:52:29 +11:00
Pat Hickey
308281f252
DataFlash_test ported to AP_HAL
2012-12-20 14:51:40 +11:00
Andrew Tridgell
c4b8959202
DataFlash: added SITL headers
2012-12-20 14:51:40 +11:00
Andrew Tridgell
e57834d763
DataFlash: added SITL header
2012-12-20 14:51:40 +11:00
Pat Hickey
7b9b088261
DataFlash: AP_HAL port fixups
2012-12-20 14:51:37 +11:00
Pat Hickey
aaffd9d96e
DataFlash: APM2 ported to AP_HAL SPIDeviceDriver
2012-12-20 14:51:36 +11:00
Pat Hickey
4f07a90b2e
DataFlash: apm1 fixups
2012-12-20 14:51:36 +11:00
Pat Hickey
ef1db1a3fc
DataFlash: don't take a delay_cb
2012-12-20 14:51:36 +11:00
Pat Hickey
0e5ff36c6c
DataFlash: DataFlash_APM1 rewritten in terms of AP_HAL spi primitives
2012-12-20 14:51:36 +11:00
Pat Hickey
a81de007d8
DataFlash: headers switch to use AP_HAL SPI device driver types
2012-12-20 14:51:36 +11:00
Pat Hickey
cc699a2a4e
DataFlash: conform to ordinary stdint types
...
* s/unsigned char/uint8_t/g
* changed all type 'byte' to uint8_t
2012-12-20 14:51:36 +11:00
Pat Hickey
8ffec83b73
DataFlash: fixes to lib include and make the test smaller
2012-12-20 14:51:22 +11:00
Andrew Tridgell
17c115d2aa
SITL: don't define __AVR_ATmega2560__ on desktop build
...
this allows us to properly separate the desktop build in the code
2012-11-19 09:03:35 +11:00
Jason Short
c848fe18a5
APM1 Dataflash update
...
My data flash would never erase, this fixed it.
2012-11-09 22:15:16 -08:00
rmackay9
17afd075c1
DataFlash_APM1: use spi_semaphore to avoid conflicts with optical flow
2012-10-18 17:03:50 +09:00
rmackay9
785d9ca6a7
DataFlash_APM2: renamed semaphore to spi3_semaphore to make it more obvious which semaphore is required.
2012-10-18 17:00:05 +09:00
Pat Hickey
aa210d7e99
AP_DataFlash_test wibble
2012-10-09 11:39:09 -07:00
Pat Hickey
605f89fa69
DataFlash_APM2: private AP_Semaphore* rather than use extern AP_Semaphore_spi3
...
The AP_Semaphore* argument to the constructor can be null (and is by
default for compatibility). Semaphore is only used when non-null.
2012-10-09 11:38:52 -07:00
rmackay9
b9963f5b5c
DataFlash: modified to use AP_Semaphore for SPI3 bus when required.
...
Also fixed test sketch which seemed broken.
2012-10-06 12:41:50 +09:00
uncrustify
08c8dffd48
uncrustify libraries/DataFlash/DataFlash.h
2012-08-21 19:19:52 -07:00
uncrustify
2e97fd3e9f
uncrustify libraries/DataFlash/DataFlash.cpp
2012-08-21 19:19:52 -07:00
uncrustify
9b44f5b741
uncrustify libraries/DataFlash/DataFlash_APM1.h
2012-08-21 19:04:23 -07:00
uncrustify
c68a341633
uncrustify libraries/DataFlash/DataFlash_APM2.h
2012-08-21 19:04:23 -07:00
uncrustify
21337a39d3
uncrustify libraries/DataFlash/DataFlash_APM1.cpp
2012-08-21 19:04:23 -07:00
uncrustify
eb9d6b259b
uncrustify libraries/DataFlash/DataFlash_APM2.cpp
2012-08-21 19:04:23 -07:00
uncrustify
15d8ba45e3
uncrustify libraries/DataFlash/examples/DataFlash_test/DataFlash_test.pde
2012-08-21 19:04:10 -07:00
rmackay9
2b24e422de
DataFlash: revert delay callbacks to use "unsigned long"
2012-08-18 20:28:31 +09:00
rmackay9
20cb2e56a0
DataFlash: change "unsigned long" to "uint32_t" in callback functions
2012-08-18 19:22:14 +09:00
rmackay9
94552b57a7
DataFlash: replaced "int" with "int16_t"
2012-08-18 18:31:20 +09:00
Andrew Tridgell
e171720608
DataFlash: fixed SITL build
2012-08-17 16:27:19 +10:00
Jason Short
bd91215770
Dataflash fix for missing card error
2012-08-16 15:37:28 -07:00
Jason Short
3ca57ac105
DataFlash : Removed Chip Erase - relying on Block erase only
2012-08-15 21:04:24 -07:00
Jason Short
ce2a608706
Dataflash Logs : Fixed block erase on APM2
...
Byte order for 512 vs 528 was reversed.
2012-08-15 21:04:24 -07:00
Craig Elder
6d3fdfc03a
DataFlash: The current method for checking if chip erase worked is producing false positives. We are forcing the block erase until we have a deterministic test method.
2012-07-09 15:23:35 -07:00
Andrew Tridgell
dd24330645
DataFlash: fallback to BlockErase if ChipErase fails
...
The errata on the APM2 dataflash chip says that ChipErase may not work
on some chips
2012-07-04 12:42:46 +10:00
Andrew Tridgell
fc73fd6531
DataFlash: use ChipErase() instead of PageErase() on all pages
...
This makes the DataFlash erase much faster (about 6 seconds instead of
about 60 seconds).
We need to test and ensure the behaviour is equivalent apart from the
speed
2012-05-22 19:29:02 -07:00
rmackay9
c45b124cbe
DataFlash_APM2 - moved CS_inactive call (which disables the dataflash) from the beginning to the end of all methods. This means the dataflash does not monopolize the SPI bus.
...
Also formatting changes to use tab instead of space. Sorry, should have done this as a separate check-in to the above changes.
2012-04-21 20:14:45 +09:00
Randy Mackay
ed19c25a97
Arduino 1.0 - changed all #includes of "WProgram.h", "wiring.h" and "WConstants.h to "Arduino.h".
...
Modified FastSerial's write function to return size_t (number of bytes written).
2012-01-28 12:25:47 +09:00
Doug Weibel
756793611f
Repair dataflash test
2012-01-08 21:29:19 -07:00
Andrew Tridgell
880c7e6411
DataFlash: cope with older dataflash chips
...
some of the APM2 DataFlash cards use an older chip with only 4096
pages, and a density code of 6. Doug has one of these.
2012-01-04 16:16:35 +11:00
Andrew Tridgell
5e4f66e525
DataFlash: moved high level logging logic to library
...
this moves out all the high level logic from ArduPlane/ArduCopter to
the library. It also adds a "config page", as the last page in the
flash. This is used to check if the flash needs erasing. We only erase
now if the DF_LOGGING_FORMAT has changed.
This patch also adds a public CardInserted() method, which is used to
disable logging on APM2 if a dataflash card is not inserted
2011-12-28 16:00:48 +11:00
Andrew Tridgell
bd9488f1e4
DataFlash: fixed sense of card detect
2011-12-28 16:00:48 +11:00
Andrew Tridgell
637d4675e1
added in DataFlash.cpp
...
forgot this ....
2011-12-26 19:34:06 +11:00
Andrew Tridgell
977326e991
dataflash: reworked classes to move most code to parent class
...
this moves all the non-hardware specific code to the parent
DataFlash_Class class, keeping the hw specific code much smaller and
simpler.
This should prevent discrepancies creeping in between APM1 and APM2
support again
2011-12-26 19:17:11 +11:00
Andrew Tridgell
13b2ddcbe1
dataflash: fixed APM2 flash logging
...
we had log wrap disabled on APM2, and also had the wrong log size. The
mainline code assumed 4096, but it is 8192 pages long.
2011-12-26 19:17:11 +11:00
Andrew Tridgell
02f25ac36d
libraries: rename purple to APM2
2011-11-25 20:00:19 -08:00
Andrew Tridgell
2b7e0c8494
DataFlash_Purple: added new logging methods needed for ArduPlane
...
builds, but not tested yet
2011-11-25 20:00:18 -08:00
Andrew Tridgell
cba93dbd43
DataFlash_APM1: re-add defines lost from merge
2011-11-25 20:00:18 -08:00
Andrew Tridgell
bb7af8c15a
dataflash: fixed datatypes to be compatible with desktop build
2011-11-25 20:00:17 -08:00
Pat Hickey
82e7551c90
purple: rework DataFlash to separate purple and APM1 hardware support
...
the purple support is still a work in progress, but the APM1 support
should be fine
2011-11-25 20:00:16 -08:00
Doug Weibel
f752c4b799
Change to logging file system.
...
This commit is somewhat temporary as I have come up with a better scheme and will be modifying this. Just making this commit in case I need to roll back
2011-11-17 21:25:51 -07:00
Andrew Tridgell
cfe058c5d5
DataFlash: use CPU independent data types
...
this ensures that the DataFlash API is consistent for different CPU
architectures, which matters for the Desktop build, and will matter
for ARM and other CPUs later
2011-11-07 22:56:13 +11:00
James Goppert
0c7c508541
Optional recursion added.
2011-09-30 17:17:51 -04:00
James Goppert
5489b84f8e
Improvements to cmake.
2011-09-29 21:23:26 -04:00
James Goppert
d887a28b91
Added ArduBoat/ ArduRover/ and APO library.
2011-09-29 14:12:15 -04:00
unknown
a4e001bbcf
Adding CMake support
2011-09-14 15:44:55 +02:00
tridge60@gmail.com
6075b7ce73
dataflash: fixed some compiler warnings
...
tmp is not needed
Pair-Programmed-With: Mike Smith
git-svn-id: https://arducopter.googlecode.com/svn/trunk@3230 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-09-04 06:39:14 +00:00
rmackay9@yahoo.com
09256e12da
DataFlash library - changed to use standard arduino SPI library
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2928 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-07-19 23:00:18 +00:00
rmackay9@yahoo.com
0f920d12ce
DataFlash - backed out recent changes to make it use SPI while I figure out the cause of some people's compile errors
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1936 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-05-01 02:27:18 +00:00
rmackay9@yahoo.com
0462774345
DataFlash - modified to use Arduino SPI interface instead of directly using registers. Also moved "dataflash_CS_inactive" calls to end of functions instead of beginning so that it doesn't monopolize the SPI bus.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1931 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-04-30 03:25:31 +00:00
mich146@hotmail.com
a107587af6
update dataflash for 528 and 512 byte pages
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1906 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-04-18 11:19:31 +00:00
james.goppert@gmail.com
c1b6032e7f
Eclipse makefile support for examples.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1860 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-04-09 19:38:12 +00:00
jasonshort
b6c552212e
updated formatting, baud
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1642 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-02-14 00:43:11 +00:00
deweibel@gmail.com
b3c9bf270f
Add FinishWrite method to the DataFlash class to support using an index system.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1575 f9c3cf11-9bcb-44bc-f272-b75c42450872
2011-01-30 01:53:04 +00:00
rmackay9@yahoo.com
a257c51a09
Some changes to fix compile errors when using ATmega2560.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@1187 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-12-19 13:05:02 +00:00
deweibel
c0e5fa9908
Added GetWritePage()
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@230 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-08-18 18:29:03 +00:00
jjulio1234
3976200f50
First version. This is the "core" of the project and libraries.
...
git-svn-id: https://arducopter.googlecode.com/svn/trunk@2 f9c3cf11-9bcb-44bc-f272-b75c42450872
2010-05-28 14:38:51 +00:00