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
c92f996e
Commit
c92f996e
authored
7 years ago
by
bbartels
Browse files
Options
Downloads
Patches
Plain Diff
quad: remove preprocessor directives in quad_app.c
parent
a1f69485
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
quad/src/quad_app/quad_app.c
+1
-21
1 addition, 21 deletions
quad/src/quad_app/quad_app.c
with
1 addition
and
21 deletions
quad/src/quad_app/quad_app.c
+
1
−
21
View file @
c92f996e
...
...
@@ -18,9 +18,6 @@
#include
"communication.h"
#include
"mio7_led.h"
//#define BENCH_TEST
//#define UART_BENCHMARK
int
quad_main
(
int
(
*
setup_hardware
)(
hardware_t
*
hardware_struct
))
{
// Structures to be used throughout
...
...
@@ -38,10 +35,8 @@ int quad_main(int (*setup_hardware)(hardware_t *hardware_struct))
return
-
1
;
}
#ifndef BENCH_TEST
// Loops to make sure the quad is responding correctly before starting the control loop
protection_loops
(
&
structs
);
#endif
int
last_kill_condition
=
kill_condition
(
&
(
structs
.
user_input_struct
));
...
...
@@ -55,23 +50,8 @@ int quad_main(int (*setup_hardware)(hardware_t *hardware_struct))
// Process all received data
#ifdef UART_BENCHMARK
usleep
(
500000
);
u32
start_time
=
timer_get_count
();
#endif
process_received
(
&
structs
);
#ifdef UART_BENCHMARK
u32
end_time
=
timer_get_count
();
u32
duration
=
end_time
-
start_time
;
u32
packets_processed
=
uart_buff_packets_processed
();
u32
data
[
2
];
data
[
0
]
=
duration
;
data
[
1
]
=
packets_processed
;
send_data
(
0
,
0
,
0
,
(
char
*
)
&
data
,
8
);
#endif
#ifndef BENCH_TEST
// Get the user input and put it into user_input_struct
get_user_input
(
&
(
structs
.
hardware_struct
),
&
(
structs
.
log_struct
),
&
(
structs
.
user_input_struct
));
...
...
@@ -94,7 +74,7 @@ int quad_main(int (*setup_hardware)(hardware_t *hardware_struct))
}
// update the GUI
update_GUI
(
&
(
structs
.
log_struct
));
#endif
// Processing of loop timer at the end of the control loop
timer_end_loop
(
&
(
structs
.
log_struct
));
...
...
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