increase lut points capacity to 257

remove unneeded constants
This commit is contained in:
a1xd 2021-09-06 19:16:06 -04:00
parent 170713f571
commit 39e042a799
2 changed files with 3 additions and 5 deletions

View file

@ -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;

View file

@ -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) {