其它¶
DebugEngine¶
DebugEngine是我们开发的和Falcon配套的debug系统,其主要作用是将debug信息显示在Falcon的界面上,方便查看。在跑仿真的时候可以看到场地上有很多我们开发时遗留的debug信息。下面简单介绍一下:
debugEngine:gui_debug_msg(CGeoPoint:new_local(-50, -param.pitchWidth/2),massage)
--debugEngine:类
--gui_debug_msg:类中的debug函数
--CGeoPoint:new_local(x, y):debug信息在场地上显示的坐标,CGeoPoint是我们自己的一个坐标点的类
--massage:要print出的信息,这里是字符串,其它类型的变量要转换成字符串再输出

一些基础的debug函数:
//此处的debug_color包括
#define COLOR_WHITE 0
#define COLOR_RED 1
#define COLOR_ORANGE 2
#define COLOR_YELLOW 3
#define COLOR_GREEN 4
#define COLOR_CYAN 5
#define COLOR_BLUE 6
#define COLOR_PURPLE 7
#define COLOR_GRAY 8
#define COLOR_BLACK 9
//用X标出某个坐标点
void gui_debug_x(const CGeoPoint& p, char debug_color = 1);
//画出从p1到p2的直线
void gui_debug_line(const CGeoPoint& p1, const CGeoPoint& p2, char debug_color = 1);
//在某点处print信息
void gui_debug_msg(const CGeoPoint& p, const char* msgstr, char debug_color = 1);