logitech-hidpp: Add some trivial defines for polling intervals

This commit is contained in:
Ricardo Cañuelo 2021-08-31 11:48:50 +01:00 committed by Richard Hughes
parent f4926e2d8e
commit f63afade6f
3 changed files with 6 additions and 2 deletions

View File

@ -19,6 +19,10 @@
/* Signed firmware are very long to verify on the device */
#define FU_UNIFYING_DEVICE_TIMEOUT_MS 30000
/* Polling intervals (ms) */
#define FU_HIDPP_DEVICE_POLLING_INTERVAL 30000
#define FU_HIDPP_RECEIVER_RUNTIME_POLLING_INTERVAL 5000
guint8
fu_logitech_hidpp_buffer_read_uint8(const gchar *str);
guint16

View File

@ -681,7 +681,7 @@ fu_logitech_hidpp_device_setup(FuDevice *device, GError **error)
fu_logitech_hidpp_device_refresh_updatable(self);
/* poll for pings to track active state */
fu_device_set_poll_interval(device, 30000);
fu_device_set_poll_interval(device, FU_HIDPP_DEVICE_POLLING_INTERVAL);
return TRUE;
}

View File

@ -186,7 +186,7 @@ fu_logitech_hidpp_runtime_open(FuDevice *device, GError **error)
return FALSE;
/* poll for notifications */
fu_device_set_poll_interval(device, 5000);
fu_device_set_poll_interval(device, FU_HIDPP_RECEIVER_RUNTIME_POLLING_INTERVAL);
/* success */
return TRUE;