Skip to content

Commit

Permalink
Merge pull request #31 from a1xd/fix-1.0.0
Browse files Browse the repository at this point in the history
forbid 0 accel with naturalgain
  • Loading branch information
JacobPalecki authored Sep 30, 2020
2 parents 97f82c3 + b4891e1 commit f62dc2e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions wrapper/wrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit f62dc2e

Please sign in to comment.