Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
c0f75547
Commit
c0f75547
authored
Aug 29, 2024
by
李俭双
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:45356 This declaration of '%1s' hides a more global declaration.
parent
5516eb82
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
1 addition
and
253 deletions
+1
-253
TianYing.uvprojx
...ware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing.uvprojx
+0
-10
TianYing200.BAT
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
+0
-1
Application.h
Firmware/Source/Application/Application.h
+1
-1
FaultCode.c
Firmware/Source/Application/FaultCode/FaultCode.c
+0
-225
FaultCode.h
Firmware/Source/Application/FaultCode/FaultCode.h
+0
-16
No files found.
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing.uvprojx
View file @
c0f75547
...
...
@@ -513,16 +513,6 @@
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\Data_TPMS\Data_TPMS.h
</FilePath>
</File>
<File>
<FileName>
FaultCode.c
</FileName>
<FileType>
1
</FileType>
<FilePath>
..\..\..\..\Source\Application\FaultCode\FaultCode.c
</FilePath>
</File>
<File>
<FileName>
FaultCode.h
</FileName>
<FileType>
5
</FileType>
<FilePath>
..\..\..\..\Source\Application\FaultCode\FaultCode.h
</FilePath>
</File>
<File>
<FileName>
Data_Voltage.c
</FileName>
<FileType>
1
</FileType>
...
...
Firmware/Project/Cmsemicon/BAT32A239/MDK_ARM/TianYing200.BAT
View file @
c0f75547
...
...
@@ -15,7 +15,6 @@ SET CPU_CLOCK=0x00B71B00
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\can_user.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\can_app.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_tpms.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\faultcode.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\data_voltage.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\bluetooth.__i"
"C:\Keil_v5\ARM\ARMCC\Bin\ArmCC" --Via ".\objects\protocol_crc16.__i"
...
...
Firmware/Source/Application/Application.h
View file @
c0f75547
...
...
@@ -17,7 +17,7 @@
#include "Data_Coolant/Data_Coolant.h"
#include "Data_TPMS/Data_TPMS.h"
#include "Data_Voltage/Data_Voltage.h"
#include "FaultCode/FaultCode.h"
#include "FaultCode/code.h"
#include "BLUETOOTH/BlueTooth.h"
#include "BLUETOOTH/Protocol_CRC16.h"
...
...
Firmware/Source/Application/FaultCode/FaultCode.c
deleted
100644 → 0
View file @
5516eb82
#include "FaultCode\FaultCode.h"
#include "Application.h"
uint8_t
DTC_Amnt_Number
=
0
;
uint8_t
DTC_Amnt_Number_Count
=
0
;
uint8_t
FaultCode_Number
=
0
;
uint32_t
DTC_Data
[
FualtCodeMax
]
=
{
0
};
uint32_t
DTC_Data_Count
[
FualtCodeMax
]
=
{
0
};
uint32_t
FaultCode_Data
[
FualtCodeMax
]
=
{
0
};
uint32_t
u32Countbuf
=
0UL
;
void
Fault_Code_Receive
(
uint8_t
CopyData
[])
{
uint8_t
i
=
0
;
//ECU_FaultCode_Processing_Service();
}
uint8_t
FaultCode_Compare
(
uint32_t
FaultCode
,
uint32_t
*
CodeList
,
uint8_t
len
)
{
uint8_t
i
=
0
;
uint8_t
result
=
0
;
for
(
i
=
0
;
i
<
len
;
i
++
)
{
if
(
FaultCode
==
CodeList
[
i
])
{
result
=
1
;
}
}
return
result
;
}
static
void
Fault_Code_App_Swap
(
uint32_t
*
pData1
,
uint32_t
*
pData2
)
{
uint32_t
psw
;
if
((
*
pData1
)
>
(
*
pData2
))
{
psw
=
(
*
pData2
);
(
*
pData2
)
=
(
*
pData1
);
(
*
pData1
)
=
psw
;
}
}
static
void
Fault_Code_App_SortNByte
(
uint32_t
*
SortData
,
uint8_t
len
)
{
uint8_t
n
=
0
,
m
;
for
(;
n
<
len
-
1
;
n
++
)
{
for
(
m
=
n
+
1
;
m
<
len
;
m
++
)
{
Fault_Code_App_Swap
((
SortData
+
n
),
(
SortData
+
m
));
}
}
}
uint32_t
u32YZHDArray
[
200
];
uint32_t
u32YZHDArraycount
=
0
;
uint32_t
u32YZHDCount
=
0
;
void
ECU_FaultCode_Processing_Service
(
void
)
{
uint8_t
DTCH1
=
0
;
uint8_t
DTCM1
=
0
;
uint8_t
DTCH2
=
0
;
uint8_t
DTCM2
=
0
;
uint32_t
DTC1
=
0
;
uint32_t
DTC2
=
0
;
uint32_t
i
=
0
;
if
(
Common_Get_IG_Sts
()
==
COMMON_POWER_ON
)
{
if
(
CAN_MSG_Status
(
&
CAN_CH0_CanMsgOp
,
CAN_CH0_ID_CAN_0x402_Msg_Count
)
==
CAN_SIG_LOST
)
{
memset
(
FaultCode_Data
,
0
,
FaultCode_Number
);
FaultCode_Number
=
0
;
}
else
{
u32YZHDCount
=
0
;
DTCH1
=
Get_CAN_CH0_ID_402_Sig_ECU_DTCH1
();
DTCM1
=
Get_CAN_CH0_ID_402_Sig_ECU_DTCM1
();
DTCH2
=
Get_CAN_CH0_ID_402_Sig_ECU_DTCH2
();
DTCM2
=
Get_CAN_CH0_ID_402_Sig_ECU_DTCM2
();
DTC_Amnt_Number
=
Get_C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=
0
;
DTC_Data
[
i
]
=
0
;
}
DTC_Amnt_Number_Count
=
0
;
}
if
(
DTC_Amnt_Number_Count
<
DTC_Amnt_Number
)
{
if
((
DTC1
!=
0
)
&&
(
FaultCode_Compare
(
DTC1
,
&
DTC_Data_Count
[
0
],
DTC_Amnt_Number_Count
)
==
0
))
{
DTC_Data_Count
[
DTC_Amnt_Number_Count
]
=
DTC1
;
DTC_Amnt_Number_Count
++
;
Fault_Code_App_SortNByte
(
DTC_Data_Count
,
DTC_Amnt_Number_Count
);
}
}
if
(
DTC_Amnt_Number_Count
<
DTC_Amnt_Number
)
{
if
((
DTC2
!=
0
)
&&
(
FaultCode_Compare
(
DTC2
,
&
DTC_Data_Count
[
0
],
DTC_Amnt_Number_Count
)
==
0
))
{
DTC_Data_Count
[
DTC_Amnt_Number_Count
]
=
DTC2
;
DTC_Amnt_Number_Count
++
;
Fault_Code_App_SortNByte
(
DTC_Data_Count
,
DTC_Amnt_Number_Count
);
}
}
if
(
DTC_Amnt_Number_Count
>
DTC_Amnt_Number
)
{
for
(
i
=
0
;
i
<
FualtCodeMax
;
i
++
)
{
// FaultCode_Data[i] = 0;
DTC_Data_Count
[
i
]
=
0
;
DTC_Data
[
i
]
=
0
;
}
DTC_Amnt_Number_Count
=
0
;
}
if
(
DTC_Amnt_Number_Count
==
DTC_Amnt_Number
)
{
for
(
i
=
0
;
i
<
DTC_Amnt_Number_Count
;
i
++
)
{
DTC_Data
[
i
]
=
DTC_Data_Count
[
i
];
DTC_Data_Count
[
i
]
=
0
;
Fault_Code_App_SortNByte
(
DTC_Data
,
FaultCode_Number
);
}
FaultCode_Number
=
DTC_Amnt_Number
;
DTC_Amnt_Number_Count
=
0
;
for
(
i
=
0
;
i
<
FaultCode_Number
;
i
++
)
{
if
(
FaultCode_Data
[
i
]
!=
DTC_Data
[
i
])
{
FaultCode_Data
[
i
]
=
DTC_Data
[
i
];
Fault_Code_App_SortNByte
(
FaultCode_Data
,
FaultCode_Number
);
}
}
}
if
(
u32YZHDArraycount
<
200
)
{
u32YZHDArray
[
u32YZHDArraycount
++
]
=
u32YZHDCount
;
}
}
}
else
{
memset
(
FaultCode_Data
,
0
,
FaultCode_Number
);
FaultCode_Number
=
0
;
}
}
Firmware/Source/Application/FaultCode/FaultCode.h
deleted
100644 → 0
View file @
5516eb82
#ifndef FAULTCODE_H__
#define FAULTCODE_H__
#include "Application.h"
#include "common.h"
#define FualtCodeMax 72
extern
uint32_t
FaultCode_Data
[
FualtCodeMax
]
;
extern
uint8_t
FaultCode_Number
;
uint8_t
FaultCode_Compare
(
uint32_t
FaultCode
,
uint32_t
*
CodeList
,
uint8_t
len
);
void
ECU_FaultCode_Processing_Service
(
void
);
//void Fault_Code_Sort(void);
extern
void
Fault_Code_Receive
(
uint8_t
CopyData
[]);
static
void
Fault_Code_App_SortNByte
(
uint32_t
*
SortData
,
uint8_t
len
);
static
void
Fault_Code_App_Swap
(
uint32_t
*
pData1
,
uint32_t
*
pData2
);
extern
uint32_t
u32YZHDCount
;
#endif
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