#ifndef INCLUDED_HAL_STEPPER #define INCLUDED_HAL_STEPPER #include #include #include namespace simon { namespace stepper { using json = nlohmann::json; 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; std::unique_ptr m_ptr_a4988; std::thread m_thread; private: std::string read_file(const std::string& fname) const; void extract_settings(const json& j_set, const std::string& axis); }; } // namespace stepper } // namespace simon #endif /*INCLUDED_HAL_STEPPER*/