Commit c2c98826 authored by 何锐's avatar 何锐

feat:增加自动大灯开启关闭按键

parent 19e2b1d7
...@@ -116,17 +116,22 @@ void Key_Operation_SW3(Key_Event_en_t enKeyEvent) ...@@ -116,17 +116,22 @@ void Key_Operation_SW3(Key_Event_en_t enKeyEvent)
{ {
if ( enKeyEvent == KEY_EVENT_SHORT_PRESS ) if ( enKeyEvent == KEY_EVENT_SHORT_PRESS )
{ {
if(BCMLED.Sig.AutoLamp)
{
BCMLED.Sig.AutoLamp = 0x00;
}
else
{
BCMLED.Sig.AutoLamp = 0x01; //自动大灯开启
}
} }
else if ( enKeyEvent == KEY_EVENT_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_LONG_PRESS )
{ {
} }
else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS ) else if ( enKeyEvent == KEY_EVENT_SUPER_LONG_PRESS )
{ {
if(Get_Display_Type( ) == 2)
{
MENU_CHECK_STEP_SUB( );
}
} }
else else
{ {
......
...@@ -1108,7 +1108,6 @@ uint32_t R485_Send_test(void) ...@@ -1108,7 +1108,6 @@ uint32_t R485_Send_test(void)
case 0: case 0:
BCMLED.Sig.Lamp = 0x01; //左转 BCMLED.Sig.Lamp = 0x01; //左转
BCMLED.Sig.FlickerFrequency = 0x05; //频率 BCMLED.Sig.FlickerFrequency = 0x05; //频率
u32sendendflag = R485_Send(0x09, BCMLED.Msg, sizeof(BCMLED.Msg));
// Dashboard.Sig.textbit2 = 0x0A; //车速 // Dashboard.Sig.textbit2 = 0x0A; //车速
// Dashboard.Sig.textbit7 = 0x7F; //P档 // Dashboard.Sig.textbit7 = 0x7F; //P档
...@@ -1116,6 +1115,8 @@ uint32_t R485_Send_test(void) ...@@ -1116,6 +1115,8 @@ uint32_t R485_Send_test(void)
break; break;
case 1: case 1:
BCMLED.Sig.Lamp = 0x00; //左转
BCMLED.Sig.FlickerFrequency = 0x00; //频率
break; break;
case 2: case 2:
...@@ -1152,5 +1153,7 @@ uint32_t R485_Send_test(void) ...@@ -1152,5 +1153,7 @@ uint32_t R485_Send_test(void)
break; break;
} }
u32sendendflag = R485_Send(0x09, BCMLED.Msg, sizeof(BCMLED.Msg));
return u32sendendflag; return u32sendendflag;
} }
\ No newline at end of file
...@@ -1108,14 +1108,13 @@ typedef union ...@@ -1108,14 +1108,13 @@ typedef union
struct struct
{ {
uint8_t text1 : 8; uint8_t text1 : 8;
uint8_t text2 : 8; uint8_t HLLamp : 7;
uint8_t AutoLamp : 1;
uint8_t text3 : 8; uint8_t text3 : 8;
uint8_t text4 : 8; uint8_t text4 : 8;
uint8_t text5 : 8; uint8_t text5 : 8;
uint8_t Lamp : 4; uint8_t Lamp : 4;
uint8_t FlickerFrequency : 4; uint8_t FlickerFrequency : 4;
uint8_t text7 : 8; uint8_t text7 : 8;
}Sig; }Sig;
}_BCMLED; }_BCMLED;
......
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