4 changed files with 25892 additions and 16 deletions
@ -1,11 +1,30 @@ |
|||
#include<include/stepper.h> |
|||
#include <thread> |
|||
#include <functional> |
|||
|
|||
namespace simon { |
|||
namespace stepper { |
|||
c_stepper::c_stepper(const settings_t* const stepper_set, |
|||
a4988::a4988_settings_t* a4988_set) |
|||
: m_set(stepper_set), m_a4988(a4988_set) |
|||
c_stepper::c_stepper(const std::string& axis) |
|||
: m_a4988(&m_a4988_set) |
|||
/* : m_a4988
|
|||
{ |
|||
|
|||
.gpio_en = 17, |
|||
.gpio_step = 18, |
|||
.gpio_dir = 22, |
|||
.gpio_microsteps{ |
|||
true, true, true |
|||
}, |
|||
m_stepper |
|||
{ |
|||
.gear_reduction = 64.0f, |
|||
.steps_per_revolution = 32.0f |
|||
} |
|||
*/ |
|||
{ |
|||
std::thread t1(std::bind(&a4988::c_allegro_4988::run, &m_a4988)); |
|||
m_a4988.post_move(32768, true, 100); |
|||
m_a4988.kill(); |
|||
t1.join(); |
|||
} |
|||
} |
|||
} |
|||
|
File diff suppressed because it is too large
Loading…
Reference in new issue