fix some bugs in 3steppers

This commit is contained in:
2022-06-10 20:07:41 +03:00
parent 80726e1c2b
commit 16f72f6801
13 changed files with 276 additions and 88 deletions

View File

@@ -25,6 +25,8 @@
// amount of tries to detect motor stall
#define NSTALLEDMAX (5)
// amount of steps to detect stalled state
#define STALLEDSTEPS (15)
// stepper states
typedef enum{
@@ -53,6 +55,7 @@ void encoders_UPD(uint8_t i);
void init_steppers();
int32_t encoder_position(uint8_t i);
int setencpos(uint8_t i, int32_t position);
errcodes setmotpos(uint8_t i, int32_t position);
errcodes getpos(uint8_t i, int32_t *position);
errcodes getremainsteps(uint8_t i, int32_t *position);