Browse Source

Only warn when the protocol version is not 2.x do not die.

This makes the program compatible with future protocol updates.
Before it was just dying so even if the new protocol was compatible
the program needed to be recompiled.
Georgi Chorbadzhiyski 9 years ago
parent
commit
32927ee8de
2 changed files with 57 additions and 2 deletions
  1. 56
    1
      test/test-10.ok
  2. 1
    1
      videohubctrl.c

+ 56
- 1
test/test-10.ok View File

1
-ERROR: Device protocol is 3.3 but this program supports 2.x only.
1
+WARNING: Device protocol is 3.3 but this program is tested with 2.x only.
2
+Device info
3
+  -------------------------------------------------------------------
4
+  | Device address             | sdi-matrix                         |
5
+  | Device port                | 9990                               |
6
+  | Model name                 | Blackmagic Micro Videohub          |
7
+  | Unique ID                  | 7c2e0d021714                       |
8
+  | Protocol                   | 3.3                                |
9
+  | Video inputs               | 16                                 |
10
+  | Video outputs              | 16                                 |
11
+  -------------------------------------------------------------------
12
+
13
+Video inputs
14
+  ----------------------------------------------------------------------
15
+  | ### | Video input name         | nn | Routed to output         | s |
16
+  ----------------------------------------------------------------------
17
+  |   1 |                          |  0 | -                        |   |
18
+  |   2 |                          |  0 | -                        |   |
19
+  |   3 |                          |  0 | -                        |   |
20
+  |   4 |                          |  0 | -                        |   |
21
+  |   5 |                          |  0 | -                        |   |
22
+  |   6 |                          |  0 | -                        |   |
23
+  |   7 |                          |  0 | -                        |   |
24
+  |   8 |                          |  0 | -                        |   |
25
+  |   9 |                          |  0 | -                        |   |
26
+  |  10 |                          |  0 | -                        |   |
27
+  |  11 |                          |  0 | -                        |   |
28
+  |  12 |                          |  0 | -                        |   |
29
+  |  13 |                          |  0 | -                        |   |
30
+  |  14 |                          |  0 | -                        |   |
31
+  |  15 |                          |  0 | -                        |   |
32
+  |  16 |                          |  0 | -                        |   |
33
+  ----------------------------------------------------------------------
34
+
35
+Video outputs
36
+  ---------------------------------------------------------------------
37
+  | ### | x | Video output name        | Connected video input    | s |
38
+  ---------------------------------------------------------------------
39
+  |   1 |   |                          |                          |   |
40
+  |   2 |   |                          |                          |   |
41
+  |   3 |   |                          |                          |   |
42
+  |   4 |   |                          |                          |   |
43
+  |   5 |   |                          |                          |   |
44
+  |   6 |   |                          |                          |   |
45
+  |   7 |   |                          |                          |   |
46
+  |   8 |   |                          |                          |   |
47
+  |   9 |   |                          |                          |   |
48
+  |  10 |   |                          |                          |   |
49
+  |  11 |   |                          |                          |   |
50
+  |  12 |   |                          |                          |   |
51
+  |  13 |   |                          |                          |   |
52
+  |  14 |   |                          |                          |   |
53
+  |  15 |   |                          |                          |   |
54
+  |  16 |   |                          |                          |   |
55
+  ---------------------------------------------------------------------
56
+

+ 1
- 1
videohubctrl.c View File

409
 		die("The device does not respond correctly. Is it Videohub?");
409
 		die("The device does not respond correctly. Is it Videohub?");
410
 
410
 
411
 	if (strstr(data->device.protocol_ver, "2.") != data->device.protocol_ver)
411
 	if (strstr(data->device.protocol_ver, "2.") != data->device.protocol_ver)
412
-		die("Device protocol is %s but this program supports 2.x only.\n",
412
+		q("WARNING: Device protocol is %s but this program is tested with 2.x only.\n",
413
 			data->device.protocol_ver);
413
 			data->device.protocol_ver);
414
 
414
 
415
 	if (!data->device.dev_present) {
415
 	if (!data->device.dev_present) {

Loading…
Cancel
Save