Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
Climb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Oliver Ljungberg
Climb
Commits
92581c72
Commit
92581c72
authored
3 years ago
by
EPFLepuck
Browse files
Options
Downloads
Patches
Plain Diff
Fix LEDs
Main features are working
parent
d19bc555
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
check_collision.c
+4
-4
4 additions, 4 deletions
check_collision.c
main.c
+0
-6
0 additions, 6 deletions
main.c
motor_speed.c
+0
-1
0 additions, 1 deletion
motor_speed.c
with
4 additions
and
11 deletions
check_collision.c
+
4
−
4
View file @
92581c72
...
...
@@ -54,16 +54,16 @@ static THD_FUNCTION(CheckCollision, arg) {
//Toggle LED
clear_leds
();
set_led
(
LED1
,
1
);
set_rgb_led
(
LED2
,
0
,
0
,
255
);
set_rgb_led
(
LED8
,
0
,
0
,
255
);
set_rgb_led
(
LED2
,
255
,
255
,
255
);
set_rgb_led
(
LED8
,
255
,
255
,
255
);
}
else
if
(
(
i
==
3
)
|
(
i
==
4
)
){
wall_detection
=
2
;
// Toggle LED
clear_leds
();
set_led
(
LED5
,
1
);
set_rgb_led
(
LED4
,
0
,
0
,
255
);
set_rgb_led
(
LED6
,
0
,
0
,
255
);
set_rgb_led
(
LED4
,
255
,
255
,
255
);
set_rgb_led
(
LED6
,
255
,
255
,
255
);
}
else
{
wall_detection
=
0
;
clear_leds
();
...
...
This diff is collapsed.
Click to expand it.
main.c
+
0
−
6
View file @
92581c72
...
...
@@ -85,12 +85,6 @@ int main(void)
}
/* Infinite loop. */
while
(
1
)
{
//chprintf((BaseSequentialStream *)&SD3, "AccX = %f \n",get_acc_x());
//chprintf((BaseSequentialStream *)&SD3, "Case = %d \n",get_acc_case());
//chprintf((BaseSequentialStream *)&SD3, "IR2 = %d \n",get_calibrated_prox(1));
//chprintf((BaseSequentialStream *)&SD3, "IR1 = %d \n",get_calibrated_prox(0));
//chprintf((BaseSequentialStream *)&SD3, "IR7 = %d \n",get_calibrated_prox(6));
//chprintf((BaseSequentialStream *)&SD3, "IR8 = %d \n",get_calibrated_prox(7));
chThdSleepMilliseconds
(
1000
);
}
...
...
This diff is collapsed.
Click to expand it.
motor_speed.c
+
0
−
1
View file @
92581c72
...
...
@@ -37,7 +37,6 @@ static THD_FUNCTION(MotorSpeed, arg) {
systime_t
time
;
//uint8_t up_down = 0;
float
error
=
0
;
float
derivative
=
0
;
float
last_error
=
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