Browse Source

Fix routing information.

The routing was completely reversed and buggy. It should be done by
output instead it was done by input.
Georgi Chorbadzhiyski 9 years ago
parent
commit
6c09abc053
5 changed files with 14 additions and 11 deletions
  1. 3
    0
      ChangeLog
  2. 7
    7
      README
  3. 1
    1
      cmd.c
  4. 1
    1
      data.h
  5. 2
    2
      videohubctrl.c

+ 3
- 0
ChangeLog View File

@@ -1,4 +1,7 @@
1 1
 |-----------------------------------------------------------------------|
2
+xxxx-xx-xx : Version 0.2 - dev
3
+ * Fix port routing. Previously it was reversed and incorrect.
4
+
2 5
 2014-11-26 : Version 0.1
3 6
  * Initial vesion with support for showing Videohub configuration
4 7
 |-----------------------------------------------------------------------|

+ 7
- 7
README View File

@@ -117,19 +117,19 @@ Serial ports: 0
117 117
 ----------------------------------------------------------------------
118 118
 |  # | x | Input name                  | Output name                 |
119 119
 ----------------------------------------------------------------------
120
-|  1 | L | Windows 1                   | Enc1 3                      |
120
+|  1 | L | Windows 3                   | Enc1 1                      |
121 121
 |  2 | L | Windows 2                   | Enc1 2                      |
122
-|  3 | L | Windows 3                   | Enc1 1                      |
123
-|  4 | L | Windows 4 HD                | Enc1 1                      |
122
+|  3 | L | Windows 1                   | Enc1 3                      |
123
+|  4 | L | Windows 1                   | Enc1 4                      |
124 124
 |  5 |   | Input 5                     | Output 5                    |
125 125
 |  6 |   | Input 6                     | Output 6                    |
126 126
 |  7 |   | Input 7                     | Output 7                    |
127 127
 |  8 |   | Input 8                     | Output 8                    |
128
-|  9 | L | Input 9                     | Enc1 4                      |
129
-| 10 |   | Input 10                    | Enc1 4                      |
128
+|  9 | L | Windows 4 HD                | Enc2 1                      |
129
+| 10 |   | Windows 4 HD                | Output 10                   |
130 130
 | 11 |   | Input 11                    | Output 11                   |
131
-| 12 | L | DPlay1                      | Output 13                   |
132
-| 13 | L | DPlay2                      | Denc                        |
131
+| 12 | L | DPlay2                      | Denc                        |
132
+| 13 | L | DPlay1                      | Output 13                   |
133 133
 | 14 |   | Input 14                    | Output 14                   |
134 134
 | 15 |   | Input 15                    | Output 15                   |
135 135
 | 16 |   | Loopback                    | Loopback                    |

+ 1
- 1
cmd.c View File

@@ -258,7 +258,7 @@ bool parse_command(struct videohub_data *data, char *cmd) {
258 258
 			if (valid_slot) {
259 259
 				unsigned int dest_pos = strtoul(slot_data, NULL, 10);
260 260
 				if (dest_pos < ARRAY_SIZE(data->outputs))
261
-					data->inputs[slot_pos].routed_to = dest_pos;
261
+					data->outputs[slot_pos].routed_to = dest_pos;
262 262
 			}
263 263
 			break;
264 264
 

+ 1
- 1
data.h View File

@@ -34,11 +34,11 @@ struct device_desc {
34 34
 struct input_desc {
35 35
 	char			name[MAX_NAME_LEN];
36 36
 	bool			locked;
37
-	unsigned int	routed_to;
38 37
 };
39 38
 
40 39
 struct output_desc {
41 40
 	char			name[MAX_NAME_LEN];
41
+	unsigned int	routed_to;
42 42
 };
43 43
 
44 44
 struct videohub_data {

+ 2
- 2
videohubctrl.c View File

@@ -135,8 +135,8 @@ static void print_device_settings(struct videohub_data *d) {
135 135
 		printf("| %2d | %c | %-27s | %-27s |\n",
136 136
 			i + 1,
137 137
 			d->inputs[i].locked ? 'L' : ' ',
138
-			d->inputs[i].name,
139
-			d->outputs[d->inputs[i].routed_to].name
138
+			d->inputs[d->outputs[i].routed_to].name,
139
+			d->outputs[i].name
140 140
 		);
141 141
 	}
142 142
 	printf_line(70);

Loading…
Cancel
Save