Skip to content

Commit

Permalink
oscplot: remove error message for devices without triggers
Browse files Browse the repository at this point in the history
Signed-off-by: Cristina Suteu <[email protected]>
  • Loading branch information
cristina-suteu committed Oct 5, 2023
1 parent 8c59b51 commit 5e2e36b
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions oscplot.c
Original file line number Diff line number Diff line change
Expand Up @@ -2201,12 +2201,7 @@ static gboolean check_valid_setup_of_device(OscPlot *plot, const char *name)
"Device %s needs an impulse generator", name);
gtk_widget_set_tooltip_text(priv->capture_button, warning_text);
return false;
} else {
fprintf(stderr, "Failed to check if device: %s has trigger. Error:"
"%s\n", iio_device_get_name(dev) ?: iio_device_get_id(dev),
strerror(-ret));
}

/* Additional validation rules provided by the plugin of the device */
if (num_enabled != 2 || plot_type == TIME_PLOT)
return true;
Expand Down Expand Up @@ -4658,6 +4653,7 @@ static void save_as(OscPlot *plot, const char *filename, int type)
if (save_channels_mask[j] == 1)
continue;
fprintf(fp, "%g\t", info->data_ref[i]);

}
fprintf(fp, "\n");
}
Expand Down Expand Up @@ -6775,10 +6771,6 @@ static gboolean right_click_menu_show(OscPlot *plot, GdkEvent *event)
has_trigger = false;
if (ret == 0 && trigger) {
has_trigger = true;
} else {
fprintf(stderr, "Failed to check if device: %s has trigger. Error:"
"%s\n", iio_device_get_name(dev) ?: iio_device_get_id(dev),
strerror(-ret));
}

gtk_widget_set_sensitive(priv->device_trigger_menuitem,
Expand Down

0 comments on commit 5e2e36b

Please sign in to comment.