Skip to content

Commit

Permalink
Reset to initial size.
Browse files Browse the repository at this point in the history
  • Loading branch information
feuerste committed Mar 22, 2024
1 parent 1a56e35 commit 4b24897
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/arvgvdevice.c
Original file line number Diff line number Diff line change
Expand Up @@ -655,7 +655,7 @@ auto_packet_size (ArvGvDevice *gv_device, gboolean exit_early, GError **error)
guint16 port;
gboolean do_not_fragment;
guint max_size, min_size;
gint64 minimum, maximum, packet_size;
gint64 minimum, maximum, packet_size, initial_size;
guint inc;
char *buffer;
guint last_size = 0;
Expand All @@ -665,6 +665,7 @@ auto_packet_size (ArvGvDevice *gv_device, gboolean exit_early, GError **error)
g_return_val_if_fail (ARV_IS_GV_DEVICE (gv_device), 1500);

packet_size = arv_device_get_integer_feature_value (device, "ArvGevSCPSPacketSize", NULL);
initial_size = packet_size;

/* PacketSize boundaries registers are device specific. Use the standard feature name for finding boundaries. If
* this feature is not present in the device Genicam data, it will fallback to the default definition inserted
Expand Down Expand Up @@ -725,7 +726,7 @@ auto_packet_size (ArvGvDevice *gv_device, gboolean exit_early, GError **error)
do {
if (g_timer_elapsed (timer, NULL) > 1.0) {
arv_info_device ("[GvDevice::auto_packet_size] Could not finish sending test packets within 1s");
packet_size = arv_device_get_integer_feature_value (device, "ArvGevSCPSPacketSize", &local_error);
packet_size = initial_size;
break;
}

Expand Down

0 comments on commit 4b24897

Please sign in to comment.