First approximation to steppers run

This commit is contained in:
Edward Emelianov
2021-11-16 00:28:20 +03:00
parent bac9912056
commit 4b50e95838
12 changed files with 257 additions and 123 deletions

View File

@@ -24,7 +24,7 @@
#include "commonproto.h"
// amount of tries to detect motor stall
#define NSTALLEDMAX (5)
#define NSTALLEDMAX (55)
// stepper states
typedef enum{
@@ -50,6 +50,9 @@ void addmicrostep(uint8_t i);
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 getpos(uint8_t i, int32_t *position);
errcodes getremainsteps(uint8_t i, int32_t *position);
errcodes motor_absmove(uint8_t i, int32_t abssteps);