Commit dc2fadd0 authored by wangxuhui's avatar wangxuhui

Merge branch 'dev' into 'master_dev'

Dev

See merge request !78
parents b0b30463 ce9abc76
......@@ -979,9 +979,9 @@
<FilePath>..\..\..\..\Source\Component\AMT630H\PicBin.h</FilePath>
</File>
<File>
<FileName>kei_S1.0.5_20240822.lib</FileName>
<FileName>kei_S1.0.6_20240827.lib</FileName>
<FileType>4</FileType>
<FilePath>..\..\..\..\Source\Component\AMT630H\kei_S1.0.5_20240822.lib</FilePath>
<FilePath>..\..\..\..\Source\Component\AMT630H\kei_S1.0.6_20240827.lib</FilePath>
</File>
<File>
<FileName>UartProtocol.h</FileName>
......
......@@ -104,11 +104,11 @@ void Data_Light_Res_service(Light_uint8_t deltaTime)//获取光感阻值,并
LightRes += 5;
}
}
timeCount += deltaTime;
if(LightADCompleteFlg)
else
{
LightRes = 32000;
}
/*由小到大插入数据*/
for (i = 0; i < NtcDataCount; i++)
{
......
......@@ -11,15 +11,12 @@ _PICID_Struct PicObj;
_QRCODE_RECT QRCode_Rect;
const uint8_t HJBlueToothName[9]= {"HJ750"};
uint8_t UUIDConfigBuf[22] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00};
//"600032023120100000995"
// uint8_t sjhja[20] = {0};
// uint8_t PhoneName[100] = {0};
// uint8_t BlueConnectStatus;
// ee_uint16_t juasfha;
void TextService(void);
void BlueToothService()
void BlueToothService(void)
{
// SetUUIDTimes++;
if(Get_Dis_Bluetooth_Open_Close() == 0)
......@@ -53,11 +50,47 @@ void BlueToothService()
{
Menu_Change_Branch_To_Item(MENU_BRANCH_ANIMATION,MENU_ITEM_MAIN_ITEM);
}
SetUUIDData((char *)UUIDConfigBuf, 22);
if (OTA_Update_Flag == 1)
{
QRCode_Rect.x = 650;
QRCode_Rect.y = 210;
}
else
{
QRCode_Rect.x = QRCode_X;
QRCode_Rect.y = QRCode_Y;
}
// QRCode_Rect.x = 650;
// QRCode_Rect.y = 210;
QRCode_Rect.height = 240;
QRCode_Rect.width = 240;
SetScreenType(QRCode_TYPE, QRCode_Rect);
if(Menu_Get_Current_Cursor_Information() != MENU_ITEM_FAULT_INFORMATION)
{
OTA_Update_Flag = 0;
}
if(OTA_Update_Flag == 1)
{
if(OTA_Update_Count_Open < 5)
{
SetUpdateCtrl(1,QRCode_Rect);
OTA_Update_Count_Open++;
}
OTA_Update_Count_Close = 0;
}
else
{
if(OTA_Update_Count_Close < 5)
{
SetUpdateCtrl(0,QRCode_Rect);
OTA_Update_Count_Close++;
}
OTA_Update_Count_Open=0;
}
SetTaskbarHeight(150);
SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
TextService();
// SetBlueToothName((uint8_t *)HJBlueToothName, sizeof(HJBlueToothName));
// SetUUIDData((char *)UUIDConfigBuf, 22);
// BlueConnectStatus = GetBlueToothPowerSTATE();
// juasfha = BlueToothPhoneData.BlueToothPhoneSate;
......@@ -136,33 +169,3 @@ void TextService(void)
}
}
void OTAUpdateService(void)
{
QRCode_Rect.x = 178;
QRCode_Rect.y = 130;
QRCode_Rect.height = 240;
QRCode_Rect.width = 240;
SetScreenType(QRCode_TYPE, QRCode_Rect);
if(Menu_Get_Current_Cursor_Information() != MENU_ITEM_FAULT_INFORMATION)
{
OTA_Update_Flag = 0;
}
if(OTA_Update_Flag == 1)
{
if(OTA_Update_Count_Open < 5)
{
SetUpdateCtrl(1,QRCode_Rect);
OTA_Update_Count_Open++;
}
OTA_Update_Count_Close = 0;
}
else
{
if(OTA_Update_Count_Close < 5)
{
SetUpdateCtrl(0,QRCode_Rect);
OTA_Update_Count_Close++;
}
OTA_Update_Count_Open=0;
}
}
......@@ -23,17 +23,22 @@ typedef struct {
uint16_t Vaild;
}TEXT_STRUCT;
/*QRCode X Y height Width*/
#define QRCode_X 457
#define QRCode_Y 134
#define QRCode_X 178
#define QRCode_Y 130
#define QRCode_HEIGHT 240
#define QRCode_WIDTH 240
#define QRCode_TYPE Square_Instrument
extern void BlueToothService(void);
extern void OTAUpdateService(void);
extern void OTAUpdateInit(void);
extern _PICID_Struct PicObj;
extern _QRCODE_RECT QRCode_Rect;
extern uint8_t PhoneNumber[40];
extern uint8_t CurBlueToothPhoneName[100];
extern TEXT_STRUCT TextPara[];
#endif
\ No newline at end of file
......@@ -25,7 +25,7 @@ const st_CANMsgAttribute CAN_CH0_CAN_MSG_CONST_ARRAY[CAN_CH0_ID_TOTAL_MAX] =
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
{0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u, 0x00u},
5000ul,
500ul,
0x111ul,
(( void * )0),
(( void * )0),
......
......@@ -289,26 +289,26 @@ void Data_Engine_Speed_Processing_Service ( void )
}
}
DataESpeedDisp = DataESPeedDamping.Speed;
// //第4步 增加回差
// if (DataESpeedDisp <= 80)
// {
// DataESpeedDisp = DataESPeedDamping.Speed;
// }
// else
// {
// if ( DataESpeedDisp < DataESPeedDamping.Speed )
// {
// DataESpeedDisp = DataESPeedDamping.Speed;
// }
// else
// {
// Delta = DataESpeedDisp - DataESPeedDamping.Speed;
// if ( Delta >= DATA_ESPEED_HYSTERESIS )
// {
// DataESpeedDisp = DataESPeedDamping.Speed;
// }
// }
// }
//第4步 增加回差
if (DataESpeedDisp <= 80)
{
DataESpeedDisp = DataESPeedDamping.Speed;
}
else
{
if ( DataESpeedDisp < DataESPeedDamping.Speed )
{
DataESpeedDisp = DataESPeedDamping.Speed;
}
else
{
Delta = DataESpeedDisp - DataESPeedDamping.Speed;
if ( Delta >= DATA_ESPEED_HYSTERESIS )
{
DataESpeedDisp = DataESPeedDamping.Speed;
}
}
}
}
uint8_t Get_EngineValid(void)
......
......@@ -321,12 +321,22 @@ void Data_Vehicle_Speed_Processing_Service(void)
}
// 第3步:生成显示车速
DataVSpeedHysteresis = DataVSPeedDamping.Speed;
if ((DataVSPeedDamping.Speed >= DataVSpeedHysteresis) || (DataVSPeedDamping.Speed < DATA_VSPEED_HYSTERESIS))
{
DataVSpeedHysteresis = DataVSPeedDamping.Speed;
}
else
{
if (DataVSpeedHysteresis - DataVSPeedDamping.Speed >= DATA_VSPEED_HYSTERESIS)
{
DataVSpeedHysteresis = DataVSPeedDamping.Speed;
}
}
VSpeedCal = ( uint32_t )DataVSpeedHysteresis;
if ( DataVSpeedValid )
{
// if ( DataVSpeedValid )
// {
VSpeedCal *= 105;
VSpeedCal /= 100;
// if((VSpeedCal % 10) >= 5)
......@@ -334,11 +344,11 @@ void Data_Vehicle_Speed_Processing_Service(void)
// VSpeedCal += 5; /* 四舍五入 */
// }
DataVSpeedDisp = ( uint16_t )VSpeedCal;
}
else
{
DataVSpeedDisp = 0;
}
// }
// else
// {
// DataVSpeedDisp = 0;
// }
}
/*车速有效位:有效=1,无效=0*/
......
#include "FaultCode.h"
#include "CAN_CH0_CAN_Communication_Matrix.h"
static _st_Init FaultCodeInit;
static uint16_t u16FaultCodeDtcCount = 0;
static uint16_t u16FaultCodeDtcCountBack = 0;
......@@ -395,3 +396,21 @@ uint8_t Get_FaultCode_Valid(void)
{
return u8FaultCodeValid;
}
/*
*NAME : Get_FaultCode_Lost()
*FUNCTION : 获取发送故障码的CAN是否掉线
*RETURN : 0-LOST 1-ONLINE
*/
uint8_t Get_FaultCode_Lost(void)
{
uint8_t u8FaultCodeLost = 0;
if(CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CH0_402_Msg_Count) == CAN_SIG_LOST)
{
u8FaultCodeLost = 0;
}
else
{
u8FaultCodeLost = 1;
}
return u8FaultCodeLost;
}
......@@ -298,8 +298,8 @@ void Amt630hInit(void)
AMT630H_InitTime = 0;
AMT630H_Animation_Start = 0;
AMT630H_Animation_Finish = 0;
AMT630H_Animation_DispPic = 0;
// AMT630H_Animation_Finish = 0;
// AMT630H_Animation_DispPic = 0;
AMT630H_Animation_RefreshTime = 0;
AMT630H_Animation_RefreshTime_default = AMT630H_ANIMATION_REFRESHTIME_DEF(0);
......@@ -462,6 +462,9 @@ void AMT630H_Main(void)
{
AMT630H_RefreshTime = 0;
//AMT630H_GUI_DisplayProc();
SetPageGuid(GRAPHICS_PAGE_0, 1, 0, 0);
SetPagePic(GRAPHICS_PAGE_0, Pic_0001_0_0);
PackedTransfer_Page();
}
}
}
......@@ -476,4 +479,22 @@ unsigned char AMT630H_isInitFinish(void)
{
return 0;
}
}
\ No newline at end of file
}
void AMT630H_Animation_IGON(void)
{
AMT630H_Animation_Finish = 0;
AMT630H_Animation_DispPic = 0;
}
unsigned char AMT630H_Animation_Finish_Flage(void)
{
if(AMT630H_Animation_Finish == 1)
{
return 1;
}
else
{
return 0;
}
}
......@@ -37,6 +37,7 @@ void AMT630H_Sleep(void);
static void AMT630H_AliveCounterMonitor(void);
void AMT630H_Main(void);
unsigned char AMT630H_isInitFinish(void);
extern uint32_t Amt630hInitTimerCnts ;
unsigned char AMT630H_Animation_Finish_Flage(void);
void AMT630H_Animation_IGON(void);
#endif
......@@ -61,6 +61,7 @@ extern void AMT630H_GUI_SELFCHECK_STS_INIT(void);
extern uint8_t g_u8Display_Mode;
extern uint8_t g_u8Display_Mode_select;
extern uint8_t g_u8SelfCheck;
......
......@@ -117,7 +117,8 @@ static const uint16_t PicIndexData[] = {
Pic_0901, 12, 653, 164, Pic_0901, 12, 667, 164, Pic_0902, 13, 638, 293, Pic_0903, 15, 637, 293, Pic_0904, 15, 637, 293, Pic_0905, 21, 634, 293, Pic_0906, 15, 637, 293, Pic_0907, 14, 637, 293, Pic_0908, 15, 637, 293, Pic_0909, 13, 638, 292,
Pic_0910, 13, 639, 293, Pic_0911, 17, 636, 292, Pic_0912, 13, 639, 293, Pic_0913, 17, 636, 292, Pic_0914, 13, 638, 293, Pic_0915, 16, 636, 293, Pic_0916, 11, 640, 293, Pic_0917, 14, 639, 293, Pic_0899, 11, 638, 293, Pic_0918, 3, 643, 293,
Pic_0898, 14, 637, 293, Pic_0897, 15, 637, 292, Pic_0919, 11, 640, 293, Pic_0920, 12, 639, 293, Pic_0921, 14, 638, 293, Pic_0922, 14, 638, 292, Pic_0923, 14, 638, 293, Pic_0924, 15, 637, 293, Pic_0925, 221, 501, 160, Pic_0926, 50, 619, 240,
Pic_0926, 50, 619, 175, Pic_0927, 50, 619, 240, Pic_0927, 50, 619, 175, Pic_0928, 75, 894, 310, Pic_0929, 75, 894, 310, Pic_0930, 64, 612, 240, Pic_0930, 64, 612, 175, Pic_0931, 64, 612, 240, Pic_0931, 64, 612, 175,
Pic_0926, 50, 619, 175, Pic_0927, 50, 619, 240, Pic_0927, 50, 619, 175, Pic_0928, 75, 894, 310, Pic_0929, 75, 894, 310, Pic_0930, 64, 612, 240, Pic_0930, 64, 612, 175, Pic_0931, 64, 612, 240, Pic_0931, 64, 612, 175, Pic_0932, 777, 124, 85,
Pic_0933, 317, 101, 210, Pic_0934, 209, 102, 260, Pic_0935, 461, 36, 367, Pic_0936, 350, 92, 367, Pic_0937, 323, 564, 521, Pic_0938, 41, 62, 399, Pic_0939, 41, 62, 401,
};
#define PicIndexData_LEN 14888
//uint32_t PicIndexDataLEN = 0;
......
#ifndef PICBIN_H
#define PICBIN_H
/* Flash Bin Version:20240826 2024-08-26 19:25:18 Compression ratio:70.00% */
/* Flash Bin Version:20240902 2024-09-02 13:18:34 Compression ratio:70.00% */
#define Pic_0001 1
#define Pic_0002 2
#define Pic_0003 3
......@@ -933,6 +933,14 @@
#define Pic_0929 929
#define Pic_0930 930
#define Pic_0931 931
#define Pic_0932 932
#define Pic_0933 933
#define Pic_0934 934
#define Pic_0935 935
#define Pic_0936 936
#define Pic_0937 937
#define Pic_0938 938
#define Pic_0939 939
enum {
Pic_0001_0_0 = 0,
......@@ -2109,9 +2117,17 @@ enum {
Pic_0930_612_175,
Pic_0931_612_240,
Pic_0931_612_175,
Pic_0932_124_85,
Pic_0933_101_210,
Pic_0934_102_260,
Pic_0935_36_367,
Pic_0936_92_367,
Pic_0937_564_521,
Pic_0938_62_399,
Pic_0939_62_401,
};
#define PIC_INDEX_DATA_CRC 0xC89CDFB5
#define PIC_INDEX_DATA_CRC 0x53F47F46
extern void User_PicIndexDataInit(void);
#endif
......@@ -31,6 +31,9 @@ extern uint8_t GetAliveCounter(ALIVE_COUNTER_TYPE n); /* 0:ALIVE_COUNTER_COMM, 1
extern uint32_t GetCrcErrCnts(void);
extern uint32_t GetRecvLenErrCnts(void);
extern uint8_t GetLcdInitSt(void);
extern uint8_t GetCameraSignalSt(void);
extern uint8_t GetVideoCaptureSt(void);
extern uint8_t GetAmt630InBoot(void);
extern uint8_t GetLcdInitStB(void);
extern uint8_t *GetUartRecvData(uint32_t *UartRecvBufLen, uint32_t *UartRecvPos);
extern void UartSendData(uint8_t *data, uint32_t len);
......@@ -190,6 +193,11 @@ extern void PackedTransfer_InitPointer(POINTER_ENUM PointerN, uint8_t *data, uin
extern uint8_t GetPointerInitSt(POINTER_ENUM PointerN);
extern void PackedTransfer_SetPointerDestVal(POINTER_ENUM PointerN, uint16_t DestVal, uint8_t NoDamping); /* DestVal:0~1000, NoDamping: 0-have damping, 1:no damping */
extern uint16_t GetPointerCurVal(POINTER_ENUM PointerN); /* CurVal:0~1000 */
#define POINTER_NUM_LIST_MAX 20
extern void SetPointerNumPic(POINTER_ENUM PointerN, uint8_t n, uint16_t PicIndex, uint16_t PointerVal);
extern void SetPointerNumZoomPara(POINTER_ENUM PointerN, uint16_t ZoomRange, float ZoomMax);
extern void PackedTransfer_PointerNumData(POINTER_ENUM PointerN);
/* Pointer end */
/* Page Data */
......@@ -227,21 +235,26 @@ typedef enum {
TFT_ROT_270,
} TFT_ROT_TYPE;
#define TEXT_ROT_SCALE (r, s) ((((r) & 0xffff) << 16) | (s) & 0xffff)
#define TEXT_ROT_SCALE (r, s) ((((r) & 0xffff) << 16) | ((s) & 0xffff))
#define TEXT_COLOR(r, g, b, a) ((((r) & 0xff) << 24) | (((g) & 0xff) << 16) | (((b) & 0xff) << 8) | ((a) & 0xff))
#define TEXT_LINE_OFFSET(x, y) ((((x) & 0xffff) << 16) | ((y) & 0xffff))
#define GROUP_ALIGN_LEFT 0x0
#define GROUP_ALIGN_CENTER 0x40
extern void SetPageGuid(GRAPHICS_PAGE_ENUM page, uint8_t h, uint8_t m, uint8_t l);
extern void SetPageBackground(GRAPHICS_PAGE_ENUM page, uint16_t PicIndex);
extern void SetPagePic(GRAPHICS_PAGE_ENUM page, uint16_t PicIndex);
extern void SetPagePicPointerNum(GRAPHICS_PAGE_ENUM page, POINTER_ENUM PointN, uint16_t PicIndex);
extern void SetPagePicFree(GRAPHICS_PAGE_ENUM page, uint16_t PicIndex, int16_t PosX, int16_t PosY);
extern void SetPagePicFreeAppend(GRAPHICS_PAGE_ENUM page, uint16_t pic, int16_t PosX, int16_t PosY);
extern void SetPagePicGroupExtParaOriCoor(GRAPHICS_PAGE_ENUM page, uint8_t PicNum, uint16_t NumZeroPic);
extern void SetPagePicGroup(GRAPHICS_PAGE_ENUM page, int16_t Interval, int16_t PosX, int16_t PosY, uint16_t *PicList, uint32_t Align_Num, uint16_t Dot_Itv, TFT_ROT_TYPE TftRot);
extern void SetPageText(GRAPHICS_PAGE_ENUM page, uint16_t LabelNum, int16_t PosX, int16_t PosY, int16_t MaxX, TEXT_ALIGN_TYPE AlginType, uint32_t RotScale, uint32_t Color); /* TEXT_ROT_SCALE:use TEXT_ROT_SCALE macro, (r:0~3600); (s:-1000 ~ 1000, 0:no scale, 1 ~ 1000:zoom in, -1 ~ -1000:zoom out); Color:use TEXT_COLOR macro */
extern void SetPageText(GRAPHICS_PAGE_ENUM page, uint16_t LabelNum, int16_t PosX, int16_t PosY, int16_t MaxX, TEXT_ALIGN_TYPE AlginType, uint32_t RotScale, uint32_t Color, uint32_t LineOffset); /* TEXT_ROT_SCALE:use TEXT_ROT_SCALE macro, (r:0~3600); (s:-1000 ~ 1000, 0:no scale, 1 ~ 1000:zoom in, -1 ~ -1000:zoom out); Color:use TEXT_COLOR macro; LineOffset:use TEXT_LINE_OFFSET macro */
extern void SetPagePointerPic(GRAPHICS_PAGE_ENUM page, POINTER_ENUM PointN, uint16_t PicIndex);
extern void SetPagePointerSePic(GRAPHICS_PAGE_ENUM page, POINTER_ENUM PointN);
extern void SetPagePointerTrackPic(GRAPHICS_PAGE_ENUM page, POINTER_ENUM PointN, uint16_t PicIndex);
extern void SetPageSliderNumPic(GRAPHICS_PAGE_ENUM page, uint8_t SliderNum);
extern void PackedTransfer_PicDirectDraw(uint32_t PicIndex, uint8_t Valid);
extern void PackedTransfer_BgJpg(uint32_t PicIndex);
extern void PackedTransfer_Page(void);
......@@ -255,9 +268,6 @@ extern void PackedTransfer_ComposeData(uint8_t *data, uint8_t len);
/* Label List */
extern uint8_t GetLanguageInitSt(void);
extern uint8_t GetCameraImageValid(void);
extern uint8_t GetItuTakeVideo(void);
extern uint8_t GetCarlinkLcdTack(void);
extern void PackedTransfer_InitLanguageFont(uint8_t Language, uint8_t Font);
extern void PackedTransfer_LabelsList(uint16_t LabelNum, uint8_t *LabelBuf, uint32_t LabelLen);
/* Label List end */
......@@ -274,15 +284,16 @@ extern void PackedTransfer_CheckFlashForceDisplay(FLASH_CHECK_FORCE_DISPLAY_TYPE
/* Flash Check end */
/* Video Input */
extern void PackedTransfer_VedioInputOn(void);
extern void PackedTransfer_VedioInputOn(uint32_t PosX, uint32_t PosY, uint32_t Wdith, uint32_t Height, uint32_t CutX, uint32_t CutY);
extern void PackedTransfer_VedioInputOff(void);
extern void PackedTransfer_VedioInputArk7116OutputOff(void);
extern void PackedTransfer_VedioInputArk7116OutputOn(void);
/* Video Input end */
/* Get Mcu or Backup Data */
typedef enum {
REQ_DATA,
GET_STATUS,
GET_OFFSET,
GET_APP_DATA_OFFSET,
GET_BACKUP_DATA_OFFSET,
GET_BACKUP_DATA_CRC,
......@@ -303,6 +314,15 @@ extern void PackedTransfer_GetBackupDataCrc(uint32_t addr, uint32_t len);
extern void PackedTransfer_WriteBackupData(uint32_t addr, uint8_t *data, uint16_t len);
/* Get Mcu or Backup Data end */
/* Set tft io mode */
extern void PackedTransfer_SetTftIoMode(uint8_t st); /*st 0:normal gpio, 1:TFT io*/
/* Set tft io mode end */
/* Slider Num */
extern void PackedTransfer_SliderNumData(uint8_t n, uint8_t *data, uint32_t len);
extern void PackedTransfer_SliderNumDestVal(uint8_t n, uint16_t val, uint8_t ForceUpdate, uint8_t DisplayValid);
/* Slider Num end */
enum {NUM_0, NUM_1, NUM_2, NUM_3, NUM_4, NUM_5, NUM_6, NUM_7, NUM_8, NUM_9, NUM_POINT, NUM_LINE};
typedef struct {
const uint16_t *NumList;
......@@ -349,7 +369,7 @@ enum BlueToothStatus
{
BlueTooth_Undefine = 0u,
BlueTooth_DisConnect,
BlueTooth_Connection,
BlueTooth_Connection
};
enum ECNaviIcon
......@@ -510,5 +530,6 @@ extern void SetUpdateCtrl(uint8_t cmddata,_QRCODE_RECT qrcode_obj);
extern void SetBlueToothName(uint8_t *data,uint8_t len);
extern void SetTaskbarHeight(uint16_t height);
extern void Set_Pro_Unique_Identifier(uint8_t *data,uint8_t len);
extern uint8_t GetUpdate(void);
#endif
......@@ -5,7 +5,7 @@
__align(4)
#define BACK_MENU_TIME 1000
#define BACK_MENU_TIME 800
_Menu_Data MenuData;
RTC_TimeTypeDef RTC_TimeStruct;
RTC_DateTypeDef RTC_DateStruct;
......@@ -147,7 +147,7 @@ void Key_KL30_Init_EXample(void)
Key_Parameter_Set_Short_Press_1_Time(50U,2000U);
Key_Parameter_Set_Short_Press_2_Time(3000U,6000U);
Key_Parameter_Set_Long_Press_1_Time(7000U);
Key_Parameter_Set_Long_Press_1_Time(2000U);
Key_Parameter_Set_Long_Press_2_Time(8000U);
Key_Parameter_Set_Long_Press_3_Time(9000U);
Key_Parameter_Set_Long_Press_4_Time(10000U);
......@@ -163,7 +163,7 @@ void Key_Wakeup_Init_EXample(void)
Key_Parameter_Set_Short_Press_1_Time(50U,2000U);
Key_Parameter_Set_Short_Press_2_Time(3000U,6000U);
Key_Parameter_Set_Long_Press_1_Time(7000U);
Key_Parameter_Set_Long_Press_1_Time(2000U);
Key_Parameter_Set_Long_Press_2_Time(8000U);
Key_Parameter_Set_Long_Press_3_Time(9000U);
Key_Parameter_Set_Long_Press_4_Time(10000U);
......@@ -385,6 +385,18 @@ void Get_DisTime_Service(void)
}
void My_Key_Service(void)
{
/* 自检时不可操作按键 */
if(g_u8SelfCheck)
{
if(Get_ActualVechileSpeed() == 0)
{
Key_Service();
}
}
}
uint8_t Get_Dis_Hour_Time(void)
{
return MenuData.u8Dis_Hour;
......
......@@ -77,6 +77,8 @@ uint8_t Get_Dis_Bluetooth_Open_Close(void);
uint8_t Get_Dis_Language(void);
void Get_DisTime_Service(void);
extern void My_Key_Service(void);
#endif
......@@ -395,6 +395,13 @@ void Menu_Logic_Operation_Clock_Hour_Tenb_Set(Menu_Key_en_t enKeyType)
datmax = 2u;
datmin = 0u;
Menu_u8Data_Updata_Process(updataDir, datmax, datmin, 1u, (uint8_t*)&(MenuData.Dis_Hour_Tenb));
if(MenuData.Dis_Hour_Tenb == 2U)
{
if(MenuData.Dis_Hour_Bit > 3U)
{
MenuData.Dis_Hour_Bit = 0U;
}
}
MenuData.u8Dis_Hour = (MenuData.Dis_Hour_Tenb*10 + MenuData.Dis_Hour_Bit);
MenuData.u8Dis_Minute = (MenuData.Dis_Minute_Tenb*10 + MenuData.Dis_Minute_Bit);
}
......
......@@ -134,8 +134,10 @@ static void Power_IG_ON_Init(void)
Fuel_KL15_Init();
//RTE_GPIO_Set_Level(Blacklight_PWM, 1);
FaultCode_Init();
Amt630hInit();
AMT630H_Animation_IGON();
// Amt630hInit();
AMT630H_GUI_SELFCHECK_STS_INIT();
Menu_Service(MENU_KEY_TIMEOUT); /* 菜单回到初始界面 */
}
static void Power_Sleep_Init(void)
......
......@@ -336,14 +336,13 @@ static void LED_Fuel_Level_Low_Execution(Tellib_uint16_t led_status)
}
// uint16_t ECU_Engine_Temperature_R =0;
// uint32_t test_ECU_Engine_Temperature =0;
uint16_t test_ECU_Engine_Temperature =0;
/*信号来源:ECU_101 +硬线-P11 阻值 CAN>硬线*/
static Tellib_uint16_t LED_Coolant_Temperature_Judgement(void)
{
Tellib_uint16_t LED_STATE = 0u;
if (CAN_MSG_Status(&CAN_CH0_CanMsgOp, CAN_CH0_ID_CH0_101_Msg_Count) == CAN_SIG_LOST)
{
// ECU_Engine_Temperature_R = ADC_Read_Signal(ADC_CH_COOLANT_TEMP1_R);
if(ADC_Read_Signal(ADC_CH_COOLANT_TEMP1_R) <= 20)
{
ECU_Engine_Temperature_flag = 1;
......@@ -372,7 +371,7 @@ static Tellib_uint16_t LED_Coolant_Temperature_Judgement(void)
}
else
{
// test_ECU_Engine_Temperature = Get_CAN_CH0_ID_101_Sig_ECU_Engine_Temperature();
test_ECU_Engine_Temperature = Get_CAN_CH0_ID_101_Sig_ECU_Engine_Temperature();
if(Get_CAN_CH0_ID_101_Sig_ECU_Engine_Temperature() >= 120 )
{
ECU_Engine_Temperature_flag = 1;
......@@ -471,3 +470,41 @@ static void LED_E_Execution(Tellib_uint16_t led_status)
;
}
Tellib_uint8_t g_u8UDSreadprec = 0U;
Tellib_uint8_t g_u8UDSreadprec_flag = 0U;
Tellib_uint16_t g_u16UDSreadprec_time = 0U;
void UDS_Read_Preconditions(void)
{
if (g_u8UDSreadprec > 0)
{
g_u16UDSreadprec_time ++;
}
if(Get_TelltalesLedSts(em_LED_High_Beam))
{
if(g_u8UDSreadprec_flag == 0U)
{
g_u8UDSreadprec_flag = 1U;
}
}
else
{
if(g_u8UDSreadprec_flag == 1U)
{
g_u8UDSreadprec_flag = 0U;
if(g_u8UDSreadprec < 5U)
{
g_u8UDSreadprec++;
}
}
}
if(g_u8UDSreadprec < 5)
{
if(g_u16UDSreadprec_time > 100U)
{
g_u16UDSreadprec_time = 0U;
g_u8UDSreadprec = 0U;
}
}
}
......@@ -26,4 +26,9 @@ typedef enum
extern Tellib_uint8_t Auto_Start_Stop ;
void Telltales_Init(void);
Tellib_uint8_t Telltales_Voltage_Date(void);
extern Tellib_uint8_t g_u8UDSreadprec;
extern Tellib_uint16_t g_u16UDSreadprec_time;
extern void UDS_Read_Preconditions(void);
#endif
......@@ -35,7 +35,7 @@ void Sys_10ms_Tasks(void)
{
FaultCode_Service(10u);
Line_In_Debounce_Service(10u);
Key_Service();
My_Key_Service();
Data_Mileage_Write_EEPROM();
Key_Clear_Time();
Key_TimeOut_Service();
......@@ -54,6 +54,7 @@ void Sys_50ms_Tasks(void)
{
BackLight_Service();
Telltales_Management();
UDS_Read_Preconditions();
g_u8Cursor_Posittion = Menu_Get_Current_Cursor_Information();
......@@ -83,7 +84,6 @@ void Sys_100ms_Tasks(void)
Coolant_Cal_Sevice(100u);
Services_Mileage_Callback();
// Data_Mileage_Clear();
OTAUpdateService();
RTE_GPIO_Config(RTE_GPIO_PORT05_PIN04, GpioOut_High);
//BackLight_Process();
//TimerM_PWM_set_duty(TIMERM_COUNTER1, TIMERM_CHB, 100);
......
......@@ -6,6 +6,7 @@
日 期:2016.11.1
******************************************************************************/
#include "UDS_ISO14229_Server.h"
#include "Telltales\Telltales_user.h"
UDS_APP_RX_Union UDS_APP_RX;
UDS_APP_TX_Union UDS_APP_TX;
......@@ -211,7 +212,11 @@ void UDS_Process_Service_Request(void)
{
case 0x10: UDS_Service_10_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
break;
case 0x22: UDS_Service_22_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
case 0x22:
if(g_u8UDSreadprec >= 5U)
{
UDS_Service_22_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
}
break;
/* case 0x2E: UDS_Service_2E_Indication(UDS_APP_RX.A_PDU.TA_type, UDS_APP_RX.A_PDU.Length, UDS_APP_RX.A_PDU.Data);
break;
......
......@@ -29,9 +29,9 @@
/******************************************************************************
program version
*******************************************************************************/
#define SWV 0x104 // 0x100 = 1.00 software version 软件版本号
#define HWV 0x100 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x100 // 0x100 = 1.00 bootloader version boot程序版本号
#define SWV 0x105 // 0x100 = 1.00 software version 软件版本号
#define HWV 0x110 // 0x100 = 1.00 hardware version 硬件版本号
#define BTV 0x104 // 0x100 = 1.00 bootloader version boot程序版本号
#define internal_version (105UL) /* 内部版本号 105 -> 1.05 */
#define internal_date (20240805UL) /* 内部版本日期 20240805 -> 2024.08.05 */
......
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