Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
RoverAVR
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
mc1n18
RoverAVR
Commits
29f1a0a7
Commit
29f1a0a7
authored
5 years ago
by
mc1n18
Browse files
Options
Downloads
Patches
Plain Diff
final commit
parent
3e9382c5
No related branches found
No related tags found
No related merge requests found
Changes
3
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
Rover_main.c
+11
-5
11 additions, 5 deletions
Rover_main.c
_build/Rover_main.o
+0
-0
0 additions, 0 deletions
_build/Rover_main.o
_build/main.hex
+708
-704
708 additions, 704 deletions
_build/main.hex
with
719 additions
and
709 deletions
Rover_main.c
+
11
−
5
View file @
29f1a0a7
...
@@ -4,9 +4,9 @@ the structure of this file is an adapted version of the code from pong.c on the
...
@@ -4,9 +4,9 @@ the structure of this file is an adapted version of the code from pong.c on the
this code is under the GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
this code is under the GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
This application uses the SmallGraphics library written by Nick Bishop, also under the
This application uses the SmallGraphics library written by Nick Bishop, also under the
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
Author of pong.c code: Steve Gunn
Author of pong.c code: Steve Gunn
* Licence: Th
is work
is licensed under the Creative Commons Attribution License.
* Licence: Th
e pong code
is licensed under the Creative Commons Attribution License.
*
View this license at http://creativecommons.org/about/licenses/
* View this license at http://creativecommons.org/about/licenses/
*/
*/
#include
<avr/io.h>
#include
<avr/io.h>
...
@@ -113,7 +113,9 @@ ISR(TIMER1_COMPA_vect)
...
@@ -113,7 +113,9 @@ ISR(TIMER1_COMPA_vect)
(
ball1
.
centre_x
>
rover1
.
back
.
x_coordinate
&&
ball1
.
centre_x
<
rover1
.
front
.
x_coordinate
)){
(
ball1
.
centre_x
>
rover1
.
back
.
x_coordinate
&&
ball1
.
centre_x
<
rover1
.
front
.
x_coordinate
)){
color1
=
BROWN
;
color1
=
BROWN
;
color2
=
BROWN
;
color2
=
BROWN
;
if
(
abs
(
ball1
.
vertical_v
)
>
15
){
lives
=
0
;
lives
=
0
;
}
}
}
ball1
.
vertical_v
=
(
-
0
.
8
*
ball1
.
vertical_v
);
ball1
.
vertical_v
=
(
-
0
.
8
*
ball1
.
vertical_v
);
if
(
abs
(
ball1
.
vertical_v
)
<
20
){
if
(
abs
(
ball1
.
vertical_v
)
<
20
){
...
@@ -127,7 +129,9 @@ ISR(TIMER1_COMPA_vect)
...
@@ -127,7 +129,9 @@ ISR(TIMER1_COMPA_vect)
(
ball2
.
centre_x
>
rover1
.
back
.
x_coordinate
&&
ball2
.
centre_x
<
rover1
.
front
.
x_coordinate
)){
(
ball2
.
centre_x
>
rover1
.
back
.
x_coordinate
&&
ball2
.
centre_x
<
rover1
.
front
.
x_coordinate
)){
color1
=
BROWN
;
color1
=
BROWN
;
color2
=
BROWN
;
color2
=
BROWN
;
lives
=
0
;
if
(
abs
(
ball2
.
vertical_v
)
>
15
){
lives
=
0
;
}
}
}
...
@@ -144,7 +148,9 @@ ISR(TIMER1_COMPA_vect)
...
@@ -144,7 +148,9 @@ ISR(TIMER1_COMPA_vect)
(
ball3
.
centre_x
>
rover1
.
back
.
x_coordinate
&&
ball3
.
centre_x
<
rover1
.
front
.
x_coordinate
)){
(
ball3
.
centre_x
>
rover1
.
back
.
x_coordinate
&&
ball3
.
centre_x
<
rover1
.
front
.
x_coordinate
)){
color1
=
BROWN
;
color1
=
BROWN
;
color2
=
BROWN
;
color2
=
BROWN
;
lives
=
0
;
if
(
abs
(
ball3
.
vertical_v
)
>
15
){
lives
=
0
;
}
}
}
...
...
This diff is collapsed.
Click to expand it.
_build/Rover_main.o
+
0
−
0
View file @
29f1a0a7
No preview for this file type
This diff is collapsed.
Click to expand it.
_build/main.hex
+
708
−
704
View file @
29f1a0a7
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