This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "krobot".
The branch, master has been updated
via 9641f603275a43c3f07862973aea212c2e0ced9c (commit)
via 7797e8dd88a52c7e6767729bd606e9aa632920af (commit)
from 731b470ef6cd5b6d93a2b2e2a85182f1c535b4b8 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 9641f603275a43c3f07862973aea212c2e0ced9c
Author: Xavier Lagorce <Xav...@cr...>
Date: Thu Apr 21 14:24:31 2011 +0200
[Controller_Motor_STM32] Release CPU during speed profile computation for Bezier Splines
commit 7797e8dd88a52c7e6767729bd606e9aa632920af
Author: Xavier Lagorce <Xav...@cr...>
Date: Thu Apr 21 14:00:47 2011 +0200
[Controller_Motor_STM32] Fix convertion problem between seconds and systicks in odometry.
-----------------------------------------------------------------------
Changes:
diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/bezier_utils.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/bezier_utils.c
index 0b74fde..d467b7d 100644
--- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/bezier_utils.c
+++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/bezier_utils.c
@@ -9,6 +9,10 @@
#include "bezier_utils.h"
+#ifdef BEZIER_UTILS_USE_BERTOS
+#include <kern/proc.h>
+#endif
+
float bezier_apply(float params[4], float u) {
return (params[0] + params[1]*u + params[2]*u*u + params[3]*u*u*u);
}
@@ -62,6 +66,10 @@ void bezier_velocity_profile(float dparams[2][4], float ddparams[2][4],
vmins[ind] = v_end;
ind++;
+#ifdef BEZIER_UTILS_USE_BERTOS
+ cpu_relax();
+#endif
+
// Compute speed limitations
for (j=0; j < ind; j++) {
im = mins[j];
@@ -95,6 +103,10 @@ void bezier_velocity_profile(float dparams[2][4], float ddparams[2][4],
break;
}
}
+
+#ifdef BEZIER_UTILS_USE_BERTOS
+ cpu_relax();
+#endif
} // end if (vm < v_max)
} // for mins
}
diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/bezier_utils.h b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/bezier_utils.h
index c36fd62..2aa45fd 100644
--- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/bezier_utils.h
+++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/bezier_utils.h
@@ -10,6 +10,8 @@
#ifndef __BEZIER_UTILS_H
#define __BEZIER_UTILS_H
+#define BEZIER_UTILS_USE_BERTOS
+
#include <math.h>
#include <stdint.h>
diff --git a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.c b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.c
index 208c342..ab0f7eb 100644
--- a/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.c
+++ b/elec/boards/Controller_Motor_STM32/Firmware/controller_motor_stm32/odometry.c
@@ -59,7 +59,7 @@ static void NORETURN odometry_process(void) {
Timer timer;
// configure timer
- timer_setDelay(&timer, ms_to_ticks(state.Ts));
+ timer_setDelay(&timer, ms_to_ticks(1000 * state.Ts));
timer_setEvent(&timer);
// Indicate we are running
hooks/post-receive
--
krobot
|