Commit a438ed2b authored by 郑萍's avatar 郑萍

feat:部分灯自检段码显示

parent 74a7402f
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
#include "TrmerM\TrmerM.h" #include "TrmerM\TrmerM.h"
#define BACK_LIGHT_DAY 50 #define BACK_LIGHT_DAY 200
uint8_t interact_PWM_Low_Duty = 0; uint8_t interact_PWM_Low_Duty = 0;
void BackLight_Process(void) void BackLight_Process(void)
{ {
......
...@@ -113,7 +113,7 @@ _Fun_Res SEG_SET_LED_STS(uint8_t LED_NUM, uint8_t m_Flag) ...@@ -113,7 +113,7 @@ _Fun_Res SEG_SET_LED_STS(uint8_t LED_NUM, uint8_t m_Flag)
IC2_SEG093 = Flag; IC2_SEG093 = Flag;
break; break;
case SEG_LED_Fuel_Oil: case SEG_LED_Fuel_Oil:
IC2_SEG093 = Flag; IC2_SEG105 = Flag;
break; break;
default: default:
break; break;
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
/*-----------------------------------------------------------*/ /*-----------------------------------------------------------*/
#define LED_ON 5 #define LED_ON 50
#define LED_OFF 0 #define LED_OFF 0
#define LED_LINEOUT_Low 0 #define LED_LINEOUT_Low 0
#define LED_LINEOUT_High 1 #define LED_LINEOUT_High 1
......
...@@ -238,13 +238,14 @@ static void LED_Grass_Full_Execution(Tellib_uint16_t led_status) ...@@ -238,13 +238,14 @@ static void LED_Grass_Full_Execution(Tellib_uint16_t led_status)
{ {
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_00_Grass_Full_R, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_00_Grass_Full_R, LED_ON);
SEG_SET_LED_STS(SEG_LED_Chloramine,1);
// SEG_SET_LED_STS(1,1); // SEG_SET_LED_STS(1,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_00_Grass_Full_R, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_00_Grass_Full_R, LED_OFF);
// SEG_SET_LED_STS(1,0); SEG_SET_LED_STS(SEG_LED_Chloramine,0);
} }
} }
static Tellib_uint16_t LED_OVERLOAD_Judgement(void) static Tellib_uint16_t LED_OVERLOAD_Judgement(void)
...@@ -267,12 +268,12 @@ static void LED_OVERLOAD_Execution(Tellib_uint16_t led_status) ...@@ -267,12 +268,12 @@ static void LED_OVERLOAD_Execution(Tellib_uint16_t led_status)
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_13_OVERLOAD_R, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_13_OVERLOAD_R, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_LED_STS(SEG_LED_Cutter_Overload,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_13_OVERLOAD_R, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_13_OVERLOAD_R, LED_OFF);
// SEG_SET_LED_STS(1,0); SEG_SET_LED_STS(SEG_LED_Cutter_Overload,0);
} }
} }
static Tellib_uint16_t LED_READY_Judgement(void) static Tellib_uint16_t LED_READY_Judgement(void)
...@@ -295,12 +296,12 @@ static void LED_READY_Execution(Tellib_uint16_t led_status) ...@@ -295,12 +296,12 @@ static void LED_READY_Execution(Tellib_uint16_t led_status)
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_10_READY_G, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_10_READY_G, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_LED_STS(SEG_LED_Ready,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_10_READY_G, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_10_READY_G, LED_OFF);
// SEG_SET_LED_STS(1,0); SEG_SET_LED_STS(SEG_LED_Ready,0);
} }
} }
static Tellib_uint16_t LED_Seat_Detection_Judgement(void) static Tellib_uint16_t LED_Seat_Detection_Judgement(void)
...@@ -322,17 +323,19 @@ static void LED_Seat_Detection_Execution(Tellib_uint16_t led_status) ...@@ -322,17 +323,19 @@ static void LED_Seat_Detection_Execution(Tellib_uint16_t led_status)
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_LED_STS(SEG_LED_Seat_Detection,1);
} }
else else
{ {
if(FLASH_SYNC_1Hz) if(FLASH_SYNC_1Hz)
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Seat_Detection,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_12_Seat_Detection_W, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Seat_Detection,0);
} }
// SEG_SET_LED_STS(1,0); // SEG_SET_LED_STS(1,0);
} }
...@@ -356,12 +359,12 @@ static void LED_Key_Access_Execution(Tellib_uint16_t led_status) ...@@ -356,12 +359,12 @@ static void LED_Key_Access_Execution(Tellib_uint16_t led_status)
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_11_Key_Access_W, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_11_Key_Access_W, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_LED_STS(SEG_LED_Key_Access,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_11_Key_Access_W, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_11_Key_Access_W, LED_OFF);
// SEG_SET_LED_STS(1,0); SEG_SET_LED_STS(SEG_LED_Key_Access,0);
} }
} }
static Tellib_uint16_t LED_Battery_Charging_Judgement(void) static Tellib_uint16_t LED_Battery_Charging_Judgement(void)
...@@ -396,23 +399,24 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status ...@@ -396,23 +399,24 @@ static void LED_Battery_Charging_Execution(Tellib_uint16_t led_status
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_LED_STS(SEG_LED_Recharge,1);
} }
else if(led_status == 2u) else if(led_status == 2u)
{ {
if(FLASH_SYNC_1Hz) if(FLASH_SYNC_1Hz)
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_ON);
SEG_SET_LED_STS(SEG_LED_Recharge,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_OFF);
} SEG_SET_LED_STS(SEG_LED_Recharge,0);
// SEG_SET_LED_STS(1,0); }
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_08_Battery_Charging_W, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, SEG_LED_Recharge, LED_OFF);
} }
} }
// static Tellib_uint16_t LED_Battery_Charging_POWEROFF_Judgement(void) // static Tellib_uint16_t LED_Battery_Charging_POWEROFF_Judgement(void)
...@@ -460,12 +464,12 @@ static void LED_Cutterhead_Switch_Execution(Tellib_uint16_t led_statu ...@@ -460,12 +464,12 @@ static void LED_Cutterhead_Switch_Execution(Tellib_uint16_t led_statu
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_14_Cutterhead_Switch_W, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_14_Cutterhead_Switch_W, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_LED_STS(SEG_LED_Cutter_Head_switch,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_14_Cutterhead_Switch_W, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_14_Cutterhead_Switch_W, LED_OFF);
// SEG_SET_LED_STS(1,0); SEG_SET_LED_STS(SEG_LED_Cutter_Head_switch,0);
} }
} }
static Tellib_uint16_t LED_GEAR_Judgement(void) static Tellib_uint16_t LED_GEAR_Judgement(void)
...@@ -478,12 +482,13 @@ static void LED_GEAR_Execution(Tellib_uint16_t led_status) ...@@ -478,12 +482,13 @@ static void LED_GEAR_Execution(Tellib_uint16_t led_status)
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_GEAR_W, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_GEAR_W, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_GEAR(1,Gear_N);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_GEAR_W, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_04_GEAR_W, LED_OFF);
// SEG_SET_LED_STS(1,0); SEG_SET_GEAR(0,Gear_N);
SEG_SET_LED_STS(SEG_LED_Cutter_Head_switch,0);
} }
} }
...@@ -558,12 +563,12 @@ static void LED_Bluetooth_Connection_Execution(Tellib_uint16_t led_st ...@@ -558,12 +563,12 @@ static void LED_Bluetooth_Connection_Execution(Tellib_uint16_t led_st
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_22_Bluetooth_Connection_W, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_22_Bluetooth_Connection_W, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_LED_STS(SEG_LED_bluetooth,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_22_Bluetooth_Connection_W, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_22_Bluetooth_Connection_W, LED_OFF);
// SEG_SET_LED_STS(1,0); SEG_SET_LED_STS(SEG_LED_bluetooth,0);
} }
} }
static Tellib_uint16_t LED_LED_Open_Judgement(void) static Tellib_uint16_t LED_LED_Open_Judgement(void)
...@@ -584,12 +589,12 @@ static void LED_LED_Open_Execution(Tellib_uint16_t led_status) ...@@ -584,12 +589,12 @@ static void LED_LED_Open_Execution(Tellib_uint16_t led_status)
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_21_LED_Open_W, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_21_LED_Open_W, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_LED_STS(SEG_LED_Distance_Light,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_21_LED_Open_W, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_21_LED_Open_W, LED_OFF);
// SEG_SET_LED_STS(1,0); SEG_SET_LED_STS(SEG_LED_Distance_Light,0);
} }
} }
static Tellib_uint16_t LED_Cruise_Control_Judgement(void) static Tellib_uint16_t LED_Cruise_Control_Judgement(void)
...@@ -822,11 +827,12 @@ static void LED_SystIndicator_R_Execution(Tellib_uint16_t led_status) ...@@ -822,11 +827,12 @@ static void LED_SystIndicator_R_Execution(Tellib_uint16_t led_status)
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_System_Indicator_R, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_System_Indicator_R, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_LED_STS(SEG_LED_System_Light,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_System_Indicator_R, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_02_System_Indicator_R, LED_OFF);
SEG_SET_LED_STS(SEG_LED_System_Light,0);
} }
} }
static Tellib_uint16_t LED_P_GEAR_G_Judgement(void) static Tellib_uint16_t LED_P_GEAR_G_Judgement(void)
...@@ -904,11 +910,12 @@ static void LED_Charging_Connection_R_Execution(Tellib_uint16_t led_s ...@@ -904,11 +910,12 @@ static void LED_Charging_Connection_R_Execution(Tellib_uint16_t led_s
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_32_Charging_Connection_R, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_32_Charging_Connection_R, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_LED_STS(SEG_LED_HHT_Charger,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_32_Charging_Connection_R, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_32_Charging_Connection_R, LED_OFF);
SEG_SET_LED_STS(SEG_LED_HHT_Charger,0);
} }
} }
...@@ -931,10 +938,11 @@ static void LED_Power_Battery_Failure_R_Execution(Tellib_uint16_t led ...@@ -931,10 +938,11 @@ static void LED_Power_Battery_Failure_R_Execution(Tellib_uint16_t led
if ( led_status == 1u ) if ( led_status == 1u )
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_01_Power_Battery_Failure_R, LED_ON); LED_Driver_Channel_Set(LampChannel_0, LampCh0_01_Power_Battery_Failure_R, LED_ON);
// SEG_SET_LED_STS(1,1); SEG_SET_LED_STS(SEG_LED_Power_Battery_Failure,1);
} }
else else
{ {
LED_Driver_Channel_Set(LampChannel_0, LampCh0_01_Power_Battery_Failure_R, LED_OFF); LED_Driver_Channel_Set(LampChannel_0, LampCh0_01_Power_Battery_Failure_R, LED_OFF);
SEG_SET_LED_STS(SEG_LED_Power_Battery_Failure,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