9 #define LOG_STEPPER(this) \ 10 ESP_LOGCONFIG(TAG, " Acceleration: %.0f steps/s^2", this->acceleration_); \ 11 ESP_LOGCONFIG(TAG, " Deceleration: %.0f steps/s^2", this->deceleration_); \ 12 ESP_LOGCONFIG(TAG, " Max Speed: %.0f steps/s", this->max_speed_); 45 void play(Ts...
x)
override { this->parent_->set_target(this->target_.value(
x...)); }
57 void play(Ts...
x)
override { this->parent_->report_position(this->position_.value(
x...)); }
67 TEMPLATABLE_VALUE(
float,
speed);
70 float speed = this->speed_.value(
x...);
71 this->parent_->set_max_speed(speed);
72 this->parent_->on_update_speed();
83 TEMPLATABLE_VALUE(
float, acceleration);
87 this->parent_->set_acceleration(acceleration);
98 TEMPLATABLE_VALUE(
float, deceleration);
102 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.