Repository navigation
Expand file tree
/
Copy pathRobot.cpp
More file actions
175 lines (110 loc) · 2.4 KB
/
Copy pathRobot.cpp
File metadata and controls
175 lines (110 loc) · 2.4 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
/*
*@File : Robot.cpp
*@Author : wangbo
*@Date : Jun 19, 2018
*@Copyright: 2018 Beijing Institute of Technology. All rights reserved.
*@Warning : This content is limited to internal circulation, forbidding disclosure and for other commercial purposes.
*/
#include "Robot.h"
Robot robot;
void Robot::setup( void )
{
}
T_DATETIME datetime_now;//当前的日期和时间,精确到秒。在主线程中每秒更新一次,其它程序直接使用即可。
void Robot::get_timedata_now()
{
struct tm *gbl_time_val;//全局时间变量,其它的时间都从这里取
time_t timep;
//获取系统时间
time(&timep);
gbl_time_val = localtime(&timep);
datetime_now.year = (unsigned short)(gbl_time_val->tm_year + 1900);
datetime_now.month = (unsigned char)(gbl_time_val->tm_mon + 1);
datetime_now.day = (unsigned char)gbl_time_val->tm_mday;
datetime_now.hour = (unsigned char)gbl_time_val->tm_hour;
datetime_now.minute = (unsigned char)gbl_time_val->tm_min;
datetime_now.second = (unsigned char)gbl_time_val->tm_sec;
DEBUG_PRINTF("当前系统时间是:%d年%02d月%02d日%02d时%02d分%02d秒\n", datetime_now.year, datetime_now.month, datetime_now.day, datetime_now.hour, datetime_now.minute, datetime_now.second);
}
void Robot::update_all_external_device_input( void )
{
}
void Robot::update_GPS()
{
}
void Robot::update_IMU()
{
}
void Robot::get_gcs_udp()
{
}
void Robot::get_gcs_radio()
{
}
void Robot::send_ap2gcs_realtime_data_RobotLink_by_udp()
{
}
void Robot::update_mpu6050()
{
}
void Robot::read_device_gps_JY901()
{
}
void Robot::read_device_gps_UM220()
{
}
void Robot::read_device_gps_NMEA()
{
}
void Robot::update_all_external_device_output( void )
{
}
void Robot::out_execute_ctrloutput()
{
}
void Robot::motros_arm_check()
{
}
void Robot::write_device_servos_output()
{
}
void Robot::write_device_motors_on()
{
}
void Robot::write_device_motors_off()
{
}
void Robot::record_wp()
{
}
void Robot::record_log()
{
}
void Robot::record_config()
{
}
void Robot::update_navigation_loop()
{
}
void Robot::loop_one_second()
{
//DEBUG_PRINTF("Hello loop_slow\n");
}
void Robot::write_device_motors_init()
{
}
void Robot::motors_disarm()
{
}
void Robot::wait_ms(int ms)
{
delay_ms(ms);
}
void Robot::wait_us(uint32_t us)
{
delay_us(us);
}
void Robot::end_of_task()
{
//DEBUG_PRINTF("Hello end_of_task\n");
}