🪇 Adds early return for kinematics to reduce calc

This commit is contained in:
Rune Harlyk
2024-07-08 21:24:51 +02:00
committed by Rune Harlyk
parent 2689093485
commit 81f69631f9
3 changed files with 22 additions and 10 deletions
+1 -1
View File
@@ -108,7 +108,6 @@ class MotionService
}
bool updateMotion() {
float new_angles[12] = {0,};
switch (motionState) {
case MOTION_STATE::IDLE:
return false;
@@ -160,6 +159,7 @@ class MotionService
constexpr static int MotionInterval = 100;
body_state_t body_state = {0,};
float new_angles[12] = {0,};
float dir[12] = {-1, -1, -1, 1, -1, -1, -1, -1, -1, 1, -1, -1};
float default_feet_positions[4][4] = {