|
@ -12,15 +12,14 @@ |
|
|
#include <sstream>
|
|
|
#include <sstream>
|
|
|
#include <string>
|
|
|
#include <string>
|
|
|
#include <vector>
|
|
|
#include <vector>
|
|
|
#include "spdlog/spdlog.h"
|
|
|
|
|
|
|
|
|
|
|
|
#include "iflytopcpp/core/spdlogfactory/logger_factory.hpp"
|
|
|
|
|
|
#include "iflytopcpp/core/basic/nlohmann/json.hpp"
|
|
|
#include "iflytopcpp/core/basic/nlohmann/json.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#include "iflytopcpp/core/spdlogfactory/logger_factory.hpp"
|
|
|
#include "spdlog/fmt/ostr.h"
|
|
|
#include "spdlog/fmt/ostr.h"
|
|
|
|
|
|
#include "spdlog/spdlog.h"
|
|
|
extern "C" { |
|
|
extern "C" { |
|
|
#include <linux/input.h>
|
|
|
#include <linux/input.h>
|
|
|
|
|
|
|
|
|
#include "linux/input-event-codes.h"
|
|
|
#include "linux/input-event-codes.h"
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -61,6 +60,13 @@ ENABLE_BASIC_TYPE_LOGGER(double) |
|
|
// dump input event
|
|
|
// dump input event
|
|
|
template <typename OStream> |
|
|
template <typename OStream> |
|
|
static inline OStream &operator<<(OStream &os, struct input_event &event) { |
|
|
static inline OStream &operator<<(OStream &os, struct input_event &event) { |
|
|
return os << fmt::format("input-event {} {} {}", event.type, event.code, |
|
|
|
|
|
event.value); |
|
|
|
|
|
|
|
|
return os << fmt::format("input-event {} {} {}", event.type, event.code, event.value); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
#define ZCHECK(exptr, info) \
|
|
|
|
|
|
{ \ |
|
|
|
|
|
if (!(exptr)) { \ |
|
|
|
|
|
logger->critical("({}:{})ZCHECK failed: {} {}", __FILE__, __LINE__, info, #exptr); \ |
|
|
|
|
|
exit(-1); \ |
|
|
|
|
|
} \ |
|
|
|
|
|
} |