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

📄 bit.txt

📁 BIT检测
💻 TXT
字号:
把set.c文件中的SET_BIT()函数改成这样


extern void itob(int i,char *a);
//BIT结果查询回复			
void SET_BIT(unsigned char *buf)
{
	static char str[100];				 	//
	static int file;
	int m,check=0;//
	char bstring_1[33];
	char bstring_2[33];

	
	if((buf[4]==0x1A) || (buf[4]==0x1B))			//判断SPDA号
	{
		for(m=0;m<10;m++)
			check = check + buf[m];
		if( (check & 0x00ff) == 0)			 //判断校验码
		{
			file = OpenFile ("./BIT记录.txt", VAL_WRITE_ONLY, VAL_APPEND,VAL_ASCII);
			
		
			sprintf(str,"Date: %s     Time %s         ",DateStr(),TimeStr());
			WriteFile(file,str,StringLength(str));
	
			itob(buf[5],bstring_1);  
			itob(buf[6],bstring_2);  
		//	sprintf(str,"BIT1:0x%.2X        BIT2:0x%.2X\n",buf[5],buf[6]); 
			sprintf(str,"BIT1:0x%.2X        BIT2:0x%.2X\n",bstring_1,bstring_2);
			WriteFile(file,str,StringLength(str));
		}
		check = 0;
	}
			
}

⌨️ 快捷键说明

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