Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
RT_RMR42E
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
时昊
RT_RMR42E
Commits
824aa2f5
Commit
824aa2f5
authored
Jul 04, 2024
by
郑萍
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:增加档位显示以及档位自检
parent
d7b3317d
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
299 additions
and
157 deletions
+299
-157
Can_App.c
Firmware/Source/Application/CAN_User/Can_App.c
+3
-3
GUI_Display.c
Firmware/Source/Application/GUI_Display/GUI_Display.c
+3
-2
SEG_DISPLAY.c
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
+267
-123
SEG_DISPLAY.h
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
+5
-5
Telltales_user.c
Firmware/Source/Component/Telltales/Telltales_user.c
+21
-24
No files found.
Firmware/Source/Application/CAN_User/Can_App.c
View file @
824aa2f5
...
...
@@ -49,7 +49,7 @@ void Can_Set_Buff_3A7(canlib_uint8_t CopyData[])
{
CopyData
[
i
]
=
0xFFU
;
}
p3A7
=
(
CANMsg3A7Union
*
)
CopyData
;
p3A7
=
(
CANMsg3A7Union
*
)
CopyData
;
if
(
p3A7
!=
(
void
*
)
0
)
{
p3A7
->
Sig
.
ICU_MasterBMSCommunicatlost
=
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
Co_Can_ConvertSubID_CAN_CH0
(
CAN_CH0_ID_CAN_0x18200A20_Msg
))
==
CAN_ERR_OK
);
...
...
@@ -84,8 +84,8 @@ void Can_Set_Buff_393(canlib_uint8_t CopyData[])
p393
->
Sig
.
ICU_SubSoftVer
=
1
;
p393
->
Sig
.
ICU_SoftPhaseVer
=
1
;
p393
->
Sig
.
Res0
=
0x0
;
p393
->
Sig
.
ICU_ProtoVer
=
1
;
p393
->
Sig
.
ICU_ProtoSubVer
=
1
;
p393
->
Sig
.
ICU_ProtoVer
=
0
;
p393
->
Sig
.
ICU_ProtoSubVer
=
7
;
p393
->
Sig
.
Res1
=
0x00
;
}
}
Firmware/Source/Application/GUI_Display/GUI_Display.c
View file @
824aa2f5
...
...
@@ -329,7 +329,7 @@ void Gauge_Service(void)
interact_PWM_Low_Duty
=
50
;
if
(
FLASH_SYNC_05Hz
)
{
SEG_SET_GEAR
(
1
,
0
);
SEG_SET_GEAR
(
1
,
Gear_P
,
0
);
if
(
Buzzer_time
<=
6000
)
{
RTE_GPIO_Config
(
RTE_GPIO_PORT04_PIN01
,
GpioOut_High
);
// OUT_EN_1
...
...
@@ -343,7 +343,7 @@ void Gauge_Service(void)
}
else
{
SEG_SET_GEAR
(
0
,
0
);
SEG_SET_GEAR
(
1
,
Gear_OFF
,
0
);
RTE_GPIO_Config
(
RTE_GPIO_PORT04_PIN01
,
GpioOut_Low
);
// OUT_EN_1
BUZZER_ON
=
0
;
}
...
...
@@ -382,6 +382,7 @@ void Gauge_CAN_setup_Service(void)
Charge_OFF_Flag
=
0
;
interact_PWM_Low_Duty
=
0
;
Gauge_Power_SOC_pull_Display
();
SEG_SET_Cutterhead
(
1
,
3
,
1
);
}
break
;
case
READY
:
...
...
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.c
View file @
824aa2f5
This diff is collapsed.
Click to expand it.
Firmware/Source/Application/SEG_DISPLAY/SEG_DISPLAY.h
View file @
824aa2f5
...
...
@@ -35,16 +35,16 @@ typedef enum
enum
{
Gear_P
=
0
,
//P
Gear_
R
,
//R
Gear_
N
,
//N
Gear_
D
,
//D
Gear_
1
,
//R
Gear_
2
,
//N
Gear_
OFF
,
//D
};
/**@brief 边框线显示函数*/
_Fun_Res
SEG_SET_Frame
(
uint8_t
m_Flag
);
/**@brief 挡位显示函数*/
_Fun_Res
SEG_SET_GEAR
(
uint8_t
m_Gear_Flag
,
uint8_t
m_Gear
);
_Fun_Res
SEG_SET_GEAR
(
uint8_t
m_Gear_Flag
,
uint8_t
m_Gear
,
uint8_t
checkself
);
/**@brief 电量表盘1SOC显示函数*/
_Fun_Res
SEG_SET_EleDial_1SOC
(
uint8_t
m_Flag
,
uint8_t
m_SEG
);
...
...
@@ -100,7 +100,7 @@ _Fun_Res SEG_SET_Travel_Time_NUM(uint8_t m_Flag, uint32_t m_NUM);
_Fun_Res
SEG_Scan_SET_EleDial
(
uint8_t
m_SEG
);
_Fun_Res
SEG_Scan_SET_PowerDial
(
uint8_t
m_SEG
);
/**@brief 刀盘显示函数*/
_Fun_Res
SEG_SET_Cutterhead
(
uint
16_t
LED_NUM
,
uint8_t
m_Flag
);
_Fun_Res
SEG_SET_Cutterhead
(
uint
8_t
m_Flag
,
uint8_t
LED_NUM
,
uint8_t
checkself
);
void
SEG_Scan_SET_FuelDial
(
void
);
void
SEG_Scan_SET_EspeedDial
(
void
);
...
...
Firmware/Source/Component/Telltales/Telltales_user.c
View file @
824aa2f5
...
...
@@ -375,7 +375,7 @@ static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
Tellib_uint8_t
Signal3
=
Get_CAN_Power_State
();
if
(
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
)
>=
9000
&&
ADC_Read_Signal
(
ADC_CH_KL30_VOLTAGE
)
<=
16000
&&
(
Get_CAN_Power_State
()
!=
PKEY_ON
&&
Get_CAN_Power_State
()
!=
KEY_OFF
))
{
if
(
Signal1
==
0x1
&&
Signal2
==
0X1
)
if
(
(
Signal1
==
0x1
||
Signal1
==
0x0
)
&&
Signal2
==
0X1
)
{
if
(
Signal3
==
CHRG_PLUGIN
||
Signal3
==
CHRGEND
)
{
...
...
@@ -475,22 +475,23 @@ static void LED_Cutterhead_Switch_Execution(Tellib_uint16_t led_statu
}
static
Tellib_uint16_t
LED_GEAR_Judgement
(
void
)
{
Tellib_uint16_t
LED_STATE
=
1u
;
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
Get_CAN_Power_State
()
!=
KEY_OFF
&&
Charge_OFF_Flag
==
0
)
{
LED_STATE
=
1
;
}
return
LED_STATE
;
}
static
void
LED_GEAR_Execution
(
Tellib_uint16_t
led_status
)
{
// if ( led_status == 1u )
// {
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_GEAR_W, LED_ON);
// SEG_SET_GEAR(1,Gear_N);
// }
// else
// {
// LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_GEAR_W, LED_OFF);
// SEG_SET_GEAR(0,Gear_N);
// SEG_SET_LED_STS(SEG_LED_Cutter_Head_switch,0);
// }
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_ON
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_OFF
);
}
}
static
Tellib_uint16_t
LED_External_Discharge_Judgement
(
void
)
...
...
@@ -756,7 +757,7 @@ static void LED_Cutterhead_Gear_Execution(Tellib_uint16_t led_status)
static
Tellib_uint16_t
LED_Working_Hours_One_Judgement
(
void
)
{
Tellib_uint16_t
LED_STATE
=
0u
;
if
(
Get_Clockonetime_lenth
()
==
1
)
if
(
Get_Clockonetime_lenth
()
==
1
&&
openLED_flag
)
{
LED_STATE
=
1
;
}
...
...
@@ -839,11 +840,11 @@ static Tellib_uint16_t LED_P_GEAR_G_Judgement(void)
Tellib_uint16_t
LED_STATE
=
0u
;
Tellib_uint8_t
Signal1
=
Get_CAN_CH0_ID_125_Sig_MMCU_ParkingGearState
();
Tellib_uint8_t
Signal2
=
Get_CAN_Power_State
();
if
(
Signal1
==
0x1
&&
openLED_flag
)
if
(
Signal1
==
0x1
&&
openLED_flag
&&
checkself_seg_Flag
==
0
)
{
LED_STATE
=
1
;
}
else
if
(
Signal2
==
PKEY_ON
)
else
if
(
Signal2
==
PKEY_ON
&&
checkself_seg_Flag
==
0
)
{
LED_STATE
=
2
;
}
...
...
@@ -857,28 +858,24 @@ static void LED_P_GEAR_G_Execution(Tellib_uint16_t led_status)
{
if
(
led_status
==
1u
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_ON
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_03_P_GEAR_G
,
LED_ON
);
SEG_SET_GEAR
(
Gear_P
,
1
);
SEG_SET_GEAR
(
1
,
Gear_P
,
0
);
}
else
if
(
led_status
==
2u
)
{
if
(
FLASH_SYNC_05Hz
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_ON
);
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_03_P_GEAR_G
,
LED_ON
);
}
else
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_03_P_GEAR_G
,
LED_OFF
);
}
}
else
else
if
(
checkself_seg_Flag
==
0
)
{
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_04_GEAR_W
,
LED_OFF
);
LED_Driver_Channel_Set
(
LampChannel_0
,
LampCh0_03_P_GEAR_G
,
LED_OFF
);
SEG_SET_GEAR
(
Gear_P
,
0
);
SEG_SET_GEAR
(
0
,
Gear_P
,
0
);
}
}
static
Tellib_uint16_t
LED_Fuel_Alarm_W_Judgement
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment