Commit Graph

66 Commits

Author SHA1 Message Date
Térence Clastres
d2dfd03551 Use the default SDK port constant in the CLI 2020-06-23 23:10:41 -05:00
Térence Clastres
f3bdee9bd2 CLI: Allow --mode flag to be case insensitive
Also fix handling when no argument passed
2020-06-23 23:10:29 -05:00
Térence Clastres
0286a5dd58 CLI: Add daemon/server mode 2020-06-20 14:39:01 -05:00
Térence Clastres
b3cadbae5d Fix CLI
It was not changing the colors since e3e6c034 and had an overflow on
`options->devices.size()` since 0f4ddd16 causing options not to be applied

Second issue was a bit trickier as it was not reproducable when using a
debug build. It seemed like `std::vector<DeviceOptions> devices` had an
overflow. I saw a bunch of warnings regarding comparison with implicit
cast so I figured I'd fix that first and see if it makes a difference.
Turns out it did and fixed the issue.

While toying around, I also noticed that `throw` didn't seem to work,
causing crashes later in the program. It turns out the catch-all clause
`catch (...)` is not necessary matching a `throw NULL` expression as it
might be of type `int`. The solution is to use `thrown nullptr;`
instead.

Reference: https://en.cppreference.com/w/cpp/language/try_catch
2020-06-19 16:46:57 -05:00
Adam Honse
eaa3b9a368 Add command line option to enable i2c tools 2020-05-12 11:01:46 -05:00
Adam Honse
aa1ad8db85 Add zone resizing to CLI 2020-04-04 02:53:55 -05:00
Adam Honse
fdbaf9bf63 Fix segfault in CLI 2020-03-22 22:18:30 -05:00
Adam Honse
08a1197b7e Fix arguments not parsing in CLI, add mode specific color support to CLI 2020-03-22 16:22:59 -05:00
Adam Honse
87a9ea5b14 Add some comments to the CLI code and clean up some warnings 2020-03-22 03:49:08 -05:00
Adam Honse
2b8d25559a Move help and version functions to the same place as the other arguments 2020-03-22 01:48:57 -05:00
Adam Honse
3db9189cbb Fix current device ID in CLI 2020-03-22 01:01:01 -05:00
Adam Honse
a0c379e8c7 Add profile saving to command line 2020-03-22 00:26:06 -05:00
Adam Honse
0ae4964545 Clean up some of the CLI code and add option to load a profile from the command line 2020-03-22 00:04:27 -05:00
Adam Honse
69651b3f91 Load sizes for variable-size controllers in CLI mode 2020-03-20 13:50:54 -05:00
Adam Honse
c7960c090a Add software version information to CLI 2020-02-29 14:01:06 -06:00
Stefan Reiter
71c650cd45 Add cli.cpp and make it build at least
Not confirmed working as of yet, but at least it builds and
--list-devices works.

Code originally taken from Sam Lewis (@sam-masaki on gitlab.com), see:
https://gitlab.com/CalcProgrammer1/OpenRGB/-/merge_requests/9
2020-02-24 00:03:07 -06:00