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
ae1702c2
Commit
ae1702c2
authored
13 years ago
by
Andrew Tridgell
Browse files
Options
Downloads
Patches
Plain Diff
Baro: added suspend/resume on init
parent
3115d48b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libraries/AP_Baro/AP_Baro_MS5611.cpp
+3
-0
3 additions, 0 deletions
libraries/AP_Baro/AP_Baro_MS5611.cpp
with
3 additions
and
0 deletions
libraries/AP_Baro/AP_Baro_MS5611.cpp
+
3
−
0
View file @
ae1702c2
...
@@ -113,6 +113,8 @@ void AP_Baro_MS5611::_spi_write(uint8_t reg)
...
@@ -113,6 +113,8 @@ void AP_Baro_MS5611::_spi_write(uint8_t reg)
// SPI should be initialized externally
// SPI should be initialized externally
bool
AP_Baro_MS5611
::
init
(
AP_PeriodicProcess
*
scheduler
)
bool
AP_Baro_MS5611
::
init
(
AP_PeriodicProcess
*
scheduler
)
{
{
scheduler
->
suspend_timer
();
pinMode
(
MS5611_CS
,
OUTPUT
);
// Chip select Pin
pinMode
(
MS5611_CS
,
OUTPUT
);
// Chip select Pin
digitalWrite
(
MS5611_CS
,
HIGH
);
digitalWrite
(
MS5611_CS
,
HIGH
);
delay
(
1
);
delay
(
1
);
...
@@ -137,6 +139,7 @@ bool AP_Baro_MS5611::init( AP_PeriodicProcess *scheduler )
...
@@ -137,6 +139,7 @@ bool AP_Baro_MS5611::init( AP_PeriodicProcess *scheduler )
Temp
=
0
;
Temp
=
0
;
Press
=
0
;
Press
=
0
;
scheduler
->
resume_timer
();
scheduler
->
register_process
(
AP_Baro_MS5611
::
_update
);
scheduler
->
register_process
(
AP_Baro_MS5611
::
_update
);
healthy
=
true
;
healthy
=
true
;
...
...
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