Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
ICRE - ESP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
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
Ricardo Andres Ercoli Auersperg
ICRE - ESP
Commits
13a2ff28
Commit
13a2ff28
authored
2 years ago
by
Ricardo Andres Ercoli Auersperg
Browse files
Options
Downloads
Patches
Plain Diff
Eliminate hardcoded moves
parent
ad5cab94
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Robotito/src/main.c
+2
-7
2 additions, 7 deletions
Robotito/src/main.c
with
2 additions
and
7 deletions
Robotito/src/main.c
+
2
−
7
View file @
13a2ff28
...
...
@@ -27,7 +27,7 @@
static
const
char
*
tag
=
"UART EVENT"
;
#define UART_NUM UART_NUM_2
#define FLOAT_BUF_SIZE
1
#define FLOAT_BUF_SIZE
3
#define BUF_SIZE FLOAT_BUF_SIZE * sizeof(float)
#define TASK_MEMORY 1024 * 2
...
...
@@ -50,11 +50,7 @@ static void uart_task(void *pvParameters)
len
=
uart_read_bytes
(
UART_NUM
,
data
,
BUF_SIZE
,
portMAX_DELAY
);
if
(
len
==
BUF_SIZE
){
memcpy
(
&
fdata
,
data
,
sizeof
(
fdata
));
for
(
int
i
=
0
;
i
<
FLOAT_BUF_SIZE
;
i
++
)
{
printf
(
"El dato %d en float es: %f
\n
"
,
i
,
fdata
[
i
]);
}
// decodificar mensaje y hacer omni_drive
omni_drive
(
fdata
[
0
],
fdata
[
1
],
fdata
[
2
],
0
);
uart_flush
(
UART_NUM
);
}
else
{
printf
(
"Todavia no se completo el mensaje o hay un error.
\n
"
);
...
...
@@ -93,7 +89,6 @@ void app_main(void)
omni_init
();
omni_set_enable
(
true
);
while
(
1
)
{
omni_drive
(
0
,
0
,
PI
/
4
,
0
);
vTaskDelay
(
300000
/
portTICK_RATE_MS
);
}
}
\ No newline at end of file
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