Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
On-Board Software
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Avionics
Software Development
On-Board Software
Commits
992296a0
Commit
992296a0
authored
1 year ago
by
Federico Mandelli
Browse files
Options
Downloads
Patches
Plain Diff
[Sensors] Enabled external interrupt
parent
0b160c34
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/boards/Parafoil/Sensors/Sensors.cpp
+11
-5
11 additions, 5 deletions
src/boards/Parafoil/Sensors/Sensors.cpp
with
11 additions
and
5 deletions
src/boards/Parafoil/Sensors/Sensors.cpp
+
11
−
5
View file @
992296a0
...
...
@@ -25,6 +25,7 @@
#include
<Parafoil/Buses.h>
#include
<Parafoil/Configs/SensorsConfig.h>
#include
<common/ReferenceConfig.h>
#include
<drivers/interrupt/external_interrupts.h>
#include
<interfaces-impl/hwmapping.h>
using
namespace
Boardcore
;
...
...
@@ -113,23 +114,25 @@ BatteryVoltageSensorData Sensors::getBatteryVoltageLastSample()
// return data;
// }
//
TODO
check used task scheduler
// check used task scheduler
error due the magnetometer calibration task
Sensors
::
Sensors
(
TaskScheduler
*
sched
)
:
scheduler
(
sched
),
sensorsCounter
(
0
)
{}
//
TODO
check calibration of gyro
// check calibration of gyro
deemed ok by giuseppe
// TODO check axis of bmx
bool
Sensors
::
start
()
{
// Read the magnetometer calibration from predefined file
miosix
::
GpioPin
cs
(
GPIOG_BASE
,
7
);
cs
.
mode
(
miosix
::
Mode
::
OUTPUT
);
cs
.
high
();
// Init all the sensors
bmx160Init
();
bmx160WithCorrectionInit
();
lis3mdlInit
();
h3lisInit
();
lps22Init
();
lps22DevInit
();
//
lps22DevInit();
ubxGpsInit
();
ads131Init
();
internalADCInit
();
...
...
@@ -165,6 +168,9 @@ bool Sensors::start()
// Create sensor manager with populated map and configured scheduler
manager
=
new
SensorManager
(
sensorMap
,
scheduler
);
miosix
::
GpioPin
interruptPin
=
miosix
::
sensors
::
bmx160
::
intr
::
getPin
();
enableExternalInterrupt
(
interruptPin
.
getPort
(),
interruptPin
.
getNumber
(),
InterruptTrigger
::
FALLING_EDGE
,
0
);
return
manager
->
start
()
&&
result
!=
0
;
}
...
...
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