Commit Graph

58 Commits

Author SHA1 Message Date
Adam Honse
357f99e003 [WIP] 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
  * NetworkServer
    * Formatting cleanup
    * Use per-controller threads for handling NetworkServer controller-specific packets to avoid delays from controller mutexes
  * NetworkClient
    * Formatting cleanup
2025-12-30 14:09:08 -06:00
Adam Honse
aafd75127f Rework Profiles to use JSON format
* Update OpenRGB Plugin Interface to include functions for loading/saving profile JSON data into OpenRGB profiles
    * Update ProfileManager to handle auto-load profiles (Exit, Open, Resume, Suspend) and move their settings to ProfileManager section
    * Update ProfileManager to store profiles in "profiles" folder in .json format
    * Update ProfileManager to store size profile in sizes.json
    * Update ProfileManager to perform device UpdateMode/UpdateColors when loading profile
    * Code cleanup of ProfileManager and profile-related code
2025-12-30 14:09:08 -06:00
Adam Honse
38f016f2a8 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
2025-12-30 14:09:08 -06: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
30f9b84d5f Use GetName instead of directly accessing the RGBController::name member outside of Controllers 2025-08-01 11:32:55 -05:00
Adam Honse
9fb71a30ec Use getter functions when accessing string fields in RGBControllers in ProfileManager and cli 2025-07-31 18:55:12 -05:00
Adam Honse
8fbde8073d Do not save virtual or remote devices to sizes.ors 2025-02-06 20:00:27 -06:00
Adam Honse
77fd471915 Only load segments from profile if segment count differs from base controller, prevents segment duplication on devices with autogenerated segments 2025-01-14 12:34:32 -06:00
morg
59e303c882 Add missing tags in logs 2025-01-10 08:53:31 +01:00
Adam Honse
b0c3856ab4 Fix warnings in ProfileManager.cpp 2024-11-26 00:38:56 -06:00
Adam Honse
9281f8ed5c Fix possible loss of data warnings in ProfileManager.cpp 2024-08-16 23:48:37 -05:00
Adam Honse
f4ff81bd45 Fix uninitialized bytes valgrind warning in ProfileManager.cpp 2024-07-25 23:36:11 -05:00
Adam Honse
a7c400bc65 Update yet more file header comments to standardized new format 2024-05-03 21:56:32 -05:00
morg
2eb43fa445 Remove null terminating chars from profile names before using them in ProfileManager 2023-12-06 10:33:57 +01:00
Dmitry K
51712f08b5 Removed include directives from ResourceManager.h to speed up build process 2023-07-12 14:51:47 +00:00
Geoffrey Mon
7b286352da Read I2C bus location more reliably 2023-05-30 22:08:44 -05:00
Frédéric Mercille
164f53dc91 Fix for Issue 3359 - Log which devices fail to load properly, but still update... 2023-05-13 16:09:39 +00:00
Shady Nawara
b05b5205de Fix segments load from profile 2023-01-26 04:29:26 +00:00
Adam Honse
447e936464 Segments 2023-01-20 19:00:45 +00:00
Dmitry K
b409b5f7cc Added support for unicode paths (filesystem::path approach) 2023-01-18 06:02:55 +00:00
Aleš Nezbeda
2603dbe4ab Fix profile not being applied when I2C bus ID changes on reboot 2022-09-27 02:29:59 +00:00
Adam Honse
4391f6db60 Attempt to fix https://gitlab.com/CalcProgrammer1/OpenRGB/-/issues/1820 by moving return statement 2021-11-04 19:38:23 -05:00
morg
3b49e9329b Add logs for invalid profiles 2021-11-04 13:37:15 +00:00
Alex
4af8614fce Add formated loging for device detection
Commits merged and amended for code style by Adam Honse <calcprogrammer1@gmail.com>
2021-07-05 03:23:34 -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
Gabriel Marcano
30f88d5fcf Fix mismatched new[] / delete
- The device description buffer was allocated using new[] in
   RGBController. Make sure to free it using delete[].
2021-05-05 02:07:19 -07:00
Adam Honse
5616f547e4 Fix a bunch of warnings 2021-04-29 13:42:49 -05:00
k1-801
ad2cd89128 Add filesystem header to select between std::filesystem and std::experimental::filesystem depending on system availability.
Commit amended by Adam Honse <calcprogrammer1@gmail.com>
2021-04-25 22:55:49 -05:00
Adam Honse
827b75320c Fix profile versioning. Profile version 1 used protocol version 0. Move profile version up to 2 using protocol version 2 and keep them synchronized if a new protocol version is added 2021-03-28 01:40:48 -05:00
Chris
ae8b502ad2 Gathering logging info to fix #1241
* Aligning profile version and header string
* Adding profile validation loggging
* Adding success / failure logging for each controller when attempting
to load profile
2021-03-28 00:53:10 -05:00
morg
8ef9f622f1 Fix memory leak (RGBController::GetDeviceDescription) 2021-03-27 22:15:24 +01:00
k1-801
1fdd4379a7 Small adjustments in LogManager 2021-03-24 11:39:26 -05:00
Chris
d65def0179 Fixing --help string for -p option
* Tweaked the profile mananger to allow to load profiles either with or
without the file extension
* Changed the --help string to reflect the change
2021-03-24 08:18:07 -05:00
Aleksey Krichevskiy
75a14f2250 ProfileManager: trunc flag to file overwrite 2021-03-05 11:09:16 -06:00
jath03
84861ef989 Fixing profile loading #1135 2021-02-26 08:17:44 -06:00
Jack
f844108022 Removing .orp extension from profile names 2021-02-19 03:29:39 +00:00
Diogo Trindade
f63aec118c Fixed profile string sdk response not being null terminated 2021-02-10 23:10:57 +00:00
morg
e2bc1003e6 Add profile management to SDK
Commit amended for code style by Adam Honse <calcprogrammer1@gmail.com>
2021-02-05 19:13:50 -06:00
Adam Honse
72070f95ad Fix profile deletion 2020-12-05 03:25:23 -06:00
Adam Honse
61d4b8fa5d More size loading fixes 2020-12-03 01:03:44 -06:00
Adam Honse
a7acefb284 Ignore location string when loading profiles for HID devices 2020-12-03 00:10:53 -06:00
Adam Honse
3f7c981ba2 Use up-to-date controller list in profile manager 2020-12-02 21:53:14 -06:00
Adam Honse
ddfcd1caf9 Split CLI processing into pre- and post-detection functions and add --localconfig and --nodetect options 2020-12-01 23:51:56 -06: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
a24909471f Fix Profile list loading 2020-11-10 15:49:56 -06:00
Adam Honse
f7d187f5b2 Use XDG-compliant configuration directory (APPDATA on Windows) 2020-11-10 15:49:56 -06:00
Adam Honse
b19dfdb010 Fix profile loading 2020-10-09 00:02:57 -05:00
Adam Honse
e767b3db90 Split functionality for applying sizes and settings from a temporary controller list to a controller to its own function 2020-10-08 00:35:35 -05:00
Adam Honse
da8c06756b Split functionality for loading temporary controllers from a saved profile into its own function 2020-10-08 00:16:37 -05:00
Térence Clastres
53379c5482 Fixes for memory issues detected by valgrind 2020-08-12 23:48:03 -05:00