增加提示未解锁功能

This commit is contained in:
sunbeam 2024-06-12 20:39:50 +08:00
parent 2c18a01325
commit ca643b194e
6 changed files with 3975 additions and 3925 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,15 +1,15 @@
QualityReport
2024年6月3日 20:21:48
2024年6月12日 20:37:12
------ Start build(ECU_APP, DefaultBuild) ------
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\ccrl.exe user\appTask.c -cpu=S3 -obj_path=DefaultBuild "-dev=C:\Program Files (x86)\Renesas Electronics\CS+\CC\Device\RL78\Devicefile\DR5F10BGG.DVF" -g -g_line -I diagnose\DTC -I diagnose\CanTrcv -I sys -I . -I rscan_driver -I diagnose -I DataFlash -I CanNw -I diagnose\CanTp -I diagnose\CanIf -I user -D DEBUG1 -c -msg_lang=english
C:\Program Files (x86)\Renesas Electronics\CS+\CC\CC-RL\V1.11.00\Bin\rlink.exe -subcommand=DefaultBuild\ECU_APP.clnk
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 13 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
RAMDATA SECTION: 00000be1 Byte(s)
ROMDATA SECTION: 000006f9 Byte(s)
PROGRAM SECTION: 00004f2c Byte(s)
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 13 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 13 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 4 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
RAMDATA SECTION: 00000be5 Byte(s)
ROMDATA SECTION: 000006fb Byte(s)
PROGRAM SECTION: 00004f99 Byte(s)
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 4 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
W0561016:The evaluation version of CC-RL V1 is valid for the remaining 4 days. After that, link size limit (64 Kbyte) will be applied. Please consider purchasing the product.
Renesas Optimizing Linker Completed
------ Build ended(Error:0, Warning:3)(ECU_APP, DefaultBuild) ------
@ -96,9 +96,9 @@ DefaultBuild\ECU_APP.clnk :
--- SHA1 hash value of output files ---
E:\workspace\HDG\CODE\ECU_APP\DefaultBuild\ECU_APP.abs: ce75a15be33226e5b28f1de0864e219b41675a5c
E:\workspace\HDG\CODE\ECU_APP\OutPut\ECU_APP.mot: 850baa17311a8671403c801ceb49e256e9668470
E:\workspace\HDG\CODE\ECU_APP\output\ECU_APP.S19: e33142a54e3e153f4aa76167e4aa7186ec6a1b66
E:\workspace\HDG\CODE\ECU_APP\DefaultBuild\ECU_APP.abs: d11d28595e2cf86a8edc00af2f8c1461d40e917d
E:\workspace\HDG\CODE\ECU_APP\OutPut\ECU_APP.mot: ad297340788d53001f2d55d65a631832e5fc874d
E:\workspace\HDG\CODE\ECU_APP\output\ECU_APP.S19: 979982fa5b29d8ac1de06521fc02d3391d04361e
--- System Information ---
@ -126,13 +126,13 @@ E:\workspace\HDG\CODE\ECU_APP\output\ECU_APP.S19: e33142a54e3e153f4aa76167e4aa71
C:\Program Files (x86)\Renesas Electronics\CS+\CC
*Memory Usage
*Private Working Set
189 MB
184 MB
*Number of GDI Objects
2115
2127
*Number of USER Objects
976
983
*Opened Files
5 editors, 5 files, 60 KB
5 editors, 5 files, 61 KB
--- Build Tool Plug-in Information ---
RH850 Build tool CC-RH Plug-in

View File

@ -42,7 +42,7 @@ uint16_t VehicleSpeedRaw,VehicleSpeed;
uint8_t nouse;//Relocation value is odd number
uint8_t lock_state,lkey_state;
static uint8_t lh_state,fnr_state;
uint8_t g_f_op,g_n_op,g_r_op;
void IND_task(void);
@ -115,6 +115,7 @@ void HD_task(void)//5ms
uint16_t adval = getAdval(ADCH_HALL);
static uint8_t fnr_step = 0, lh_step = 0;
static uint16_t fnr_counter[3] = {0};
static uint16_t err_counter=0;
uint8_t db_pos = 0;
txbuf1[0] = lock_state;
txbuf1[1] = lkey_state;
@ -173,6 +174,40 @@ void HD_task(void)//5ms
fnr_counter[1] = 0;
fnr_counter[2] = 0;
}
if (lock_state == 1 && db_pos != 3)
{
err_counter++;
if (err_counter>=60)
{
err_counter = 60;
if (db_pos == 1)
{
g_f_op = 1;
g_n_op = 0;
g_r_op = 0;
}
else if (db_pos == 5)
{
g_r_op = 1;
g_f_op = 0;
g_n_op = 0;
}
else
{
g_n_op = 1;
g_f_op = 0;
g_r_op = 0;
}
}
}
else
{
g_f_op = 0;
g_n_op = 0;
g_r_op = 0;
}
break;
case 1:
if(lock_state == 1)
@ -183,7 +218,7 @@ void HD_task(void)//5ms
if (db_pos == 2 || db_pos == 4)
{
fnr_counter[FNR_STATE_N]++;
if (fnr_counter[FNR_STATE_N]>=100)
if (fnr_counter[FNR_STATE_N]>=60)
{
fnr_state = FNR_STATE_N;
fnr_step = 2;
@ -194,7 +229,7 @@ void HD_task(void)//5ms
else if (db_pos == 5)
{
fnr_counter[FNR_STATE_R]++;
if (fnr_counter[FNR_STATE_R]>=20)
if (fnr_counter[FNR_STATE_R]>=30)
{
fnr_state = FNR_STATE_R;
fnr_step = 2;
@ -205,7 +240,7 @@ void HD_task(void)//5ms
else if (db_pos == 1)
{
fnr_counter[FNR_STATE_F]++;
if (fnr_counter[FNR_STATE_F]>=20)
if (fnr_counter[FNR_STATE_F]>=30)
{
fnr_state = FNR_STATE_F;
fnr_step = 2;
@ -262,6 +297,10 @@ void Can_Msg_Change(void)
CAN_188.Msg_Part.SL_Lswitch = (lh_state == LH_STATE_L)?1:0;
CAN_188.Msg_Part.SL_Nswitch = (fnr_state == FNR_STATE_N)?1:0;
CAN_188.Msg_Part.SL_Rswitch = (fnr_state == FNR_STATE_R)?1:0;
CAN_188.Msg_Part.Reserve_1 = 0;
CAN_188.Msg_Part.F_OP = g_f_op;
CAN_188.Msg_Part.N_OP = g_n_op;
CAN_188.Msg_Part.R_OP = g_r_op;
CAN_188.Msg_Part.err1 = 0;
CAN_188.Msg_Part.err2 = 0;
CAN_188.Msg_Part.err3 = 0;

View File

@ -8,7 +8,7 @@ typedef union{
unsigned int Msg_Word[2];
unsigned char Msg_Byte[4];
struct{
//byte 0
//byte 0 0
unsigned char SL_Lswitch:1;
unsigned char SL_Hswitch:1;
unsigned char SL_Fswitch:1;
@ -16,21 +16,26 @@ typedef union{
unsigned char SL_Rswitch:1;
unsigned char Reserve_1:3;
//byte 1
//byte 1 8
unsigned char Reserve_2:8;
//byte 2
unsigned char err1:1;
unsigned char err2:1;
unsigned char err3:1;
unsigned char err4:1;
unsigned char err5:1;
unsigned char err6:1;
//byte 2 16
unsigned char err1:1;//HorL_SwitchFault
unsigned char err2:1;//F_SwitchFault
unsigned char err3:1;//R_SwitchFault
unsigned char err4:1;//F_OperationFault
unsigned char err5:1;//N_OperationFault
unsigned char err6:1;//R_OperationFault
unsigned char err7:1;
unsigned char err8:1;
//byte 3 24
unsigned char F_OP:1;//F_operation prompt
unsigned char N_OP:1;//N_operation prompt
unsigned char R_OP:1;//R_operation prompt
unsigned char Reserve_3:5;
//byte 3 - 6
unsigned char Reserve_3:8;
//byte 4 - 6
unsigned char Reserve_4:8;
unsigned char Reserve_5:8;
unsigned char Reserve_6:8;