From 9aed5d7e7b3c7bf09da712e9c272ece401a7acc9 Mon Sep 17 00:00:00 2001 From: QuakeGod <QuakeGod@sina.com> Date: 星期一, 25 十一月 2024 14:51:23 +0800 Subject: [PATCH] add UltraSonic and MultiWireLess --- ComLib/Src/debug.c | 66 ++------------------------------ 1 files changed, 5 insertions(+), 61 deletions(-) diff --git a/ComLib/Src/debug.c b/ComLib/Src/debug.c index 9a11b29..941ea2b 100644 --- a/ComLib/Src/debug.c +++ b/ComLib/Src/debug.c @@ -17,7 +17,7 @@ int sprintftime = 0; int putstrtime = 0; const unsigned char buf1[16]={0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88,0x99,0xaa,0xbb,0xcc,0xdd,0xee,0xff,0x00}; -char str1[256]; +char str1[128]; int LineCount=0; int Uart1baudval=0; int Uart2baudval=0; @@ -54,69 +54,12 @@ int ShowInitInfo() { +/* int len1=0; clearscreen(); uint32_t us1,us2,us3,us4,us5,us6; -// Locate(1,1); -/* - LoadFlashDatas(); - - LoadAndUpdateStoreCfg(); - - HAL_StatusTypeDef res; - stStoreCfg * pFCfg = (stStoreCfg *) GetCurStoreCfgAddr(); - stStoreCfg * pFCfg2 = GetNextStoreCfgAddr(pFCfg); - -int t11=GetuS(); - - for (int i=0;i<20;i++) - { - tims[i]=GetuS(); - } - clearscreen(); - len1+=sprintf(str1+len1," Ver 001 \r\n"); - len1+=sprintf(str1+len1," Uart1Baud %d Uart2Baud %d UID %08x %08x %08x \r\n",Uart1Baud,Uart2Baud,pUID[0],pUID[1],pUID[2]); - len1+=sprintf(str1+len1," Flash = %d %d %d %d res = %d ",FlashDatas[0],FlashDatas[1],FlashDatas[2],FlashDatas[3],res); - len1+=sprintf(str1+len1,"flash operation = %u %u %u\r\n",t11-t10,t10,t11); - PutStr(str1,len1); - len1=0; - len1+=sprintf(str1+len1,"%08X %X %X , PowerOn %X UpTime %X %X %X %X \r\n", - (uint32_t)pFCfg,pFCfg[0].Sign1,pFCfg[0].SN1,pFCfg[0].PowerCount,pFCfg[0].UpTime,pFCfg[0].UserData1,pFCfg[0].CRC1,pFCfg[0].EndSign1); - len1+=sprintf(str1+len1,"%08X %X %X , PowerOn %X UpTime %X %X %X %X \r\n", - (uint32_t)pFCfg2,Cfg2.Sign1,Cfg2.SN1,Cfg2.PowerCount,Cfg2.UpTime,Cfg2.UserData1,Cfg2.CRC1,Cfg2.EndSign1); - PutStr(str1,len1); -*/ - len1=0; -/* - for (int i=0;i<8;i++) - { - len1=0; - len1+=sprintf(str1+len1,"%02X:",i*32); - for (int j=0;j<8;j++) - { - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+j]); - } - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+8]); - for (int j=9;j<16;j++) - { - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+j]); - } - len1+=sprintf(str1+len1," | %02X",pFlash1[i*32+16]); - for (int j=17;j<24;j++) - { - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+j]); - } - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+24]); - for (int j=25;j<32;j++) - { - len1+=sprintf(str1+len1," %02X",pFlash1[i*32+j]); - } - len1+=sprintf(str1+len1,"\r\n"); - PutStr(str1,len1); - } -*/ us1=GetuS(); int crc1 = crc_check(buf1,16); //7us us2=GetuS(); @@ -162,6 +105,7 @@ // RunTimer(0,1000); // StartTimer(2,1000); Locate(13,1);LineCount=3; + */ return 0; } @@ -259,10 +203,10 @@ nextchannel = LL_ADC_CHANNEL_7; if (KMem.ADCValues[0] < 1500) { - PowerDownEvent=1; + PowerDownFlag=1; }else { - PowerDownEvent=0; + PowerDownFlag=0; } } else if ((channels & LL_ADC_CHANNEL_7) == LL_ADC_CHANNEL_7) -- Gitblit v1.9.1