Browse Source

Small fix for serial directions.

Georgi Chorbadzhiyski 9 years ago
parent
commit
39bc206641
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      cmd.c

+ 2
- 2
cmd.c View File

201
 			break;
201
 			break;
202
 		case PARSE_DIR:
202
 		case PARSE_DIR:
203
 			s_port->port[port_num].direction = DIR_AUTO;
203
 			s_port->port[port_num].direction = DIR_AUTO;
204
-			if (streq("control", port_data)) s_port->port[port_num].direction = DIR_CONTROL;
205
-			if (streq("slave", port_data))   s_port->port[port_num].direction = DIR_SLAVE;
204
+			if (streq("control", port_data))      s_port->port[port_num].direction = DIR_CONTROL;
205
+			else if (streq("slave", port_data))   s_port->port[port_num].direction = DIR_SLAVE;
206
 			break;
206
 			break;
207
 		case PARSE_ROUTE:
207
 		case PARSE_ROUTE:
208
 			dest_port_num = strtoul(port_data, NULL, 10);
208
 			dest_port_num = strtoul(port_data, NULL, 10);

Loading…
Cancel
Save