Переглянути джерело

1、修改SOC计算算法;
2、增加限速起始和结束值的设定;
3、开灯延迟2s;
4、优化首次开机的判断逻辑。

Dail 1 рік тому
батько
коміт
8f4404ea24

+ 15 - 1
Core/Src/adc.c

@@ -51,6 +51,7 @@
 #include "torque_sensor.h"
 #include "math_tools.h"
 #include "motor_control.h"
+#include "remain_distance.h"
 
 uint16_t ADC1_Result[ADC1_DATA_NUM] = {0};
 uint16_t ADC1_Result_Filt[ADC1_DATA_NUM] = {0};
@@ -482,12 +483,25 @@ void HAL_ADC_ConvCpltCallback(ADC_HandleTypeDef* hadc)
 	//更新母线电压 
 	BusVoltageFltSum += ((ADC1_Result[ADC1_RANK_VIN] << 10) - BusVoltageFltSum) >> 9;
 	MC_RunInfo.BusVoltage = (uint32_t)((BusVoltageFltSum >> 10) * 18382) >> 10;//3300 * 1047 / (4095 * 47)
-	MC_RunInfo.BusVoltage += (MC_RunInfo.BusCurrent >> 7) * 8; //根据母线电流和估算的线阻进行补偿, 补偿电阻 0.2 * 128 = 25.6
+	MC_RunInfo.BusVoltage += (MC_RunInfo.BusCurrent >> 7) * 25; //根据母线电流和估算的线阻进行补偿, 补偿电阻 0.2 * 128 = 25.6
 	if( MCUManufacturer == HK32F103RBT6 )
 	{
 	   MC_RunInfo.BusVoltage = ((MC_RunInfo.BusVoltage - 8100) * 1402) >> 10;
 	}
 	
+	//累加计算母线电压
+	if((Battery_Info.BFlagCalSoc == FALSE) && (HAL_GetTick() >= 2000))
+	{
+		Battery_Info.u16CurVoltage = MC_RunInfo.BusVoltage / 10;
+		Battery_Info.u32TotalBusVoltage += Battery_Info.u16CurVoltage;
+		Battery_Info.u32GetvalCnt++;
+		if(Battery_Info.u32GetvalCnt >= 15000) //5 * 3K = 5s 电压平均值计算周期5s
+		{
+			Battery_Info.u32GetvalCnt = 0;
+			Battery_Info.BFlagCalSoc = TRUE;
+		}
+	}	
+	
 	//更新母线电流
 	if( MC_HallSensorData.InverterExistFlag == FALSE )
 	{

+ 11 - 0
Core/Src/main.c

@@ -162,6 +162,9 @@ int main(void)
 	EEPROM_Flash_Erase(EEPROM_FLASH_BEGIN_ADDRESS, EEPROM_FLASH_END_ADDRESS);
 	#endif
 	
+	//根据EEPROM里存储的开机次数确定是否首次开机
+	IsFirstPowerOnFlag = CheckFactoryModeFromEEPROM(&I2C_Handle_EEPROM, EEPROM_24C02_ADDR_RUN_LOG1);
+	
 	//EEPROM_Flash初始化	
 	EEPROM_Flash_Check();
 	
@@ -221,10 +224,13 @@ int main(void)
 		  	RunPeriodTestCnt = 0;
 			}
 			#endif
+			
 			//硬件版本识别
 			GetHardware_Versin( HardwareVersion_AD );
+			
 			//无码表模式初始化处理
 			NoPBUMode_Ini();	
+			
 			//CAN数据解析及处理
 			CanRx_Process();
 			
@@ -309,6 +315,9 @@ int main(void)
 			  ErrorLogSave_Process(&MC_ErrorLogSaveInfo, &IsErrorLogSaveInfoUpdateFlag);
 				RunLogSave_Process(&RunLogSaveIndex);
 			}
+			
+			#if 1
+			//异常掉电时保存里程数据
 			if(PowerDown_SaveFlag==TRUE)
 			{	
 				MC_PowerOffBkp.ODO_Km = MC_RideLog.ODO_Km;
@@ -320,6 +329,8 @@ int main(void)
 				SaveDataToEEPROM_Flash(EEPROM_FLASH_ADDR_POWEROFF_BKP_FLAG, (uint8_t*)"FLAG", 4); //掉电存储的数据标志更新
 				PowerDown_SaveFlag = FALSE;
 			}
+			#endif
+			
 			#if 1
 			//故障检测
 			MC_Fault_Check_Process();

Різницю між файлами не показано, бо вона завелика
+ 2438 - 2438
MDK-ARM/QD007A_CTL_APP/QD007A_CTL_APP_CRC.hex


BIN
MDK-ARM/bin/MC_VS75XX(250K)-TC000000-MS0000-V6.2.1.0.0_20230915.bin


BIN
MDK-ARM/bin/QD007A_CTL_APP.bin


+ 7 - 9
MDK-ARM/startup_stm32f103xb.lst

@@ -516,20 +516,18 @@ ARM Macro Assembler    Page 8
   334 00000004         
   335 00000004         
   336 00000004                 END
-Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw
-ork --depend=.\qd007a_ctl_app\startup_stm32f103xb.d -o.\qd007a_ctl_app\startup_
+Command Line: --debug --xref --cpu=Cortex-M3 --apcs=interwork --depend=.\qd007a
+_ctl_app\startup_stm32f103xb.d -o.\qd007a_ctl_app\startup_stm32f103xb.o -ID:\So
 
 
 
 ARM Macro Assembler    Page 9 
 
 
-stm32f103xb.o -ID:\MOTINOVA\Motor\Volans\QD007E_CTRL_APP_GD32\QD007E_CTRL_APP\M
-DK-ARM\RTE\_QD007A_CTL_APP -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.0.0\CMSIS\Include 
--IC:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.3.0\Device\Include --predefine="__MI
-CROLIB SETA 1" --predefine="__UVISION_VERSION SETA 522" --predefine="_RTE_ SETA
- 1" --predefine="STM32F10X_MD SETA 1" --list=startup_stm32f103xb.lst startup_st
-m32f103xb.s
+ftDesign\20190311_QD007A_CTL\QD007E_CTRL_APP\QD007E_CTRL_APP\MDK-ARM\RTE -IC:\K
+eil_v5\ARM\PACK\ARM\CMSIS\4.1.0\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32F
+1xx_DFP\1.0.4\Device\Include --predefine="__MICROLIB SETA 1" --list=startup_stm
+32f103xb.lst startup_stm32f103xb.s
 
 
 
@@ -1259,4 +1257,4 @@ Symbol: __main
       At line 152 in file startup_stm32f103xb.s
 Comment: __main used once
 2 symbols
-408 symbols in table
+405 symbols in table

+ 8 - 16
MDK-ARM/stm32f1xx_stucpuregsaddressing.lst

@@ -121,21 +121,13 @@ ARM Macro Assembler    Page 2
                                                             ler
    98 00000096                 ENDP
    99 00000096                 END
-Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw
-ork --depend=.\qd007a_ctl_app\stm32f1xx_stucpuregsaddressing.d -o.\qd007a_ctl_a
-pp\stm32f1xx_stucpuregsaddressing.o -ID:\MOTINOVA\Motor\Volans\QD007E_CTRL_APP_
-GD32\QD007E_CTRL_APP\MDK-ARM\RTE\_QD007A_CTL_APP -IC:\Keil_v5\ARM\PACK\ARM\CMSI
-S\5.0.0\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.3.0\Device\Inc
-lude --predefine="__MICROLIB SETA 1" --predefine="__UVISION_VERSION SETA 522" -
--predefine="_RTE_ SETA 1" --predefine="STM32F10X_MD SETA 1" --list=stm32f1xx_st
-
-
-
-ARM Macro Assembler    Page 3 
-
-
-ucpuregsaddressing.lst ..\SelfTestUser\src_specific\stm32f1xx_STUCpuRegsAddress
-ing.s
+Command Line: --debug --xref --cpu=Cortex-M3 --apcs=interwork --depend=.\qd007a
+_ctl_app\stm32f1xx_stucpuregsaddressing.d -o.\qd007a_ctl_app\stm32f1xx_stucpure
+gsaddressing.o -ID:\SoftDesign\20190311_QD007A_CTL\QD007E_CTRL_APP\QD007E_CTRL_
+APP\MDK-ARM\RTE -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\4.1.0\CMSIS\Include -IC:\Keil_v
+5\ARM\PACK\Keil\STM32F1xx_DFP\1.0.4\Device\Include --predefine="__MICROLIB SETA
+ 1" --list=stm32f1xx_stucpuregsaddressing.lst ..\SelfTestUser\src_specific\stm3
+2f1xx_STUCpuRegsAddressing.s
 
 
 
@@ -247,4 +239,4 @@ ssing.s
 ssing.s
 Comment: FailSafePOR used once
 3 symbols
-341 symbols in table
+338 symbols in table

+ 8 - 9
MDK-ARM/stm32f1xx_stucpuwalkpatkeil.lst

@@ -1591,14 +1591,13 @@ ARM Macro Assembler    Page 25
  1170 000006D0         
  1171 000006D0         
  1172 000006D0                 END
-Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw
-ork --depend=.\qd007a_ctl_app\stm32f1xx_stucpuwalkpatkeil.d -o.\qd007a_ctl_app\
-stm32f1xx_stucpuwalkpatkeil.o -ID:\MOTINOVA\Motor\Volans\QD007E_CTRL_APP_GD32\Q
-D007E_CTRL_APP\MDK-ARM\RTE\_QD007A_CTL_APP -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.0.
-0\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.3.0\Device\Include -
--predefine="__MICROLIB SETA 1" --predefine="__UVISION_VERSION SETA 522" --prede
-fine="_RTE_ SETA 1" --predefine="STM32F10X_MD SETA 1" --list=stm32f1xx_stucpuwa
-lkpatkeil.lst ..\SelfTestUser\src_specific\stm32f1xx_STUCpuWalkpatKEIL.s
+Command Line: --debug --xref --cpu=Cortex-M3 --apcs=interwork --depend=.\qd007a
+_ctl_app\stm32f1xx_stucpuwalkpatkeil.d -o.\qd007a_ctl_app\stm32f1xx_stucpuwalkp
+atkeil.o -ID:\SoftDesign\20190311_QD007A_CTL\QD007E_CTRL_APP\QD007E_CTRL_APP\MD
+K-ARM\RTE -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\4.1.0\CMSIS\Include -IC:\Keil_v5\ARM\
+PACK\Keil\STM32F1xx_DFP\1.0.4\Device\Include --predefine="__MICROLIB SETA 1" --
+list=stm32f1xx_stucpuwalkpatkeil.lst ..\SelfTestUser\src_specific\stm32f1xx_STU
+CpuWalkpatKEIL.s
 
 
 
@@ -2666,4 +2665,4 @@ KEIL.s
 KEIL.s
 
 1 symbol
-401 symbols in table
+398 symbols in table

+ 8 - 9
MDK-ARM/stm32f1xx_sturamwalkpatkeil.lst

@@ -428,14 +428,13 @@ ARM Macro Assembler    Page 7
   329 000001F2                 ENDP
   330 000001F2         
   331 000001F2                 END
-Command Line: --debug --xref --diag_suppress=9931 --cpu=Cortex-M3 --apcs=interw
-ork --depend=.\qd007a_ctl_app\stm32f1xx_sturamwalkpatkeil.d -o.\qd007a_ctl_app\
-stm32f1xx_sturamwalkpatkeil.o -ID:\MOTINOVA\Motor\Volans\QD007E_CTRL_APP_GD32\Q
-D007E_CTRL_APP\MDK-ARM\RTE\_QD007A_CTL_APP -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\5.0.
-0\CMSIS\Include -IC:\Keil_v5\ARM\PACK\Keil\STM32F1xx_DFP\2.3.0\Device\Include -
--predefine="__MICROLIB SETA 1" --predefine="__UVISION_VERSION SETA 522" --prede
-fine="_RTE_ SETA 1" --predefine="STM32F10X_MD SETA 1" --list=stm32f1xx_sturamwa
-lkpatkeil.lst ..\SelfTestUser\src_specific\stm32f1xx_STURamWalkpatKEIL.s
+Command Line: --debug --xref --cpu=Cortex-M3 --apcs=interwork --depend=.\qd007a
+_ctl_app\stm32f1xx_sturamwalkpatkeil.d -o.\qd007a_ctl_app\stm32f1xx_sturamwalkp
+atkeil.o -ID:\SoftDesign\20190311_QD007A_CTL\QD007E_CTRL_APP\QD007E_CTRL_APP\MD
+K-ARM\RTE -IC:\Keil_v5\ARM\PACK\ARM\CMSIS\4.1.0\CMSIS\Include -IC:\Keil_v5\ARM\
+PACK\Keil\STM32F1xx_DFP\1.0.4\Device\Include --predefine="__MICROLIB SETA 1" --
+list=stm32f1xx_sturamwalkpatkeil.lst ..\SelfTestUser\src_specific\stm32f1xx_STU
+RamWalkpatKEIL.s
 
 
 
@@ -812,4 +811,4 @@ IL.s
       None
 Comment: FailSafePOR unused
 1 symbol
-363 symbols in table
+360 symbols in table

+ 1 - 0
User/Inc/eeprom_24c02.h

@@ -44,5 +44,6 @@ int8_t SavePowerOffBakData(I2C_Handle_Struct_t* I2C_Handle, TrueOrFalse_Flag_Str
 void EEPROM_24C02_ParamReset(I2C_Handle_Struct_t* I2C_Handle);
 void EEPROM_24C02_LogReset(I2C_Handle_Struct_t* I2C_Handle);
 int8_t RunLogSave_Process(uint8_t* RunLogIndex);
+TrueOrFalse_Flag_Struct_t CheckFactoryModeFromEEPROM(I2C_Handle_Struct_t* I2C_Handle, uint8_t Addr);
 
 #endif

+ 2 - 0
User/Inc/eeprom_flash.h

@@ -25,6 +25,8 @@
 extern TrueOrFalse_Flag_Struct_t IsPowerOffDataBkp_SaveFlag;
 extern TrueOrFalse_Flag_Struct_t IsFlashSaveDataUpdate;
 
+extern void CopyDataToEEPROM_Flash(void);
+extern void CopyDataFromEEPROM_Flash(void);
 extern void FLASH_Write(uint32_t FlashAddress, uint32_t* Data, uint16_t DataLength);
 extern void EEPROM_Flash_Erase(uint32_t BeginAddress, uint32_t EndAddress);
 extern int8_t ReadDataFromEEPROM_Flash(uint32_t FlashAddress, uint8_t* Data, uint8_t Length); // Length±ØÐëΪ4µÄ±¶Êý

+ 1 - 0
User/Inc/math_tools.h

@@ -25,4 +25,5 @@ extern int16_t accDecProcess(int16_t V_Set,	\
 extern uint16_t Standard_deviation_aver(uint16_t *data,uint8_t len, uint16_t *pAver);
 extern uint8_t CheckArrayIs0(uint8_t* Data, uint16_t Len);
 extern void ArrayFillZero(uint16_t* Array, uint16_t Length);
+extern uint16_t MovingMaxFilter(uint16_t InputData, uint16_t* Array, uint16_t Length);
 #endif

+ 7 - 2
User/Inc/remain_distance.h

@@ -45,14 +45,19 @@ typedef struct
 	uint32_t Q_remain_real;          //电池实时剩余电量
 	uint32_t Q_remain_real_last;     //电池上一次剩余电量
 	uint8_t SOC;
+	TrueOrFalse_Flag_Struct_t BFlagCalSoc;//计算SOC
+	uint16_t u16CurVoltage;          //实时电压,0.01V
+	uint32_t u32TotalBusVoltage;		 //母线电压累计和,0.01V
+	uint32_t u32GetvalCnt;					 //统计计数
+	uint16_t u16BusAverageVol[12];	 //母线平均电压数组
 }Battery_Info_t;
 
 extern Remain_Dis_t RemainDis;
-
+extern Battery_Info_t Battery_Info;
 extern void RD_RemainDis_Init(uint16_t uwWheelLength, TrueOrFalse_Flag_Struct_t BMS_COM_OK, uint16_t BusVoltage, uint8_t DesignVol, uint16_t BMS_RC);
 extern void RD_CalculateRemainDis(uint32_t WheelTurnCnt, uint16_t RemainCap, uint8_t SOC, uint16_t BusCurrent) ;
 extern void RD_SaveAndUpdateInfo(MC_GearSt_Struct_t GearSt, MC_AssistRunMode_Struct_t MC_AssistRunMode);
-extern uint8_t Battery_SocCal(uint16_t Voltage);
+extern uint8_t Battery_SocCal(Battery_Info_t* p_Battery_Info, uint8_t SOC_Old, uint8_t Vol_Design);
 
 #endif
 

+ 4 - 1
User/Inc/var.h

@@ -208,7 +208,9 @@ typedef struct
 	uint16_t u16OverspeedWarnVal;									 //超速告警值
 	uint16_t u16EffectVal;												 //尾灯亮起有效值
 	uint16_t u16Prediv;														 //尾灯亮起时间的分频系数
-	uint8_t RS2[18];
+	int8_t   speedLimitStartAdj;
+	int8_t   speedLimitEndAdj;
+	uint8_t RS2[16];
 }MC_ConfigParam2_Struct_t;
 
 //姿态传感器数值
