Peter Barker
3803684c4e
DataFlash: add sanity checks around EraseAll
2018-11-06 10:15:03 +11:00
Andrew Tridgell
1d6b58f9ca
DataFlash: use WITH_SEMAPHORE()
...
and removed usage of hal.util->new_semaphore()
2018-10-17 12:54:22 +11:00
Peter Barker
fa7ba7ddbc
DataFlash: force messagewriters to completion
...
Setting a dataflash-file buffer size of less than or equal to 2kiB would
cause the startup-messagewriter to never push any messages other than
FMT out to the logs.
This is a combination of the return values of
critical_message_reserved_space and
non_messagewriter_message_reserved_space
This patch forces the startup messages out to the logs by ignoring the
space constraints every 100ms
2018-08-15 12:40:33 +10:00
Andrew Tridgell
8b4b38bcb2
DataFlash: removed "no io thread heartbeat" msg
2018-07-31 19:37:17 +10:00
murata
396517fe58
DataFlash: Delete unused arguments.
2018-07-30 12:14:49 +09:00
Peter Barker
493f958eb2
DataFlash: remove unused ReadBlock method
2018-07-02 09:00:51 +10:00
Andrew Tridgell
1283b92cb7
DataFlash: fix for new AP_RTC API
2018-06-15 08:01:22 +10:00
Andrew Tridgell
777b4c8cfe
DataFlash: avoid stat of current log file
...
this avoids getting invalid data base for stat() for the current log
file.
It also only gives up writing to a log file if writes fail for 2
seconds. This avoids a temporary write failure causing the log to be
closed (that can happen on ChibiOS with directory listing while writing)
2018-06-14 14:55:41 +10:00
Michael du Breuil
c4a66349ef
DataFlash: Remove suspend timer calls, restirct flush() to replay
2018-06-06 07:16:58 +10:00
Francisco Ferreira
221ba177c5
DataFlash: remove Qualcomm board support
2018-05-17 09:57:20 +10:00
Michael du Breuil
7e4972a061
DataFlash: Fix a false reporting of dead IO thread when millis() wraps
2018-05-14 10:11:32 +09:00
Michael du Breuil
703c7fb4b7
DataFlash: Remove unneeded inits and newlines
2018-05-14 10:10:38 +09:00
Lucas De Marchi
904888fba7
DataFlash: Linux boards never use /fs
2018-05-04 11:42:55 -07:00
Peter Barker
8027883734
DataFlash: remove vestiges of CLI functions
2018-04-10 10:27:08 +09:00
LukeMike
3dcaf83eaa
VRBRAIN / DataFlash: some update for new VR Brain 5.2E (EEPROM version)
2018-02-05 08:26:49 +11:00
LukeMike
bf6e57e7a4
VRBRAIN / DataFlash: added writebuf_chunk for VR Brain 5.4
2018-02-05 08:26:49 +11:00
Andrew Tridgell
38a36a070f
DataFlash: removed some special cases for ChibiOS
2018-01-20 17:40:07 +11:00
Andrew Tridgell
43a6ed4099
DataFlash: support ChibiOS FATFS implementation
2018-01-15 11:46:02 +11:00
Peter Barker
3af5be76aa
DataFlash: protect write fd with semaphore
...
If the sensor threads are using WriteBlock they may pass the _write_fd
== -1 check but then have that set to -1 by the main thread
2017-09-20 11:33:07 +01:00
Peter Barker
4263c1a90c
DataFlash: file not being initialised means logging is failed
2017-09-11 17:42:38 +01:00
Peter Barker
9783c0c3ba
DataFlash: log dataflash-file statistics periodically
2017-08-28 22:05:44 +01:00
Peter Barker
776d88bb6b
DataFlash: remove duplicate variables
2017-08-28 22:05:44 +01:00
Peter Barker
975d2fd0d1
DataFlash: add debug for io thread failure
2017-07-28 17:06:49 +01:00
Peter Barker
0769432e63
DataFlash: move log-write-started logic to be backend-specific
2017-07-19 16:37:28 +01:00
Peter Barker
1f0a14ab33
DataFlash: add PrepForArming method
2017-07-19 16:37:28 +01:00
Francisco Ferreira
a1115ba5d0
DataFlash: move some code from WritesOK into a new ShouldLog method
2017-07-19 16:37:21 +01:00
Peter Barker
b572c13ca9
DataFlash: move starting of new logs into DataFlash
2017-07-19 16:37:16 +01:00
Peter Barker
4234f4ef7a
DataFlash: move _initialised into DataFlash_Backend
2017-07-19 16:37:16 +01:00
Peter Barker
f6a09d0657
DataFlash: eliminate GCS_MAVLINK::send_statustext_all
2017-07-11 23:53:53 +01:00
Peter Barker
001d3a7118
DataFlash: correct consts on CardInserted
2017-06-16 17:07:48 +01:00
Peter Barker
91b62abfe5
DataFlash: simplify dataflash initialisation
2017-06-14 12:20:29 +01:00
Peter Barker
0be2e7962f
DataFlash: create a WritesOK method for WritePrioritisedBlock
2017-06-11 20:34:12 +01:00
Peter Barker
9324d8e251
Dataflash: emit io thread warnings much less frequently
2017-04-19 12:33:18 +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
murata
1b2ea27a68
DataFlash: Unify from print or println to printf.
2017-01-27 18:20:22 +11: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
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
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
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
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
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
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
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