|
@@ -114,8 +114,6 @@ static void parse_options(struct videohub_data *data, int argc, char **argv) {
|
114
|
114
|
}
|
115
|
115
|
|
116
|
116
|
static void print_device_desc(struct device_desc *d) {
|
117
|
|
- if (!strlen(d->protocol_ver) || !strlen(d->model_name))
|
118
|
|
- die("The device does not return protocol version and model name!");
|
119
|
117
|
printf("\n");
|
120
|
118
|
printf("Protocol version: %s\n", d->protocol_ver);
|
121
|
119
|
printf("Model name: %s\n", d->model_name);
|
|
@@ -175,6 +173,14 @@ int main(int argc, char **argv) {
|
175
|
173
|
exit(EXIT_FAILURE);
|
176
|
174
|
|
177
|
175
|
read_device_command_stream(data);
|
|
176
|
+
|
|
177
|
+ if (!strlen(data->device.protocol_ver) || !strlen(data->device.model_name))
|
|
178
|
+ die("The device does not respond correctly. Is it Videohub?");
|
|
179
|
+
|
|
180
|
+ if (strstr(data->device.protocol_ver, "2.") != data->device.protocol_ver)
|
|
181
|
+ die("Device protocol is %s but this program supports 2.x only.\n",
|
|
182
|
+ data->device.protocol_ver);
|
|
183
|
+
|
178
|
184
|
if (show_monitor) {
|
179
|
185
|
while (1) {
|
180
|
186
|
printf("\e[2J\e[H"); // Clear screen
|