@@ -502,6 +504,7 @@ extern uint16_t SpeedRatio;
 extern uint16_t HardwareVersion_AD;
 extern TrueOrFalse_Flag_Struct_t VersionIdentifyFinishedFlag;
 extern TrueOrFalse_Flag_Struct_t PowerDown_SaveFlag;
+extern TrueOrFalse_Flag_Struct_t IsFirstPowerOnFlag;
 /**************************全局变量声明End***************************/
 
 /**************************全局函数声明Begin*************************/

+ 1022 - 2085
User/Src/battery_info.c

@@ -17,2089 +17,1026 @@
 /*µç³ØÉè¼ÆÈÝÁ¿*/
 const uint16_t battery_VoltageQuantity[1022][2] = 
 {
-4152	,	0	,
-4122	,	2	,
-4121	,	6	,
-4120	,	10	,
-4119	,	14	,
-4118	,	22	,
-4117	,	30	,
-4116	,	34	,
-4115	,	54	,
-4114	,	58	,
-4113	,	70	,
-4112	,	86	,
-4111	,	94	,
-4110	,	110	,
-4109	,	130	,
-4108	,	142	,
-4107	,	166	,
-4106	,	178	,
-4105	,	194	,
-4104	,	218	,
-4103	,	242	,
-4102	,	258	,
-4101	,	286	,
-4100	,	310	,
-4099	,	334	,
-4098	,	366	,
-4097	,	386	,
-4096	,	414	,
-4095	,	446	,
-4094	,	470	,
-4093	,	494	,
-4092	,	526	,
-4091	,	562	,
-4090	,	598	,
-4089	,	638	,
-4088	,	662	,
-4087	,	690	,
-4086	,	738	,
-4085	,	770	,
-4084	,	802	,
-4083	,	846	,
-4082	,	894	,
-4081	,	930	,
-4080	,	986	,
-4079	,	1022	,
-4078	,	1070	,
-4077	,	1114	,
-4076	,	1166	,
-4075	,	1206	,
-4074	,	1262	,
-4073	,	1322	,
-4072	,	1374	,
-4071	,	1454	,
-4070	,	1506	,
-4069	,	1570	,
-4068	,	1646	,
-4067	,	1726	,
-4066	,	1802	,
-4065	,	1886	,
-4064	,	1962	,
-4063	,	2030	,
-4062	,	2130	,
-4061	,	2198	,
-4060	,	2270	,
-4059	,	2382	,
-4058	,	2462	,
-4057	,	2562	,
-4056	,	2682	,
-4055	,	2770	,
-4054	,	2882	,
-4053	,	2982	,
-4052	,	3118	,
-4051	,	3234	,
-4050	,	3318	,
-4049	,	3442	,
-4048	,	3554	,
-4047	,	3642	,
-4046	,	3774	,
-4045	,	3890	,
-4044	,	3974	,
-4043	,	4094	,
-4042	,	4206	,
-4041	,	4282	,
-4040	,	4402	,
-4039	,	4502	,
-4038	,	4566	,
-4037	,	4674	,
-4036	,	4754	,
-4035	,	4822	,
-4034	,	4910	,
-4033	,	4978	,
-4032	,	5054	,
-4031	,	5134	,
-4030	,	5202	,
-4029	,	5254	,
-4028	,	5330	,
-4027	,	5402	,
-4026	,	5450	,
-4025	,	5522	,
-4024	,	5570	,
-4023	,	5630	,
-4022	,	5686	,
-4021	,	5746	,
-4020	,	5794	,
-4019	,	5854	,
-4018	,	5902	,
-4017	,	5942	,
-4016	,	5998	,
-4015	,	6054	,
-4014	,	6090	,
-4013	,	6146	,
-4012	,	6198	,
-4011	,	6230	,
-4010	,	6290	,
-4009	,	6338	,
-4008	,	6370	,
-4007	,	6426	,
-4006	,	6474	,
-4005	,	6514	,
-4004	,	6562	,
-4003	,	6610	,
-4002	,	6642	,
-4001	,	6694	,
-4000	,	6742	,
-3999	,	6774	,
-3998	,	6830	,
-3997	,	6866	,
-3996	,	6910	,
-3995	,	6950	,
-3994	,	6990	,
-3993	,	7026	,
-3992	,	7070	,
-3991	,	7106	,
-3990	,	7142	,
-3989	,	7190	,
-3988	,	7222	,
-3987	,	7266	,
-3986	,	7306	,
-3985	,	7350	,
-3984	,	7382	,
-3983	,	7426	,
-3982	,	7462	,
-3981	,	7494	,
-3980	,	7544	,
-3979	,	7574	,
-3978	,	7614	,
-3977	,	7664	,
-3976	,	7696	,
-3975	,	7734	,
-3974	,	7778	,
-3973	,	7814	,
-3972	,	7850	,
-3971	,	7898	,
-3970	,	7926	,
-3969	,	7966	,
-3968	,	8014	,
-3967	,	8058	,
-3966	,	8086	,
-3965	,	8138	,
-3964	,	8166	,
-3963	,	8198	,
-3962	,	8232	,
-3961	,	8278	,
-3960	,	8312	,
-3959	,	8342	,
-3958	,	8392	,
-3957	,	8422	,
-3956	,	8468	,
-3955	,	8502	,
-3954	,	8538	,
-3953	,	8582	,
-3952	,	8616	,
-3951	,	8656	,
-3950	,	8696	,
-3949	,	8736	,
-3948	,	8776	,
-3947	,	8806	,
-3946	,	8856	,
-3945	,	8886	,
-3944	,	8936	,
-3943	,	8968	,
-3942	,	9010	,
-3941	,	9046	,
-3940	,	9092	,
-3939	,	9136	,
-3938	,	9160	,
-3937	,	9212	,
-3936	,	9256	,
-3935	,	9288	,
-3934	,	9344	,
-3933	,	9376	,
-3932	,	9404	,
-3931	,	9464	,
-3930	,	9490	,
-3929	,	9534	,
-3928	,	9572	,
-3927	,	9616	,
-3926	,	9652	,
-3925	,	9704	,
-3924	,	9734	,
-3923	,	9780	,
-3922	,	9816	,
-3921	,	9860	,
-3920	,	9896	,
-3919	,	9944	,
-3918	,	9984	,
-3917	,	10028	,
-3916	,	10084	,
-3915	,	10116	,
-3914	,	10168	,
-3913	,	10200	,
-3912	,	10248	,
-3911	,	10284	,
-3910	,	10352	,
-3909	,	10384	,
-3908	,	10432	,
-3907	,	10472	,
-3906	,	10520	,
-3905	,	10572	,
-3904	,	10620	,
-3903	,	10660	,
-3902	,	10708	,
-3901	,	10748	,
-3900	,	10792	,
-3899	,	10824	,
-3898	,	10892	,
-3897	,	10928	,
-3896	,	10972	,
-3895	,	11016	,
-3894	,	11068	,
-3893	,	11120	,
-3892	,	11176	,
-3891	,	11212	,
-3890	,	11256	,
-3889	,	11320	,
-3888	,	11364	,
-3887	,	11400	,
-3886	,	11468	,
-3885	,	11508	,
-3884	,	11560	,
-3883	,	11608	,
-3882	,	11664	,
-3881	,	11716	,
-3880	,	11760	,
-3879	,	11812	,
-3878	,	11864	,
-3877	,	11912	,
-3876	,	11964	,
-3875	,	12020	,
-3874	,	12060	,
-3873	,	12120	,
-3872	,	12180	,
-3871	,	12220	,
-3870	,	12268	,
-3869	,	12332	,
-3868	,	12372	,
-3867	,	12432	,
-3866	,	12488	,
-3865	,	12532	,
-3864	,	12584	,
-3863	,	12644	,
-3862	,	12684	,
-3861	,	12744	,
-3860	,	12796	,
-3859	,	12844	,
-3858	,	12908	,
-3857	,	12956	,
-3856	,	13004	,
-3855	,	13064	,
-3854	,	13116	,
-3853	,	13164	,
-3852	,	13228	,
-3851	,	13260	,
-3850	,	13328	,
-3849	,	13380	,
-3848	,	13440	,
-3847	,	13480	,
-3846	,	13540	,
-3845	,	13600	,
-3844	,	13640	,
-3843	,	13696	,
-3842	,	13748	,
-3841	,	13800	,
-3840	,	13852	,
-3839	,	13908	,
-3838	,	13952	,
-3837	,	14004	,
-3836	,	14064	,
-3835	,	14100	,
-3834	,	14156	,
-3833	,	14200	,
-3832	,	14260	,
-3831	,	14308	,
-3830	,	14348	,
-3829	,	14404	,
-3828	,	14460	,
-3827	,	14508	,
-3826	,	14552	,
-3825	,	14612	,
-3824	,	14652	,
-3823	,	14704	,
-3822	,	14756	,
-3821	,	14812	,
-3820	,	14852	,
-3819	,	14912	,
-3818	,	14948	,
-3817	,	15004	,
-3816	,	15052	,
-3815	,	15108	,
-3814	,	15140	,
-3813	,	15196	,
-3812	,	15240	,
-3811	,	15280	,
-3810	,	15328	,
-3809	,	15380	,
-3808	,	15416	,
-3807	,	15468	,
-3806	,	15516	,
-3805	,	15552	,
-3804	,	15604	,
-3803	,	15652	,
-3802	,	15688	,
-3801	,	15740	,
-3800	,	15772	,
-3799	,	15820	,
-3798	,	15872	,
-3797	,	15920	,
-3796	,	15956	,
-3795	,	16008	,
-3794	,	16044	,
-3793	,	16092	,
-3792	,	16136	,
-3791	,	16172	,
-3790	,	16224	,
-3789	,	16268	,
-3788	,	16316	,
-3787	,	16352	,
-3786	,	16396	,
-3785	,	16440	,
-3784	,	16480	,
-3783	,	16524	,
-3782	,	16556	,
-3781	,	16604	,
-3780	,	16656	,
-3779	,	16696	,
-3778	,	16728	,
-3777	,	16772	,
-3776	,	16820	,
-3775	,	16856	,
-3774	,	16892	,
-3773	,	16940	,
-3772	,	16972	,
-3771	,	17012	,
-3770	,	17056	,
-3769	,	17092	,
-3768	,	17132	,
-3767	,	17168	,
-3766	,	17212	,
-3765	,	17248	,
-3764	,	17296	,
-3763	,	17328	,
-3762	,	17368	,
-3761	,	17408	,
-3760	,	17452	,
-3759	,	17488	,
-3758	,	17520	,
-3757	,	17568	,
-3756	,	17600	,
-3755	,	17648	,
-3754	,	17680	,
-3753	,	17712	,
-3752	,	17760	,
-3751	,	17800	,
-3750	,	17840	,
-3749	,	17872	,
-3748	,	17920	,
-3747	,	17952	,
-3746	,	18004	,
-3745	,	18036	,
-3744	,	18068	,
-3743	,	18116	,
-3742	,	18152	,
-3741	,	18196	,
-3740	,	18244	,
-3739	,	18276	,
-3738	,	18304	,
-3737	,	18356	,
-3736	,	18388	,
-3735	,	18420	,
-3734	,	18472	,
-3733	,	18504	,
-3732	,	18552	,
-3731	,	18596	,
-3730	,	18624	,
-3729	,	18660	,
-3728	,	18712	,
-3727	,	18748	,
-3726	,	18792	,
-3725	,	18832	,
-3724	,	18868	,
-3723	,	18912	,
-3722	,	18956	,
-3721	,	18992	,
-3720	,	19024	,
-3719	,	19072	,
-3718	,	19112	,
-3717	,	19152	,
-3716	,	19188	,
-3715	,	19232	,
-3714	,	19264	,
-3713	,	19316	,
-3712	,	19356	,
-3711	,	19400	,
-3710	,	19452	,
-3709	,	19488	,
-3708	,	19536	,
-3707	,	19568	,
-3706	,	19616	,
-3705	,	19648	,
-3704	,	19700	,
-3703	,	19748	,
-3702	,	19780	,
-3701	,	19836	,
-3700	,	19872	,
-3699	,	19920	,
-3698	,	19960	,
-3697	,	20000	,
-3696	,	20036	,
-3695	,	20084	,
-3694	,	20132	,
-3693	,	20164	,
-3692	,	20224	,
-3691	,	20264	,
-3690	,	20304	,
-3689	,	20352	,
-3688	,	20392	,
-3687	,	20436	,
-3686	,	20496	,
-3685	,	20536	,
-3684	,	20576	,
-3683	,	20624	,
-3682	,	20676	,
-3681	,	20700	,
-3680	,	20744	,
-3679	,	20800	,
-3678	,	20848	,
-3677	,	20892	,
-3676	,	20948	,
-3675	,	21000	,
-3674	,	21040	,
-3673	,	21088	,
-3672	,	21140	,
-3671	,	21176	,
-3670	,	21232	,
-3669	,	21280	,
-3668	,	21320	,
-3667	,	21376	,
-3666	,	21424	,
-3665	,	21472	,
-3664	,	21524	,
-3663	,	21584	,
-3662	,	21616	,
-3661	,	21676	,
-3660	,	21720	,
-3659	,	21776	,
-3658	,	21832	,
-3657	,	21888	,
-3656	,	21932	,
-3655	,	21988	,
-3654	,	22044	,
-3653	,	22084	,
-3652	,	22152	,
-3651	,	22208	,
-3650	,	22244	,
-3649	,	22320	,
-3648	,	22372	,
-3647	,	22420	,
-3646	,	22480	,
-3645	,	22540	,
-3644	,	22588	,
-3643	,	22644	,
-3642	,	22704	,
-3641	,	22752	,
-3640	,	22816	,
-3639	,	22864	,
-3638	,	22924	,
-3637	,	22988	,
-3636	,	23056	,
-3635	,	23096	,
-3634	,	23168	,
-3633	,	23236	,
-3632	,	23280	,
-3631	,	23360	,
-3630	,	23408	,
-3629	,	23472	,
-3628	,	23540	,
-3627	,	23600	,
-3626	,	23656	,
-3625	,	23732	,
-3624	,	23792	,
-3623	,	23852	,
-3622	,	23920	,
-3621	,	23988	,
-3620	,	24048	,
-3619	,	24128	,
-3618	,	24180	,
-3617	,	24252	,
-3616	,	24324	,
-3615	,	24392	,
-3614	,	24452	,
-3613	,	24528	,
-3612	,	24588	,
-3611	,	24652	,
-3610	,	24728	,
-3609	,	24800	,
-3608	,	24860	,
-3607	,	24948	,
-3606	,	25020	,
-3605	,	25076	,
-3604	,	25148	,
-3603	,	25220	,
-3602	,	25300	,
-3601	,	25380	,
-3600	,	25456	,
-3599	,	25516	,
-3598	,	25604	,
-3597	,	25680	,
-3596	,	25732	,
-3595	,	25824	,
-3594	,	25880	,
-3593	,	25956	,
-3592	,	26036	,
-3591	,	26116	,
-3590	,	26192	,
-3589	,	26264	,
-3588	,	26344	,
-3587	,	26424	,
-3586	,	26504	,
-3585	,	26584	,
-3584	,	26660	,
-3583	,	26728	,
-3582	,	26808	,
-3581	,	26888	,
-3580	,	26968	,
-3579	,	27072	,
-3578	,	27128	,
-3577	,	27228	,
-3576	,	27316	,
-3575	,	27376	,
-3574	,	27460	,
-3573	,	27540	,
-3572	,	27620	,
-3571	,	27700	,
-3570	,	27784	,
-3569	,	27848	,
-3568	,	27928	,
-3567	,	28008	,
-3566	,	28088	,
-3565	,	28168	,
-3564	,	28268	,
-3563	,	28328	,
-3562	,	28396	,
-3561	,	28512	,
-3560	,	28576	,
-3559	,	28664	,
-3558	,	28744	,
-3557	,	28824	,
-3556	,	28904	,
-3555	,	29004	,
-3554	,	29064	,
-3553	,	29136	,
-3552	,	29240	,
-3551	,	29300	,
-3550	,	29388	,
-3549	,	29476	,
-3548	,	29532	,
-3547	,	29596	,
-3546	,	29696	,
-3545	,	29764	,
-3544	,	29832	,
-3543	,	29936	,
-3542	,	29992	,
-3541	,	30056	,
-3540	,	30160	,
-3539	,	30216	,
-3538	,	30296	,
-3537	,	30376	,
-3536	,	30444	,
-3535	,	30520	,
-3534	,	30600	,
-3533	,	30676	,
-3532	,	30752	,
-3531	,	30832	,
-3530	,	30888	,
-3529	,	30956	,
-3528	,	31036	,
-3527	,	31108	,
-3526	,	31180	,
-3525	,	31260	,
-3524	,	31308	,
-3523	,	31388	,
-3522	,	31452	,
-3521	,	31520	,
-3520	,	31580	,
-3519	,	31644	,
-3518	,	31716	,
-3517	,	31772	,
-3516	,	31852	,
-3515	,	31908	,
-3514	,	31964	,
-3513	,	32044	,
-3512	,	32092	,
-3511	,	32156	,
-3510	,	32236	,
-3509	,	32276	,
-3508	,	32348	,
-3507	,	32396	,
-3506	,	32460	,
-3505	,	32532	,
-3504	,	32588	,
-3503	,	32644	,
-3502	,	32700	,
-3501	,	32764	,
-3500	,	32816	,
-3499	,	32884	,
-3498	,	32924	,
-3497	,	32996	,
-3496	,	33036	,
-3495	,	33088	,
-3494	,	33156	,
-3493	,	33196	,
-3492	,	33252	,
-3491	,	33312	,
-3490	,	33376	,
-3489	,	33412	,
-3488	,	33468	,
-3487	,	33516	,
-3486	,	33568	,
-3485	,	33628	,
-3484	,	33680	,
-3483	,	33716	,
-3482	,	33772	,
-3481	,	33820	,
-3480	,	33864	,
-3479	,	33924	,
-3478	,	33964	,
-3477	,	34012	,
-3476	,	34064	,
-3475	,	34120	,
-3474	,	34156	,
-3473	,	34208	,
-3472	,	34252	,
-3471	,	34296	,
-3470	,	34348	,
-3469	,	34396	,
-3468	,	34436	,
-3467	,	34484	,
-3466	,	34528	,
-3465	,	34576	,
-3464	,	34624	,
-3463	,	34668	,
-3462	,	34704	,
-3461	,	34768	,
-3460	,	34800	,
-3459	,	34840	,
-3458	,	34892	,
-3457	,	34940	,
-3456	,	34972	,
-3455	,	35020	,
-3454	,	35052	,
-3453	,	35100	,
-3452	,	35140	,
-3451	,	35180	,
-3450	,	35220	,
-3449	,	35264	,
-3448	,	35296	,
-3447	,	35340	,
-3446	,	35384	,
-3445	,	35424	,
-3444	,	35456	,
-3443	,	35496	,
-3442	,	35536	,
-3441	,	35568	,
-3440	,	35608	,
-3439	,	35640	,
-3438	,	35680	,
-3437	,	35716	,
-3436	,	35760	,
-3435	,	35788	,
-3434	,	35824	,
-3433	,	35860	,
-3432	,	35888	,
-3431	,	35924	,
-3430	,	35952	,
-3429	,	35988	,
-3428	,	36028	,
-3427	,	36064	,
-3426	,	36088	,
-3425	,	36124	,
-3424	,	36152	,
-3423	,	36184	,
-3422	,	36224	,
-3421	,	36256	,
-3420	,	36284	,
-3419	,	36320	,
-3418	,	36356	,
-3417	,	36380	,
-3416	,	36416	,
-3415	,	36448	,
-3414	,	36472	,
-3413	,	36508	,
-3412	,	36536	,
-3411	,	36572	,
-3410	,	36604	,
-3409	,	36640	,
-3408	,	36660	,
-3407	,	36688	,
-3406	,	36720	,
-3405	,	36752	,
-3404	,	36776	,
-3403	,	36820	,
-3402	,	36844	,
-3401	,	36876	,
-3400	,	36908	,
-3399	,	36932	,
-3398	,	36960	,
-3397	,	36992	,
-3396	,	37020	,
-3395	,	37044	,
-3394	,	37076	,
-3393	,	37108	,
-3392	,	37132	,
-3391	,	37176	,
-3390	,	37200	,
-3389	,	37228	,
-3388	,	37264	,
-3387	,	37292	,
-3386	,	37320	,
-3385	,	37348	,
-3384	,	37384	,
-3383	,	37416	,
-3382	,	37456	,
-3381	,	37480	,
-3380	,	37504	,
-3379	,	37556	,
-3378	,	37580	,
-3377	,	37616	,
-3376	,	37652	,
-3375	,	37692	,
-3374	,	37728	,
-3373	,	37776	,
-3372	,	37812	,
-3371	,	37864	,
-3370	,	37908	,
-3369	,	37948	,
-3368	,	37996	,
-3367	,	38032	,
-3366	,	38080	,
-3365	,	38132	,
-3364	,	38192	,
-3363	,	38224	,
-3362	,	38272	,
-3361	,	38328	,
-3360	,	38364	,
-3359	,	38412	,
-3358	,	38464	,
-3357	,	38500	,
-3356	,	38544	,
-3355	,	38600	,
-3354	,	38636	,
-3353	,	38684	,
-3352	,	38736	,
-3351	,	38768	,
-3350	,	38816	,
-3349	,	38868	,
-3348	,	38900	,
-3347	,	38948	,
-3346	,	38988	,
-3345	,	39032	,
-3344	,	39068	,
-3343	,	39120	,
-3342	,	39152	,
-3341	,	39200	,
-3340	,	39236	,
-3339	,	39276	,
-3338	,	39312	,
-3337	,	39360	,
-3336	,	39400	,
-3335	,	39432	,
-3334	,	39492	,
-3333	,	39516	,
-3332	,	39552	,
-3331	,	39608	,
-3330	,	39636	,
-3329	,	39664	,
-3328	,	39720	,
-3327	,	39748	,
-3326	,	39776	,
-3325	,	39828	,
-3324	,	39860	,
-3323	,	39888	,
-3322	,	39936	,
-3321	,	39968	,
-3320	,	40000	,
-3319	,	40048	,
-3318	,	40072	,
-3317	,	40104	,
-3316	,	40136	,
-3315	,	40172	,
-3314	,	40208	,
-3313	,	40236	,
-3312	,	40272	,
-3311	,	40296	,
-3310	,	40324	,
-3309	,	40356	,
-3308	,	40392	,
-3307	,	40412	,
-3306	,	40444	,
-3305	,	40468	,
-3304	,	40496	,
-3303	,	40524	,
-3302	,	40548	,
-3301	,	40572	,
-3300	,	40596	,
-3299	,	40620	,
-3298	,	40640	,
-3297	,	40664	,
-3296	,	40680	,
-3295	,	40708	,
-3294	,	40728	,
-3293	,	40744	,
-3292	,	40764	,
-3291	,	40788	,
-3290	,	40800	,
-3289	,	40820	,
-3288	,	40836	,
-3287	,	40856	,
-3286	,	40868	,
-3285	,	40888	,
-3284	,	40900	,
-3283	,	40916	,
-3282	,	40932	,
-3281	,	40948	,
-3280	,	40960	,
-3279	,	40976	,
-3278	,	40984	,
-3277	,	41000	,
-3276	,	41012	,
-3275	,	41024	,
-3274	,	41036	,
-3273	,	41048	,
-3272	,	41060	,
-3271	,	41072	,
-3270	,	41084	,
-3269	,	41092	,
-3268	,	41104	,
-3267	,	41116	,
-3266	,	41124	,
-3265	,	41136	,
-3264	,	41144	,
-3263	,	41152	,
-3262	,	41164	,
-3261	,	41172	,
-3260	,	41180	,
-3259	,	41192	,
-3258	,	41200	,
-3257	,	41208	,
-3256	,	41220	,
-3255	,	41228	,
-3254	,	41236	,
-3253	,	41244	,
-3252	,	41252	,
-3251	,	41260	,
-3250	,	41268	,
-3249	,	41276	,
-3248	,	41284	,
-3247	,	41292	,
-3246	,	41300	,
-3245	,	41308	,
-3244	,	41316	,
-3243	,	41324	,
-3242	,	41332	,
-3241	,	41340	,
-3240	,	41348	,
-3239	,	41356	,
-3238	,	41360	,
-3237	,	41368	,
-3236	,	41376	,
-3235	,	41384	,
-3234	,	41392	,
-3233	,	41396	,
-3232	,	41404	,
-3231	,	41412	,
-3230	,	41416	,
-3229	,	41424	,
-3228	,	41432	,
-3227	,	41440	,
-3226	,	41444	,
-3225	,	41452	,
-3224	,	41460	,
-3223	,	41468	,
-3222	,	41476	,
-3221	,	41480	,
-3220	,	41488	,
-3219	,	41492	,
-3218	,	41500	,
-3217	,	41508	,
-3216	,	41512	,
-3215	,	41520	,
-3214	,	41524	,
-3213	,	41532	,
-3212	,	41536	,
-3211	,	41544	,
-3210	,	41552	,
-3209	,	41556	,
-3208	,	41564	,
-3207	,	41568	,
-3206	,	41576	,
-3205	,	41584	,
-3204	,	41588	,
-3203	,	41596	,
-3202	,	41604	,
-3200	,	41612	,
-3199	,	41620	,
-3198	,	41628	,
-3197	,	41632	,
-3196	,	41636	,
-3195	,	41644	,
-3194	,	41648	,
-3193	,	41656	,
-3192	,	41664	,
-3191	,	41668	,
-3190	,	41672	,
-3189	,	41680	,
-3188	,	41684	,
-3187	,	41692	,
-3186	,	41696	,
-3185	,	41704	,
-3184	,	41708	,
-3183	,	41716	,
-3182	,	41720	,
-3181	,	41724	,
-3180	,	41728	,
-3179	,	41736	,
-3178	,	41744	,
-3177	,	41748	,
-3176	,	41752	,
-3175	,	41760	,
-3174	,	41764	,
-3173	,	41768	,
-3172	,	41776	,
-3171	,	41780	,
-3170	,	41788	,
-3169	,	41792	,
-3168	,	41796	,
-3167	,	41800	,
-3166	,	41808	,
-3165	,	41812	,
-3164	,	41820	,
-3163	,	41824	,
-3162	,	41828	,
-3161	,	41832	,
-3160	,	41840	,
-3159	,	41844	,
-3158	,	41852	,
-3157	,	41856	,
-3156	,	41860	,
-3155	,	41864	,
-3154	,	41872	,
-3153	,	41876	,
-3152	,	41880	,
-3151	,	41884	,
-3150	,	41888	,
-3149	,	41896	,
-3148	,	41900	,
-3147	,	41908	,
-3145	,	41916	,
-3144	,	41920	,
-3143	,	41924	,
-3142	,	41932	,
-3141	,	41936	,
-3140	,	41940	,
-3139	,	41944	,
-3138	,	41948	,
-3137	,	41956	,
-3136	,	41960	,
-3135	,	41964	,
-3134	,	41968	,
-3133	,	41972	,
-3132	,	41980	,
-3131	,	41984	,
-3130	,	41988	,
-3129	,	41992	,
-3128	,	41996	,
-3127	,	42000	,
-3126	,	42008	,
-3125	,	42012	,
-3124	,	42016	,
-3123	,	42020	,
-3122	,	42024	,
-3121	,	42028	,
-3120	,	42032	,
-3119	,	42036	,
-3118	,	42044	,
-3117	,	42048	,
-3116	,	42052	,
-3115	,	42056	,
-3114	,	42060	,
-3113	,	42064	,
-3112	,	42068	,
-3111	,	42072	,
-3110	,	42076	,
-3109	,	42084	,
-3108	,	42088	,
-3107	,	42092	,
-3106	,	42096	,
-3105	,	42100	,
-3104	,	42104	,
-3103	,	42108	,
-3102	,	42112	,
-3101	,	42116	,
-3100	,	42120	,
+	4152	,	0	,
+	4122	,	2	,
+	4121	,	6	,
+	4120	,	10	,
+	4119	,	14	,
+	4118	,	22	,
+	4117	,	30	,
+	4116	,	34	,
+	4115	,	54	,
+	4114	,	58	,
+	4113	,	70	,
+	4112	,	86	,
+	4111	,	94	,
+	4110	,	110	,
+	4109	,	130	,
+	4108	,	142	,
+	4107	,	166	,
+	4106	,	178	,
+	4105	,	194	,
+	4104	,	218	,
+	4103	,	242	,
+	4102	,	258	,
+	4101	,	286	,
+	4100	,	310	,
+	4099	,	334	,
+	4098	,	366	,
+	4097	,	386	,
+	4096	,	414	,
+	4095	,	446	,
+	4094	,	470	,
+	4093	,	494	,
+	4092	,	526	,
+	4091	,	562	,
+	4090	,	598	,
+	4089	,	638	,
+	4088	,	662	,
+	4087	,	690	,
+	4086	,	738	,
+	4085	,	770	,
+	4084	,	802	,
+	4083	,	846	,
+	4082	,	894	,
+	4081	,	930	,
+	4080	,	986	,
+	4079	,	1022	,
+	4078	,	1070	,
+	4077	,	1114	,
+	4076	,	1166	,
+	4075	,	1206	,
+	4074	,	1262	,
+	4073	,	1322	,
+	4072	,	1374	,
+	4071	,	1454	,
+	4070	,	1506	,
+	4069	,	1570	,
+	4068	,	1646	,
+	4067	,	1726	,
+	4066	,	1802	,
+	4065	,	1886	,
+	4064	,	1962	,
+	4063	,	2030	,
+	4062	,	2130	,
+	4061	,	2198	,
+	4060	,	2270	,
+	4059	,	2382	,
+	4058	,	2462	,
+	4057	,	2562	,
+	4056	,	2682	,
+	4055	,	2770	,
+	4054	,	2882	,
+	4053	,	2982	,
+	4052	,	3118	,
+	4051	,	3234	,
+	4050	,	3318	,
+	4049	,	3442	,
+	4048	,	3554	,
+	4047	,	3642	,
+	4046	,	3774	,
+	4045	,	3890	,
+	4044	,	3974	,
+	4043	,	4094	,
+	4042	,	4206	,
+	4041	,	4282	,
+	4040	,	4402	,
+	4039	,	4502	,
+	4038	,	4566	,
+	4037	,	4674	,
+	4036	,	4754	,
+	4035	,	4822	,
+	4034	,	4910	,
+	4033	,	4978	,
+	4032	,	5054	,
+	4031	,	5134	,
+	4030	,	5202	,
+	4029	,	5254	,
+	4028	,	5330	,
+	4027	,	5402	,
+	4026	,	5450	,
+	4025	,	5522	,
+	4024	,	5570	,
+	4023	,	5630	,
+	4022	,	5686	,
+	4021	,	5746	,
+	4020	,	5794	,
+	4019	,	5854	,
+	4018	,	5902	,
+	4017	,	5942	,
+	4016	,	5998	,
+	4015	,	6054	,
+	4014	,	6090	,
+	4013	,	6146	,
+	4012	,	6198	,
+	4011	,	6230	,
+	4010	,	6290	,
+	4009	,	6338	,
+	4008	,	6370	,
+	4007	,	6426	,
+	4006	,	6474	,
+	4005	,	6514	,
+	4004	,	6562	,
+	4003	,	6610	,
+	4002	,	6642	,
+	4001	,	6694	,
+	4000	,	6742	,
+	3999	,	6774	,
+	3998	,	6830	,
+	3997	,	6866	,
+	3996	,	6910	,
+	3995	,	6950	,
+	3994	,	6990	,
+	3993	,	7026	,
+	3992	,	7070	,
+	3991	,	7106	,
+	3990	,	7142	,
+	3989	,	7190	,
+	3988	,	7222	,
+	3987	,	7266	,
+	3986	,	7306	,
+	3985	,	7350	,
+	3984	,	7382	,
+	3983	,	7426	,
+	3982	,	7462	,
+	3981	,	7494	,
+	3980	,	7544	,
+	3979	,	7574	,
+	3978	,	7614	,
+	3977	,	7664	,
+	3976	,	7696	,
+	3975	,	7734	,
+	3974	,	7778	,
+	3973	,	7814	,
+	3972	,	7850	,
+	3971	,	7898	,
+	3970	,	7926	,
+	3969	,	7966	,
+	3968	,	8014	,
+	3967	,	8058	,
+	3966	,	8086	,
+	3965	,	8138	,
+	3964	,	8166	,
+	3963	,	8198	,
+	3962	,	8232	,
+	3961	,	8278	,
+	3960	,	8312	,
+	3959	,	8342	,
+	3958	,	8392	,
+	3957	,	8422	,
+	3956	,	8468	,
+	3955	,	8502	,
+	3954	,	8538	,
+	3953	,	8582	,
+	3952	,	8616	,
+	3951	,	8656	,
+	3950	,	8696	,
+	3949	,	8736	,
+	3948	,	8776	,
+	3947	,	8806	,
+	3946	,	8856	,
+	3945	,	8886	,
+	3944	,	8936	,
+	3943	,	8968	,
+	3942	,	9010	,
+	3941	,	9046	,
+	3940	,	9092	,
+	3939	,	9136	,
+	3938	,	9160	,
+	3937	,	9212	,
+	3936	,	9256	,
+	3935	,	9288	,
+	3934	,	9344	,
+	3933	,	9376	,
+	3932	,	9404	,
+	3931	,	9464	,
+	3930	,	9490	,
+	3929	,	9534	,
+	3928	,	9572	,
+	3927	,	9616	,
+	3926	,	9652	,
+	3925	,	9704	,
+	3924	,	9734	,
+	3923	,	9780	,
+	3922	,	9816	,
+	3921	,	9860	,
+	3920	,	9896	,
+	3919	,	9944	,
+	3918	,	9984	,
+	3917	,	10028	,
+	3916	,	10084	,
+	3915	,	10116	,
+	3914	,	10168	,
+	3913	,	10200	,
+	3912	,	10248	,
+	3911	,	10284	,
+	3910	,	10352	,
+	3909	,	10384	,
+	3908	,	10432	,
+	3907	,	10472	,
+	3906	,	10520	,
+	3905	,	10572	,
+	3904	,	10620	,
+	3903	,	10660	,
+	3902	,	10708	,
+	3901	,	10748	,
+	3900	,	10792	,
+	3899	,	10824	,
+	3898	,	10892	,
+	3897	,	10928	,
+	3896	,	10972	,
+	3895	,	11016	,
+	3894	,	11068	,
+	3893	,	11120	,
+	3892	,	11176	,
+	3891	,	11212	,
+	3890	,	11256	,
+	3889	,	11320	,
+	3888	,	11364	,
+	3887	,	11400	,
+	3886	,	11468	,
+	3885	,	11508	,
+	3884	,	11560	,
+	3883	,	11608	,
+	3882	,	11664	,
+	3881	,	11716	,
+	3880	,	11760	,
+	3879	,	11812	,
+	3878	,	11864	,
+	3877	,	11912	,
+	3876	,	11964	,
+	3875	,	12020	,
+	3874	,	12060	,
+	3873	,	12120	,
+	3872	,	12180	,
+	3871	,	12220	,
+	3870	,	12268	,
+	3869	,	12332	,
+	3868	,	12372	,
+	3867	,	12432	,
+	3866	,	12488	,
+	3865	,	12532	,
+	3864	,	12584	,
+	3863	,	12644	,
+	3862	,	12684	,
+	3861	,	12744	,
+	3860	,	12796	,
+	3859	,	12844	,
+	3858	,	12908	,
+	3857	,	12956	,
+	3856	,	13004	,
+	3855	,	13064	,
+	3854	,	13116	,
+	3853	,	13164	,
+	3852	,	13228	,
+	3851	,	13260	,
+	3850	,	13328	,
+	3849	,	13380	,
+	3848	,	13440	,
+	3847	,	13480	,
+	3846	,	13540	,
+	3845	,	13600	,
+	3844	,	13640	,
+	3843	,	13696	,
+	3842	,	13748	,
+	3841	,	13800	,
+	3840	,	13852	,
+	3839	,	13908	,
+	3838	,	13952	,
+	3837	,	14004	,
+	3836	,	14064	,
+	3835	,	14100	,
+	3834	,	14156	,
+	3833	,	14200	,
+	3832	,	14260	,
+	3831	,	14308	,
+	3830	,	14348	,
+	3829	,	14404	,
+	3828	,	14460	,
+	3827	,	14508	,
+	3826	,	14552	,
+	3825	,	14612	,
+	3824	,	14652	,
+	3823	,	14704	,
+	3822	,	14756	,
+	3821	,	14812	,
+	3820	,	14852	,
+	3819	,	14912	,
+	3818	,	14948	,
+	3817	,	15004	,
+	3816	,	15052	,
+	3815	,	15108	,
+	3814	,	15140	,
+	3813	,	15196	,
+	3812	,	15240	,
+	3811	,	15280	,
+	3810	,	15328	,
+	3809	,	15380	,
+	3808	,	15416	,
+	3807	,	15468	,
+	3806	,	15516	,
+	3805	,	15552	,
+	3804	,	15604	,
+	3803	,	15652	,
+	3802	,	15688	,
+	3801	,	15740	,
+	3800	,	15772	,
+	3799	,	15820	,
+	3798	,	15872	,
+	3797	,	15920	,
+	3796	,	15956	,
+	3795	,	16008	,
+	3794	,	16044	,
+	3793	,	16092	,
+	3792	,	16136	,
+	3791	,	16172	,
+	3790	,	16224	,
+	3789	,	16268	,
+	3788	,	16316	,
+	3787	,	16352	,
+	3786	,	16396	,
+	3785	,	16440	,
+	3784	,	16480	,
+	3783	,	16524	,
+	3782	,	16556	,
+	3781	,	16604	,
+	3780	,	16656	,
+	3779	,	16696	,
+	3778	,	16728	,
+	3777	,	16772	,
+	3776	,	16820	,
+	3775	,	16856	,
+	3774	,	16892	,
+	3773	,	16940	,
+	3772	,	16972	,
+	3771	,	17012	,
+	3770	,	17056	,
+	3769	,	17092	,
+	3768	,	17132	,
+	3767	,	17168	,
+	3766	,	17212	,
+	3765	,	17248	,
+	3764	,	17296	,
+	3763	,	17328	,
+	3762	,	17368	,
+	3761	,	17408	,
+	3760	,	17452	,
+	3759	,	17488	,
+	3758	,	17520	,
+	3757	,	17568	,
+	3756	,	17600	,
+	3755	,	17648	,
+	3754	,	17680	,
+	3753	,	17712	,
+	3752	,	17760	,
+	3751	,	17800	,
+	3750	,	17840	,
+	3749	,	17872	,
+	3748	,	17920	,
+	3747	,	17952	,
+	3746	,	18004	,
+	3745	,	18036	,
+	3744	,	18068	,
+	3743	,	18116	,
+	3742	,	18152	,
+	3741	,	18196	,
+	3740	,	18244	,
+	3739	,	18276	,
+	3738	,	18304	,
+	3737	,	18356	,
+	3736	,	18388	,
+	3735	,	18420	,
+	3734	,	18472	,
+	3733	,	18504	,
+	3732	,	18552	,
+	3731	,	18596	,
+	3730	,	18624	,
+	3729	,	18660	,
+	3728	,	18712	,
+	3727	,	18748	,
+	3726	,	18792	,
+	3725	,	18832	,
+	3724	,	18868	,
+	3723	,	18912	,
+	3722	,	18956	,
+	3721	,	18992	,
+	3720	,	19024	,
+	3719	,	19072	,
+	3718	,	19112	,
+	3717	,	19152	,
+	3716	,	19188	,
+	3715	,	19232	,
+	3714	,	19264	,
+	3713	,	19316	,
+	3712	,	19356	,
+	3711	,	19400	,
+	3710	,	19452	,
+	3709	,	19488	,
+	3708	,	19536	,
+	3707	,	19568	,
+	3706	,	19616	,
+	3705	,	19648	,
+	3704	,	19700	,
+	3703	,	19748	,
+	3702	,	19780	,
+	3701	,	19836	,
+	3700	,	19872	,
+	3699	,	19920	,
+	3698	,	19960	,
+	3697	,	20000	,
+	3696	,	20036	,
+	3695	,	20084	,
+	3694	,	20132	,
+	3693	,	20164	,
+	3692	,	20224	,
+	3691	,	20264	,
+	3690	,	20304	,
+	3689	,	20352	,
+	3688	,	20392	,
+	3687	,	20436	,
+	3686	,	20496	,
+	3685	,	20536	,
+	3684	,	20576	,
+	3683	,	20624	,
+	3682	,	20676	,
+	3681	,	20700	,
+	3680	,	20744	,
+	3679	,	20800	,
+	3678	,	20848	,
+	3677	,	20892	,
+	3676	,	20948	,
+	3675	,	21000	,
+	3674	,	21040	,
+	3673	,	21088	,
+	3672	,	21140	,
+	3671	,	21176	,
+	3670	,	21232	,
+	3669	,	21280	,
+	3668	,	21320	,
+	3667	,	21376	,
+	3666	,	21424	,
+	3665	,	21472	,
+	3664	,	21524	,
+	3663	,	21584	,
+	3662	,	21616	,
+	3661	,	21676	,
+	3660	,	21720	,
+	3659	,	21776	,
+	3658	,	21832	,
+	3657	,	21888	,
+	3656	,	21932	,
+	3655	,	21988	,
+	3654	,	22044	,
+	3653	,	22084	,
+	3652	,	22152	,
+	3651	,	22208	,
+	3650	,	22244	,
+	3649	,	22320	,
+	3648	,	22372	,
+	3647	,	22420	,
+	3646	,	22480	,
+	3645	,	22540	,
+	3644	,	22588	,
+	3643	,	22644	,
+	3642	,	22704	,
+	3641	,	22752	,
+	3640	,	22816	,
+	3639	,	22864	,
+	3638	,	22924	,
+	3637	,	22988	,
+	3636	,	23056	,
+	3635	,	23096	,
+	3634	,	23168	,
+	3633	,	23236	,
+	3632	,	23280	,
+	3631	,	23360	,
+	3630	,	23408	,
+	3629	,	23472	,
+	3628	,	23540	,
+	3627	,	23600	,
+	3626	,	23656	,
+	3625	,	23732	,
+	3624	,	23792	,
+	3623	,	23852	,
+	3622	,	23920	,
+	3621	,	23988	,
+	3620	,	24048	,
+	3619	,	24128	,
+	3618	,	24180	,
+	3617	,	24252	,
+	3616	,	24324	,
+	3615	,	24392	,
+	3614	,	24452	,
+	3613	,	24528	,
+	3612	,	24588	,
+	3611	,	24652	,
+	3610	,	24728	,
+	3609	,	24800	,
+	3608	,	24860	,
+	3607	,	24948	,
+	3606	,	25020	,
+	3605	,	25076	,
+	3604	,	25148	,
+	3603	,	25220	,
+	3602	,	25300	,
+	3601	,	25380	,
+	3600	,	25456	,
+	3599	,	25516	,
+	3598	,	25604	,
+	3597	,	25680	,
+	3596	,	25732	,
+	3595	,	25824	,
+	3594	,	25880	,
+	3593	,	25956	,
+	3592	,	26036	,
+	3591	,	26116	,
+	3590	,	26192	,
+	3589	,	26264	,
+	3588	,	26344	,
+	3587	,	26424	,
+	3586	,	26504	,
+	3585	,	26584	,
+	3584	,	26660	,
+	3583	,	26728	,
+	3582	,	26808	,
+	3581	,	26888	,
+	3580	,	26968	,
+	3579	,	27072	,
+	3578	,	27128	,
+	3577	,	27228	,
+	3576	,	27316	,
+	3575	,	27376	,
+	3574	,	27460	,
+	3573	,	27540	,
+	3572	,	27620	,
+	3571	,	27700	,
+	3570	,	27784	,
+	3569	,	27848	,
+	3568	,	27928	,
+	3567	,	28008	,
+	3566	,	28088	,
+	3565	,	28168	,
+	3564	,	28268	,
+	3563	,	28328	,
+	3562	,	28396	,
+	3561	,	28512	,
+	3560	,	28576	,
+	3559	,	28664	,
+	3558	,	28744	,
+	3557	,	28824	,
+	3556	,	28904	,
+	3555	,	29004	,
+	3554	,	29064	,
+	3553	,	29136	,
+	3552	,	29240	,
+	3551	,	29300	,
+	3550	,	29388	,
+	3549	,	29476	,
+	3548	,	29532	,
+	3547	,	29596	,
+	3546	,	29696	,
+	3545	,	29764	,
+	3544	,	29832	,
+	3543	,	29936	,
+	3542	,	29992	,
+	3541	,	30056	,
+	3540	,	30160	,
+	3539	,	30216	,
+	3538	,	30296	,
+	3537	,	30376	,
+	3536	,	30444	,
+	3535	,	30520	,
+	3534	,	30600	,
+	3533	,	30676	,
+	3532	,	30752	,
+	3531	,	30832	,
+	3530	,	30888	,
+	3529	,	30956	,
+	3528	,	31036	,
+	3527	,	31108	,
+	3526	,	31180	,
+	3525	,	31260	,
+	3524	,	31308	,
+	3523	,	31388	,
+	3522	,	31452	,
+	3521	,	31520	,
+	3520	,	31580	,
+	3519	,	31644	,
+	3518	,	31716	,
+	3517	,	31772	,
+	3516	,	31852	,
+	3515	,	31908	,
+	3514	,	31964	,
+	3513	,	32044	,
+	3512	,	32092	,
+	3511	,	32156	,
+	3510	,	32236	,
+	3509	,	32276	,
+	3508	,	32348	,
+	3507	,	32396	,
+	3506	,	32460	,
+	3505	,	32532	,
+	3504	,	32588	,
+	3503	,	32644	,
+	3502	,	32700	,
+	3501	,	32764	,
+	3500	,	32816	,
+	3499	,	32884	,
+	3498	,	32924	,
+	3497	,	32996	,
+	3496	,	33036	,
+	3495	,	33088	,
+	3494	,	33156	,
+	3493	,	33196	,
+	3492	,	33252	,
+	3491	,	33312	,
+	3490	,	33376	,
+	3489	,	33412	,
+	3488	,	33468	,
+	3487	,	33516	,
+	3486	,	33568	,
+	3485	,	33628	,
+	3484	,	33680	,
+	3483	,	33716	,
+	3482	,	33772	,
+	3481	,	33820	,
+	3480	,	33864	,
+	3479	,	33924	,
+	3478	,	33964	,
+	3477	,	34012	,
+	3476	,	34064	,
+	3475	,	34120	,
+	3474	,	34156	,
+	3473	,	34208	,
+	3472	,	34252	,
+	3471	,	34296	,
+	3470	,	34348	,
+	3469	,	34396	,
+	3468	,	34436	,
+	3467	,	34484	,
+	3466	,	34528	,
+	3465	,	34576	,
+	3464	,	34624	,
+	3463	,	34668	,
+	3462	,	34704	,
+	3461	,	34768	,
+	3460	,	34800	,
+	3459	,	34840	,
+	3458	,	34892	,
+	3457	,	34940	,
+	3456	,	34972	,
+	3455	,	35020	,
+	3454	,	35052	,
+	3453	,	35100	,
+	3452	,	35140	,
+	3451	,	35180	,
+	3450	,	35220	,
+	3449	,	35264	,
+	3448	,	35296	,
+	3447	,	35340	,
+	3446	,	35384	,
+	3445	,	35424	,
+	3444	,	35456	,
+	3443	,	35496	,
+	3442	,	35536	,
+	3441	,	35568	,
+	3440	,	35608	,
+	3439	,	35640	,
+	3438	,	35680	,
+	3437	,	35716	,
+	3436	,	35760	,
+	3435	,	35788	,
+	3434	,	35824	,
+	3433	,	35860	,
+	3432	,	35888	,
+	3431	,	35924	,
+	3430	,	35952	,
+	3429	,	35988	,
+	3428	,	36028	,
+	3427	,	36064	,
+	3426	,	36088	,
+	3425	,	36124	,
+	3424	,	36152	,
+	3423	,	36184	,
+	3422	,	36224	,
+	3421	,	36256	,
+	3420	,	36284	,
+	3419	,	36320	,
+	3418	,	36356	,
+	3417	,	36380	,
+	3416	,	36416	,
+	3415	,	36448	,
+	3414	,	36472	,
+	3413	,	36508	,
+	3412	,	36536	,
+	3411	,	36572	,
+	3410	,	36604	,
+	3409	,	36640	,
+	3408	,	36660	,
+	3407	,	36688	,
+	3406	,	36720	,
+	3405	,	36752	,
+	3404	,	36776	,
+	3403	,	36820	,
+	3402	,	36844	,
+	3401	,	36876	,
+	3400	,	36908	,
+	3399	,	36932	,
+	3398	,	36960	,
+	3397	,	36992	,
+	3396	,	37020	,
+	3395	,	37044	,
+	3394	,	37076	,
+	3393	,	37108	,
+	3392	,	37132	,
+	3391	,	37176	,
+	3390	,	37200	,
+	3389	,	37228	,
+	3388	,	37264	,
+	3387	,	37292	,
+	3386	,	37320	,
+	3385	,	37348	,
+	3384	,	37384	,
+	3383	,	37416	,
+	3382	,	37456	,
+	3381	,	37480	,
+	3380	,	37504	,
+	3379	,	37556	,
+	3378	,	37580	,
+	3377	,	37616	,
+	3376	,	37652	,
+	3375	,	37692	,
+	3374	,	37728	,
+	3373	,	37776	,
+	3372	,	37812	,
+	3371	,	37864	,
+	3370	,	37908	,
+	3369	,	37948	,
+	3368	,	37996	,
+	3367	,	38032	,
+	3366	,	38080	,
+	3365	,	38132	,
+	3364	,	38192	,
+	3363	,	38224	,
+	3362	,	38272	,
+	3361	,	38328	,
+	3360	,	38364	,
+	3359	,	38412	,
+	3358	,	38464	,
+	3357	,	38500	,
+	3356	,	38544	,
+	3355	,	38600	,
+	3354	,	38636	,
+	3353	,	38684	,
+	3352	,	38736	,
+	3351	,	38768	,
+	3350	,	38816	,
+	3349	,	38868	,
+	3348	,	38900	,
+	3347	,	38948	,
+	3346	,	38988	,
+	3345	,	39032	,
+	3344	,	39068	,
+	3343	,	39120	,
+	3342	,	39152	,
+	3341	,	39200	,
+	3340	,	39236	,
+	3339	,	39276	,
+	3338	,	39312	,
+	3337	,	39360	,
+	3336	,	39400	,
+	3335	,	39432	,
+	3334	,	39492	,
+	3333	,	39516	,
+	3332	,	39552	,
+	3331	,	39608	,
+	3330	,	39636	,
+	3329	,	39664	,
+	3328	,	39720	,
+	3327	,	39748	,
+	3326	,	39776	,
+	3325	,	39828	,
+	3324	,	39860	,
+	3323	,	39888	,
+	3322	,	39936	,
+	3321	,	39968	,
+	3320	,	40000	,
+	3319	,	40048	,
+	3318	,	40072	,
+	3317	,	40104	,
+	3316	,	40136	,
+	3315	,	40172	,
+	3314	,	40208	,
+	3313	,	40236	,
+	3312	,	40272	,
+	3311	,	40296	,
+	3310	,	40324	,
+	3309	,	40356	,
+	3308	,	40392	,
+	3307	,	40412	,
+	3306	,	40444	,
+	3305	,	40468	,
+	3304	,	40496	,
+	3303	,	40524	,
+	3302	,	40548	,
+	3301	,	40572	,
+	3300	,	40596	,
+	3299	,	40620	,
+	3298	,	40640	,
+	3297	,	40664	,
+	3296	,	40680	,
+	3295	,	40708	,
+	3294	,	40728	,
+	3293	,	40744	,
+	3292	,	40764	,
+	3291	,	40788	,
+	3290	,	40800	,
+	3289	,	40820	,
+	3288	,	40836	,
+	3287	,	40856	,
+	3286	,	40868	,
+	3285	,	40888	,
+	3284	,	40900	,
+	3283	,	40916	,
+	3282	,	40932	,
+	3281	,	40948	,
+	3280	,	40960	,
+	3279	,	40976	,
+	3278	,	40984	,
+	3277	,	41000	,
+	3276	,	41012	,
+	3275	,	41024	,
+	3274	,	41036	,
+	3273	,	41048	,
+	3272	,	41060	,
+	3271	,	41072	,
+	3270	,	41084	,
+	3269	,	41092	,
+	3268	,	41104	,
+	3267	,	41116	,
+	3266	,	41124	,
+	3265	,	41136	,
+	3264	,	41144	,
+	3263	,	41152	,
+	3262	,	41164	,
+	3261	,	41172	,
+	3260	,	41180	,
+	3259	,	41192	,
+	3258	,	41200	,
+	3257	,	41208	,
+	3256	,	41220	,
+	3255	,	41228	,
+	3254	,	41236	,
+	3253	,	41244	,
+	3252	,	41252	,
+	3251	,	41260	,
+	3250	,	41268	,
+	3249	,	41276	,
+	3248	,	41284	,
+	3247	,	41292	,
+	3246	,	41300	,
+	3245	,	41308	,
+	3244	,	41316	,
+	3243	,	41324	,
+	3242	,	41332	,
+	3241	,	41340	,
+	3240	,	41348	,
+	3239	,	41356	,
+	3238	,	41360	,
+	3237	,	41368	,
+	3236	,	41376	,
+	3235	,	41384	,
+	3234	,	41392	,
+	3233	,	41396	,
+	3232	,	41404	,
+	3231	,	41412	,
+	3230	,	41416	,
+	3229	,	41424	,
+	3228	,	41432	,
+	3227	,	41440	,
+	3226	,	41444	,
+	3225	,	41452	,
+	3224	,	41460	,
+	3223	,	41468	,
+	3222	,	41476	,
+	3221	,	41480	,
+	3220	,	41488	,
+	3219	,	41492	,
+	3218	,	41500	,
+	3217	,	41508	,
+	3216	,	41512	,
+	3215	,	41520	,
+	3214	,	41524	,
+	3213	,	41532	,
+	3212	,	41536	,
+	3211	,	41544	,
+	3210	,	41552	,
+	3209	,	41556	,
+	3208	,	41564	,
+	3207	,	41568	,
+	3206	,	41576	,
+	3205	,	41584	,
+	3204	,	41588	,
+	3203	,	41596	,
+	3202	,	41604	,
+	3200	,	41612	,
+	3199	,	41620	,
+	3198	,	41628	,
+	3197	,	41632	,
+	3196	,	41636	,
+	3195	,	41644	,
+	3194	,	41648	,
+	3193	,	41656	,
+	3192	,	41664	,
+	3191	,	41668	,
+	3190	,	41672	,
+	3189	,	41680	,
+	3188	,	41684	,
+	3187	,	41692	,
+	3186	,	41696	,
+	3185	,	41704	,
+	3184	,	41708	,
+	3183	,	41716	,
+	3182	,	41720	,
+	3181	,	41724	,
+	3180	,	41728	,
+	3179	,	41736	,
+	3178	,	41744	,
+	3177	,	41748	,
+	3176	,	41752	,
+	3175	,	41760	,
+	3174	,	41764	,
+	3173	,	41768	,
+	3172	,	41776	,
+	3171	,	41780	,
+	3170	,	41788	,
+	3169	,	41792	,
+	3168	,	41796	,
+	3167	,	41800	,
+	3166	,	41808	,
+	3165	,	41812	,
+	3164	,	41820	,
+	3163	,	41824	,
+	3162	,	41828	,
+	3161	,	41832	,
+	3160	,	41840	,
+	3159	,	41844	,
+	3158	,	41852	,
+	3157	,	41856	,
+	3156	,	41860	,
+	3155	,	41864	,
+	3154	,	41872	,
+	3153	,	41876	,
+	3152	,	41880	,
+	3151	,	41884	,
+	3150	,	41888	,
+	3149	,	41896	,
+	3148	,	41900	,
+	3147	,	41908	,
+	3145	,	41916	,
+	3144	,	41920	,
+	3143	,	41924	,
+	3142	,	41932	,
+	3141	,	41936	,
+	3140	,	41940	,
+	3139	,	41944	,
+	3138	,	41948	,
+	3137	,	41956	,
+	3136	,	41960	,
+	3135	,	41964	,
+	3134	,	41968	,
+	3133	,	41972	,
+	3132	,	41980	,
+	3131	,	41984	,
+	3130	,	41988	,
+	3129	,	41992	,
+	3128	,	41996	,
+	3127	,	42000	,
+	3126	,	42008	,
+	3125	,	42012	,
+	3124	,	42016	,
+	3123	,	42020	,
+	3122	,	42024	,
+	3121	,	42028	,
+	3120	,	42032	,
+	3119	,	42036	,
+	3118	,	42044	,
+	3117	,	42048	,
+	3116	,	42052	,
+	3115	,	42056	,
+	3114	,	42060	,
+	3113	,	42064	,
+	3112	,	42068	,
+	3111	,	42072	,
+	3110	,	42076	,
+	3109	,	42084	,
+	3108	,	42088	,
+	3107	,	42092	,
+	3106	,	42096	,
+	3105	,	42100	,
+	3104	,	42104	,
+	3103	,	42108	,
+	3102	,	42112	,
+	3101	,	42116	,
+	3100	,	42120	,
 };
-
-
-
-///*µç³ØÉè¼ÆÈÝÁ¿*/
-//const uint16_t battery_VoltageQuantity[1054][2] = 
-//{
-//	4174	,	1	,
-//	4173	,	7	,
-//	4172	,	11	,
-//	4171	,	17	,
-//	4170	,	25	,
-//	4169	,	35	,
-//	4168	,	41	,
-//	4167	,	53	,
-//	4166	,	65	,
-//	4165	,	79	,
-//	4164	,	93	,
-//	4163	,	109	,
-//	4162	,	123	,
-//	4161	,	145	,
-//	4160	,	159	,
-//	4159	,	177	,
-//	4158	,	199	,
-//	4157	,	215	,
-//	4156	,	233	,
-//	4155	,	255	,
-//	4154	,	271	,
-//	4153	,	297	,
-//	4152	,	321	,
-//	4151	,	341	,
-//	4150	,	365	,
-//	4149	,	391	,
-//	4148	,	409	,
-//	4147	,	435	,
-//	4146	,	463	,
-//	4145	,	487	,
-//	4144	,	515	,
-//	4143	,	531	,
-//	4142	,	557	,
-//	4141	,	581	,
-//	4140	,	603	,
-//	4139	,	637	,
-//	4138	,	653	,
-//	4137	,	677	,
-//	4136	,	709	,
-//	4135	,	733	,
-//	4134	,	755	,
-//	4133	,	789	,
-//	4132	,	811	,
-//	4131	,	831	,
-//	4130	,	869	,
-//	4129	,	887	,
-//	4128	,	909	,
-//	4127	,	941	,
-//	4126	,	969	,
-//	4125	,	993	,
-//	4124	,	1021	,
-//	4123	,	1051	,
-//	4122	,	1067	,
-//	4121	,	1101	,
-//	4120	,	1127	,
-//	4119	,	1157	,
-//	4118	,	1181	,
-//	4117	,	1215	,
-//	4116	,	1239	,
-//	4115	,	1269	,
-//	4114	,	1293	,
-//	4113	,	1317	,
-//	4112	,	1351	,
-//	4111	,	1377	,
-//	4110	,	1407	,
-//	4109	,	1431	,
-//	4108	,	1461	,
-//	4107	,	1487	,
-//	4106	,	1515	,
-//	4105	,	1545	,
-//	4104	,	1567	,
-//	4103	,	1605	,
-//	4102	,	1633	,
-//	4101	,	1653	,
-//	4100	,	1683	,
-//	4099	,	1719	,
-//	4098	,	1741	,
-//	4097	,	1775	,
-//	4096	,	1801	,
-//	4095	,	1821	,
-//	4094	,	1855	,
-//	4093	,	1885	,
-//	4092	,	1911	,
-//	4091	,	1939	,
-//	4090	,	1973	,
-//	4089	,	1995	,
-//	4088	,	2031	,
-//	4087	,	2059	,
-//	4086	,	2087	,
-//	4085	,	2113	,
-//	4084	,	2145	,
-//	4083	,	2167	,
-//	4082	,	2203	,
-//	4081	,	2235	,
-//	4080	,	2263	,
-//	4079	,	2293	,
-//	4078	,	2319	,
-//	4077	,	2345	,
-//	4076	,	2375	,
-//	4075	,	2409	,
-//	4074	,	2433	,
-//	4073	,	2461	,
-//	4072	,	2495	,
-//	4071	,	2523	,
-//	4070	,	2551	,
-//	4069	,	2581	,
-//	4068	,	2607	,
-//	4067	,	2637	,
-//	4066	,	2669	,
-//	4065	,	2703	,
-//	4064	,	2727	,
-//	4063	,	2761	,
-//	4062	,	2783	,
-//	4061	,	2823	,
-//	4060	,	2845	,
-//	4059	,	2879	,
-//	4058	,	2905	,
-//	4057	,	2937	,
-//	4056	,	2961	,
-//	4055	,	2997	,
-//	4054	,	3027	,
-//	4053	,	3055	,
-//	4052	,	3079	,
-//	4051	,	3113	,
-//	4050	,	3137	,
-//	4049	,	3169	,
-//	4048	,	3207	,
-//	4047	,	3231	,
-//	4046	,	3261	,
-//	4045	,	3291	,
-//	4044	,	3317	,
-//	4043	,	3347	,
-//	4042	,	3383	,
-//	4041	,	3409	,
-//	4040	,	3439	,
-//	4039	,	3469	,
-//	4038	,	3495	,
-//	4037	,	3523	,
-//	4036	,	3559	,
-//	4035	,	3581	,
-//	4034	,	3617	,
-//	4033	,	3647	,
-//	4032	,	3673	,
-//	4031	,	3703	,
-//	4030	,	3737	,
-//	4029	,	3769	,
-//	4028	,	3793	,
-//	4027	,	3829	,
-//	4026	,	3853	,
-//	4025	,	3879	,
-//	4024	,	3919	,
-//	4023	,	3945	,
-//	4022	,	3973	,
-//	4021	,	4005	,
-//	4020	,	4027	,
-//	4019	,	4063	,
-//	4018	,	4099	,
-//	4017	,	4123	,
-//	4016	,	4157	,
-//	4015	,	4189	,
-//	4014	,	4217	,
-//	4013	,	4243	,
-//	4012	,	4275	,
-//	4011	,	4301	,
-//	4010	,	4333	,
-//	4009	,	4369	,
-//	4008	,	4393	,
-//	4007	,	4425	,
-//	4006	,	4461	,
-//	4005	,	4489	,
-//	4004	,	4511	,
-//	4003	,	4549	,
-//	4002	,	4574	,
-//	4001	,	4606	,
-//	4000	,	4641	,
-//	3999	,	4665	,
-//	3998	,	4697	,
-//	3997	,	4734	,
-//	3996	,	4757	,
-//	3995	,	4790	,
-//	3994	,	4820	,
-//	3993	,	4845	,
-//	3992	,	4878	,
-//	3991	,	4914	,
-//	3990	,	4934	,
-//	3989	,	4970	,
-//	3988	,	5008	,
-//	3987	,	5028	,
-//	3986	,	5064	,
-//	3985	,	5094	,
-//	3984	,	5122	,
-//	3983	,	5150	,
-//	3982	,	5186	,
-//	3981	,	5218	,
-//	3980	,	5242	,
-//	3979	,	5278	,
-//	3978	,	5300	,
-//	3977	,	5336	,
-//	3976	,	5368	,
-//	3975	,	5394	,
-//	3974	,	5420	,
-//	3973	,	5460	,
-//	3972	,	5489	,
-//	3971	,	5515	,
-//	3970	,	5551	,
-//	3969	,	5574	,
-//	3968	,	5610	,
-//	3967	,	5644	,
-//	3966	,	5666	,
-//	3965	,	5704	,
-//	3964	,	5732	,
-//	3963	,	5762	,
-//	3962	,	5792	,
-//	3961	,	5818	,
-//	3960	,	5857	,
-//	3959	,	5882	,
-//	3958	,	5914	,
-//	3957	,	5940	,
-//	3956	,	5980	,
-//	3955	,	5998	,
-//	3954	,	6036	,
-//	3953	,	6066	,
-//	3952	,	6092	,
-//	3951	,	6132	,
-//	3950	,	6158	,
-//	3949	,	6188	,
-//	3948	,	6228	,
-//	3947	,	6252	,
-//	3946	,	6282	,
-//	3945	,	6310	,
-//	3944	,	6348	,
-//	3943	,	6370	,
-//	3942	,	6406	,
-//	3941	,	6442	,
-//	3940	,	6460	,
-//	3939	,	6500	,
-//	3938	,	6528	,
-//	3937	,	6556	,
-//	3936	,	6596	,
-//	3935	,	6624	,
-//	3934	,	6652	,
-//	3933	,	6692	,
-//	3932	,	6716	,
-//	3931	,	6748	,
-//	3930	,	6776	,
-//	3929	,	6812	,
-//	3928	,	6842	,
-//	3927	,	6870	,
-//	3926	,	6908	,
-//	3925	,	6934	,
-//	3924	,	6968	,
-//	3923	,	7002	,
-//	3922	,	7026	,
-//	3921	,	7060	,
-//	3920	,	7096	,
-//	3919	,	7120	,
-//	3918	,	7156	,
-//	3917	,	7184	,
-//	3916	,	7218	,
-//	3915	,	7252	,
-//	3914	,	7282	,
-//	3913	,	7316	,
-//	3912	,	7348	,
-//	3911	,	7380	,
-//	3910	,	7412	,
-//	3909	,	7444	,
-//	3908	,	7472	,
-//	3907	,	7508	,
-//	3906	,	7542	,
-//	3905	,	7576	,
-//	3904	,	7604	,
-//	3903	,	7638	,
-//	3902	,	7666	,
-//	3901	,	7700	,
-//	3900	,	7740	,
-//	3899	,	7766	,
-//	3898	,	7796	,
-//	3897	,	7826	,
-//	3896	,	7862	,
-//	3895	,	7892	,
-//	3894	,	7932	,
-//	3893	,	7960	,
-//	3892	,	7988	,
-//	3891	,	8028	,
-//	3890	,	8062	,
-//	3889	,	8086	,
-//	3888	,	8126	,
-//	3887	,	8164	,
-//	3886	,	8186	,
-//	3885	,	8224	,
-//	3884	,	8260	,
-//	3883	,	8286	,
-//	3882	,	8322	,
-//	3881	,	8358	,
-//	3880	,	8382	,
-//	3879	,	8422	,
-//	3878	,	8460	,
-//	3877	,	8484	,
-//	3876	,	8524	,
-//	3875	,	8558	,
-//	3874	,	8590	,
-//	3873	,	8630	,
-//	3872	,	8658	,
-//	3871	,	8686	,
-//	3870	,	8726	,
-//	3869	,	8764	,
-//	3868	,	8788	,
-//	3867	,	8824	,
-//	3866	,	8862	,
-//	3865	,	8890	,
-//	3864	,	8924	,
-//	3863	,	8960	,
-//	3862	,	8998	,
-//	3861	,	9032	,
-//	3860	,	9066	,
-//	3859	,	9094	,
-//	3858	,	9134	,
-//	3857	,	9170	,
-//	3856	,	9194	,
-//	3855	,	9234	,
-//	3854	,	9270	,
-//	3853	,	9304	,
-//	3852	,	9338	,
-//	3851	,	9380	,
-//	3850	,	9406	,
-//	3849	,	9444	,
-//	3848	,	9478	,
-//	3847	,	9504	,
-//	3846	,	9542	,
-//	3845	,	9580	,
-//	3844	,	9614	,
-//	3843	,	9652	,
-//	3842	,	9684	,
-//	3841	,	9716	,
-//	3840	,	9750	,
-//	3839	,	9790	,
-//	3838	,	9820	,
-//	3837	,	9860	,
-//	3836	,	9896	,
-//	3835	,	9926	,
-//	3834	,	9966	,
-//	3833	,	10000	,
-//	3832	,	10026	,
-//	3831	,	10066	,
-//	3830	,	10106	,
-//	3829	,	10138	,
-//	3828	,	10174	,
-//	3827	,	10214	,
-//	3826	,	10238	,
-//	3825	,	10276	,
-//	3824	,	10312	,
-//	3823	,	10350	,
-//	3822	,	10386	,
-//	3821	,	10420	,
-//	3820	,	10450	,
-//	3819	,	10486	,
-//	3818	,	10526	,
-//	3817	,	10556	,
-//	3816	,	10594	,
-//	3815	,	10634	,
-//	3814	,	10662	,
-//	3813	,	10702	,
-//	3812	,	10744	,
-//	3811	,	10774	,
-//	3810	,	10814	,
-//	3809	,	10852	,
-//	3808	,	10880	,
-//	3807	,	10916	,
-//	3806	,	10956	,
-//	3805	,	10990	,
-//	3804	,	11022	,
-//	3803	,	11066	,
-//	3802	,	11090	,
-//	3801	,	11132	,
-//	3800	,	11172	,
-//	3799	,	11204	,
-//	3798	,	11242	,
-//	3797	,	11280	,
-//	3796	,	11308	,
-//	3795	,	11348	,
-//	3794	,	11390	,
-//	3793	,	11416	,
-//	3792	,	11456	,
-//	3791	,	11496	,
-//	3790	,	11530	,
-//	3789	,	11568	,
-//	3788	,	11608	,
-//	3787	,	11634	,
-//	3786	,	11676	,
-//	3785	,	11718	,
-//	3784	,	11744	,
-//	3783	,	11784	,
-//	3782	,	11824	,
-//	3781	,	11854	,
-//	3780	,	11896	,
-//	3779	,	11936	,
-//	3778	,	11962	,
-//	3777	,	12002	,
-//	3776	,	12032	,
-//	3775	,	12072	,
-//	3774	,	12112	,
-//	3773	,	12142	,
-//	3772	,	12192	,
-//	3771	,	12226	,
-//	3770	,	12254	,
-//	3769	,	12294	,
-//	3768	,	12338	,
-//	3767	,	12368	,
-//	3766	,	12410	,
-//	3765	,	12444	,
-//	3764	,	12480	,
-//	3763	,	12520	,
-//	3762	,	12560	,
-//	3761	,	12592	,
-//	3760	,	12632	,
-//	3759	,	12672	,
-//	3758	,	12698	,
-//	3757	,	12738	,
-//	3756	,	12784	,
-//	3755	,	12808	,
-//	3754	,	12852	,
-//	3753	,	12892	,
-//	3752	,	12924	,
-//	3751	,	12964	,
-//	3750	,	13004	,
-//	3749	,	13042	,
-//	3748	,	13082	,
-//	3747	,	13120	,
-//	3746	,	13152	,
-//	3745	,	13194	,
-//	3744	,	13232	,
-//	3743	,	13262	,
-//	3742	,	13304	,
-//	3741	,	13340	,
-//	3740	,	13372	,
-//	3739	,	13426	,
-//	3738	,	13462	,
-//	3737	,	13490	,
-//	3736	,	13530	,
-//	3735	,	13572	,
-//	3734	,	13602	,
-//	3733	,	13642	,
-//	3732	,	13684	,
-//	3731	,	13722	,
-//	3730	,	13762	,
-//	3729	,	13798	,
-//	3728	,	13834	,
-//	3727	,	13874	,
-//	3726	,	13914	,
-//	3725	,	13944	,
-//	3724	,	13994	,
-//	3723	,	14030	,
-//	3722	,	14066	,
-//	3721	,	14106	,
-//	3720	,	14146	,
-//	3719	,	14186	,
-//	3718	,	14220	,
-//	3717	,	14258	,
-//	3716	,	14298	,
-//	3715	,	14338	,
-//	3714	,	14378	,
-//	3713	,	14408	,
-//	3712	,	14456	,
-//	3711	,	14492	,
-//	3710	,	14530	,
-//	3709	,	14570	,
-//	3708	,	14610	,
-//	3707	,	14650	,
-//	3706	,	14688	,
-//	3705	,	14726	,
-//	3704	,	14762	,
-//	3703	,	14802	,
-//	3702	,	14846	,
-//	3701	,	14882	,
-//	3700	,	14922	,
-//	3699	,	14964	,
-//	3698	,	14996	,
-//	3697	,	15050	,
-//	3696	,	15088	,
-//	3695	,	15116	,
-//	3694	,	15160	,
-//	3693	,	15208	,
-//	3692	,	15240	,
-//	3691	,	15284	,
-//	3690	,	15324	,
-//	3689	,	15364	,
-//	3688	,	15406	,
-//	3687	,	15448	,
-//	3686	,	15484	,
-//	3685	,	15524	,
-//	3684	,	15576	,
-//	3683	,	15612	,
-//	3682	,	15652	,
-//	3681	,	15696	,
-//	3680	,	15734	,
-//	3679	,	15776	,
-//	3678	,	15828	,
-//	3677	,	15868	,
-//	3676	,	15910	,
-//	3675	,	15954	,
-//	3674	,	15988	,
-//	3673	,	16034	,
-//	3672	,	16086	,
-//	3671	,	16120	,
-//	3670	,	16170	,
-//	3669	,	16220	,
-//	3668	,	16256	,
-//	3667	,	16308	,
-//	3666	,	16360	,
-//	3665	,	16400	,
-//	3664	,	16450	,
-//	3663	,	16504	,
-//	3662	,	16540	,
-//	3661	,	16588	,
-//	3660	,	16646	,
-//	3659	,	16684	,
-//	3658	,	16740	,
-//	3657	,	16796	,
-//	3656	,	16836	,
-//	3655	,	16892	,
-//	3654	,	16950	,
-//	3653	,	16988	,
-//	3652	,	17044	,
-//	3651	,	17108	,
-//	3650	,	17148	,
-//	3649	,	17208	,
-//	3648	,	17276	,
-//	3647	,	17316	,
-//	3646	,	17378	,
-//	3645	,	17436	,
-//	3644	,	17492	,
-//	3643	,	17548	,
-//	3642	,	17626	,
-//	3641	,	17668	,
-//	3640	,	17732	,
-//	3639	,	17806	,
-//	3638	,	17862	,
-//	3637	,	17918	,
-//	3636	,	17998	,
-//	3635	,	18042	,
-//	3634	,	18122	,
-//	3633	,	18192	,
-//	3632	,	18246	,
-//	3631	,	18326	,
-//	3630	,	18406	,
-//	3629	,	18464	,
-//	3628	,	18534	,
-//	3627	,	18616	,
-//	3626	,	18680	,
-//	3625	,	18752	,
-//	3624	,	18846	,
-//	3623	,	18904	,
-//	3622	,	18982	,
-//	3621	,	19080	,
-//	3620	,	19142	,
-//	3619	,	19228	,
-//	3618	,	19312	,
-//	3617	,	19380	,
-//	3616	,	19462	,
-//	3615	,	19556	,
-//	3614	,	19626	,
-//	3613	,	19718	,
-//	3612	,	19816	,
-//	3611	,	19884	,
-//	3610	,	19978	,
-//	3609	,	20072	,
-//	3608	,	20144	,
-//	3607	,	20244	,
-//	3606	,	20340	,
-//	3605	,	20416	,
-//	3604	,	20526	,
-//	3603	,	20630	,
-//	3602	,	20694	,
-//	3601	,	20800	,
-//	3600	,	20910	,
-//	3599	,	20992	,
-//	3598	,	21086	,
-//	3597	,	21198	,
-//	3596	,	21278	,
-//	3595	,	21390	,
-//	3594	,	21514	,
-//	3593	,	21592	,
-//	3592	,	21696	,
-//	3591	,	21794	,
-//	3590	,	21904	,
-//	3589	,	22016	,
-//	3588	,	22096	,
-//	3587	,	22216	,
-//	3586	,	22328	,
-//	3585	,	22428	,
-//	3584	,	22544	,
-//	3583	,	22658	,
-//	3582	,	22752	,
-//	3581	,	22872	,
-//	3580	,	22990	,
-//	3579	,	23090	,
-//	3578	,	23202	,
-//	3577	,	23322	,
-//	3576	,	23420	,
-//	3575	,	23532	,
-//	3574	,	23666	,
-//	3573	,	23748	,
-//	3572	,	23882	,
-//	3571	,	23996	,
-//	3570	,	24090	,
-//	3569	,	24210	,
-//	3568	,	24348	,
-//	3567	,	24442	,
-//	3566	,	24578	,
-//	3565	,	24676	,
-//	3564	,	24788	,
-//	3563	,	24908	,
-//	3562	,	25032	,
-//	3561	,	25130	,
-//	3560	,	25254	,
-//	3559	,	25372	,
-//	3558	,	25474	,
-//	3557	,	25604	,
-//	3556	,	25722	,
-//	3555	,	25820	,
-//	3554	,	25934	,
-//	3553	,	26068	,
-//	3552	,	26148	,
-//	3551	,	26276	,
-//	3550	,	26400	,
-//	3549	,	26492	,
-//	3548	,	26628	,
-//	3547	,	26742	,
-//	3546	,	26838	,
-//	3545	,	26944	,
-//	3544	,	27072	,
-//	3543	,	27174	,
-//	3542	,	27274	,
-//	3541	,	27386	,
-//	3540	,	27482	,
-//	3539	,	27598	,
-//	3538	,	27710	,
-//	3537	,	27792	,
-//	3536	,	27914	,
-//	3535	,	28022	,
-//	3534	,	28118	,
-//	3533	,	28216	,
-//	3532	,	28334	,
-//	3531	,	28412	,
-//	3530	,	28514	,
-//	3529	,	28622	,
-//	3528	,	28702	,
-//	3527	,	28798	,
-//	3526	,	28894	,
-//	3525	,	28974	,
-//	3524	,	29070	,
-//	3523	,	29160	,
-//	3522	,	29226	,
-//	3521	,	29334	,
-//	3520	,	29414	,
-//	3519	,	29490	,
-//	3518	,	29578	,
-//	3517	,	29650	,
-//	3516	,	29710	,
-//	3515	,	29800	,
-//	3514	,	29866	,
-//	3513	,	29936	,
-//	3512	,	30016	,
-//	3511	,	30078	,
-//	3510	,	30142	,
-//	3509	,	30212	,
-//	3508	,	30278	,
-//	3507	,	30332	,
-//	3506	,	30400	,
-//	3505	,	30464	,
-//	3504	,	30520	,
-//	3503	,	30576	,
-//	3502	,	30638	,
-//	3501	,	30696	,
-//	3500	,	30757	,
-//	3499	,	30810	,
-//	3498	,	30866	,
-//	3497	,	30920	,
-//	3496	,	30984	,
-//	3495	,	31024	,
-//	3494	,	31082	,
-//	3493	,	31137	,
-//	3492	,	31193	,
-//	3491	,	31238	,
-//	3490	,	31292	,
-//	3489	,	31342	,
-//	3488	,	31389	,
-//	3487	,	31451	,
-//	3486	,	31488	,
-//	3485	,	31542	,
-//	3484	,	31591	,
-//	3483	,	31624	,
-//	3482	,	31680	,
-//	3481	,	31727	,
-//	3480	,	31762	,
-//	3479	,	31808	,
-//	3478	,	31858	,
-//	3477	,	31891	,
-//	3476	,	31931	,
-//	3475	,	31977	,
-//	3474	,	32011	,
-//	3473	,	32051	,
-//	3472	,	32091	,
-//	3471	,	32123	,
-//	3470	,	32163	,
-//	3469	,	32203	,
-//	3468	,	32231	,
-//	3467	,	32261	,
-//	3466	,	32301	,
-//	3465	,	32327	,
-//	3464	,	32361	,
-//	3463	,	32397	,
-//	3462	,	32421	,
-//	3461	,	32459	,
-//	3460	,	32491	,
-//	3459	,	32519	,
-//	3458	,	32553	,
-//	3457	,	32585	,
-//	3456	,	32611	,
-//	3455	,	32643	,
-//	3454	,	32681	,
-//	3453	,	32707	,
-//	3452	,	32735	,
-//	3451	,	32773	,
-//	3450	,	32803	,
-//	3449	,	32831	,
-//	3448	,	32861	,
-//	3447	,	32885	,
-//	3446	,	32919	,
-//	3445	,	32955	,
-//	3444	,	32979	,
-//	3443	,	33011	,
-//	3442	,	33047	,
-//	3441	,	33065	,
-//	3440	,	33097	,
-//	3439	,	33131	,
-//	3438	,	33155	,
-//	3437	,	33181	,
-//	3436	,	33211	,
-//	3435	,	33231	,
-//	3434	,	33265	,
-//	3433	,	33291	,
-//	3432	,	33319	,
-//	3431	,	33341	,
-//	3430	,	33375	,
-//	3429	,	33393	,
-//	3428	,	33419	,
-//	3427	,	33447	,
-//	3426	,	33481	,
-//	3425	,	33503	,
-//	3424	,	33539	,
-//	3423	,	33559	,
-//	3422	,	33593	,
-//	3421	,	33623	,
-//	3420	,	33651	,
-//	3419	,	33689	,
-//	3418	,	33717	,
-//	3417	,	33749	,
-//	3416	,	33787	,
-//	3415	,	33827	,
-//	3414	,	33867	,
-//	3413	,	33911	,
-//	3412	,	33963	,
-//	3411	,	34003	,
-//	3410	,	34059	,
-//	3409	,	34115	,
-//	3408	,	34155	,
-//	3407	,	34211	,
-//	3406	,	34255	,
-//	3405	,	34331	,
-//	3404	,	34377	,
-//	3403	,	34427	,
-//	3402	,	34483	,
-//	3401	,	34545	,
-//	3400	,	34579	,
-//	3399	,	34647	,
-//	3398	,	34699	,
-//	3397	,	34739	,
-//	3396	,	34797	,
-//	3395	,	34851	,
-//	3394	,	34881	,
-//	3393	,	34935	,
-//	3392	,	34989	,
-//	3391	,	35029	,
-//	3390	,	35073	,
-//	3389	,	35125	,
-//	3388	,	35155	,
-//	3387	,	35205	,
-//	3386	,	35245	,
-//	3385	,	35277	,
-//	3384	,	35319	,
-//	3383	,	35357	,
-//	3382	,	35397	,
-//	3381	,	35437	,
-//	3380	,	35471	,
-//	3379	,	35497	,
-//	3378	,	35539	,
-//	3377	,	35573	,
-//	3376	,	35605	,
-//	3375	,	35635	,
-//	3374	,	35669	,
-//	3373	,	35701	,
-//	3372	,	35729	,
-//	3371	,	35761	,
-//	3370	,	35783	,
-//	3369	,	35821	,
-//	3368	,	35845	,
-//	3367	,	35865	,
-//	3366	,	35901	,
-//	3365	,	35923	,
-//	3364	,	35943	,
-//	3363	,	35973	,
-//	3362	,	35997	,
-//	3361	,	36017	,
-//	3360	,	36041	,
-//	3359	,	36065	,
-//	3358	,	36083	,
-//	3357	,	36109	,
-//	3356	,	36131	,
-//	3355	,	36149	,
-//	3354	,	36171	,
-//	3353	,	36189	,
-//	3352	,	36205	,
-//	3351	,	36229	,
-//	3350	,	36245	,
-//	3349	,	36257	,
-//	3348	,	36275	,
-//	3347	,	36289	,
-//	3346	,	36307	,
-//	3345	,	36325	,
-//	3344	,	36341	,
-//	3343	,	36353	,
-//	3342	,	36367	,
-//	3341	,	36381	,
-//	3340	,	36397	,
-//	3339	,	36409	,
-//	3338	,	36423	,
-//	3337	,	36437	,
-//	3336	,	36447	,
-//	3335	,	36461	,
-//	3334	,	36473	,
-//	3333	,	36487	,
-//	3332	,	36497	,
-//	3331	,	36505	,
-//	3330	,	36519	,
-//	3329	,	36531	,
-//	3328	,	36539	,
-//	3327	,	36549	,
-//	3326	,	36561	,
-//	3325	,	36571	,
-//	3324	,	36579	,
-//	3323	,	36591	,
-//	3322	,	36599	,
-//	3321	,	36611	,
-//	3320	,	36619	,
-//	3319	,	36627	,
-//	3318	,	36635	,
-//	3317	,	36645	,
-//	3316	,	36655	,
-//	3315	,	36661	,
-//	3314	,	36671	,
-//	3313	,	36677	,
-//	3312	,	36685	,
-//	3311	,	36695	,
-//	3310	,	36701	,
-//	3309	,	36711	,
-//	3308	,	36717	,
-//	3307	,	36725	,
-//	3306	,	36733	,
-//	3305	,	36739	,
-//	3304	,	36747	,
-//	3303	,	36753	,
-//	3302	,	36761	,
-//	3301	,	36767	,
-//	3300	,	36775	,
-//	3299	,	36781	,
-//	3298	,	36789	,
-//	3297	,	36793	,
-//	3296	,	36801	,
-//	3295	,	36807	,
-//	3294	,	36813	,
-//	3293	,	36819	,
-//	3292	,	36827	,
-//	3291	,	36831	,
-//	3290	,	36839	,
-//	3289	,	36845	,
-//	3288	,	36849	,
-//	3287	,	36857	,
-//	3286	,	36863	,
-//	3285	,	36867	,
-//	3284	,	36873	,
-//	3283	,	36881	,
-//	3282	,	36887	,
-//	3281	,	36891	,
-//	3280	,	36897	,
-//	3279	,	36903	,
-//	3278	,	36907	,
-//	3277	,	36913	,
-//	3276	,	36919	,
-//	3275	,	36925	,
-//	3274	,	36929	,
-//	3273	,	36933	,
-//	3272	,	36941	,
-//	3271	,	36943	,
-//	3270	,	36949	,
-//	3269	,	36955	,
-//	3268	,	36961	,
-//	3267	,	36965	,
-//	3266	,	36969	,
-//	3265	,	36973	,
-//	3264	,	36981	,
-//	3263	,	36985	,
-//	3262	,	36989	,
-//	3261	,	36995	,
-//	3260	,	36999	,
-//	3259	,	37003	,
-//	3258	,	37007	,
-//	3257	,	37013	,
-//	3256	,	37019	,
-//	3255	,	37023	,
-//	3254	,	37027	,
-//	3253	,	37031	,
-//	3252	,	37035	,
-//	3251	,	37041	,
-//	3250	,	37043	,
-//	3249	,	37049	,
-//	3248	,	37053	,
-//	3247	,	37059	,
-//	3246	,	37063	,
-//	3245	,	37067	,
-//	3244	,	37069	,
-//	3243	,	37075	,
-//	3242	,	37079	,
-//	3241	,	37083	,
-//	3240	,	37087	,
-//	3239	,	37093	,
-//	3238	,	37095	,
-//	3237	,	37099	,
-//	3236	,	37103	,
-//	3235	,	37107	,
-//	3234	,	37113	,
-//	3233	,	37117	,
-//	3232	,	37119	,
-//	3231	,	37123	,
-//	3230	,	37129	,
-//	3229	,	37133	,
-//	3228	,	37135	,
-//	3227	,	37139	,
-//	3226	,	37143	,
-//	3225	,	37147	,
-//	3224	,	37151	,
-//	3223	,	37155	,
-//	3222	,	37159	,
-//	3221	,	37161	,
-//	3220	,	37165	,
-//	3219	,	37169	,
-//	3218	,	37173	,
-//	3217	,	37177	,
-//	3216	,	37181	,
-//	3215	,	37183	,
-//	3214	,	37187	,
-//	3213	,	37191	,
-//	3212	,	37195	,
-//	3211	,	37199	,
-//	3210	,	37201	,
-//	3209	,	37205	,
-//	3208	,	37211	,
-//	3207	,	37213	,
-//	3206	,	37215	,
-//	3205	,	37219	,
-//	3204	,	37223	,
-//	3203	,	37227	,
-//	3202	,	37231	,
-//	3201	,	37233	,
-//	3200	,	37237	,
-//	3199	,	37239	,
-//	3198	,	37243	,
-//	3197	,	37247	,
-//	3196	,	37251	,
-//	3195	,	37253	,
-//	3194	,	37255	,
-//	3193	,	37259	,
-//	3192	,	37263	,
-//	3191	,	37267	,
-//	3190	,	37271	,
-//	3189	,	37273	,
-//	3188	,	37275	,
-//	3187	,	37279	,
-//	3186	,	37283	,
-//	3185	,	37285	,
-//	3184	,	37289	,
-//	3183	,	37293	,
-//	3182	,	37295	,
-//	3181	,	37297	,
-//	3180	,	37301	,
-//	3179	,	37305	,
-//	3178	,	37307	,
-//	3177	,	37311	,
-//	3176	,	37313	,
-//	3175	,	37317	,
-//	3174	,	37319	,
-//	3173	,	37323	,
-//	3172	,	37325	,
-//	3171	,	37327	,
-//	3170	,	37331	,
-//	3169	,	37335	,
-//	3168	,	37337	,
-//	3167	,	37339	,
-//	3166	,	37343	,
-//	3165	,	37347	,
-//	3164	,	37349	,
-//	3163	,	37351	,
-//	3162	,	37355	,
-//	3161	,	37357	,
-//	3160	,	37359	,
-//	3159	,	37363	,
-//	3158	,	37365	,
-//	3157	,	37367	,
-//	3156	,	37371	,
-//	3155	,	37373	,
-//	3154	,	37377	,
-//	3153	,	37379	,
-//	3152	,	37381	,
-//	3151	,	37385	,
-//	3150	,	37389	,
-//	3149	,	37391	,
-//	3148	,	37393	,
-//	3147	,	37395	,
-//	3146	,	37397	,
-//	3145	,	37401	,
-//	3144	,	37403	,
-//	3143	,	37407	,
-//	3142	,	37409	,
-//	3141	,	37411	,
-//	3140	,	37413	,
-//	3139	,	37417	,
-//	3138	,	37419	,
-//	3137	,	37421	,
-//	3136	,	37425	,
-//	3135	,	37427	,
-//	3134	,	37429	,
-//	3133	,	37431	,
-//	3132	,	37435	,
-//	3131	,	37437	,
-//	3130	,	37439	,
-//	3129	,	37443	,
-//	3128	,	37445	,
-//	3127	,	37447	,
-//	3126	,	37449	,
-//	3125	,	37451	,
-//	3124	,	37455	,
-//	3123	,	37457	,
-//	3122	,	37459	,
-//	3121	,	37461	,
-//};
-
-

+ 2 - 0
User/Src/can_process.c

@@ -594,6 +594,7 @@ void DataProcess(uint16_t ID, uint8_t Mode, uint16_t Cmd, uint8_t* Data)
 				  if(strncmp("CLEAR", (char*)Data, DataLength) == 0)
 					{
 					  EEPROM_24C02_ClearData(&I2C_Handle_EEPROM, EEPROM_24C02_ADDR_FLAG, EEPROM_24C02_ADDR_FLAG + 4, 0xFF);
+						EEPROM_24C02_ClearData(&I2C_Handle_EEPROM, EEPROM_24C02_ADDR_RUN_LOG1, EEPROM_24C02_ADDR_RUN_LOG1 + 4, 0xFF);//清除开机次数
 						EEPROM_Flash_Erase(EEPROM_FLASH_BEGIN_ADDRESS, EEPROM_FLASH_END_ADDRESS);
 						EEPROM_Flash_Erase(LOG_ADDRESS_BEGIN, LOG_ADDRESS_END);
 						SendData(ID_MC_TO_CDL, MODE_REPORT, 0xA903, (uint8_t*)"ACK");
@@ -608,6 +609,7 @@ void DataProcess(uint16_t ID, uint8_t Mode, uint16_t Cmd, uint8_t* Data)
 					{
 					  Var_SetToDefaultParam();
 						EEPROM_24C02_ParamReset(&I2C_Handle_EEPROM);
+						CopyDataToEEPROM_Flash();
 						SendData(ID_MC_TO_CDL, MODE_REPORT, 0xA903, (uint8_t*)"ACK");
 				  	__set_FAULTMASK(1);//关闭所有中断
 			      HAL_NVIC_SystemReset();

+ 20 - 2
User/Src/eeprom_24c02.c

@@ -324,9 +324,13 @@ int8_t EEPROM_24C02_Check(I2C_Handle_Struct_t* I2C_Handle)
 	{
 		return(CopyDataFromEEpprom_24C02(I2C_Handle));
 	}
-	else //数据无效
+	else if(IsFirstPowerOnFlag == TRUE) // 数据无效且开机次数为0时,写入默认参数
 	{
-		return (CopyDefaultDataToEEpprom_24C02(I2C_Handle));
+		return(CopyDefaultDataToEEpprom_24C02(I2C_Handle));
+	}
+	else
+	{
+	  return ACK_FAIL;
 	}
 }
 
@@ -460,3 +464,17 @@ int8_t RunLogSave_Process(uint8_t* RunLogIndex)
 	}
 	return 0;
 }
+
+//根据历史信息中开机次数判断是否进行第一次开机
+TrueOrFalse_Flag_Struct_t CheckFactoryModeFromEEPROM(I2C_Handle_Struct_t* I2C_Handle, uint8_t Addr)
+{
+  uint8_t Temp_8[4] = {0}; 
+	
+	//读取存储标志并计算校验码
+	EEPROM_24C02_ReadOneByte(I2C_Handle, Addr, Temp_8);
+	EEPROM_24C02_ReadOneByte(I2C_Handle, Addr + 1, (Temp_8 + 1));
+	EEPROM_24C02_ReadOneByte(I2C_Handle, Addr + 2, (Temp_8 + 2));
+	EEPROM_24C02_ReadOneByte(I2C_Handle, Addr + 3, (Temp_8 + 3));
+	
+	return((Temp_8[0] & Temp_8[1] & Temp_8[2] & Temp_8[3] == 0xFF) ? TRUE : FALSE);
+}

+ 6 - 6
User/Src/eeprom_flash.c

@@ -6,9 +6,9 @@ FLASH_EraseInitTypeDef EEPROM_AreaEraseInitStruct;
 TrueOrFalse_Flag_Struct_t IsPowerOffDataBkp_SaveFlag = FALSE;
 TrueOrFalse_Flag_Struct_t IsFlashSaveDataUpdate = FALSE;
 
-/****************************局函数定义******************************/
+/****************************局函数定义******************************/
 //数据写入
-static void CopyDataToEEPROM_Flash(void)
+void CopyDataToEEPROM_Flash(void)
 {
 	uint32_t Temp_32[2];
 	//Flash页擦除
@@ -33,7 +33,8 @@ static void CopyDataToEEPROM_Flash(void)
 	FLASH_Write(EEPROM_FLASH_ADDR_FLAG, Temp_32, 2);
 }
 
-static void CopyDataFromEEPROM_Flash(void)
+//数据读取
+void CopyDataFromEEPROM_Flash(void)
 {
   uint8_t Data_Buf[64];
 	int8_t Error_OK; 
@@ -77,7 +78,6 @@ static void CopyDataFromEEPROM_Flash(void)
 	
 }
 
-/****************************全局函数定义******************************/
 //指定地址写入指定长度数据类型为32bit数据
 void FLASH_Write(uint32_t FlashAddress, uint32_t* Data, uint16_t DataLength)
 {
@@ -186,11 +186,11 @@ void EEPROM_Flash_Check(void)
 	FlagResult = CRC32_Calculate(DataBuf, 4);
 	
 	//判断数据是否有效
-	if((FlagResult - FlagCrc) == 0)//数据有效
+	if((FlagResult - FlagCrc) == 0) //数据有效
 	{
 	  CopyDataFromEEPROM_Flash();
 	}
-	else//数据无效
+	else if(IsFirstPowerOnFlag == TRUE) //数据无效且开机次数为0时,写入默认参数
 	{
 		CopyDataToEEPROM_Flash();
 	}

+ 22 - 0
User/Src/math_tools.c

@@ -396,3 +396,25 @@ void ArrayFillZero(uint16_t* Array, uint16_t Length)
 	  Array[i] = 0;
 	}
 }
+
+/*
+滑动最大值滤波
+InputData:最新采集值
+Array:缓存队列
+Length:缓存大小
+运行一次后,缓存队列最后一个数据为最新采集值,前面数据依次前移,返回值为缓存队列最大值
+*/
+uint16_t MovingMaxFilter(uint16_t InputData, uint16_t* Array, uint16_t Length)
+{
+	uint16_t Result, i;
+	
+	Result = GetMaxData(Array, Length);
+	for(i = 0; i < (Length - 1); i++)
+	{
+	  Array[i] = Array[i+1];
+	}
+	
+	Array[Length - 1] = InputData;
+
+	return Result;
+}

+ 10 - 3
User/Src/motor_control.c

@@ -980,9 +980,16 @@ MC_CalParam_Struct_t MC_AssistRunMode_Torque_Process(uint16_t SenorData, MC_Gear
 				break;
 			}
 		}
+				
+		static uint16_t speedLimitStart = 250, speedLimitEnd = 272, slewRate = 52;
+		if((MC_ConfigParam2.speedLimitStartAdj > 50) || (MC_ConfigParam2.speedLimitStartAdj < -50)) MC_ConfigParam2.speedLimitStartAdj = 0;
+		if((MC_ConfigParam2.speedLimitEndAdj > 50) || (MC_ConfigParam2.speedLimitEndAdj < -50)) MC_ConfigParam2.speedLimitEndAdj = 0;
 		
