From 36b39d41bae16c1ef0803d1b8cc77e5f7e41254c Mon Sep 17 00:00:00 2001 From: Rune Harlyk Date: Wed, 16 Jul 2025 21:44:46 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Replace=20magic=20number=20for?= =?UTF-8?q?=20stand=5Ffrac?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- esp32/include/gait/bezier_state.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/esp32/include/gait/bezier_state.h b/esp32/include/gait/bezier_state.h index b4c27da..d882db0 100644 --- a/esp32/include/gait/bezier_state.h +++ b/esp32/include/gait/bezier_state.h @@ -61,8 +61,8 @@ class BezierState : public GaitState { body_state.feet[index][2] = this->default_feet_pos[index][2]; const float leg_phase = std::fmod(phase_time + PHASE_OFFSET[index], 1.0f); const bool contact = leg_phase <= STAND_OFFSET; - contact ? standController(body_state, index, leg_phase / 0.75) - : swingController(body_state, index, (leg_phase - 0.75) / (1 - 0.75)); + contact ? standController(body_state, index, leg_phase / STAND_OFFSET) + : swingController(body_state, index, (leg_phase - STAND_OFFSET) / (1 - STAND_OFFSET)); } void standController(body_state_t &body_state, const int index, const float phase) {