From: Justin <Ba...@us...> - 2011-06-09 13:27:25
|
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 866ad6a203d8944e3e4b2adbc0c6751634f85c35 (commit) from 813f014e3d1f1a42fbd0851c3d877e1739d8710a (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 866ad6a203d8944e3e4b2adbc0c6751634f85c35 Author: justin <justin@MacBook.(none)> Date: Thu Jun 9 15:26:17 2011 +0200 Modifications on asservissement code ----------------------------------------------------------------------- Changes: diff --git a/elec/boards/Controller_Motor_STM32/Firmwares/Junior_Drive/controller_motor_stm32/#main.c# b/elec/boards/Controller_Motor_STM32/Firmwares/Junior_Drive/controller_motor_stm32/#main.c# deleted file mode 100644 index 77b78d4..0000000 --- a/elec/boards/Controller_Motor_STM32/Firmwares/Junior_Drive/controller_motor_stm32/#main.c# +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Firmware for Controller Motor STM32 - * - * Author : Xavier Lagorce <Xav...@cr...> - */ -#include <cpu/irq.h> -#include <cfg/debug.h> -#include <drv/timer.h> -#include <drv/gpio_stm32.h> -#include <kern/proc.h> -#include <kern/monitor.h> -#include <math.h> - -#include "hw/hw_led.h" -#include "motor.h" -#include "encoder.h" -#include "asservissement.h" - - -PROC_DEFINE_STACK(stack_ind, KERN_MINSTACKSIZE * 2); - -static void init(void) -{ - IRQ_ENABLE; - LEDS_INIT(); - - /* Initialize debugging module (allow kprintf(), etc.) */ - kdbg_init(); - /* Initialize system timer */ - timer_init(); - - /* - * Kernel initialization: processes (allow to create and dispatch - * processes using proc_new()). - */ - proc_init(); - - motorsInit(); - encodersInit(); - controlInit(); - - // Blink to say we are ready - for (uint8_t i=0; i < 5; i++) { - LED1_ON(); - LED2_ON(); - LED3_ON(); - LED4_ON(); - timer_delay(100); - LED1_OFF(); - LED2_OFF(); - LED3_OFF(); - LED4_OFF(); - timer_delay(100); - } -} - -static void NORETURN ind_process(void) -{ - while(1) { - LED1_ON(); - timer_delay(500); - LED1_OFF(); - timer_delay(500); - } -} - -int main(void) -{ - init(); - int status=0; - int coder=0; - /* Create a new child process */ - proc_new(ind_process, NULL, sizeof(stack_ind), stack_ind); - - /* - * The main process is kept to periodically report the stack - * utilization of all the processes (1 probe per second). - */ - - - - - while (1) - { - //monitor_report(); - /* if( getEncoderDirection(ENCODER3) == FORWARD_DIRECTION ) - { - if(status==0) - { - status=1; - LED4_ON(); - } - } - else - { - if(status==1) - { - LED4_OFF(); - status=0; - } - LED4_OFF(); - } - coder = getEncoderCount(ENCODER2); - timer_delay(10); - if ( getEncoderCount(ENCODER2)==65535) LED3_ON(); - //else LED3_OFF(); - timer_delay(10);*/ - timer_delay(1000); - } - - return 0; -} - hooks/post-receive -- krobot |