diff options
| author | Jacob Palecki <[email protected]> | 2020-08-11 21:16:50 -0700 |
|---|---|---|
| committer | Jacob Palecki <[email protected]> | 2020-08-11 21:16:50 -0700 |
| commit | 319eb45dee5b805eee976d7c2d6be0a9d090d3ed (patch) | |
| tree | d164cf52ce420c2c51aee2e9c0fe67c5fe5b56c5 /common/rawaccel.hpp | |
| parent | Further comments (diff) | |
| parent | Merge pull request #13 from a1xd/write-cd (diff) | |
| download | rawaccel-319eb45dee5b805eee976d7c2d6be0a9d090d3ed.tar.xz rawaccel-319eb45dee5b805eee976d7c2d6be0a9d090d3ed.zip | |
Merge branch 'master' into GainCap
Diffstat (limited to 'common/rawaccel.hpp')
| -rw-r--r-- | common/rawaccel.hpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/rawaccel.hpp b/common/rawaccel.hpp index a2ed801..fc06731 100644 --- a/common/rawaccel.hpp +++ b/common/rawaccel.hpp @@ -16,6 +16,8 @@ namespace rawaccel { + using milliseconds = double; + /// <summary> Struct to hold vector rotation details. </summary> struct rotator { @@ -184,8 +186,8 @@ namespace rawaccel { velocity_gain_cap gain_cap = velocity_gain_cap(); accel_function(const accel_fn_args& args) { - if (args.time_min <= 0) error("min time must be positive"); - if (args.acc_args.offset < 0) error("offset must not be negative"); + if (args.time_min <= 0) bad_arg("min time must be positive"); + if (args.acc_args.offset < 0) bad_arg("offset must not be negative"); accel.tag = args.accel_mode; accel.visit([&](auto& impl) { impl = { args.acc_args }; }); |