Browse Source

北京6060-001电池软件修改-使用中-3-17

CHENJIE-PC\QiXiang_CHENJIE 4 years ago
parent
commit
5575eab6ad
3 changed files with 11 additions and 18 deletions
  1. 3 3
      ARMCC/Makefile
  2. 8 8
      src/app.c
  3. 0 7
      src/hal_module_adapter.c

+ 3 - 3
ARMCC/Makefile

@@ -15,8 +15,8 @@ CFLAGS_INC        +=  -I ../inc
 
 
 
 
 obj-y             += PLAT/project/$(TARGET)/apps/qx_app/src/app.o \
 obj-y             += PLAT/project/$(TARGET)/apps/qx_app/src/app.o \
-                     PLAT/project/$(TARGET)/apps/qx_app/src/cisAsynEntry.o \
-		     						PLAT/project/$(TARGET)/apps/qx_app/src/bsp_custom.o \
-									PLAT/project/$(TARGET)/apps/qx_app/src/hal_module_adapter.o
+                    PLAT/project/$(TARGET)/apps/qx_app/src/cisAsynEntry.o \
+		     		PLAT/project/$(TARGET)/apps/qx_app/src/bsp_custom.o \
+					PLAT/project/$(TARGET)/apps/qx_app/src/hal_module_adapter.o
 
 
 include $(TOP)/PLAT/tools/scripts/Makefile.rules
 include $(TOP)/PLAT/tools/scripts/Makefile.rules

+ 8 - 8
src/app.c

@@ -755,9 +755,6 @@ static void Can_Task(void* arg)
                 #ifdef USING_PRINTF	
                 #ifdef USING_PRINTF	
                     printf("Gpsmsgqueue: %d,%d,%d,%d\r\n",Gps_Data.latitude,Gps_Data.longitude,Gps_Data.speed,Gps_Data.direction);
                     printf("Gpsmsgqueue: %d,%d,%d,%d\r\n",Gps_Data.latitude,Gps_Data.longitude,Gps_Data.speed,Gps_Data.direction);
                 #endif 
                 #endif 
-                #ifdef BL_FILE_LOG
-	                bluejoy_printf(BL_LEVEL3,"Gpsmsg: %d,%d,%d,%d\r\n",Gps_Data.latitude,Gps_Data.longitude,Gps_Data.speed,Gps_Data.direction);
-                #endif
                 //can采用先接收后发送的策略
                 //can采用先接收后发送的策略
                 HAL_Can_Receive(Can_Rece_buffer);
                 HAL_Can_Receive(Can_Rece_buffer);
                 if (Can_Rece_buffer[0]!=0xff)//满足can发送使能
                 if (Can_Rece_buffer[0]!=0xff)//满足can发送使能
@@ -1240,7 +1237,7 @@ static void Tcp_Task(void* arg)
                                 printf("TCP connect unresolved dns\n");
                                 printf("TCP connect unresolved dns\n");
                             #endif
                             #endif
                             #ifdef BL_FILE_LOG
                             #ifdef BL_FILE_LOG
-	                            //bluejoy_printf(BL_LEVEL3,"TCP connect unresolved dns\n");
+	                            bluejoy_printf(BL_LEVEL3,"TCP connect unresolved dns\n");
                             #endif
                             #endif
                         }
                         }
                         Tcp_statuts=2;
                         Tcp_statuts=2;
@@ -1258,7 +1255,7 @@ static void Tcp_Task(void* arg)
                                 printf("socket create error\n");
                                 printf("socket create error\n");
                             #endif
                             #endif
                             #ifdef BL_FILE_LOG
                             #ifdef BL_FILE_LOG
-	                            //bluejoy_printf(BL_LEVEL3,"socket create error\n");
+	                            bluejoy_printf(BL_LEVEL3,"socket create error\n");
                             #endif
                             #endif
                             Tcp_statuts=1;
                             Tcp_statuts=1;
                         }
                         }
@@ -1285,7 +1282,7 @@ static void Tcp_Task(void* arg)
                             if(Reconnect_Num>=20)
                             if(Reconnect_Num>=20)
                             {
                             {
                                 #ifdef BL_FILE_LOG
                                 #ifdef BL_FILE_LOG
-	                                //bluejoy_printf(BL_LEVEL3,"20 Connect failed!%d,Reconnect:%d\n",TcpconnectID,Reconnect_Num);
+	                                bluejoy_printf(BL_LEVEL3,"20 Connect failed!%d,Reconnect:%d\n",TcpconnectID,Reconnect_Num);
                                 #endif
                                 #endif
                                 appSetCFUN(0);
                                 appSetCFUN(0);
                                 osDelay(10);
                                 osDelay(10);
@@ -1369,7 +1366,7 @@ static void Tcp_Task(void* arg)
                             if (TcpsendID<0)
                             if (TcpsendID<0)
                             {
                             {
                                 #ifdef BL_FILE_LOG
                                 #ifdef BL_FILE_LOG
-	                                //bluejoy_printf(BL_LEVEL3,"send failed,ConnectID:%d,TcpSend:%d,data length:%d\n",sockfd,TcpsendID,NB_send_len);
+	                                bluejoy_printf(BL_LEVEL3,"send failed,ConnectID:%d,TcpSend:%d,data length:%d\n",sockfd,TcpsendID,NB_send_len);
                                 #endif
                                 #endif
                                 closesocket(sockfd);
                                 closesocket(sockfd);
                                 TcpconnectID = -1;
                                 TcpconnectID = -1;
@@ -1407,7 +1404,10 @@ static void Tcp_Task(void* arg)
                             //     }
                             //     }
                             //     printf("\n");
                             //     printf("\n");
                             // #endif
                             // #endif
-                            TcpsendID = send(sockfd, TcpSendBuffer, NB_send_len, 0 );
+                            if(gpsbuffer[13]==0x01)
+                            {
+                                TcpsendID = send(sockfd, TcpSendBuffer, NB_send_len, 0 );
+                            }
                             free(TcpSendBuffer);
                             free(TcpSendBuffer);
                             if (TcpsendID<0)
                             if (TcpsendID<0)
                             {
                             {

+ 0 - 7
src/hal_module_adapter.c

@@ -2081,13 +2081,6 @@ static void GpsProcess(void* arg)
 						Gps_buffer.direction = atol(databuffer[8]);
 						Gps_buffer.direction = atol(databuffer[8]);
 					}
 					}
 					Gps_buffer.direction = 0xfffe;
 					Gps_buffer.direction = 0xfffe;
-					#ifdef BL_FILE_LOG
-					bluejoy_printf(BL_LEVEL3,"\nGpsdata valide:");
-					for (int i = 0; i < sizeof(databuffer); i++)
-					{
-						bluejoy_printf(BL_LEVEL3,"%s---",databuffer[i]);
-					}
-            		#endif
 					osMessageQueuePut(gpsMsgQueue, &Gps_buffer, 0, 1000);
 					osMessageQueuePut(gpsMsgQueue, &Gps_buffer, 0, 1000);
 				}
 				}
 			}
 			}