-
Notifications
You must be signed in to change notification settings - Fork 237
Closed
Labels
Description
It is using ms_table[] that is defined in A4988.cpp.
It is using this table, because implementation of method setMicrostep() is in A4988.cpp and this table is static.
If I copy whole setMicrostep() method to DRV8825.cpp and that way overwrite A4988 method it start to work.
There is few method to resolve this issue like removing static and moving initialization of ms_table to constructor or overwriting setMicrostep() in DRV8825.
Additionally I found few smaller cosmetic issues :)
- In few places there is this kind of if statment
if (!IS_CONNECTED(ms1_pin) || !IS_CONNECTED(ms1_pin) || !IS_CONNECTED(ms1_pin))
I think it shouldn't have only ms1_pin there. - Following members are not used in DRV8825.h:
int mode0_pin = PIN_UNCONNECTED;
int mode1_pin = PIN_UNCONNECTED;
int mode2_pin = PIN_UNCONNECTED;