zhouxin 2 weken geleden
bovenliggende
commit
c69eefd8e5

+ 1 - 0
BoardInterface/onechip_include_header.h

@@ -12,6 +12,7 @@
 #include "i2c.h"
 #include "tim.h"
 #include "usart.h"
+#include "iwdg.h"
 #include "gpio.h"
 #include "onechip_devinf_define.h"
 #include "van_bsp_debug_shell.h"

+ 1 - 1
DriverInterface/TCA9548A.h

@@ -1,6 +1,6 @@
 
 
-#ifndef __TCA9548A__H
+#ifndef __TCA9548A_H
 #define __TCA9548A_H
 #define Sensor1           1
 #define Sensor2           2

+ 1 - 1
DriverInterface/communication.c

@@ -177,7 +177,7 @@ void PackDeviceNum(void){
 #ifdef ONE_CHIP_GIT_SHA
      uint8_t gitinf[10] = {0};
      memcpy(gitinf, ONE_CHIP_GIT_SHA, 9);
-	 strcat(DeviceNum, gitinf);
+	 strcat(DeviceNum, (const char *)gitinf);
 #endif  
 	Van_Device_Printf(VAN_LOG_INFO,"DeviceNum:%s\n", DeviceNum);
 }

+ 1 - 1
DriverInterface/communication.h

@@ -124,7 +124,7 @@ typedef struct _miniConfigPram {
         MotorParm minf;
     }Pram;
 } miniConfigPram;
-
+void PackDeviceNum(void);
 void deal_mUnion_cmd(CmdMessage *pMsg);
 void query_pc_cmd(CmdMessage *pMsg);
 unsigned int check_to_pc_busy(void);

+ 18 - 3
DriverInterface/onchip_flash.c

@@ -183,19 +183,33 @@ uint32_t checksum_calc1(uint8_t *wdata, int len)
 ********************************************************************/
 void cfg_load_default_param(void)
 {
+	
+
+
+
+#ifdef ONECHIP_MINI_ONE
 	sysinf.lysis_offset = 0;
 	sysinf.lysis_overHeat = 3;
 	sysinf.lysis_overHeatTime    = 10;
 	sysinf.lysis_Kp = 5;
 	sysinf.lysis_Ki = 0.01;
 	sysinf.lysis_Kd = 0;
-
-
+#else
+	sysinf.amplif_Kp_Slave = 20;
+	sysinf.amplif_Ki_Slave = 0.05;
+	sysinf.amplif_Kd_Slave = 0;
+	sysinf.PresetTempVal_Slave = 72;
+	sysinf.PresetTempTime_Slave = 5;
+	sysinf.SetTempVal_Slave    = 68;
+	sysinf.holdTemp_Slave = 63.5;
+	sysinf.PreHeatTime_Slave = 10;
+	sysinf.readyTemp_Slave = 65.5;
+	sysinf.adjtemp = -0.5;
+#endif	
 
 	sysinf.amplif_Kp = 20;
 	sysinf.amplif_Ki = 0.05;
 	sysinf.amplif_Kd    = 0;
-
 	sysinf.PresetTempVal = 72;
 	sysinf.PresetTempTime = 5;
 	sysinf.SetTempVal    = 68;
@@ -240,6 +254,7 @@ uint8_t cfg_param_verify(void)
 	if((saveCrc == calCrc) && (saveCrc != 0xffffffff))	{
 		Flash_ReadBuffer(CFG_PARAM_START_ADDR,(uint8_t *)&sysinf.SN, pramlen);
 	}
+	return 0;
 }
 
 /********************************************************************

+ 1 - 1
DriverInterface/onchip_flash.h

@@ -16,6 +16,6 @@ void cfg_load_default_param(void);
 uint8_t cfg_param_verify(void);
 uint8_t cfg_save_cfg_param(void);
 uint8_t cfg_param_init(void);
-
+void Flash_WriteBuffer(uint32_t start_addr, uint8_t *pBuffer, uint32_t NumToWrite);
 
 #endif

+ 2 - 1
MDK-ARM/RTE/_mini7_V2/RTE_Components.h

@@ -1,6 +1,6 @@
 
 /*
- * Auto generated Run-Time-Environment Component Configuration File
+ * Auto generated Run-Time-Environment Configuration File
  *      *** Do not modify ! ***
  *
  * Project: 'mini7_V2' 
@@ -17,4 +17,5 @@
 #define CMSIS_device_header "stm32f10x.h"
 
 
+
 #endif /* RTE_COMPONENTS_H */

+ 1 - 0
tshell/van_com_algorithm.c

@@ -13,6 +13,7 @@
 
 #include "van_com_algorithm.h"
 #include <stdio.h>
+#include <string.h>
 #define g_uMsgCmdFrameLen (6)
 
 /****************************************************************