Simon's and Max' camera steering software.
https://stiefel.tech
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
691 B
34 lines
691 B
#ifndef INCLUDED_HAL_STEPPER
|
|
#define INCLUDED_HAL_STEPPER
|
|
|
|
#include <include/a4988.h>
|
|
|
|
namespace simon {
|
|
namespace stepper {
|
|
|
|
typedef struct {
|
|
float gear_reduction;
|
|
float steps_per_revolution;
|
|
} settings_t;
|
|
|
|
class c_stepper
|
|
{
|
|
public:
|
|
c_stepper(const std::string& axis);
|
|
private:
|
|
settings_t m_stepper;
|
|
a4988::c_allegro_4988 m_a4988;
|
|
a4988::a4988_settings_t m_a4988_set = {
|
|
.gpio_en = 17,
|
|
.gpio_step = 18,
|
|
.gpio_dir = 22,
|
|
.gpio_microsteps{
|
|
true, true, true
|
|
}
|
|
};
|
|
};
|
|
|
|
} // namespace stepper
|
|
} // namespace simon
|
|
|
|
#endif /*INCLUDED_HAL_STEPPER*/
|
|
|