📄 debug.c
字号:
#define _SIZE_T_DEFINED
#include <windows.h>
#include <string.h>
#include <stdio.h>
#include <kernel\ros33\ros33.h>
// simulator header
#include <simsrv\export\simsrv.h>
__declspec( dllimport ) char tcaDebugLog[82];
extern HANDLE hEnEventInt;
void AppendDebugLogString( char *text, FILE *file )
{
ID id;
ResetEvent( hEnEventInt ); // disable interrupt
if( file == NULL )
{
get_tid( &id );
sprintf( tcaDebugLog, "%02d:", id );
strncpy( tcaDebugLog+3, text, 77 );
tcaDebugLog[80]=0;
// PostMessage( hwndPanel, WM_USER, 0, 0 );
SendMessage( hwndPanel, WM_USER, 0, 0 );
}
else
fprintf( file, "%s\n", text );
SetEvent( hEnEventInt ); // enable interrupt
return;
}
void DebugLog( char *format, ... )
{
// var_list
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -