Added [override] to onStep
This commit is contained in:
parent
d3912b6ec9
commit
9a42f0885c
|
|
@ -71,7 +71,7 @@ struct Stepper_A3967 : StepperControl {
|
||||||
|
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
|
|
||||||
void onStep(boolean direction){
|
void onStep(boolean direction) override {
|
||||||
digitalWrite(dirPin,direction);
|
digitalWrite(dirPin,direction);
|
||||||
digitalWrite(stepPin,HIGH);
|
digitalWrite(stepPin,HIGH);
|
||||||
digitalWrite(stepPin,LOW);
|
digitalWrite(stepPin,LOW);
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,7 @@ struct Stepper_TB6612 : StepperControl {
|
||||||
|
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
|
|
||||||
void onStep(boolean direction){
|
void onStep(boolean direction) override {
|
||||||
if(direction)
|
if(direction)
|
||||||
phase=(phase+1)%nPhases;
|
phase=(phase+1)%nPhases;
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@ void setup() {
|
||||||
delay(1000);
|
delay(1000);
|
||||||
Serial.printf("\nHomeSpan Stepper Control\n\n");
|
Serial.printf("\nHomeSpan Stepper Control\n\n");
|
||||||
|
|
||||||
bigMotor=(new Stepper_TB6612(23,32,22,14,33,27))->setStepType(StepperControl::HALF_STEP)->setAccel(10,20);;
|
bigMotor=(new Stepper_TB6612(23,32,22,14,33,27))->setStepType(StepperControl::HALF_STEP)->setAccel(10,20);
|
||||||
smallMotor=new Stepper_A3967(17,16,19,18,21);
|
smallMotor=new Stepper_A3967(17,16,19,18,21);
|
||||||
|
|
||||||
// bigMotor->setStepType(StepperControl::HALF_STEP);
|
// bigMotor->setStepType(StepperControl::HALF_STEP);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue