Commit Graph

78 Commits

Author SHA1 Message Date
Adam Honse
b86be6b75d Use RGBControllerInterface for plugin API 2026-05-23 15:17:05 -05:00
Adam Honse
072d27d9dd Settings Rework
* Add JSON string configuration field to RGBController to store device-specific configurations
    * This JSON string holds both configuration and schema
    * Add settings schema tracking to SettingsManager
    * Implement dynamic settings widget that generates a settings UI based on a JSON schema
    * Implement SettingsManager callback for notifying of settings changes and settings schema updates
    * Always enable Entire Device zone option and use it to enable Edit Device
    * Rename SaveSizes to SaveConfiguration in ProfileManager and Sizes.json to Configuration.json
    * Add zone flag for indicating that a zone's geometry may change, informing profile manager to ignore this check
    * Remove Theme setting and Theme Manager, as this didn't work on most setups anyways and Qt6 has proper Windows dark theming
2026-05-14 17:25:35 -05:00
Adam Honse
24ea50df71 Implement size verification on RGBController set description functions 2026-05-07 17:24:46 -05:00
Adam Honse
75df39252b Clean up zone initialization dialog 2026-05-07 17:24:46 -05:00
Adam Honse
0ba254e38f Implement segment groups in zone editor 2026-05-07 17:24:46 -05:00
Adam Honse
0466996970 Rework adding segments with ConfigureZone 2026-05-07 17:24:46 -05:00
Adam Honse
56bd7580ba Zone and Segment type updates
* Add zone flags to indicate if fields are manually configurable and if they have been manually configured
  * Add flags field to segment type
  * Add segment flags for group start and group member
  * Add color mode support flags to zone (RGB, RBG, GRB, GBR, BRG, BGR)
  * Add color mode enum to zone
  * Update zone and segment description functions to support new fields
  * Rename the effects-only configurable size flag
  * Remove zone type and matrix map configuration from E1.31 manual configuration, use zone editor instead
  * Rework DeviceResizeZone to DeviceConfigureZone
  * Rework most ARGB controllers to allow zone customizations
  * Rework DRGBController to define devices in DRGBDevices list (similar to RazerDevices)
  * Rework NollieController to define devices in NollieDevices list (similar to RazerDevices)
2026-05-07 17:24:46 -05:00
Adam Honse
cc00690dd4 RGBController API changes and segment configuration updates
* Make the Get/Set RGBControler descriptor functions static
  * Add functions for getting the matrix_map_type for zone and segment matrix maps
  * Rename zone resize dialog to zone editor dialog
  * Add additional segment types
  * Add option to import segments configuration from JSON file in zone editor dialog
  * Update device view to be able to display matrix segment types
  * Add matrix map editor dialog for creating/editing segment matrix maps
  * Add option to export segments configuration to JSON file in zone editor dialog
2026-05-07 17:24:46 -05:00
Adam Honse
70f79e97b4 Move RGBController base destructor functionality into RGBController::Shutdown() so that update thread can be stopped before deleting the controller. Shutdown() must be called in every RGBController implementation before deleting the controller. Also some fixes to the NetworkServer to avoid deadlocking and disconnect issues 2026-05-07 17:24:45 -05:00
Adam Honse
98dd494f75 Add some validity checks to mode setters and getters in RGBController 2026-05-07 17:24:45 -05:00
Adam Honse
4e70949aec Use std::string.assign when setting strings in the SDK protocol and description handlers so that string size limit is enforced, then strip out null terminators 2026-05-07 17:24:45 -05:00
Adam Honse
58582202cf SDK Version 6 Updates
* SDK Protocol
    * Server sends its name to client
    * ProfileManager
      * Rename existing profile commands
      * Add Upload Profile, Download Profile, and Get Active Profile commands
    * SettingsManager
      * Add Get, Set, and Save Settings commands
    * Add zone::active_mode, zone::mode fields for zone-specific modes
    * Add NET_PACKET_ID_RGBCONTROLLER_UPDATEZONEMODE packet for updating zone modes
    * Add segment::matrix_map to segment packet
    * Add NET_PACKET_ID_RGBCONTROLLER_SIGNALUPDATE packet for passing SignalUpdate signal from server to clients
  * NetworkServer
    * Formatting cleanup
    * Use per-controller threads for handling NetworkServer controller-specific packets to avoid delays from controller mutexes
  * NetworkClient
    * Formatting cleanup
  * RGBController
    * Clean up and modularize descriptor functions
