Commit Graph

41 Commits

Author SHA1 Message Date
Lennard Kittner
2f18725c11 Remove debugging code 2025-11-08 13:13:19 +01:00
Fabio Scaccabarozzi
f7c230a8ef Show read-only markers in CLI output (Option A)
Changed DeviceState Display trait to use to_string_with_readonly_info()
instead of to_string_with_padding().

This allows CLI users to see which features are hardware-limited before
attempting to use them, providing helpful context and reducing confusion
about why certain commands might not work.

The tray application continues to use to_string_with_padding() since
it's display-only and doesn't allow user interaction.

Implements Option A as discussed in PR #14
2025-10-27 23:10:20 +00:00
Fabio Scaccabarozzi
84bbc4a122 Refactor: eliminate code duplication in DeviceState display methods
Create helper function get_display_data() that returns the device data
array with 4-tuple format (prefix, value, suffix, readonly_flag).

Both to_string_with_padding() and to_string_with_readonly_info() now
call this helper function:
- to_string_with_padding() ignores the readonly flag
- to_string_with_readonly_info() uses it to add (read-only) markers

This eliminates ~100 lines of duplicated code and makes the codebase
easier to maintain.

Addresses PR #14 review comment from @LennardKittner
2025-10-27 23:08:44 +00:00
Fabio Scaccabarozzi
5ba124b086 Add documentation about unknown command 4 2025-10-19 18:32:35 +01:00
Fabio Scaccabarozzi
80976df212 Some features are read-only: either they require Windows APO, or they really don't have a software command available. Add the plumbing to detect and report this. Also, add documentation for the featureset. 2025-10-19 18:21:31 +01:00
Fabio Scaccabarozzi
8c3d954e0e Align everything to Headset_protocol.md (Copilot) 2025-10-19 18:08:46 +01:00
Lennard Kittner
83c811b72d Only display known information 2025-10-19 15:25:19 +02:00
Lennard Kittner
b0265629a4 Add WIP cloud 3 support 2025-10-19 14:05:10 +02:00
Lennard Kittner
ba53b55d48 Remove 2 sec waiting time 2025-10-18 18:04:17 +02:00
Lennard Kittner
dc7c68b460 Fix get_event_from_device_response hyperX cloud 2 2025-10-18 18:03:10 +02:00
Lennard Kittner
b0569ec47a Fix get_event_from_device_response on HP cloud 2 2025-10-18 17:57:29 +02:00
Lennard Kittner
04895cab8c Add new packets 2025-09-29 08:52:48 +02:00
Lennard Kittner
deae62cd01 Detect surround sound 2025-09-25 19:58:09 +02:00
Lennard Kittner
3627f3d639 Set old cloud 2 as always connected 2025-09-25 19:08:39 +02:00
Lennard Kittner
fca6440892 Fix tray 2025-09-25 09:14:11 +02:00
Lennard Kittner
cfa5f06f56 Stop periodically requesting packets 2025-09-24 20:25:33 +02:00
Lennard Kittner
f2372c75b9 Add more debug printing and delays 2025-09-24 17:57:12 +02:00
Lennard Kittner
4f91ddd7cc Add new surround sound packet 2025-09-24 17:56:17 +02:00
Lennard Kittner
f4e9ffa926 Fix packet parsing 2025-09-24 17:55:54 +02:00
Lennard Kittner
97ef1d40ad Add some debug stuff 2025-09-17 12:23:10 +02:00
Lennard Kittner
b9028fe287 Fix buffer size 2025-08-29 09:18:27 +02:00
Lennard Kittner
6840cec0f2 Add support for old cloud 2 2025-08-24 12:15:40 +02:00
Lennard Kittner
fab983ff73 Improve device init and add prepare_write function 2025-08-18 20:12:36 +02:00
Lennard Kittner
ac43ef8000 Remove old cloud 2 from cloud 2 dts 2025-08-18 20:11:32 +02:00
Lennard Kittner
856a91fe67 Formatting 2025-05-16 13:20:34 +02:00
Lennard Kittner
ea4a76739f Add passive_refresh_state 2025-05-16 13:20:09 +02:00
Lennard Kittner
536ffcd5e2 Add second mic packet to get_event_from_device_response 2025-05-16 13:18:18 +02:00
Lennard Kittner
906ea1c221 Updated hyperx vendor ID 2025-05-16 13:17:36 +02:00
Lennard Kittner
ae40be64d4 Add second base packet which might work on the older HyperX Cloud 2 2025-03-27 22:01:56 +01:00
Lennard Kittner
b970760c74 Add vendor and product ID to DeviceState 2025-03-27 21:25:16 +01:00
Lennard Kittner
62b9bbb6f0 Better printing 2025-03-23 00:18:14 +01:00
Lennard Kittner
d5fcc8286c Improve to_string and add name 2025-03-22 12:22:32 +01:00
Lennard Kittner
3ed6b8510f Add connect_compatible_device 2025-03-22 12:21:59 +01:00
Lennard Kittner
58731d8221 Fix warning 2025-03-21 22:04:37 +01:00
Lennard Kittner
975f2937ad Add setter to CLI app 2025-03-21 22:01:14 +01:00
Lennard Kittner
95d55f4e9f Fix packet 2025-03-21 22:00:12 +01:00
Lennard Kittner
b86b1f88df Fix unsupported packets 2025-03-20 00:01:59 +01:00
Lennard Kittner
2e8c6ac5dc Better printing 2025-03-19 23:53:13 +01:00
Lennard Kittner
ff47d7e72d Check connection sooner 2025-03-19 23:48:17 +01:00
Lennard Kittner
bdacc3d3a5 Implement display traits 2025-03-19 23:41:08 +01:00
Lennard Kittner
a2d53f3f04 Add new device module 2025-03-19 09:29:09 +01:00