Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
Ardupilot
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
Ardupilot
Commits
c151f246
Commit
c151f246
authored
10 years ago
by
Andrew Tridgell
Browse files
Options
Downloads
Patches
Plain Diff
Copter: updates for new AP_Baro API
parent
f8962d24
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ArduCopter/ArduCopter.pde
+2
-15
2 additions, 15 deletions
ArduCopter/ArduCopter.pde
ArduCopter/sensors.pde
+1
-1
1 addition, 1 deletion
ArduCopter/sensors.pde
with
3 additions
and
16 deletions
ArduCopter/ArduCopter.pde
+
2
−
15
View file @
c151f246
...
@@ -259,21 +259,8 @@ static GPS_Glitch gps_glitch(gps);
...
@@ -259,21 +259,8 @@ static GPS_Glitch gps_glitch(gps);
// flight modes convenience array
// flight modes convenience array
static
AP_Int8
*
flight_modes
=
&
g
.
flight_mode1
;
static
AP_Int8
*
flight_modes
=
&
g
.
flight_mode1
;
#if CONFIG_BARO == HAL_BARO_BMP085
static
AP_Baro
barometer
;
static
AP_Baro_BMP085
barometer
;
#elif CONFIG_BARO == HAL_BARO_PX4
static
AP_Baro_PX4
barometer
;
#elif CONFIG_BARO == HAL_BARO_VRBRAIN
static
AP_Baro_VRBRAIN
barometer
;
#elif CONFIG_BARO == HAL_BARO_HIL
static
AP_Baro_HIL
barometer
;
#elif CONFIG_BARO == HAL_BARO_MS5611
static
AP_Baro_MS5611
barometer
(
&
AP_Baro_MS5611
::
i2c
);
#elif CONFIG_BARO == HAL_BARO_MS5611_SPI
static
AP_Baro_MS5611
barometer
(
&
AP_Baro_MS5611
::
spi
);
#else
#error Unrecognized CONFIG_BARO setting
#endif
static
Baro_Glitch
baro_glitch
(
barometer
);
static
Baro_Glitch
baro_glitch
(
barometer
);
#if CONFIG_COMPASS == HAL_COMPASS_PX4
#if CONFIG_COMPASS == HAL_COMPASS_PX4
...
...
This diff is collapsed.
Click to expand it.
ArduCopter/sensors.pde
+
1
−
1
View file @
c151f246
...
@@ -16,7 +16,7 @@ static void init_barometer(bool full_calibration)
...
@@ -16,7 +16,7 @@ static void init_barometer(bool full_calibration)
// return barometric altitude in centimeters
// return barometric altitude in centimeters
static
void
read_barometer
(
void
)
static
void
read_barometer
(
void
)
{
{
barometer
.
read
();
barometer
.
update
();
if
(
should_log
(
MASK_LOG_IMU
))
{
if
(
should_log
(
MASK_LOG_IMU
))
{
Log_Write_Baro
();
Log_Write_Baro
();
}
}
...
...
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