From 39e042a799e7abf0886119ef471eaee261aa02cc Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Mon, 6 Sep 2021 19:16:06 -0400 Subject: increase lut points capacity to 257 remove unneeded constants --- common/rawaccel-base.hpp | 4 +--- common/rawaccel-validate.hpp | 4 ++-- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/common/rawaccel-base.hpp b/common/rawaccel-base.hpp index 8a49681..258cfef 100644 --- a/common/rawaccel-base.hpp +++ b/common/rawaccel-base.hpp @@ -13,12 +13,10 @@ namespace rawaccel { inline constexpr milliseconds WRITE_DELAY = 1000; - inline constexpr size_t POOL_SIZE = 1024 * 512; - inline constexpr size_t MAX_DEV_ID_LEN = 200; inline constexpr size_t MAX_NAME_LEN = 256; - inline constexpr size_t LUT_RAW_DATA_CAPACITY = 258; + inline constexpr size_t LUT_RAW_DATA_CAPACITY = 514; inline constexpr size_t LUT_POINTS_CAPACITY = LUT_RAW_DATA_CAPACITY / 2; inline constexpr double MAX_NORM = 16; diff --git a/common/rawaccel-validate.hpp b/common/rawaccel-validate.hpp index e901a8a..8b99a56 100644 --- a/common/rawaccel-validate.hpp +++ b/common/rawaccel-validate.hpp @@ -36,14 +36,14 @@ namespace rawaccel { }; auto check_accel = [&error](const accel_args& args) { - static_assert(LUT_POINTS_CAPACITY == 129, "update error msg"); + static_assert(LUT_POINTS_CAPACITY == 257, "update error msg"); if (args.mode == accel_mode::lookup) { if (args.length < 4) { error("lookup mode requires at least 2 points"); } else if (args.length > ra::LUT_RAW_DATA_CAPACITY) { - error("too many data points (max=129)"); + error("too many data points (max=257)"); } } else if (args.length > ra::LUT_RAW_DATA_CAPACITY) { -- cgit v1.2.3