Commit e34f3caf authored by 时昊's avatar 时昊

feat:增加按键大小计,语言切换,蓝牙开关功能和接口函数

parent 4a8123c2
...@@ -173,6 +173,11 @@ void Key_Auto_Save(void) ...@@ -173,6 +173,11 @@ void Key_Auto_Save(void)
void Key_Event_Short_Press_Left(void)//选择 void Key_Event_Short_Press_Left(void)//选择
{ {
if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_MAIN_ITEM)//切换大小计
{
Menu_Service(MENU_KEY_FUNCTION_1_SHORT);
}
if((Menu_Get_Current_Cursor_Information() == MENU_ITEM_DISPLAY_MODE)|| if((Menu_Get_Current_Cursor_Information() == MENU_ITEM_DISPLAY_MODE)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_SETTING)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_SETTING)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_CONNECT)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_CONNECT)||
...@@ -196,8 +201,7 @@ void Key_Event_Short_Press_Left(void)//选择 ...@@ -196,8 +201,7 @@ void Key_Event_Short_Press_Left(void)//选择
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_2)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_2)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_1)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_1)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_AUTO)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_AUTO)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_OPEN)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_OPEN_CLOSE)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_CLOSE)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_SYNC)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_SYNC)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_BACK)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_BACK)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_TENB)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_TENB)||
...@@ -205,6 +209,10 @@ void Key_Event_Short_Press_Left(void)//选择 ...@@ -205,6 +209,10 @@ void Key_Event_Short_Press_Left(void)//选择
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_TENB)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_TENB)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_BIT)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_BIT)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_BACK)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_BACK)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_TENB_SET)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_BIT_SET)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_TENB_SET)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_BIT_SET)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_UNIT_KM)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_UNIT_KM)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_UNIT_MILE)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_UNIT_MILE)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_LANGUAGE_CHINESE)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_LANGUAGE_CHINESE)||
...@@ -212,13 +220,6 @@ void Key_Event_Short_Press_Left(void)//选择 ...@@ -212,13 +220,6 @@ void Key_Event_Short_Press_Left(void)//选择
{ {
Menu_Service(MENU_KEY_DOWN_SHORT); Menu_Service(MENU_KEY_DOWN_SHORT);
} }
else
{
if(Menu_Get_Current_Cursor_Information() == MENU_ITEM_MAIN_ITEM)//切换大小计
{
Menu_Service(MENU_KEY_FUNCTION_1_SHORT);
}
}
} }
} }
...@@ -243,8 +244,7 @@ void Key_Event_Short_Press_Right(void)//确认 ...@@ -243,8 +244,7 @@ void Key_Event_Short_Press_Right(void)//确认
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_2)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_2)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_1)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_1)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_AUTO)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BACKLIGHT_AUTO)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_OPEN)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_OPEN_CLOSE)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_CLOSE)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_SYNC)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_SYNC)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_BACK)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_BLUETOOTH_BACK)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_TENB)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_TENB)||
...@@ -252,11 +252,16 @@ void Key_Event_Short_Press_Right(void)//确认 ...@@ -252,11 +252,16 @@ void Key_Event_Short_Press_Right(void)//确认
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_TENB)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_TENB)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_BIT)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_BIT)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_BACK)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_BACK)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_TENB_SET)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_HOUR_BIT_SET)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_TENB_SET)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_CLOCK_MIN_BIT_SET)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_UNIT_KM)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_UNIT_KM)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_UNIT_MILE)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_UNIT_MILE)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_LANGUAGE_CHINESE)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_LANGUAGE_CHINESE)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_LANGUAGE_ENGLISH)|| (Menu_Get_Current_Cursor_Information() == MENU_ITEM_LANGUAGE_ENGLISH)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_PHONE_CONNECT_WIN)) (Menu_Get_Current_Cursor_Information() == MENU_ITEM_PHONE_CONNECT_SET)||
(Menu_Get_Current_Cursor_Information() == MENU_ITEM_PHONE_CONNECT_APP))
{ {
Menu_Service(MENU_KEY_CONFIRM_SHORT); Menu_Service(MENU_KEY_CONFIRM_SHORT);
} }
...@@ -334,3 +339,18 @@ uint8_t Get_Dis_Unit(void) ...@@ -334,3 +339,18 @@ uint8_t Get_Dis_Unit(void)
{ {
return MenuData.Unit; //0km,1mile return MenuData.Unit; //0km,1mile
} }
uint8_t Get_Dis_OdoAndTrip(void)
{
return MenuData.OdoAndTrip; //0Odo,1Trip
}
uint8_t Get_Dis_Bluetooth_Open_Close(void)
{
return MenuData.Bluetooth_Open_Close; //0开,1关
}
uint8_t Get_Dis_Language(void)
{
return MenuData.Language; //0中文,1英文
}
\ No newline at end of file
...@@ -36,12 +36,15 @@ typedef struct ...@@ -36,12 +36,15 @@ typedef struct
uint16_t Back_Time_Right; uint16_t Back_Time_Right;
uint8_t Back_Time_Right_Flag; uint8_t Back_Time_Right_Flag;
uint8_t Back_Time_Left_Flag; uint8_t Back_Time_Left_Flag;
uint8_t Set_Hour; uint8_t Dis_Hour_Tenb;
uint8_t Set_Minute; uint8_t Dis_Hour_Bit;
uint8_t Dis_Hour; uint8_t Dis_Minute_Tenb;
uint8_t Dis_Minute; uint8_t Dis_Minute_Bit;
uint8_t Unit; uint8_t Unit;
uint8_t Language; uint8_t Language;
uint8_t OdoAndTrip;
uint8_t Bluetooth_Open_Close;
uint8_t Clock_Flash;
}_Menu_Data; }_Menu_Data;
extern uint8_t ClearODO_Flag; extern uint8_t ClearODO_Flag;
...@@ -65,4 +68,11 @@ void TYW_RESET_ODO(void); ...@@ -65,4 +68,11 @@ void TYW_RESET_ODO(void);
uint8_t Get_Dis_Unit(void); uint8_t Get_Dis_Unit(void);
void Key_TimeOut_Service(void); void Key_TimeOut_Service(void);
void Key_Clear_Time(void); void Key_Clear_Time(void);
uint8_t Get_Dis_OdoAndTrip(void);
uint8_t Get_Dis_Bluetooth_Open_Close(void);
uint8_t Get_Dis_Language(void);
#endif #endif
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