แก้ให้แล้ว

Dependencies:   NOKIA_5110 mbed

Fork of Lost-Found_BOX by FRA221:A

Revision:
9:5944142f8b40
Parent:
8:e683edc8a530
Child:
10:323219f2a084
--- a/main.cpp	Mon Dec 07 18:12:36 2015 +0000
+++ b/main.cpp	Mon Dec 07 19:31:30 2015 +0000
@@ -44,7 +44,6 @@
     }
 }
 
-
 int main(void) {
     // Init. LCD Pin
     LcdPins myPins;      
@@ -89,7 +88,7 @@
     while(true){//Loop around
         wait(1);
         getStatus("192.168.1.88","/l-f-box/getdata.php?check=1",stat_uid); //Recheck now status
-        
+        lock = 0;
  
             
         if(isalnum((int)stat_uid[0])){
@@ -141,6 +140,7 @@
                     submode ++;    
             }
             if(submode == 1){
+                lock=1;
                 updateWithdrawer("192.168.1.88","/l-f-box/update.php",sid);
                 wait(0.5);
                 myLcd.InitLcd();
@@ -156,13 +156,15 @@
             }
         }
         while(mode == 1){ //Deposit Process (No item in the box)
+        pc.printf("Deposition process \n");
             if(submode == 0){ //Ask for deposit
                 myLcd.InitLcd();  
                 myLcd.SetXY(20,1);
                 myLcd.DrawString("PLEASE");   
                 myLcd.SetXY(8,3);
                 myLcd.DrawString("TAP A CARD");   
-    
+                myLcd.SetXY(9,5);
+                myLcd.DrawString("TO DEPOSIT"); 
                 myLcd.stop();
                 submode++;
             }
@@ -182,6 +184,7 @@
                 submode ++;
             }
             if(submode == 2){ //Get depositor data. & Show depositor data
+                lock=1;
                 wait(0.5);
                 myLcd.InitLcd();  
                 myLcd.DrawString("WAITING...");
@@ -232,6 +235,7 @@
                 
                 submode=0;
                 mode = 0;
+                lock = 0;
             } // End Deposit Process
         }