From b4891e12e7c86dc6c08ced56f42d9a291195c2f8 Mon Sep 17 00:00:00 2001 From: a1xd <68629610+a1xd@users.noreply.github.com> Date: Wed, 30 Sep 2020 02:05:48 -0400 Subject: [PATCH] forbid 0 accel with naturalgain --- wrapper/wrapper.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/wrapper/wrapper.cpp b/wrapper/wrapper.cpp index a23205f9..a8fc0fb8 100644 --- a/wrapper/wrapper.cpp +++ b/wrapper/wrapper.cpp @@ -137,6 +137,8 @@ error_list_t^ get_accel_errors(AccelMode mode, AccelArgs^ args) if (args->acceleration > 10 && is_mode(am::natural, am::naturalgain)) error_list->Add("acceleration can not be greater than 10"); + else if (args->acceleration == 0 && is_mode(am::naturalgain)) + error_list->Add("acceleration must be positive"); else if (args->acceleration < 0) { bool additive = m < am::power; if (additive) error_list->Add("acceleration can not be negative, use a negative weight to compensate");