⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 utility.cpp

📁 用于机器人自动低分辨路的地图测绘程序。用于机器人控制测绘。分为远端控制端和本地控制端。控制电机为标准舵机。
💻 CPP
字号:
/*
    Robot Interface
    (C) 2006 Jason Hunt
    nulluser@gmail.com
    
    File: utility.cpp
*/

#include <windows.h>
#include <stdio.h>
#include "display.h"

CRITICAL_SECTION debug_lock;

/* Add a byte to a buffer */
void append_byte(unsigned char *buffer, unsigned int &index, unsigned char data)
{
    buffer[index++] = data;
}
/* End of append_byte */


void debug_start(void)
{
   InitializeCriticalSection(&debug_lock);   
    
}
    
    
void debug(char *s)
{
//    return;
    add_line(s);
 EnterCriticalSection(&debug_lock); 
    FILE *f = fopen("debug.txt", "at");
    fprintf(f, "%s\n", s);
    fclose(f);
 LeaveCriticalSection(&debug_lock);     
}
    

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -