Switched from fabs to std::abs which is type-aware and safer going forward.

This commit is contained in:
Rob Giseburt
2017-12-03 16:10:22 -06:00
parent 459f7c5c43
commit b70abe4067
13 changed files with 53 additions and 61 deletions
+1 -1
View File
@@ -153,7 +153,7 @@ static stat_t _jogging_axis_start(int8_t axis) {
static stat_t _jogging_axis_ramp_jog(int8_t axis) // run the jog ramp
{
float direction = jog.start_pos <= jog.dest_pos ? 1. : -1.;
float delta = fabs(jog.dest_pos - jog.start_pos);
float delta = std::abs(jog.dest_pos - jog.start_pos);
uint8_t last = 0;
float velocity =