Fix methods
This commit is contained in:
parent
f2f3dd9127
commit
04d29ef2fe
|
@ -23,10 +23,10 @@ void TB6600MotorDriver::setup() {
|
|||
pinMode(_pulsePin, OUTPUT);
|
||||
|
||||
digitalWrite(_directionPin, LOW);
|
||||
digitalWrite(_enablePin, HIGH);
|
||||
digitalWrite(_enablePin, _enabled ? HIGH : LOW);
|
||||
}
|
||||
|
||||
void TB6600MotorDriver::setDirection(uint8_t direction) {
|
||||
void TB6600MotorDriver::setDirection(bool direction) {
|
||||
if (direction != _direction) {
|
||||
_direction = direction;
|
||||
_setDirection();
|
||||
|
|
|
@ -35,10 +35,9 @@ class TB6600MotorDriver {
|
|||
TB6600MotorDriver();
|
||||
TB6600MotorDriver(uint8_t enablePin, uint8_t directionPin, uint8_t pulsePin, uint32_t usPulse, uint8_t microsteps);
|
||||
|
||||
|
||||
void setup();
|
||||
|
||||
void setDirection(uint8_t direction);
|
||||
void setDirection(bool direction);
|
||||
void setSpeed(uint16_t rpm);
|
||||
|
||||
//full
|
||||
|
|
Loading…
Reference in New Issue