Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
Distributed Autonomous Networked Control Lab
MicroCART
Commits
04e5d5bd
Commit
04e5d5bd
authored
7 years ago
by
dawehr
Browse files
Options
Downloads
Patches
Plain Diff
Processing communication commands before controller is turned on.
Allowing throttle to be down during autonomous.
parent
b7640424
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
quad/src/quad_app/control_algorithm.c
+3
-3
3 additions, 3 deletions
quad/src/quad_app/control_algorithm.c
quad/src/quad_app/initialize_components.c
+6
-8
6 additions, 8 deletions
quad/src/quad_app/initialize_components.c
with
9 additions
and
11 deletions
quad/src/quad_app/control_algorithm.c
+
3
−
3
View file @
04e5d5bd
...
...
@@ -356,9 +356,9 @@ int control_algorithm_init(parameter_t * ps)
//memcpy(raw_actuator_struct->controller_corrected_motor_commands, user_input_struct->rc_commands, sizeof(int) * 6);
// don't use the PID corrections if the throttle is less than about 10% of its range
// re-enable the check for AUTO_FLIGHT_MODE when autonomous is fully enabled!!!
if
((
user_input_struct
->
rc_commands
[
THROTTLE
]
>
118000
)
)
// unless we are in autonomous
if
((
user_input_struct
->
rc_commands
[
THROTTLE
]
>
118000
)
||
user_defined_struct
->
flight_mode
=
AUTO_FLIGHT_MODE
)
{
//THROTTLE
...
...
This diff is collapsed.
Click to expand it.
quad/src/quad_app/initialize_components.c
+
6
−
8
View file @
04e5d5bd
...
...
@@ -21,14 +21,12 @@ int protection_loops(modular_structs_t *structs)
struct
PWMInputDriver
*
pwm_inputs
=
&
structs
->
hardware_struct
.
pwm_inputs
;
read_rec_all
(
pwm_inputs
,
rc_commands
);
// wait for RC receiver to connect to transmitter
while
(
rc_commands
[
THROTTLE
]
<
75000
)
read_rec_all
(
pwm_inputs
,
rc_commands
);
// wait until throttle is low and the gear switch is engaged (so you don't immediately break out of the main loop below)
// also wait for the flight mode to be set to manual
while
(
rc_commands
[
THROTTLE
]
>
125000
||
read_kill
(
rc_commands
[
GEAR
])
||
!
read_flap
(
rc_commands
[
FLAP
]))
{
while
(
rc_commands
[
THROTTLE
]
<
75000
||
// wait for RC receiver to connect to transmitter
rc_commands
[
THROTTLE
]
>
125000
||
// Wait until throttle is low
read_kill
(
rc_commands
[
GEAR
])
||
// Wait until gear switch is engaged (so you don't immediately break out of the main loop below)
!
read_flap
(
rc_commands
[
FLAP
]))
// Wait for the flight mode to be set to manual
{
process_received
(
structs
);
read_rec_all
(
pwm_inputs
,
rc_commands
);
}
...
...
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