8 static const char *
const TAG =
"stepper";
22 auto steps_to_decelerate =
static_cast<int32_t
>(v_squared / (2 * this->
deceleration_));
23 if (num_steps <= steps_to_decelerate) {
30 this->current_speed_ =
clamp(this->current_speed_, 0.0f, this->
max_speed_);
42 this->last_step_ = now;
uint32_t last_calculation_
void calculate_speed_(uint32_t now)
uint32_t IRAM_ATTR HOT micros()
constexpr const T & clamp(const T &v, const T &lo, const T &hi, Compare comp)
bool has_reached_target()
Implementation of SPI Controller mode.