Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
Baitboat
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenSource
Baitboat
Commits
ab9a3201
Commit
ab9a3201
authored
11 years ago
by
Emile Castelnuovo
Committed by
Andrew Tridgell
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
DataFlash: added #ifdefs for VRBRAIN board
parent
06744ea7
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libraries/DataFlash/DataFlash_File.cpp
+9
-3
9 additions, 3 deletions
libraries/DataFlash/DataFlash_File.cpp
libraries/DataFlash/DataFlash_File.h
+2
-2
2 additions, 2 deletions
libraries/DataFlash/DataFlash_File.h
with
11 additions
and
5 deletions
libraries/DataFlash/DataFlash_File.cpp
+
9
−
3
View file @
ab9a3201
...
@@ -42,16 +42,22 @@ DataFlash_File::DataFlash_File(const char *log_directory) :
...
@@ -42,16 +42,22 @@ DataFlash_File::DataFlash_File(const char *log_directory) :
_log_directory
(
log_directory
),
_log_directory
(
log_directory
),
_writebuf
(
NULL
),
_writebuf
(
NULL
),
_writebuf_size
(
16
*
1024
),
_writebuf_size
(
16
*
1024
),
#ifdef
CONFIG_ARCH_BOARD_PX4FMU_V1
#if
def
ined(
CONFIG_ARCH_BOARD_PX4FMU_V1
)
// V1 gets IO errors with larger than 512 byte writes
// V1 gets IO errors with larger than 512 byte writes
_writebuf_chunk
(
512
),
_writebuf_chunk
(
512
),
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V4)
_writebuf_chunk
(
512
),
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V5)
_writebuf_chunk
(
512
),
#elif defined(CONFIG_ARCH_BOARD_VRHERO_V1)
_writebuf_chunk
(
512
),
#else
#else
_writebuf_chunk
(
4096
),
_writebuf_chunk
(
4096
),
#endif
#endif
_writebuf_head
(
0
),
_writebuf_head
(
0
),
_writebuf_tail
(
0
),
_writebuf_tail
(
0
),
_last_write_time
(
0
)
_last_write_time
(
0
)
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|| CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
,
_perf_write
(
perf_alloc
(
PC_ELAPSED
,
"DF_write"
)),
,
_perf_write
(
perf_alloc
(
PC_ELAPSED
,
"DF_write"
)),
_perf_fsync
(
perf_alloc
(
PC_ELAPSED
,
"DF_fsync"
)),
_perf_fsync
(
perf_alloc
(
PC_ELAPSED
,
"DF_fsync"
)),
_perf_errors
(
perf_alloc
(
PC_COUNT
,
"DF_errors"
))
_perf_errors
(
perf_alloc
(
PC_COUNT
,
"DF_errors"
))
...
@@ -67,7 +73,7 @@ void DataFlash_File::Init(const struct LogStructure *structure, uint8_t num_type
...
@@ -67,7 +73,7 @@ void DataFlash_File::Init(const struct LogStructure *structure, uint8_t num_type
int
ret
;
int
ret
;
struct
stat
st
;
struct
stat
st
;
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|| CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
// try to cope with an existing lowercase log directory
// try to cope with an existing lowercase log directory
// name. NuttX does not handle case insensitive VFAT well
// name. NuttX does not handle case insensitive VFAT well
DIR
*
d
=
opendir
(
"/fs/microsd/APM"
);
DIR
*
d
=
opendir
(
"/fs/microsd/APM"
);
...
...
This diff is collapsed.
Click to expand it.
libraries/DataFlash/DataFlash_File.h
+
2
−
2
View file @
ab9a3201
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
#ifndef DataFlash_File_h
#ifndef DataFlash_File_h
#define DataFlash_File_h
#define DataFlash_File_h
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|| CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
#include
<systemlib/perf_counter.h>
#include
<systemlib/perf_counter.h>
#else
#else
#define perf_begin(x)
#define perf_begin(x)
...
@@ -83,7 +83,7 @@ private:
...
@@ -83,7 +83,7 @@ private:
void
_io_timer
(
void
);
void
_io_timer
(
void
);
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
#if CONFIG_HAL_BOARD == HAL_BOARD_PX4
|| CONFIG_HAL_BOARD == HAL_BOARD_VRBRAIN
// performance counters
// performance counters
perf_counter_t
_perf_write
;
perf_counter_t
_perf_write
;
perf_counter_t
_perf_fsync
;
perf_counter_t
_perf_fsync
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment