Add config info in README
This commit is contained in:
parent
b95cc60fd1
commit
52f6a667d0
|
@ -4,6 +4,11 @@ This is an unofficial driver for Logitech mice and keyboard.
|
||||||
|
|
||||||
This is currently only compatible with HID++ \>2.0 devices.
|
This is currently only compatible with HID++ \>2.0 devices.
|
||||||
|
|
||||||
|
## Configuration
|
||||||
|
[Refer to the wiki for details.](https://github.com/PixlOne/logiops/wiki/Configuration)
|
||||||
|
|
||||||
|
You may also refer to logid.example.cfg for an example.
|
||||||
|
|
||||||
## Building
|
## Building
|
||||||
|
|
||||||
This project requires a C++14 compiler, cmake, libevdev, libconfig, and [my fork of libhidpp](https://github.com/PixlOne/hidpp)
|
This project requires a C++14 compiler, cmake, libevdev, libconfig, and [my fork of libhidpp](https://github.com/PixlOne/hidpp)
|
||||||
|
|
|
@ -42,6 +42,8 @@ Device::Device(std::string p, const HIDPP::DeviceIndex i) : path(std::move(p)),
|
||||||
|
|
||||||
void Device::configure(bool scanning)
|
void Device::configure(bool scanning)
|
||||||
{
|
{
|
||||||
|
// Divert buttons
|
||||||
|
divert_buttons();
|
||||||
// Set DPI if it is set
|
// Set DPI if it is set
|
||||||
if(config->dpi != nullptr)
|
if(config->dpi != nullptr)
|
||||||
set_dpi(*config->dpi, scanning);
|
set_dpi(*config->dpi, scanning);
|
||||||
|
@ -51,8 +53,6 @@ void Device::configure(bool scanning)
|
||||||
// Set Hires Scroll if it is set
|
// Set Hires Scroll if it is set
|
||||||
if(config->hiresscroll != nullptr)
|
if(config->hiresscroll != nullptr)
|
||||||
set_hiresscroll(*config->hiresscroll, scanning);
|
set_hiresscroll(*config->hiresscroll, scanning);
|
||||||
// Divert buttons
|
|
||||||
divert_buttons();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Device::divert_buttons(bool scanning)
|
void Device::divert_buttons(bool scanning)
|
||||||
|
@ -306,8 +306,12 @@ void Device::move_diverted(uint16_t cid, HIDPP20::IReprogControlsV4::Move m)
|
||||||
|
|
||||||
std::map<uint16_t, uint8_t> Device::get_features()
|
std::map<uint16_t, uint8_t> Device::get_features()
|
||||||
{
|
{
|
||||||
std::map<uint16_t, uint8_t> features;
|
std::map<uint16_t, uint8_t> _features;
|
||||||
HIDPP20::IFeatureSet ifs (hidpp_dev);
|
HIDPP20::IFeatureSet ifs (hidpp_dev);
|
||||||
unsigned int feature_count = ifs.getCount();
|
unsigned int feature_count = ifs.getCount();
|
||||||
return features;
|
|
||||||
|
for(int i = 0; i < feature_count; i++)
|
||||||
|
_features.insert( {i, ifs.getFeatureID(i) } );
|
||||||
|
|
||||||
|
return _features;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user