void Status_Refresh(void)
{
if(Locked) //上鎖狀態
{
LCD1602_I2C_DISPLAY_STRING(1," Locked "); //上鎖時 顯示Locked ,Psw or Fpt等待輸入密碼解鎖
LCD1602_I2C_DISPLAY_STRING(2," Psw or Fpt ");
LOCK_ON;
LED_OFF;
}
else //開鎖狀態
{
LCD1602_I2C_DISPLAY_STRING(1,"Already Unlocked"); //開鎖時 顯示AlreadyUnlcoked, WELCOME
LCD1602_I2C_DISPLAY_STRING(2," WELCOME! :) ");
Unlock_7s(); //開鎖7秒,再上鎖
LED_ON ;
delay_ms(20);
Locked = 1;
Fpt_Pass = 0; // 清除進入方式標記
Psw_Pass = 0;
}
} |