10 #define LOG_STEPPER(this) \ 11 ESP_LOGCONFIG(TAG, " Acceleration: %.0f steps/s^2", this->acceleration_); \ 12 ESP_LOGCONFIG(TAG, " Deceleration: %.0f steps/s^2", this->deceleration_); \ 13 ESP_LOGCONFIG(TAG, " Max Speed: %.0f steps/s", this->max_speed_); 46 void play(Ts...
x)
override { this->parent_->set_target(this->target_.value(
x...)); }
58 void play(Ts...
x)
override { this->parent_->report_position(this->position_.value(
x...)); }
68 TEMPLATABLE_VALUE(
float,
speed);
71 float speed = this->speed_.value(
x...);
72 this->parent_->set_max_speed(speed);
73 this->parent_->on_update_speed();
84 TEMPLATABLE_VALUE(
float, acceleration);
88 this->parent_->set_acceleration(acceleration);
99 TEMPLATABLE_VALUE(
float, deceleration);
103 this->parent_->set_deceleration(deceleration);
void set_acceleration(float acceleration)
void play(Ts... x) override
SetTargetAction(Stepper *parent)
void set_max_speed(float max_speed)
TEMPLATABLE_VALUE(int32_t, target) void play(Ts... x) override
virtual void on_update_speed()
uint32_t last_calculation_
void calculate_speed_(uint32_t now)
ReportPositionAction(Stepper *parent)
void set_deceleration(float deceleration)
void set_target(int32_t steps)
void play(Ts... x) override
SetDecelerationAction(Stepper *parent)
SetSpeedAction(Stepper *parent)
SetAccelerationAction(Stepper *parent)
TEMPLATABLE_VALUE(int32_t, position) void play(Ts... x) override
void play(Ts... x) override
void report_position(int32_t steps)
bool has_reached_target()
Implementation of SPI Controller mode.