2026-05-07 17:24:44 -05:00
Adam Honse
b0c7dba441 RGBController API Overhaul
* Reorganize and clean up RGBController API functions
    * Add functions to get protected RGBController member values
    * Make NetworkClient, ProfileManager, and ResourceManager friend classes so they can access protected members
    * Protected previously-public RGBController members
        * Information strings (name, vendor, description, version, serial location)
        * Device type
        * Active mode
        * Flags
        * LEDs vector
        * LED alternate names vector
        * Modes vector
        * Colors vector
        * Zones vector
    * Add CONTROLLER_FLAG_HIDDEN to allow plugins to hide controllers from control GUI
    * Add update reason codes to RGBController update callback and signal updates on more RGBController events
    * Add loop zone types and segmented zone type
    * Add matrix map field to segments
    * Rework matrix_map_type from using pointers to vector to prevent memory leaks
    * Rework KeyboardLayoutManager to return new matrix_map_type
    * Add access mutex to RGBController API
    * Add per-zone modes ot RGBController API
    * Add JSON description functions to RGBController API
2026-05-07 17:24:44 -05:00
Adam Honse
c71cc4f18a Change SPDX license identifier from GPL 2.0 only to GPL 2.0 or later, as the original LICENSE file includes an or later clause at the end so the file headers were incorrect 2025-09-28 00:47:08 -05:00
Adam Honse
221f5007ab Fix laptop and monitor device type strings 2025-08-22 21:52:31 -05:00
Adam Honse
a762d00aa8 Fix warnings in Windows build 2025-07-05 01:47:40 -05:00
Adam Honse
14d3c68145 Fix warnings 2025-02-10 10:21:36 -06:00
Adam Honse
bb79fbfc07 Add controller flags field with flags for controller location and update behavior 2025-02-06 20:00:27 -06:00
Adam Honse
012cb5e62d Fix segment creation and modification over the network protocol 2025-02-06 20:00:27 -06:00
Adam Honse
e634a77860 Add LED alternate names field to SDK protocol 2025-02-06 20:00:27 -06:00
Adam Honse
27cac898b0 Initial development for alternate LED names suppport in RGBController API
Alternate LED names allow an LED to have a secondary "alternate" name.  The led_alt_names vector should either be empty if alternate names are not used or be equal in size to the leds vector.  Empty strings in the led_alt_names vector indicate that a particular LED does not have an alternate name.
2025-02-06 20:00:27 -06:00
Adam Honse
11d6b19cde Add protocol handling for resizable effects-only modes, increment protocol revision to 5 2025-02-06 20:00:27 -06:00
Adam Honse
032b6c6300 Resizable Effects-Only Zones 2025-02-06 20:00:27 -06:00
Adam Honse
54802fdd4b Fix device type strings 2025-01-21 14:18:04 -06:00
Adam Honse
66487422ab Fix warning in RGBController.cpp 2025-01-16 23:44:58 -06:00
Adam Honse
1586812112 Fix warnings in RGBController.cpp 2024-11-26 02:28:19 -06:00
Adam Honse
f1da4a3b2f Fix warning in RGBController.cpp 2024-11-26 01:57:01 -06:00
Adam Honse
6c729ff60f Fix possible loss of data warnings in RGBController.cpp 2024-08-16 23:54:14 -05:00
Adam Honse
a3066db16c Update even more file header comments to standardized new format 2024-05-03 11:52:02 -05:00
Cooper Hall
45be4329c5 Fixed some warnings 2023-03-11 23:25:26 +00:00
Adam Honse
447e936464 Segments 2023-01-20 19:00:45 +00:00
Codename-Antares
ae8f40db00 Add Type Keypad & Tartarus Pro Layout for Razer 2022-10-21 16:52:09 +00:00
Adam Honse
389cdf340f Allow mode specific color mode for SetCustomMode 2022-08-21 22:08:23 -05:00
Adam Honse
afb975e5fc Add generic implementation of SetCustomMode to RGBController class 2022-08-09 20:49:38 -05:00
Arnaud MAURIN
287618ebe5 Add new device type "Case" 2022-03-13 04:49:18 +00:00
Qwex
57e7e6a823 Revert "Fix frames skip when using external effects engine" to fix ram race condition 2021-12-30 06:00:59 +00:00
NicolasNewman
7b63813cdb Add storage device type
Commit amended from original XPG Spectrix S40G merge request by Adam Honse <calcprogrammer1@gmail.com>
2021-11-22 00:12:30 -06:00
Cheerpipe
3100f72601 Fix frames skip when using external effects engine 2021-07-07 16:56:02 -05:00
Adam Honse
cbee33706f Fix some issues with mode constructor 2021-07-05 04:04:27 -05:00
Adam Honse
eade8fea1a Add save to device support to RGBController 2021-07-04 21:17:45 -05:00
Chris
a46eccef3c Added brightness to profile loading and saving
* Bumped profile version to 3
* Loading a v1/v2 profile onto a device with brightness will work
* Loading a v3 profile onto a device without brightness also works
* Add profile version parameter to Get/SetModeDescription

Commit amended for code style and to update versioning by Adam Honse <calcprogrammer1@gmail.com>
2021-07-04 21:16:56 -05:00
Chris
b76265cf7d Convert mode from struct to class, add automatic initialization
* To avoid filtering in the profile manager and to ensure that color_mode is set to MODE_COLORS_RANDOM correctly
for HW that has the mode flags

MODE_FLAG_HAS_RANDOM_COLOR | MODE_FLAG_HAS_PER_LED_COLOR

The values for speed_min, speed_max, colors_min and colors_max NEED to be initialised to allow for a saved
profile to load correctly in `ProfileManager::LoadDeviceFromListWithOptions`

Commit amended for code style by Adam Honse <calcprogrammer1@gmail.com>
2021-06-26 00:29:51 -05:00
Adam Honse
be1fbc27ca Add device type string for virtual device 2021-04-22 16:24:48 -05:00
morg
2a6b457324 Add UnregisterRGBController method to ResourceManager
Commit amended by Adam Honse <calcprogrammer1@gmail.com>
2021-04-20 09:21:24 -05:00
Cheerpipe
e9f3a1b3b9 Logitech G560 initial support
Logitech G560 Speaker working with Direct Mode using same bits as the Logitech Ambilight and Audioviz. Other modes are not working (get) as expected.

Note: G560 Direct mode is slow because Logitech hardware implementation but it is working.

Changing volume at the same time colors are changing can reduce FPS because G560 uses the same channel for led and audio modes commands.

Commits squashed and amended for code style by Adam Honse <calcprogrammer1@gmail.com>
2021-02-15 08:45:57 -06:00
morg
dba814215d Fixing memory leaks in controllers 2021-02-05 16:25:46 +01:00
Adam Honse
72da8f362c SDK protocol versioning implemented. Protocol updated to version 1 which adds vendor string to controller request. 2020-12-01 21:02:32 -06:00
Adam Honse
1e4eacd337 Add a Light device type with a bulb icon 2020-11-04 09:23:17 -06:00
Pol Rius
791df64f81 Add support for Sony DualShock 4 (manual merge of !160)
Files pulled in manually and code style changes, Gamepad type addition by Adam Honse <calcprogrammer1@gmail.com>
2020-10-08 17:15:18 -05:00
Adam Honse
8ead2f9c73 Call the callbacks when redetection starts, move matrix map deletion to individual controllers to avoid attempting to delete const pointers 2020-09-28 23:22:01 -05:00