Commit f3dc9b09 authored by root's avatar root
Browse files

Merge branch 'master' of /srv/git/hook_robotique/../repositories/gitRobotique

parents 0f547255 28b3c340
......@@ -12,7 +12,7 @@ class Roues
Roues();
/**@brief On sauvegarde ces deux roues pour pouvoir les utiliser indépendament */
Roue gauche,droite;
Roue droite, gauche;
};
#endif // ROUES_H
......@@ -48,7 +48,6 @@
<Add before="cp stm32LinkerScriptH405.cmd stm32LinkerScript.cmd" />
<Add after="arm-none-eabi-objcopy -Obinary main.out main.bin" />
<Add after="arm-none-eabi-objdump -S main.out &gt; main.list" />
<Add after="cp main.bin ~/Dropbox/Clubs/Robotique/Informatique/git2014_f4/gitRobotique/stm32/." />
<Mode after="always" />
</ExtraCommands>
<Unit filename="LibrariesF4/CMSIS/Device/ST/STM32F4xx/Include/stm32f4xx.h" />
......@@ -199,7 +198,7 @@
<debugger>
<search_path add="../../../../../Lien vers partageMV" />
<remote_debugging target="Debug">
<options conn_type="0" serial_baud="115200" ip_address="192.168.153.1" ip_port="3333" additional_cmds_before="source ~/.gdbinit" />
<options conn_type="0" serial_baud="115200" ip_address="127.0.0.1" ip_port="3333" additional_cmds_before="source ~/.gdbinit" />
</remote_debugging>
</debugger>
</Extensions>
......
......@@ -47,7 +47,7 @@ void Clock::every100ms()
void Clock::everySecond()
{
//Led::toggle(0);
Led::toggle(0);
}
Clock* Clock::getInstance()
......
......@@ -59,5 +59,43 @@ void InitKrabiJunior::initGPIO()
#ifdef ROBOTHW
Tirette tirette(GPIOA, GPIO_Pin_10);
#ifdef STM32F40_41xxx
GPIO_InitTypeDef GPIOStruct;
GPIOStruct.GPIO_OType = GPIO_OType_PP;
GPIOStruct.GPIO_Speed = GPIO_Speed_2MHz;
/** Sharps **/
GPIOStruct.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1 | GPIO_Pin_2 | GPIO_Pin_3 | GPIO_Pin_5;
GPIOStruct.GPIO_Mode = GPIO_Mode_AN;
GPIOStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOC, &GPIOStruct);
GPIOStruct.GPIO_Pin = GPIO_Pin_0 | GPIO_Pin_1;
GPIOStruct.GPIO_Mode = GPIO_Mode_AN;
GPIOStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOB, &GPIOStruct);
GPIOStruct.GPIO_Pin = GPIO_Pin_6 | GPIO_Pin_7;
GPIOStruct.GPIO_Mode = GPIO_Mode_AN;
GPIOStruct.GPIO_PuPd = GPIO_PuPd_NOPULL;
GPIO_Init(GPIOA, &GPIOStruct);
/** LEDS choix strat **/
GPIOStruct.GPIO_Pin = GPIO_Pin_9;
GPIOStruct.GPIO_Mode = GPIO_Mode_IN;
GPIOStruct.GPIO_PuPd = GPIO_PuPd_DOWN;
GPIOStruct.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOB, &GPIOStruct);
/** LED verte **/
GPIOStruct.GPIO_Pin = GPIO_Pin_12;
GPIOStruct.GPIO_Mode = GPIO_Mode_OUT;
GPIOStruct.GPIO_OType = GPIO_OType_PP;
GPIOStruct.GPIO_Speed = GPIO_Speed_2MHz;
GPIO_Init(GPIOC, &GPIOStruct);
GPIO_WriteBit(GPIOC, GPIO_Pin_12, Bit_SET);
#endif
#endif
}
......@@ -2,7 +2,7 @@
#if defined(STM32F40_41xxx)
#include "initKrabiJunior.h"
#include "clock.h"
#include "KJ2016Tempo.h"
#elif defined(STM32F10X_CL)
#include "initkrabi.h"
......@@ -23,17 +23,18 @@ int main()
//initKJ.init(); // Not this year - we are NOT using odometry, strategiev2, etc, so it's best not to init them at all
initKJ.initClock();
initKJ.initGPIO();
initKJ.initActionneurs(); // For servos
Clock::getInstance();
// initKJ.initActionneurs(); // For servos
#elif defined(STM32F10X_CL) // H107
InitKrabi initKrabi;
initKrabi.init();
#endif
Remote::getSingleton()->waitForConnection();
//Remote::getSingleton()->waitForConnection();
/** Action sequencing for KJ **/
#ifdef STM32F40_41xxx
KJ2016Tempo::run(initKJ.isYellow());
//KJ2016Tempo::run(initKJ.isYellow());
#endif
while(1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment