Commit cf82bd79 authored by 时昊's avatar 时昊

Merge branch 'zhengping' into 'dev'

Zhengping

See merge request !8
parents 9232edee 65da23a8
...@@ -275,7 +275,7 @@ ...@@ -275,7 +275,7 @@
</OCR_RVCT3> </OCR_RVCT3>
<OCR_RVCT4> <OCR_RVCT4>
<Type>1</Type> <Type>1</Type>
<StartAddress>0x0</StartAddress> <StartAddress>0x8000</StartAddress>
<Size>0x40000</Size> <Size>0x40000</Size>
</OCR_RVCT4> </OCR_RVCT4>
<OCR_RVCT5> <OCR_RVCT5>
......
...@@ -16,7 +16,7 @@ User definitions ...@@ -16,7 +16,7 @@ User definitions
***********************************************************************************************************************/ ***********************************************************************************************************************/
#ifndef __TYPEDEF__ #ifndef __TYPEDEF__
#define HAS_BOOTLOADER (0u) // 仅仿真App时设置为0 #define HAS_BOOTLOADER (1u) // 仅仿真App时设置为0
#define APP_BASE (0x00008000ul) #define APP_BASE (0x00008000ul)
typedef unsigned short MD_STATUS; typedef unsigned short MD_STATUS;
......
...@@ -11,7 +11,7 @@ uint8_t Charge_OFF_Flag = 0; ...@@ -11,7 +11,7 @@ uint8_t Charge_OFF_Flag = 0;
void Gauge_Power_SOC_pull_Display(void) void Gauge_Power_SOC_pull_Display(void)
{ {
// uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState(); // uint8_t MBMS_StatBattWorkState = Get_CAN_CH0_ID_18203220_Sig_MBMS_StatBattWorkState();
if (DISPLAY_OPEN) if ((Common_Get_IG_Sts() == COMMON_POWER_ON) && (Get_CAN_Power_State() != KEY_OFF) && (Get_CAN_Power_State() != PKEY_ON) && (System_Indicator_CANFlag != 1))
{ {
uint8_t Current_1_Grid = Get_CAN_Num_MBMS_Soc_1_Grid(); uint8_t Current_1_Grid = Get_CAN_Num_MBMS_Soc_1_Grid();
uint8_t Current_2_Grid = Get_CAN_Num_SBMS_Soc_2_Grid(); uint8_t Current_2_Grid = Get_CAN_Num_SBMS_Soc_2_Grid();
...@@ -92,6 +92,10 @@ uint8_t Get_CAN_Num_MBMS_Soc_1_Grid(void) ...@@ -92,6 +92,10 @@ uint8_t Get_CAN_Num_MBMS_Soc_1_Grid(void)
{ {
num++; num++;
} }
if(num > 10)
{
num = 10;
}
return num; return num;
} }
uint8_t Get_CAN_Num_SBMS_Soc_2_Grid(void) uint8_t Get_CAN_Num_SBMS_Soc_2_Grid(void)
...@@ -103,6 +107,10 @@ uint8_t Get_CAN_Num_SBMS_Soc_2_Grid(void) ...@@ -103,6 +107,10 @@ uint8_t Get_CAN_Num_SBMS_Soc_2_Grid(void)
{ {
num++; num++;
} }
if(num > 10)
{
num = 10;
}
return num; return num;
} }
uint8_t SOC1_Count = 0; uint8_t SOC1_Count = 0;
...@@ -266,7 +274,8 @@ uint8_t Get_Clockonetime_lenth(void) ...@@ -266,7 +274,8 @@ uint8_t Get_Clockonetime_lenth(void)
uint32_t u32Data_read[1] = {0}; uint32_t u32Data_read[1] = {0};
uint32_t CumulativeWorkHours_Writeback = 0; uint32_t CumulativeWorkHours_Writeback = 0;
uint8_t CumulativeWorkHours_readDiffer = 0; uint32_t CumulativeWorkHours_readDiffer = 0;
uint8_t CumulativeWorkHours_MAX_flag = 0;
void Data_CumulativeWorkHours_EEPROM_Write(void) void Data_CumulativeWorkHours_EEPROM_Write(void)
{ {
uint32_t CurrentData = 0; uint32_t CurrentData = 0;
...@@ -274,29 +283,53 @@ void Data_CumulativeWorkHours_EEPROM_Write(void) ...@@ -274,29 +283,53 @@ void Data_CumulativeWorkHours_EEPROM_Write(void)
if (DISPLAY_OPEN) if (DISPLAY_OPEN)
{ {
CurrentData = Get_CAN_Num_MMCU_AccumulatedWorkHours(); CurrentData = Get_CAN_Num_MMCU_AccumulatedWorkHours();
if (CurrentData > CumulativeWorkHours_Writeback) if (CumulativeWorkHours_MAX_flag == 0)
{ {
CumulativeWorkHours_readDiffer = CurrentData - CumulativeWorkHours_Writeback; if (CurrentData > CumulativeWorkHours_Writeback)
eeprom_ReadRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data_read, 4); {
u32Data[0] = u32Data_read[0] + CumulativeWorkHours_readDiffer; CumulativeWorkHours_readDiffer = CurrentData - CumulativeWorkHours_Writeback;
eeprom_WriteRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data, 4); eeprom_ReadRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data_read, 4);
CumulativeWorkHours_Writeback = CurrentData; u32Data[0] = u32Data_read[0] + CumulativeWorkHours_readDiffer;
eeprom_WriteRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data, 4);
CumulativeWorkHours_Writeback = CurrentData;
}
else if (CurrentData < CumulativeWorkHours_Writeback)
{
CumulativeWorkHours_readDiffer = CumulativeWorkHours_Writeback - CurrentData;
eeprom_ReadRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data_read, 4);
u32Data[0] = u32Data_read[0] - CumulativeWorkHours_readDiffer;
eeprom_WriteRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data, 4);
CumulativeWorkHours_Writeback = CurrentData;
}
} }
else if (CurrentData < CumulativeWorkHours_Writeback) else if(CumulativeWorkHours_Writeback != 0)
{ {
CumulativeWorkHours_readDiffer = CumulativeWorkHours_Writeback - CurrentData; if (CurrentData < CumulativeWorkHours_Writeback)
eeprom_ReadRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data_read, 4); {
u32Data[0] = u32Data_read[0] - CumulativeWorkHours_readDiffer; CumulativeWorkHours_readDiffer = CumulativeWorkHours_Writeback - CurrentData;
eeprom_WriteRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data, 4); eeprom_ReadRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data_read, 4);
CumulativeWorkHours_Writeback = CurrentData; u32Data[0] = u32Data_read[0] - CumulativeWorkHours_readDiffer;
eeprom_WriteRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data, 4);
CumulativeWorkHours_Writeback = CurrentData;
}
} }
} }
} }
void Gauge_Clock_All_Display(void) void Gauge_Clock_All_Display(void)
{ {
uint32_t u32Data[1] = {0};
eeprom_ReadRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data_read, 4); eeprom_ReadRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data_read, 4);
if (u32Data_read[0] > 99999)
{
u32Data[0] = 99999;
eeprom_WriteRecord(EEPROM_BLOCK_00, (uint8_t *)u32Data, 4);
CumulativeWorkHours_MAX_flag = 1;
}
else
{
CumulativeWorkHours_MAX_flag = 0;
}
if (DISPLAY_OPEN) if (DISPLAY_OPEN)
{ {
SEG_SET_Clock_ALL(1, u32Data_read[0]); SEG_SET_Clock_ALL(1, u32Data_read[0]);
...@@ -354,17 +387,17 @@ void Gauge_Service(void) ...@@ -354,17 +387,17 @@ void Gauge_Service(void)
{ {
SOC_charge_seg_Flag = 0; SOC_charge_seg_Flag = 0;
Checkself_Init(); Checkself_Init();
Gauge_CAN_setup_Service(); Gauge_CAN_setup_Service();
} }
else else
{ {
checkself_seg_Flag = 1; checkself_seg_Flag = 1;
if(Get_CAN_Power_State() == KEY_ACC) if (Get_CAN_Power_State() == KEY_ACC)
{ {
interact_PWM_Low_Duty = 0; interact_PWM_Low_Duty = 0;
} }
Checkself_LED_Display(); Checkself_LED_Display();
// Checkself_SEG_Display(); // Checkself_SEG_Display();
} }
...@@ -484,10 +517,8 @@ void Gauge_CAN_setup_Service(void) ...@@ -484,10 +517,8 @@ void Gauge_CAN_setup_Service(void)
{ {
if (MBMS_TOTALSigAcc == 0x0 && MBMS_TOTALSigCharge == 0x1) // 下电充电) if (MBMS_TOTALSigAcc == 0x0 && MBMS_TOTALSigCharge == 0x1) // 下电充电)
{ {
Charge_OFF_Flag = 2; Charge_OFF_Flag = 1;
SEG_SET_EleDial_AllSOC(0, 0); Gauge_Power_SOC_pull_Display();
SEG_SET_EleDial_1SOC(0, 0);
SEG_SET_EleDial_2SOC(0, 0);
SOC1_Count = 0; SOC1_Count = 0;
SOC2_Count = 0; SOC2_Count = 0;
} }
...@@ -495,6 +526,8 @@ void Gauge_CAN_setup_Service(void) ...@@ -495,6 +526,8 @@ void Gauge_CAN_setup_Service(void)
{ {
Charge_OFF_Flag = 0; Charge_OFF_Flag = 0;
Gauge_Power_SOC_pull_Display(); Gauge_Power_SOC_pull_Display();
SOC1_Count = 0;
SOC2_Count = 0;
} }
poweroff_time = 0; poweroff_time = 0;
} }
......
...@@ -1876,7 +1876,7 @@ _Fun_Res SEG_SET_Clock(uint8_t m_hour, uint8_t m_minute, uint8_t m_icon, uint8_t ...@@ -1876,7 +1876,7 @@ _Fun_Res SEG_SET_Clock(uint8_t m_hour, uint8_t m_minute, uint8_t m_icon, uint8_t
_Fun_Res m_Res; _Fun_Res m_Res;
uint8_t Num; uint8_t Num;
uint8_t m8; uint8_t m8;
if ((m_hour >= 99u) || (m_minute >= 99u) || (m_icon > 1u) || (m_Flag1 > 1u) || (m_Flag2 > 1u)) if ((m_hour > 99u) || (m_minute > 99u) || (m_icon > 1u) || (m_Flag1 > 1u) || (m_Flag2 > 1u))
{ {
m_Res = EX_ERR; m_Res = EX_ERR;
} }
...@@ -2644,8 +2644,6 @@ void Checkself_SEG_Display(void) ...@@ -2644,8 +2644,6 @@ void Checkself_SEG_Display(void)
if (Checkself_SEG_step == 0) if (Checkself_SEG_step == 0)
{ {
Checkself_SEG_step = 0; Checkself_SEG_step = 0;
SEG_SET_EleDial_2SOC(1, 0);
SEG_SET_EleDial_1SOC(1, 0);
} }
else else
{ {
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#define u16ENTER_LOW_Y_RANGE 9000U #define u16ENTER_LOW_Y_RANGE 9000U
#define u16EXIT_LOW_Y_RANGE 10000U #define u16EXIT_LOW_Y_RANGE 10000U
#define u16EXIT_HIGH_Y_RANGE 16500U #define u16EXIT_HIGH_Y_RANGE 17000U
#define u16ENTER_HIGH_Y_RANGE 17000U #define u16ENTER_HIGH_Y_RANGE 17500U
#define u16EXIT_HIGH_N_RANGE 17500U #define u16EXIT_HIGH_N_RANGE 18000U
#define u16ENTER_HIGH_N_RANGE 18000U #define u16ENTER_HIGH_N_RANGE 18500U
#define u16Top_Vol 0xffffu #define u16Top_Vol 0xffffu
...@@ -59,7 +59,6 @@ static const monitorlib_uint16_t SysFun_Range [ 26u ] = { ...@@ -59,7 +59,6 @@ static const monitorlib_uint16_t SysFun_Range [ 26u ] = {
2u, 2u,
0u, 0u,
}; };
monitorlib_uint16_t Sys_Read_KL30_Voltage_F(void) monitorlib_uint16_t Sys_Read_KL30_Voltage_F(void)
{ {
monitorlib_uint16_t u16Voltage; monitorlib_uint16_t u16Voltage;
......
...@@ -697,23 +697,11 @@ static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void) ...@@ -697,23 +697,11 @@ static Tellib_uint16_t LED_Cutterhead_Gear_Judgement(void)
} }
static void LED_Cutterhead_Gear_Execution(Tellib_uint16_t led_status) static void LED_Cutterhead_Gear_Execution(Tellib_uint16_t led_status)
{ {
if (led_status == 1u) if (led_status != 0u)
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_ON);
// SEG_SET_LED_STS(1,1); // SEG_SET_LED_STS(1,1);
} }
else if (led_status == 2u)
{
if (FLASH_SYNC_1Hz)
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_ON);
}
else
{
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_OFF);
}
// SEG_SET_LED_STS(1,0);
}
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_15_Cutterhead_Gear_W, LED_OFF);
...@@ -831,14 +819,14 @@ static void LED_P_GEAR_G_Execution(Tellib_uint16_t led_status) ...@@ -831,14 +819,14 @@ static void LED_P_GEAR_G_Execution(Tellib_uint16_t led_status)
{ {
if (FLASH_SYNC_1Hz) if (FLASH_SYNC_1Hz)
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Gears_W, LED_ON);
SEG_SET_GEAR(1, Gear_P, 0); SEG_SET_GEAR(1, Gear_P, 0);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Gears_W, LED_OFF);
SEG_SET_GEAR(1, Gear_OFF, 0); SEG_SET_GEAR(1, Gear_OFF, 0);
} }
LED_Driver_Channel_Set(LampChannel_0, LampCh0_05_Gears_W, LED_ON);
} }
else if (checkself_seg_Flag == 0) else if (checkself_seg_Flag == 0)
{ {
......
...@@ -52,6 +52,7 @@ void Sys_15ms_Tasks(void) ...@@ -52,6 +52,7 @@ void Sys_15ms_Tasks(void)
{ {
if ((Common_GetIgnOnTime() <= 1500) && (Common_GetIgnOnTime() > 0) && (checkself_seg_Flag == 1)) if ((Common_GetIgnOnTime() <= 1500) && (Common_GetIgnOnTime() > 0) && (checkself_seg_Flag == 1))
{ {
BU98R10_Update_Request();
Checkself_SEG_Display(); Checkself_SEG_Display();
} }
} }
......
...@@ -310,7 +310,7 @@ ...@@ -310,7 +310,7 @@
#define CheckSumErr 7 // Checksum Error #define CheckSumErr 7 // Checksum Error
#define UnknownPartID 8 // Unknown Part ID #define UnknownPartID 8 // Unknown Part ID
#define SWV 0x101 // 0x100 = 1.00 software version 软件版本号 #define SWV 0x102 // 0x100 = 1.00 software version 软件版本号
#define HWV 0x100 // 0x100 = 1.00 hardware version 硬件版本号 #define HWV 0x100 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号 #define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号
#define INTLV 0x101 // 0x100 = 1.00 internal version 内部版本号 #define INTLV 0x101 // 0x100 = 1.00 internal version 内部版本号
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
#new Option #new Option
#Fri Apr 12 15:33:42 CST 2024 #Fri Jul 19 13:47:59 CST 2024
IsSort=true IsSort=true
MergeFlashIsCompression=false MergeFlashIsCompression=false
ChangeAppFilePath= ChangeAppFilePath=
...@@ -7,7 +7,7 @@ MergeCanXLSPath= ...@@ -7,7 +7,7 @@ MergeCanXLSPath=
RH850_D1M1AGPIOJSONpath= RH850_D1M1AGPIOJSONpath=
DBFFilePath= DBFFilePath=
MergeCrcTtpe=21 MergeCrcTtpe=21
MergeBootFilePath=D\:\\Desktop\\haojin232\\Firmware\\utility\\Boot_Release\\HaoJin_HJYB-5_Boot_BV1.01_20240320.hex MergeBootFilePath=D\:\\\u5DE5\u4F5C\\\u6DA6\u901A\u8349\u5730\\new\\rt_rmr42e\\Firmware\\utility\\BootRelease\\RT_RMR42E_RMRE42-60_Boot_BV1.01_20240709.hex
IsMergeChangeAddress=false IsMergeChangeAddress=false
MergeFlashOutPutFilePath= MergeFlashOutPutFilePath=
GPIOOutPutPath= GPIOOutPutPath=
...@@ -25,12 +25,12 @@ MsgSTmin=0 ...@@ -25,12 +25,12 @@ MsgSTmin=0
MergeLineInOutPutPath= MergeLineInOutPutPath=
Leave2ID=1 Leave2ID=1
PHYID=781 PHYID=781
BaudRate=500K BaudRate=250K
AppUpdateFilePath= AppUpdateFilePath=D\:\\\u5DE5\u4F5C\\\u6DA6\u901A\u8349\u5730\\new\\rt_rmr42e\\Firmware\\utility\\\u7A0B\u5E8F\u91CA\u653E\\RT_RMRE42-60-20240719\\APP_20240719134557876532.srec
FUNID=7DF FUNID=7DF
IsMergeCreateBin=false IsMergeCreateBin=false
IsOverWrite=false IsOverWrite=false
DllFilePath=D\:\\Desktop\\haojin232\\Firmware\\utility\\\u8BCA\u65AD\u5DE5\u5177\\\u89E3\u9501\u6587\u4EF6\\HJ232 x64.dll DllFilePath=D\:\\\u5DE5\u4F5C\\\u6DA6\u901A\u8349\u5730\\new\\rt_rmr42e\\Firmware\\utility\\\u8BCA\u65AD\u5DE5\u5177\\\u89E3\u9501\u6587\u4EF6\\HJ232 x64.dll
MergeAudioOutPutPath= MergeAudioOutPutPath=
MergeCanOutPutPath= MergeCanOutPutPath=
ChangeOutPutFilePath= ChangeOutPutFilePath=
...@@ -39,10 +39,10 @@ TTFExtractTXTpath= ...@@ -39,10 +39,10 @@ TTFExtractTXTpath=
JieFaRH850GPIOJSONpath= JieFaRH850GPIOJSONpath=
MergeFlashIsMandatory=false MergeFlashIsMandatory=false
UpdateProcess=\u6BD4\u4E9A\u8FEA UpdateProcess=\u6BD4\u4E9A\u8FEA
Driver=Kvaser Driver=PCAN
MergeFlashImageFormat= MergeFlashImageFormat=
RH850_F1KMGPIOJSONpath= RH850_F1KMGPIOJSONpath=
DriverFilePath=D\:\\Desktop\\haojin232\\Firmware\\utility\\\u8BCA\u65AD\u5DE5\u5177\\FlashDriver\\R5_FlashDriver.srec DriverFilePath=D\:\\\u5DE5\u4F5C\\\u6DA6\u901A\u8349\u5730\\new\\rt_rmr42e\\Firmware\\utility\\\u8BCA\u65AD\u5DE5\u5177\\FlashDriver\\R5_FlashDriver.srec
IsMergeCreateHex=false IsMergeCreateHex=false
MergeFlashIsCreateREC=false MergeFlashIsCreateREC=false
TTFExtractTTFpath= TTFExtractTTFpath=
...@@ -56,8 +56,8 @@ IsHexDisplay=true ...@@ -56,8 +56,8 @@ IsHexDisplay=true
MergeLineInXLSPath= MergeLineInXLSPath=
MergeFlashInPutFilePath= MergeFlashInPutFilePath=
MergeFlashIsInternal=false MergeFlashIsInternal=false
MergeOutPutFilePath= MergeOutPutFilePath=D\:\\\u5DE5\u4F5C\\\u6DA6\u901A\u8349\u5730\\new\\rt_rmr42e\\Firmware\\utility\\\u7A0B\u5E8F\u91CA\u653E\\RT_RMRE42-60-20240719
MergeAppFilePath= MergeAppFilePath=D\:\\\u5DE5\u4F5C\\\u6DA6\u901A\u8349\u5730\\new\\rt_rmr42e\\Firmware\\utility\\\u7A0B\u5E8F\u91CA\u653E\\RT_RMRE42-60-20240719\\RMR42E.hex
MergeTelltalesXLSPath= MergeTelltalesXLSPath=
FillingByte=-86 FillingByte=-86
ImageVersion=0 ImageVersion=0
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment