Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
jiancetai
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
陈家乐
jiancetai
Commits
1ebf8d30
Commit
1ebf8d30
authored
Jun 18, 2025
by
何锐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
✨
feat:检测台完成写入UID,无贴图
parent
8f7e2b24
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
243 additions
and
19 deletions
+243
-19
Barcode_Scanner.c
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
+9
-9
CAN_APP.c
YueJin_test_bench/source/Appliciation/CAN_APP.c
+109
-6
CAN_APP.h
YueJin_test_bench/source/Appliciation/CAN_APP.h
+3
-2
CAN_Communication_Matrix.h
...test_bench/source/Appliciation/CAN_Communication_Matrix.h
+1
-0
Display_Info.c
YueJin_test_bench/source/Appliciation/Display_Info.c
+11
-0
Key.h
YueJin_test_bench/source/Appliciation/Key.h
+1
-0
Key_user.c
YueJin_test_bench/source/Appliciation/Key_user.c
+26
-1
RSCAN.c
YueJin_test_bench/source/Driver/CAN/RSCAN.c
+82
-0
RSCAN.h
YueJin_test_bench/source/Driver/CAN/RSCAN.h
+1
-1
No files found.
YueJin_test_bench/source/Appliciation/Barcode_Scanner.c
View file @
1ebf8d30
...
...
@@ -39,7 +39,7 @@ uint8_t zhenduanflag = 0;
uint8_t
clearOdoFlag
=
0
;
uint8_t
connectbleFlag
=
0
;
uint8_t
Auto_ONOFF
=
0
;
uint32_t
key_value
;
uint8_t
key_array
[
4
];
uint8_t
seed_value
[
4
];
uint8_t
zhenduansendStep
=
0
;
...
...
@@ -51,14 +51,14 @@ uint8_t blename[5];
uint16_t
lightnumber
=
0
;
void
get_key
(
void
)
{
key_array
[
0
]
=
seed_value
[
0
]
|
seed_value
[
3
];
key_array
[
1
]
=
(
seed_value
[
1
]
>>
1
)
|
(
seed_value
[
2
]
<<
1
);
key_array
[
2
]
=
(
seed_value
[
2
]
>>
2
)
|
(
seed_value
[
1
]
<<
2
);
key_array
[
3
]
=
(
seed_value
[
3
]
>>
3
)
|
(
seed_value
[
0
]
<<
3
);
key_value
=
((
uint32_t
)
key_array
[
0
]
<<
24U
);
key_value
=
key_value
|
((
uint32_t
)
key_array
[
1
]
<<
16U
);
key_value
=
key_value
|
((
uint32_t
)
key_array
[
2
]
<<
8U
);
key_value
=
key_value
|
(
uint32_t
)
key_array
[
3
];
//
key_array[0] = seed_value[0] | seed_value[3];
//
key_array[1] = (seed_value[1] >> 1) | (seed_value[2] << 1);
//
key_array[2] = (seed_value[2] >> 2) | (seed_value[1] << 2);
//
key_array[3] = (seed_value[3] >> 3) | (seed_value[0] << 3);
//
key_value = ((uint32_t)key_array[0] << 24U);
//
key_value = key_value | ((uint32_t)key_array[1] << 16U);
//
key_value = key_value | ((uint32_t)key_array[2] << 8U);
//
key_value = key_value | (uint32_t)key_array[3];
}
void
datacheck
(
void
)
{
...
...
YueJin_test_bench/source/Appliciation/CAN_APP.c
View file @
1ebf8d30
...
...
@@ -6,8 +6,8 @@
#include "RSCAN.h"
#include "Key.h"
#include "Display_Info.h"
#include "string.h"
#include "RSCAN.h"
uint8_t
CrcCheckSum
(
uint8_t
*
data
,
uint8_t
len
)
{
uint8_t
crc
=
0xff
;
...
...
@@ -464,8 +464,23 @@ extern uint8_t Data_786_2[8]= {0x30,0x00,0x00,0xAA,0xAA,0xAA,0xAA,0xAA};
/*硬件版本号*/
extern
uint8_t
Data_786_3
[
8
]
=
{
0x03
,
0x22
,
0xF1
,
0x93
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_4
[
8
]
=
{
0x30
,
0x00
,
0x00
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
/*解锁UID*/
extern
uint8_t
Data_786_5
[
8
]
=
{
0x02
,
0x10
,
0x02
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_6
[
8
]
=
{
0x02
,
0x27
,
0x05
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_7
[
8
]
=
{
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
extern
uint8_t
Data_786_8
[
8
]
=
{
0x10
,
0x23
,
0x2E
,
0x10
,
0x88
,
0x31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_9
[
8
]
=
{
0x21
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_10
[
8
]
=
{
0x22
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_11
[
8
]
=
{
0x23
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_12
[
8
]
=
{
0x24
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
,
0x31
};
extern
uint8_t
Data_786_13
[
8
]
=
{
0x25
,
0x31
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
,
0xAA
};
uint8_t
UIDStep
;
uint8_t
uidWrite
;
uint8_t
UIDGetstep
=
0
;
uint8_t
u8getUIDmsg
[
8
];
uint8_t
UIDNumber2
[
19
]
=
{
84
,
89
,
87
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
2
,
0
,
2
,
5
,
0xFF
};
void
get_seed_msg
(
void
);
void
Can_Set_Buff_786
(
uint8_t
CopyData
[])
{
uint8_t
i
=
0u
;
...
...
@@ -521,10 +536,98 @@ void Can_Set_Buff_786(uint8_t CopyData [])
pCANMsg
->
Msg
[
i
]
=
Data_786_4
[
i
];
}
Diagnosis_banbenhao_flag_
=
4
;
Diagnosis_banbenhao_flag_
=
4
;
Diagnosis_banbenhao_flag
=
0
;
}
if
(
uidWrite
==
1
)
{
switch
(
UIDStep
)
{
case
0
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_5
[
i
];
}
UIDStep
++
;
break
;
case
1
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_6
[
i
];
}
UIDStep
++
;
break
;
case
2
:
if
(
UIDGetstep
==
1
)
{
Data_786_7
[
0
]
=
0x06
;
Data_786_7
[
1
]
=
0x27
;
Data_786_7
[
2
]
=
0x06
;
Data_786_7
[
3
]
=
seedresult
[
0
];
Data_786_7
[
4
]
=
seedresult
[
1
];
Data_786_7
[
5
]
=
seedresult
[
2
];
Data_786_7
[
6
]
=
seedresult
[
3
];
Data_786_7
[
7
]
=
0xAA
;
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_7
[
i
];
}
UIDStep
++
;
UIDGetstep
=
2
;
}
break
;
case
3
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_8
[
i
];
}
UIDStep
++
;
break
;
case
4
:
if
(
UIDGetstep
==
3
)
{
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_9
[
i
];
}
UIDStep
++
;
}
break
;
case
5
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_10
[
i
];
}
UIDStep
++
;
break
;
case
6
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_11
[
i
];
}
UIDStep
++
;
break
;
case
7
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_12
[
i
];
}
UIDStep
++
;
break
;
case
8
:
for
(
uint8_t
i
=
0
;
i
<
8
;
i
++
)
{
pCANMsg
->
Msg
[
i
]
=
Data_786_13
[
i
];
}
UIDGetstep
=
4
;
UIDStep
++
;
break
;
default:
UIDStep
=
0
;
break
;
}
}
}
void
Can_Set_Buff_207
(
uint8_t
CopyData
[])
...
...
YueJin_test_bench/source/Appliciation/CAN_APP.h
View file @
1ebf8d30
...
...
@@ -260,6 +260,7 @@ typedef union
}
Sig
;
}
CANMsg207Union
;
extern
uint8_t
UIDNumber2
[
19
];
void
CAN_MSG_COUNTER_PLUS
(
void
);
uint8_t
CrcCheckSum
(
uint8_t
*
data
,
uint8_t
len
);
...
...
@@ -279,8 +280,8 @@ void Can_Set_Buff_786(uint8_t CopyData []);
void
Can_Set_Buff_207
(
uint8_t
CopyData
[]);
void
CAN_Msg_Steps_100ms
();
extern
uint8_t
uidWrite
;
extern
uint8_t
UIDGetstep
;
extern
uint8_t
VSpeed
;
extern
uint8_t
Student_Card
;
// uint8_t Student_Card_Last;
...
...
YueJin_test_bench/source/Appliciation/CAN_Communication_Matrix.h
View file @
1ebf8d30
...
...
@@ -51,6 +51,7 @@ extern uint8_t Get_CAN_CH4_ID_450_Mileage(void);
#define CAN_CH4_ID_450_Msg 0x450u
#define CAN_CH4_ID_451_Msg 0x451u
#define CAN_CH4_ID_750_Msg 0x750u
#define CAN_CH4_ID_786_Msg 0x786u
extern
uint8_t
Co_Can_ConvertSubID_CAN_CH4
(
uint32_t
MsgID
);
...
...
YueJin_test_bench/source/Appliciation/Display_Info.c
View file @
1ebf8d30
...
...
@@ -209,6 +209,17 @@ const unsigned char gImage_Dyy_words_5X6_Y137[]={/*Byte Size204*/
0X78U
,
0X00U
,
0X00U
,
0X18U
,
0X38U
,
0X38U
,
0X10U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,};
//UID写入
const
unsigned
char
gImage_Dyy_words_3X6_Y88
[]
=
{
/*Byte Size204*/
62U
,
16U
,
0X10U
,
0Xf0U
,
0X10U
,
0X00U
,
0X10U
,
0Xf0U
,
0X10U
,
0X00U
,
0X10U
,
0Xf0U
,
0X10U
,
0X00U
,
0X10U
,
0Xf0U
,
0X10U
,
0X00U
,
0X10U
,
0X10U
,
0Xf0U
,
0X10U
,
0X10U
,
0X00U
,
0X10U
,
0Xf0U
,
0X10U
,
0X10U
,
0X10U
,
0X20U
,
0Xc0U
,
0X00U
,
0X0cU
,
0X04U
,
0X84U
,
0X74U
,
0X24U
,
0X24U
,
0X24U
,
0X24U
,
0X24U
,
0X24U
,
0X24U
,
0X04U
,
0X0cU
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X02U
,
0XccU
,
0X30U
,
0Xc0U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X00U
,
0X80U
,
0X80U
,
0X00U
,
0X1fU
,
0X20U
,
0X20U
,
0X20U
,
0X1fU
,
0X00U
,
0X00U
,
0X00U
,
0X1fU
,
0X20U
,
0X20U
,
0X20U
,
0X1fU
,
0X00U
,
0X00U
,
0X20U
,
0X20U
,
0X3fU
,
0X20U
,
0X20U
,
0X00U
,
0X20U
,
0X3fU
,
0X20U
,
0X20U
,
0X20U
,
0X10U
,
0X0fU
,
0X00U
,
0X08U
,
0X08U
,
0X09U
,
0X09U
,
0X09U
,
0X09U
,
0X09U
,
0X09U
,
0X09U
,
0X49U
,
0X41U
,
0X3fU
,
0X00U
,
0X00U
,
0X40U
,
0X20U
,
0X10U
,
0X0cU
,
0X03U
,
0X00U
,
0X00U
,
0X00U
,
0X03U
,
0X0cU
,
0X10U
,
0X20U
,
0X40U
,
0X00U
,
0X00U
,
0X00U
,
0X31U
,
0X31U
,};
//10V输出电压:
const
unsigned
char
gImage_Dyy_words_6X6_Y165
[]
=
{
/*Byte Size204*/
101U
,
16U
,
...
...
YueJin_test_bench/source/Appliciation/Key.h
View file @
1ebf8d30
...
...
@@ -153,6 +153,7 @@ extern uint8_t can_car_Data[8];
extern
const
unsigned
char
gImage_Dyy_words_1X6_Y16
[];
extern
const
unsigned
char
gImage_Dyy_words_2X6_Y46
[];
extern
const
unsigned
char
gImage_Dyy_words_5X6_Y137
[];
extern
const
unsigned
char
gImage_Dyy_words_3X6_Y88
[];
extern
uint8_t
Study_Flag
;
extern
uint8_t
Require_card_flag
;
#endif
...
...
YueJin_test_bench/source/Appliciation/Key_user.c
View file @
1ebf8d30
...
...
@@ -6,7 +6,7 @@
#include "Task.h"
#include "string.h"
#include "TFT_LCD.h"
#include "CAN_APP.h"
extern
const
unsigned
char
gImage_titlex0_y0
[];
...
...
@@ -98,10 +98,33 @@ void Key_Operation_SW2(Key_Event_en_t enKeyEvent)
{
}
}
uint8_t
UUIDX
=
197
;
uint8_t
UIDNumber
[
19
]
=
{
84
,
89
,
87
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
1
,
2
,
0
,
2
,
5
,
0xFF
};
void
Key_Operation_SW3
(
Key_Event_en_t
enKeyEvent
)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
// memset(&All_Flag, 0, sizeof(All_Flag));
// All_Flag.u8flag[2] = 1;
// memset(canData1, 0, sizeof(canData1));/*清除上次CAN诊断接收的数据*/
// memset(canData4, 0, sizeof(canData4));
// Diagnosis_banbenhao_flag=1;/*CAN诊断起始信号*/
Display_TFT_Clear
();
// TFT_LCD_Draw_Bmp(5, 50, ( uint8_t * )gImage_Dyy_words_1X6_Y16 ); //软件版本号
// TFT_LCD_Draw_Bmp(5, 100, ( uint8_t * )gImage_Dyy_words_2X6_Y46 ); //硬件版本号
// TFT_LCD_Draw_Bmp(0,200 , ( uint8_t * )gImage_Dyy_words_5X6_Y137 ); //静态电流
// TFT_LCD_Draw_Bmp(0, 220, ( uint8_t * )gImage_titlex0_y0);
// General_Number_Disp(banbenhao, 90, 230);/*显示检测台版本号*/
// Display_Can_Receive_Data(5,50);
General_Number_Disp
(
UIDNumber
,
85
,
120
);
//固定UID数字
General_Number_Disp
(
UIDNumber2
,
70
,
146
);
//可调UID数字
uint8_t
UUIDS
[
2
]
=
{
45
,
0xFF
};
General_Number_Disp
(
UUIDS
,
UUIDX
,
160
);
//UID下——
TFT_LCD_Draw_Bmp
(
3
,
120
,
(
uint8_t
*
)
gImage_Dyy_words_3X6_Y88
);
//UID写入
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
...
...
@@ -117,6 +140,8 @@ void Key_Operation_SW4(Key_Event_en_t enKeyEvent)
{
if
(
enKeyEvent
==
KEY_EVENT_SHORT_PRESS
)
{
uidWrite
=
1
;
UIDGetstep
=
0
;
}
else
if
(
enKeyEvent
==
KEY_EVENT_LONG_PRESS
)
{
...
...
YueJin_test_bench/source/Driver/CAN/RSCAN.c
View file @
1ebf8d30
...
...
@@ -9,6 +9,7 @@
#include "RSCAN_Table.h"
#include "string.h"
#include "Key.h"
#include "CAN_APP.h"
#define RSCAN_CKSCLK_IPERI2_CLKC 40000000UL
/*PPLLCLK2*/
#define RSCAN_CKSCLK_ICANOSC_CLK_XIN_CAN 8000000UL
/*MainOSC*/
#define RSCAN_F_CAN RSCAN_CKSCLK_IPERI2_CLKC
...
...
@@ -796,6 +797,11 @@ void RSCAN0_CH3_Receive(CAN_Frame_st_t *pstCANFrame)
g_stRSCAN0Config
.
stRSCANCh3
.
pfnRSCANReadMsgCallBack
(
pstCANFrame
->
u32CANID
,
pstCANFrame
->
u8CANLEN
,
pstCANFrame
->
unCANData
.
u8CANData
);
}
}
uint8_t
u8get786msg
[
8
];
uint8_t
seednum
[
4
]
=
{
0
};
uint8_t
seedresult
[
4
]
=
{
0
};
uint32_t
key_value
;
uint32_t
CalculateKey
();
void
RSCAN0_CH4_Receive
(
CAN_Frame_st_t
*
pstCANFrame
)
{
if
(
g_stRSCAN0Config
.
stRSCANCh4
.
pfnRSCANReadMsgCallBack
)
...
...
@@ -924,8 +930,84 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
}
if
(
uidWrite
==
1
)
{
if
(
pstCANFrame
->
u32CANID
==
0x750u
)
{
u8get786msg
[
0
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
0
];
u8get786msg
[
1
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
1
];
u8get786msg
[
2
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
2
];
u8get786msg
[
3
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
3
];
u8get786msg
[
4
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
4
];
u8get786msg
[
5
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
5
];
u8get786msg
[
6
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
6
];
u8get786msg
[
7
]
=
pstCANFrame
->
unCANData
.
u8CANData
[
7
];
if
(
UIDGetstep
==
0
)
{
if
(
u8get786msg
[
1
]
==
0x67
&&
u8get786msg
[
2
]
==
0x05
)
{
memcpy
(
seednum
,
&
u8get786msg
[
3
],
4
);
key_value
=
CalculateKey
(
seednum
);
seedresult
[
0
]
=
(
uint8_t
)(
key_value
>>
24
);
seedresult
[
1
]
=
(
uint8_t
)(
key_value
>>
16
);
seedresult
[
2
]
=
(
uint8_t
)(
key_value
>>
8
);
seedresult
[
3
]
=
(
uint8_t
)
key_value
;
UIDGetstep
=
1
;
}
}
else
if
(
UIDGetstep
==
2
)
{
if
(
u8get786msg
[
0
]
==
0x30
&&
u8get786msg
[
2
]
==
0x00
)
{
UIDGetstep
=
3
;
}
}
else
if
(
UIDGetstep
==
4
)
{
if
(
u8get786msg
[
3
]
==
0x78
)
{
UIDGetstep
=
5
;
}
}
else
if
(
UIDGetstep
==
5
)
{
if
((
u8get786msg
[
1
]
==
0x6E
)
&&
(
u8get786msg
[
3
]
==
0x88
))
{
UIDGetstep
=
6
;
uidWrite
=
0
;
}
}
}
}
}
}
uint32_t
CalculateKey
(
uint8_t
seed
[])
{
uint32_t
key_value
=
0U
;
uint32_t
u32seedP
=
0U
;
uint32_t
ConstVaule
=
0x3BE7FAD5u
;
uint32_t
key
=
0U
;
uint8_t
i
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
u32seedP
=
u32seedP
<<
8
;
u32seedP
|=
seed
[
i
];
}
key
=
(
u32seedP
>>
8
)
|
(
u32seedP
>>
16
);
key
^=
ConstVaule
;
key
=
(
key
<<
12
)
|
(
key
>>
15
);
key_value
=
((
uint32_t
)
key
<<
24U
);
key_value
=
key_value
|
((
uint32_t
)
key
<<
16U
);
key_value
=
key_value
|
((
uint32_t
)
key
<<
8U
);
key_value
=
key_value
|
(
uint32_t
)
key
;
return
(
key_value
);
}
void
RSCAN0_CH5_Receive
(
CAN_Frame_st_t
*
pstCANFrame
)
{
if
(
g_stRSCAN0Config
.
stRSCANCh5
.
pfnRSCANReadMsgCallBack
)
...
...
YueJin_test_bench/source/Driver/CAN/RSCAN.h
View file @
1ebf8d30
...
...
@@ -212,5 +212,5 @@ extern uint8_t Student_Card_can_command;
extern
uint8_t
Query_Card_can_command
;
extern
uint8_t
can_car_return_Data
[
8
];
extern
uint8_t
canData_card
[
8
];
extern
uint8_t
seedresult
[
4
];
#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