Add config info in README

This commit is contained in:
PixlOne 2019-07-29 22:56:20 -04:00
parent b95cc60fd1
commit 52f6a667d0
2 changed files with 13 additions and 4 deletions

View File

@ -4,6 +4,11 @@ This is an unofficial driver for Logitech mice and keyboard.
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
This project requires a C++14 compiler, cmake, libevdev, libconfig, and [my fork of libhidpp](https://github.com/PixlOne/hidpp)

View File

@ -42,6 +42,8 @@ Device::Device(std::string p, const HIDPP::DeviceIndex i) : path(std::move(p)),
void Device::configure(bool scanning)
{
// Divert buttons
divert_buttons();
// Set DPI if it is set
if(config->dpi != nullptr)
set_dpi(*config->dpi, scanning);
@ -51,8 +53,6 @@ void Device::configure(bool scanning)
// Set Hires Scroll if it is set
if(config->hiresscroll != nullptr)
set_hiresscroll(*config->hiresscroll, scanning);
// Divert buttons
divert_buttons();
}
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> features;
std::map<uint16_t, uint8_t> _features;
HIDPP20::IFeatureSet ifs (hidpp_dev);
unsigned int feature_count = ifs.getCount();
return features;
for(int i = 0; i < feature_count; i++)
_features.insert( {i, ifs.getFeatureID(i) } );
return _features;
}