Commit be5389da authored by 何锐's avatar 何锐

feat:UID写完后增加

parent f48c2ec5
...@@ -486,6 +486,22 @@ uint8_t UIDGetstep = 0; ...@@ -486,6 +486,22 @@ uint8_t UIDGetstep = 0;
uint8_t u8getUIDmsg[8]; uint8_t u8getUIDmsg[8];
uint8_t UIDNumber[15] = {2,0,0,0,0,0,0,0,0,0,0,1,2,0,0xFF}; uint8_t UIDNumber[15] = {2,0,0,0,0,0,0,0,0,0,0,1,2,0,0xFF};
void get_seed_msg(void); void get_seed_msg(void);
void UID_ADD(void)
{
for(uint8_t i = 17; i > 1; i--)
{
if(UIDNumber2[i] < 9)
{
UIDNumber2[i] += 1;
return;
}
else
{
UIDNumber2[i] = 0;
}
}
}
void Can_Set_Buff_786(uint8_t CopyData []) void Can_Set_Buff_786(uint8_t CopyData [])
{ {
uint8_t i = 0u; uint8_t i = 0u;
......
...@@ -281,6 +281,7 @@ void Can_Set_Buff_786(uint8_t CopyData []); ...@@ -281,6 +281,7 @@ void Can_Set_Buff_786(uint8_t CopyData []);
void Can_Set_Buff_207(uint8_t CopyData []); void Can_Set_Buff_207(uint8_t CopyData []);
void CAN_Msg_Steps_100ms(); void CAN_Msg_Steps_100ms();
extern void UID_ADD(void);
extern uint8_t uidWrite; extern uint8_t uidWrite;
extern uint8_t UIDGetstep; extern uint8_t UIDGetstep;
extern uint8_t VSpeed; extern uint8_t VSpeed;
......
...@@ -971,6 +971,7 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame) ...@@ -971,6 +971,7 @@ void RSCAN0_CH4_Receive(CAN_Frame_st_t *pstCANFrame)
uidWrite = 0; uidWrite = 0;
UIDGetstep = 5; UIDGetstep = 5;
General_Number_Disp(writesuccess, 3, 200); //写入成功 General_Number_Disp(writesuccess, 3, 200); //写入成功
UID_ADD();
} }
} }
} }
......
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