From 566ed7f3c2620e22f0e7df0c733b31a4187da502 Mon Sep 17 00:00:00 2001
From: zhangbo <zhangbo@qq.com>
Date: 星期二, 29 七月 2025 18:07:58 +0800
Subject: [PATCH] V1.69

---
 源码/核心板/Src/main.c |   35 +++++++++++++++++++++++++++++++----
 1 files changed, 31 insertions(+), 4 deletions(-)

diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c"
index 69eef50..153893e 100644
--- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c"
+++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/main.c"
@@ -142,7 +142,7 @@
         
 	OUT485_ENABLE;
 	ComMapCheck();	
-	g_com_map[VERSION] = 1<<8|68;
+	g_com_map[VERSION] = 1<<8|69;
     FLASH_Read(FLASH_HARDWARE_FLAG, (uint8_t*)&g_com_map[HARDWAREFLAG_INDEX], 16);
     dist_threshold = (g_com_map[SPEEDFILTER_THRES]*10)/(1000/g_com_map[COM_INTERVAL]);
      if(dist_threshold<300)
@@ -224,7 +224,7 @@
 void IdleTask(void)
 {
 		
-			UART_CheckReceive();
+        UART_CheckReceive();
 		UART_CheckSend();
 	
 	if(heartbeat_timer>1000)
@@ -245,7 +245,7 @@
 //						NVIC_SystemReset();
 //					}
 //				}
-	  flag_newsecond=0;
+	    flag_newsecond=0;
 		tagpos_binary=0;
 		memcpy(ancidlist_send,ancidlist_rec,ancidlist_num*2);
 		ancidlist_num=0;
@@ -308,6 +308,32 @@
 		g_com_map[RELAY2_STATE_INDEX] = READ_RELAY2;
 
 	}
+uint8_t at_cmd[3]={0x2B,0x2B,0x2B};
+uint8_t at_cmd1[2]={0x41,0x54};
+char at_cmd2[20]={"AT+CAN=500,70,NDTF\r\n"};  //AT+CAN?\r\n
+char at_cmd3[9]={"AT+CAN?\r\n"}; 
+char at_cmd4[9]={"AT+EXAT\r\n"}; 
+void send_to_ECAN()
+{
+//  UART_PushFrame(at_cmd,3);
+//    
+//  UART_PushFrame(at_cmd1,2);
+////  delay_ms(1); 
+//  UART_PushFrame((uint8_t*)at_cmd2,20);
+////  delay_ms(1);   
+//  UART_PushFrame((uint8_t*)at_cmd3,9);
+////  delay_ms(1);   
+//  UART_PushFrame((uint8_t*)at_cmd4,9);
+ printf("+++");
+ delay_ms(20);  
+ printf("AT"); 
+ delay_ms(20);    
+ printf("AT+CAN=500,0,NDTF\r\n"); 
+ delay_ms(1);
+ printf("AT+CAN?\r\n");
+ delay_ms(1);
+ printf("AT+EXAT\r\n");    
+}
     
 int main(void)
 {
@@ -324,9 +350,10 @@
 	usart_send[1]=0xAA;
 	usart_send_anc[0]=0x55;
 	usart_send_anc[1]=0xAA;
-
+    send_to_ECAN();
 	while(1)
 	{
+      
 	g_start_sync_flag=0;
 	if(g_start_send_flag)
 	{

--
Gitblit v1.9.3