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
b7a4814e
Commit
b7a4814e
authored
12 years ago
by
Randy Mackay
Browse files
Options
Downloads
Patches
Plain Diff
Rover: integrate automatic roll and pitch trims
parent
9c984b18
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
APMrover2/setup.pde
+5
-1
5 additions, 1 deletion
APMrover2/setup.pde
with
5 additions
and
1 deletion
APMrover2/setup.pde
+
5
−
1
View file @
b7a4814e
...
@@ -296,13 +296,17 @@ setup_erase(uint8_t argc, const Menu::arg *argv)
...
@@ -296,13 +296,17 @@ setup_erase(uint8_t argc, const Menu::arg *argv)
static
int8_t
static
int8_t
setup_accel_scale
(
uint8_t
argc
,
const
Menu
::
arg
*
argv
)
setup_accel_scale
(
uint8_t
argc
,
const
Menu
::
arg
*
argv
)
{
{
float
trim_roll
,
trim_pitch
;
cliSerial
->
println_P
(
PSTR
(
"Initialising gyros"
));
cliSerial
->
println_P
(
PSTR
(
"Initialising gyros"
));
ahrs
.
init
();
ahrs
.
init
();
ins
.
init
(
AP_InertialSensor
::
COLD_START
,
ins
.
init
(
AP_InertialSensor
::
COLD_START
,
ins_sample_rate
,
ins_sample_rate
,
flash_leds
);
flash_leds
);
AP_InertialSensor_UserInteractStream
interact
(
hal
.
console
);
AP_InertialSensor_UserInteractStream
interact
(
hal
.
console
);
ins
.
calibrate_accel
(
flash_leds
,
&
interact
);
if
(
ins
.
calibrate_accel
(
flash_leds
,
&
interact
,
trim_roll
,
trim_pitch
))
{
// reset ahrs's trim to suggested values from calibration routine
ahrs
.
set_trim
(
Vector3f
(
trim_roll
,
trim_pitch
,
0
));
}
return
(
0
);
return
(
0
);
}
}
#endif
#endif
...
...
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