Set baud rate to 1200 for door code
authorJohn Hodge <[email protected]>
Mon, 27 Jun 2011 13:54:40 +0000 (21:54 +0800)
committerJohn Hodge <[email protected]>
Mon, 27 Jun 2011 13:54:40 +0000 (21:54 +0800)
src/server/handler_door.c
src/server/main.c

index 62fb8f9..3359ed1 100644 (file)
@@ -93,7 +93,7 @@ int Door_DoDispense(int User, int Item)
                return 1;
        }
        
-       door_serial_handle = InitSerial(gsDoor_SerialPort, 9600);
+       door_serial_handle = InitSerial(gsDoor_SerialPort, 1200);
 
        if( write(door_serial_handle, "ATH1\n", 5) != 5 ) {
                fprintf(stderr, "Unable to open door (sending ATH1)\n");
index d336b77..faf07e3 100644 (file)
@@ -236,6 +236,7 @@ int InitSerial(const char *File, int BaudRate)
        
        switch(BaudRate)
        {
+       case 1200:      baud = B1200;   break;
        case 9600:      baud = B9600;   break;
        default:        close(fd);      return -1;
        }

UCC git Repository :: git.ucc.asn.au