+		speedLimitStart = MC_ConfigParam1.SpeedLimit * 10 + MC_ConfigParam2.speedLimitStartAdj;
+		speedLimitEnd   = MC_ConfigParam1.SpeedLimit * 10 + MC_ConfigParam2.speedLimitEndAdj + 22;
+		slewRate        = 1024 / (speedLimitEnd-speedLimitStart - 3);		
 		//随车速调节助力比
-		Torque_Temp = (uint16_t)((uint32_t)(Torque_Temp * Function_Linear_3Stage(MC_ConfigParam1.SpeedLimit * 10, 0, MC_ConfigParam1.SpeedLimit * 10, 52, MC_SpeedSensorData.Speed_Data)) >> 10);
+		Torque_Temp = (uint16_t)((uint32_t)(Torque_Temp * Function_Linear_3Stage(speedLimitStart, 0, speedLimitStart, slewRate, MC_SpeedSensorData.Speed_Data)) >> 10);
 			
     //助力输出		
 		MC_TorqueProcess_Param.TorqueRef = Torque_Temp;
@@ -992,7 +999,7 @@ MC_CalParam_Struct_t MC_AssistRunMode_Torque_Process(uint16_t SenorData, MC_Gear
 		}
 				
 		//升降速曲线计算
-		if( MC_SpeedSensorData.Speed_Data > (MC_ConfigParam1.SpeedLimit * 10) ) //限速处理
+		if( MC_SpeedSensorData.Speed_Data > (speedLimitStart * 10) ) //限速处理
 		{
 			if((MC_TorqueProcess_Param.TorqueRef - MC_TorqueProcess_Param.TorqueRefEnd) > 2)
 			{
@@ -1078,7 +1085,7 @@ MC_CalParam_Struct_t MC_AssistRunMode_Torque_Process(uint16_t SenorData, MC_Gear
 		MC_TorqueProcess_Param.TorqueRefEnd = (MC_TorqueProcess_Param.TorqueRefEnd < 6) ? 6 : MC_TorqueProcess_Param.TorqueRefEnd;
 		
 		//限速点处理
-		if( MC_SpeedSensorData.Speed_Data > (MC_ConfigParam1.SpeedLimit * 10 + 22) ) //限速值 + 2.2
+		if( MC_SpeedSensorData.Speed_Data > (speedLimitEnd) ) //限速值停机值
 		{
 			MC_TorqueProcess_Param.MotorStopLock_Flag = SET;
 			MC_TorqueProcess_Param.TorqueRefEnd = 0;

+ 13 - 6
User/Src/protect_check.c

@@ -253,16 +253,20 @@ void MC_Protect_OverHeat_Process(uint8_t T_MCU, uint8_t T_PCB, uint8_t T_Coil, u
 	
 	if(p_MC_ErrorCode->ERROR_Bit.Protect_OverTemp == 0)
 	{
+		//旧板无MOS温度传感器,根据PCB温度和绕组温度
 		if( MC_HallSensorData.InverterExistFlag==TRUE ) 
-		{	//单片机100度保护,绕组130度保护
-			if( (T_PCB < (TH - 25))&&(T_Coil < (TH + 5)) ) 
+		{	
+			//单片机100度保护,绕组135度保护
+			if( (T_PCB < (TH - 25))&&(T_Coil < (TH + 10)) ) 
 			{
 				OT_Set_TimeCnt = HAL_GetTick();
 			}
 		}
+		//新板有MOS温度传感器,根据PCB温度、MOS温度、绕组温度
 		else
-		{ //单片机90度保护,绕组130度保护,MOS管105度保护
-			if( (T_PCB < (TH - 35))&&(T_Coil < (TH + 5))&&(T_MCU < (TH - 20)) ) 
+		{ 
+			//单片机100度保护,绕组135度保护,MOS管105度保护
+			if( (T_PCB < (TH - 25))&&(T_Coil < (TH + 10))&&(T_MCU < (TH - 20)) ) 
 			{
 				OT_Set_TimeCnt = HAL_GetTick();
 			}
@@ -451,8 +455,11 @@ void MC_Protect_Check_Process(void)
 	                                &MC_ErrorCode);
 	
 	//过压保护检测
-	MC_Protect_OverVoltage_Process(((IsComOK_BMS.IsOK_Flag == TRUE) ? BMS_RunInfo.Voltage : MC_RunInfo.BusVoltage), MC_MotorParam.Rate_Voltage, &MC_ErrorCode);
-
+	if(MC_RunInfo.BusCurrent < 5000)
+	{
+	  MC_Protect_OverVoltage_Process(((IsComOK_BMS.IsOK_Flag == TRUE) ? BMS_RunInfo.Voltage : MC_RunInfo.BusVoltage), MC_MotorParam.Rate_Voltage, &MC_ErrorCode);
+	}
+	
 	//堵转保护检测
 	MC_Protect_RotorLock_Process(MC_RunInfo.BusCurrent, MC_HallSensorData.IsStopFlag, &MC_ErrorCode);
 

+ 60 - 52
User/Src/remain_distance.c

@@ -15,6 +15,7 @@
 #include "remain_distance.h"
 #include "battery_info.h"
 #include "eeprom_24c02.h"
+#include "math_tools.h"
 
 /*电流积分,最小值,单位mA*/
 #define CURRENT_MIN    130
@@ -25,10 +26,10 @@
 extern const MC_AvgPower_Struct_t MC_AvgPower_Default;
 
 //续航计算相关参数
-
 Remain_Dis_t RemainDis = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFFFF, 0, 0, FALSE, 0};
-//电池信息
-Battery_Info_t Battery_Info;
+
+//电池电量计算相关参数
+Battery_Info_t Battery_Info = {0, 0, 0, 0, 0, FALSE, 0, 0, 0};
 
 /******************************************************************************
 * @Function:  void RD_getQRemainRecord( void )
@@ -435,41 +436,72 @@ void RD_SaveAndUpdateInfo(MC_GearSt_Struct_t GearSt, MC_AssistRunMode_Struct_t M
 	MC_AssistRunMode_Old = MC_AssistRunMode;
 }
 
-//运行周期200ms
-uint8_t Battery_SocCal(uint16_t Voltage_mV)
+/*
+根据电池电压计算剩余电量,运行周期200ms
+*/
+uint8_t Battery_SocCal(Battery_Info_t* p_Battery_Info, uint8_t SOC_Old, uint8_t Vol_Design)
 {
   static uint16_t TimeDelayCnt = 0;
-	static uint32_t FiltSum = 0;
-	static uint8_t FiltCnt = 0;
 	static uint8_t Result = 0, Result_Pre=0;
 	static TrueOrFalse_Flag_Struct_t InitFlag = FALSE;
 	uint16_t i;
 	uint16_t TableNum;
 	uint32_t batteryTotalQ, batteryRemainQ;
-	uint16_t Vol_Avg = 0;
+	static uint8_t u8LoopCnt = 0;
+	static uint16_t u16MaxVoltage = 0;
+	static TrueOrFalse_Flag_Struct_t FlagFristCal = TRUE;
 	
 	TableNum = sizeof(battery_VoltageQuantity) / 4;
 	batteryTotalQ = battery_VoltageQuantity[TableNum - 1][1];
 	batteryRemainQ = batteryTotalQ;
 	
-	TimeDelayCnt++;
-	//初始化电压上升较慢,开机时动态效果
-	if(TimeDelayCnt <= 10) return 0;
-	else if(TimeDelayCnt <= 15) return 10;
-	else if(TimeDelayCnt <= 20) return 25;
-	else if(TimeDelayCnt <= 25) return 45;
-	else if(TimeDelayCnt <= 30) return 65;
-	else if(TimeDelayCnt <= 35) return 85;
-	else	
+	if(InitFlag == FALSE) //初始化动态显示百分比
 	{
-	  if(InitFlag == FALSE)//等待约5s后,计算一次初始值
+	  TimeDelayCnt++;
+		if(TimeDelayCnt <= 10) return 0;
+	  else if(TimeDelayCnt <= 15) return 10;
+	  else if(TimeDelayCnt <= 20) return 25;
+	  else if(TimeDelayCnt <= 25) return 45;
+	  else if(TimeDelayCnt <= 30) return 65;
+	  else if(TimeDelayCnt <= 35) return 85;
+		else
 		{
 		  InitFlag = TRUE;
+			return 100;
+		}
+	}
+	else	//初始化后根据电压平均值计算百分比
+	{
+	  Result_Pre = SOC_Old;
+		Result = Result_Pre;
+		
+		if(p_Battery_Info->BFlagCalSoc == TRUE)
+		{
+			if(FlagFristCal == TRUE) //第一次计算采用当前值
+			{
+				u16MaxVoltage = (Vol_Design == 24) ? (uint16_t)(p_Battery_Info->u32TotalBusVoltage / 15000) * 10 / 7
+				                                   : ((Vol_Design == 48) ? (uint16_t)(p_Battery_Info->u32TotalBusVoltage / 15000) * 10 / 13
+				                                                         : (uint16_t)(p_Battery_Info->u32TotalBusVoltage / 15000));
+				FlagFristCal = FALSE;
+			}
+			else //后面取12个值的最大值
+			{
+				p_Battery_Info->u16BusAverageVol[u8LoopCnt++] = (uint16_t)(p_Battery_Info->u32TotalBusVoltage / 15000);
+				if(u8LoopCnt >= 12)
+				{
+					u16MaxVoltage = (Vol_Design == 24) ? GetMaxData(p_Battery_Info->u16BusAverageVol, 12) * 10 / 7
+				                                     : ((Vol_Design == 48) ? GetMaxData(p_Battery_Info->u16BusAverageVol, 12) * 10 / 13
+				                                                           : GetMaxData(p_Battery_Info->u16BusAverageVol, 12));				
+					u8LoopCnt = 0;
+				}
+			}
+			
+			//查表计算SOC
 			for(i=0; i<TableNum; i++)
 			{
-				if(battery_VoltageQuantity[i][0] <= (Voltage_mV / 10))
+				if(battery_VoltageQuantity[i][0] <= u16MaxVoltage)
 				{
-					batteryRemainQ = batteryTotalQ - battery_VoltageQuantity[i][1];
+					batteryRemainQ = batteryTotalQ - battery_VoltageQuantity[i][1]; //A*s
 					break;
 				}
 				else//电池电压低于最小值
@@ -478,44 +510,20 @@ uint8_t Battery_SocCal(uint16_t Voltage_mV)
 				}
 			}
 			Result = batteryRemainQ * 100 / batteryTotalQ;
-		}
-		else//第一次计算后,采用25组电压平均值
-		{
-		  Result_Pre = MC_RunInfo.SOC;
-			Result = Result_Pre;
 			
-			//取25组数据的平均值计算SOC
-			FiltSum += Voltage_mV;
-			FiltCnt++;
-			if(FiltCnt >= 25)
+			//电量上升时,突变较小,取上次计算值
+			if(Result > Result_Pre)
 			{
-				Vol_Avg = FiltSum / 25;
-				FiltSum = 0;
-				FiltCnt = 0;
-				//查表计算SOC
-				for(i=0; i<TableNum; i++)
-				{
-					if(battery_VoltageQuantity[i][0] <= (Vol_Avg / 10))
-					{
-						batteryRemainQ = batteryTotalQ - battery_VoltageQuantity[i][1] ;    //A*s
-						break;
-					}
-					else//电池电压低于最小值
-					{
-						batteryRemainQ = 0;
-					}
-				}
-				Result = batteryRemainQ * 100 / batteryTotalQ;
-				if(Result > Result_Pre)//电量上升时,突变较小,取上次计算值
+				if((Result < (Result_Pre + 30)) && (Result < 90))
 				{
-					if((Result < (Result_Pre + 30)) && (Result < 90))
-					{
-						Result = Result_Pre;
-					}
+					Result = Result_Pre;
 				}
 			}
+			
+			p_Battery_Info->u32TotalBusVoltage = 0;
+			p_Battery_Info->BFlagCalSoc = FALSE;
 		}
+		
 		return Result;
 	}
 }
-

+ 2 - 1
User/Src/tasks.c

@@ -156,8 +156,9 @@ void MC_RunInfo_Update(void)
 		MC_RunInfo.LightSwitch = MC_ControlCode.LightSwitch;
 		
 		//Ê£ÓàµçÁ¿
-		MC_RunInfo.SOC = (DeviceOnLine_Status.Status_Bit.BMS_OffLine == 1) ? Battery_SocCal(MC_RunInfo.BusVoltage * 36 / MC_MotorParam.Rate_Voltage)
+		MC_RunInfo.SOC = (DeviceOnLine_Status.Status_Bit.BMS_OffLine == 1) ? Battery_SocCal((Battery_Info_t*)&Battery_Info.Q_discharged, MC_RunInfo.SOC, MC_MotorParam.Rate_Voltage)
 	                                                                     : BMS_RunInfo.SOC;
+		
 		//Ðøº½Àï³Ì
 		MC_RunInfo.RemainDistance = (DeviceOnLine_Status.Status_Bit.BMS_OffLine == 1) ? 0xEEEE : RemainDis.remainDistance;
 		

+ 13 - 6
User/Src/var.c

@@ -42,10 +42,12 @@ MC_AttitudeAngle_Struct_t MC_AttitudeAngle;               //
 MC_RideLog_Struct_t MC_RideLog;                           //骑行历史
 MC_AvgPower_Struct_t MC_AvgPower;                         //助力平均功耗
 MCU_Manufacturter_Struct_t MCUManufacturer;               //MCU生厂商
-uint16_t SpeedRatio;
-uint16_t HardwareVersion_AD=0;
-TrueOrFalse_Flag_Struct_t VersionIdentifyFinishedFlag = FALSE;
-TrueOrFalse_Flag_Struct_t PowerDown_SaveFlag = FALSE;
+uint16_t SpeedRatio;                                      //传动比计算结果
+uint16_t HardwareVersion_AD=0;                            //硬件识别AD
+TrueOrFalse_Flag_Struct_t VersionIdentifyFinishedFlag = FALSE; //硬件识别结束标识
+TrueOrFalse_Flag_Struct_t PowerDown_SaveFlag = FALSE;          //断电标识
+TrueOrFalse_Flag_Struct_t IsFirstPowerOnFlag = FALSE;          //首次开机标识
+
 //BMS默认设计信息
 const BMS_DesignInfo_Struct_t BMS_DesignInfo_Default =
 {
@@ -100,6 +102,11 @@ const MC_ConfigParam2_Struct_t MC_ConfigParam2_Default =
 	(MC_TailLight_Mode_Struct_t)MC_TAIL_LIGHT_MODE2, 
 	(MC_LightVoltage_Struct_t)MC_LIGHT_VOL_12V,
 	(MC_LightVoltage_Struct_t)MC_LIGHT_VOL_12V,
+	(uint16_t)150,
+	(uint16_t)75,
+	(uint16_t)150,
+	(int8_t)0,
+	(int8_t)0
 };
 
 const MC_TorqueCorrectParam_Struct_t MC_TorqueCorrectParam_Default =
@@ -504,9 +511,9 @@ void Var_Init(void)
 	//MC版本信息初始化,Mode和SN从EEPROM读取
 	strncpy(MC_VerInfo.HW_Version, (char*)"QD007H.       ", 16);
 	#if BaudRate250K
-  strncpy(MC_VerInfo.FW_Version, (char*)"V6r2r1_20230907C", 16);
+  strncpy(MC_VerInfo.FW_Version, (char*)"V6r2r1_20230915C", 16);
 	#else
-	strncpy(MC_VerInfo.FW_Version, (char*)"V2r3r1_20230907C", 16);
+	strncpy(MC_VerInfo.FW_Version, (char*)"V2r3r1_20230915C", 16);
 	#endif
 	
 	#if NormalWork

Деякі файли не було показано, через те що забагато файлів було змінено