From: John Hodge Date: Mon, 27 Jun 2011 13:54:40 +0000 (+0800) Subject: Set baud rate to 1200 for door code X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=6f3966a5439c1d446549b6a707460fbb84d296ab;p=tpg%2Fopendispense2.git Set baud rate to 1200 for door code --- diff --git a/src/server/handler_door.c b/src/server/handler_door.c index 62fb8f9..3359ed1 100644 --- a/src/server/handler_door.c +++ b/src/server/handler_door.c @@ -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"); diff --git a/src/server/main.c b/src/server/main.c index d336b77..faf07e3 100644 --- a/src/server/main.c +++ b/src/server/main.c @@ -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; }