Implement RemapButton feature

Many changes were made here, too many to list here.
This commit is contained in:
pixl
2020-07-05 02:55:46 -04:00
parent 0b87d3c664
commit 5bf5dc75b5
21 changed files with 765 additions and 104 deletions
+10 -1
View File
@@ -20,6 +20,7 @@
#include "features/DPI.h"
#include "Device.h"
#include "features/SmartShift.h"
#include "features/RemapButton.h"
using namespace logid;
using namespace logid::backend;
@@ -46,9 +47,14 @@ void Device::_init()
_addFeature<features::DPI>("dpi");
_addFeature<features::SmartShift>("smartshift");
_addFeature<features::RemapButton>("remapbutton");
for(auto& feature: _features)
for(auto& feature: _features) {
feature.second->configure();
feature.second->listen();
}
_hidpp20.listen();
}
std::string Device::name()
@@ -69,6 +75,9 @@ void Device::sleep()
void Device::wakeup()
{
logPrintf(INFO, "%s:%d woke up.", _path.c_str(), _index);
std::this_thread::sleep_for(std::chrono::milliseconds(100));
for(auto& feature: _features)
feature.second->configure();
}
DeviceConfig& Device::config()