Skip to content

Commit

Permalink
Correct issue #257 - inversion error on INVERT_PWM_VALUES
Browse files Browse the repository at this point in the history
  • Loading branch information
fra589 committed Mar 3, 2022
1 parent 23438b3 commit 7a293a9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion grbl/grbl.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

// Grbl versioning system
#define GRBL_VERSION "1.2e"
#define GRBL_VERSION_BUILD "20220224"
#define GRBL_VERSION_BUILD "20220303"

// Define standard libraries used by Grbl.
#include <avr/io.h>
Expand Down
2 changes: 1 addition & 1 deletion grbl/spindle_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ void spindle_set_speed(uint16_t pwm_value)
sys.spindle_speed = rpm;
pwm_value = floor((rpm-settings.rpm_min)*pwm_gradient) + SPINDLE_PWM_MIN_VALUE;
}
#ifdef INVERT_PWM_VALUES
#ifndef INVERT_PWM_VALUES
return(pwm_value);
#else
return(SPINDLE_PWM_MAX_VALUE - pwm_value);
Expand Down

0 comments on commit 7a293a9

Please sign in to comment.