📄 collection.c
字号:
#include <airobot/c/SimpleRobot.h>
//存储自己的速度值(最多只保存100个数)
double velocity[100];
//存储自己的坐标值(最多只保存10轮,每轮最多100个数)
double x[10][100];
/**
* 每个单位时间都会触发
*/
void onTick(struct TickAction* action)
{
int time = (int)(getTime()%100);
int round = getCurrentRound()%10;
velocity[time] = getVelocity();
x[round][time] = getX();
}
/**
* 机器人程序入口
*/
int main(int argC, char* argV[])
{
tickHook = onTick;
return startup(argC, argV);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -