Skip to content
Snippets Groups Projects
Commit 13a2ff28 authored by Ricardo Andres Ercoli Auersperg's avatar Ricardo Andres Ercoli Auersperg
Browse files

Eliminate hardcoded moves

parent ad5cab94
No related branches found
No related tags found
No related merge requests found
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment