Use events instead of continous pinging

This commit is contained in:
PixlOne
2019-07-28 02:08:18 -04:00
parent 684f502b2e
commit b95cc60fd1
13 changed files with 366 additions and 291 deletions
+7 -11
View File
@@ -1,14 +1,10 @@
#ifndef MASTEROPTIONS_CONFIGURATION_H
#define MASTEROPTIONS_CONFIGURATION_H
#ifndef CONFIGURATION_H
#define CONFIGURATION_H
#include <map>
#include <libconfig.h++>
struct smartshift_options
{
bool* on = nullptr;
uint8_t* threshold = nullptr;
};
#include <hidpp20/ISmartShift.h>
#include "Actions.h"
class DeviceConfig;
class ButtonAction;
@@ -20,8 +16,8 @@ public:
DeviceConfig();
DeviceConfig(const libconfig::Setting& root);
const int* dpi = nullptr;
struct smartshift_options* smartshift = nullptr;
const bool* hiresscroll = nullptr;
HIDPP20::ISmartShift::SmartshiftStatus* smartshift;
const uint8_t* hiresscroll = nullptr;
std::map<uint16_t, ButtonAction*> actions;
};
@@ -38,4 +34,4 @@ ButtonAction* parse_action(Action action, const libconfig::Setting* action_confi
extern Configuration* global_config;
#endif //MASTEROPTIONS_CONFIGURATION_H
#endif //CONFIGURATION_H