Commit Graph

24 Commits

Author SHA1 Message Date
Richard Hughes
fc2da47b69 Remove fu_strtoull_full() 2022-06-14 14:36:52 -05:00
Richard Hughes
425fedcca1 trivial: Remove fu_byte_array_set_size_full() 2022-06-14 14:36:52 -05:00
Richard Hughes
ed1b13da28 Split out the memory helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
9d33c29e92 Split out the string helpers to a new source file 2022-06-14 14:36:52 -05:00
Richard Hughes
b9172ae5c5 logitech-bulkcontroller: Reset the progress counter when required 2022-06-11 11:05:08 +01:00
Richard Hughes
9a33c96b7c logitech-bulkcontroller: Split up two distinct progress sections 2022-06-11 11:05:08 +01:00
Richard Hughes
31275cf89a logitech-bulkcontroller: Use fu_progress_step_done() when writing chunks 2022-06-11 11:05:08 +01:00
Richard Hughes
2b10848e57 logitech-bulkcontroller: Only move the progressbar forwards when writing 2022-06-11 11:05:08 +01:00
Richard Hughes
dc91d59f8e Remove the recently added fu_progress_add_step_full()
Just break API instead.
2022-06-03 13:47:11 -05:00
Richard Hughes
e9454e022f logitech-bulkcontroller: Mark as signed payload 2022-03-17 20:46:43 +00:00
Mario Limonciello
661990ed98 Convert build system to use meson tristate features
tristate features will automatically disable if dependencies marked
as required are missing.

Packagers can manually override using `auto_features`.

Link: https://mesonbuild.com/Build-options.html#features
2022-02-28 08:34:48 -06:00
Richard Hughes
8df102b7c0 Add fu_usb_device_add_interface() for plugins to use
It's a common action for plugins to call FuUsbDevice->open() then claim
interfaces, and then release them just before FuUsbDevice->close().

It's also something a lot of plugins get wrong, so provide common code
to handle it correctly in one place.
2022-01-04 22:05:37 +00:00
Richard Hughes
815a5a8a93 logitech-bulkcontroller: Assign the update interface correctly 2022-01-04 18:13:59 +00:00
Richard Hughes
8fc8539146 trivial: Remove some unused variables 2021-12-10 16:00:07 +00:00
Richard Hughes
e87fc05ab9 Speed up the daemon startup by ~2% by doing dlsym much less
We were calling g_module_symbol() 2703 times, which is actually more
expensive than you'd think.

It also means the plugins are actually what we tell people they are:
A set of vfuncs that get run. The reality before that they were dlsym'd
functions that get called at pretty random times.
2021-11-09 12:02:07 +00:00
Richard Hughes
128a3afaa9 logitech-bulkcontroller: Fix a potential NULL dereference on error
Spotted by Coverity.
2021-10-27 15:57:53 +01:00
Sanjay Sheth
3814b0be12
logitech-bulkcontroller: Set device time and timezone
Also, use UTC for older glib version.
2021-10-26 09:50:28 +01:00
Sanjay Sheth
3c8339c9eb logitech-bulkcontroller: Wait and verify firmware upgrade status 2021-10-22 10:38:59 -07:00
Sanjay Sheth
4c5d00886a logitech-bulkcontroller: Continuously capture device messages 2021-10-15 11:20:16 -07:00
Sanjay Sheth
7acccd581c Retry if device is not idle 2021-09-30 18:14:28 +01:00
Sanjay Sheth
baf4279f70
logitech-bulkcontroller: Explicitly set to device mode
Explicitly set to device mode when required.
2021-09-30 10:15:56 +01:00
Richard Hughes
431dbee65a Lower the GUsb dep to allow compiling on RHEL-8
This is something that I keep being asked to do...
2021-09-24 06:50:59 -05:00
Richard Hughes
40cd18fa97 Allow using a per-device global percentage completion
It's actually quite hard to build a front-end for fwupd at the moment
as you're never sure when the progress bar is going to zip back to 0%
and start all over again. Some plugins go 0..100% for write, others
go 0..100% for erase, then again for write, then *again* for verify.

By creating a helper object we can easily split up the progress of the
specific task, e.g. write_firmware().

We can encode at the plugin level "the erase takes 50% of the time, the
write takes 40% and the read takes 10%". This means we can have a
progressbar which goes up just once at a consistent speed.
2021-09-13 14:28:15 +01:00
Sanjay Sheth
b6ff1ea40e Add support for devices supporting the Logitech bulk controller protocol 2021-08-29 20:33:16 +01:00