-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestRunTFLoWWithFLoWRTOS.c
55 lines (47 loc) · 1.61 KB
/
TestRunTFLoWWithFLoWRTOS.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
Copyright (C) 2018 ER2C
Politektik Elektronika Negeri Surabaya
Agung Pambudi <[email protected]>
*/
///////////////////////////////////////////////////////////////////////////////
// Includes
///////////////////////////////////////////////////////////////////////////////
#include "flowrtos.h"
#include "KinematicControl.h"
////////////////////////////////////////////////////////////////////////////////
// Code
////////////////////////////////////////////////////////////////////////////////
uint32_t time_start_task, time_finish_task;
void task1(){ // -+ 44 us
// time_start_task = count_time_us;
get_euler_angles();
// time_finish_task = count_time_us;
// PRINTF("\n\rIMU = %u us\n\r", (time_finish_task - time_start_task));
}
void task2(){ // -+ 42 us
// time_start_task = count_time_us;
kinematic_control(0, 0, 0, true);
// time_finish_task = count_time_us;
// PRINTF("\n\rIK_C = %u us\n\r", (time_finish_task - time_start_task));
}
void task3(){ // -+ 5146 us
// time_start_task = count_time_us;
set_position();
// time_finish_task = count_time_us;
// PRINTF("\n\rDXL = %u us\n\r", (time_finish_task - time_start_task));
}
void main(void){
management_io();
management_memory_init();
management_timer_init();
management_task_init();
create_task("Task_1", task1, 1000);
create_task("Task_2", task2, 2000);
create_task("Task_3", task3, 7000);
learning(1000000);
scheduler();
while(true);
}
/*******************************************************************************
* EOF
******************************************************************************/