Commit 924be2f8 authored by root's avatar root

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

parents 506606e2 8a1dd2e5
......@@ -4,9 +4,10 @@
#include "asservissement/asservissement.h"
#include "hardware/tourelle.h"
#include "hardware/leds.h"
#include "hardware/remote.h"
#ifndef ROBOTHW
#ifdef ROBOTHW
#include "hardware/remote.h"
#else
#include <QTimer>
#endif
......@@ -22,12 +23,14 @@ void Clock::everyTick()
void Clock::every5ms()
{
#ifndef STM32F40_41xxx
Remote::getSingleton()->update();
Odometrie::odometrie->update();
Asservissement::asservissement->update();
Tourelle::getSingleton()->update();
//StrategieV2::update();
#ifdef ROBOTHW
#ifndef STM32F40_41xxx
Remote::getSingleton()->update();
Odometrie::odometrie->update();
Asservissement::asservissement->update();
Tourelle::getSingleton()->update();
//StrategieV2::update();
#endif
#endif
}
......@@ -59,18 +62,18 @@ Clock::Clock()
m_matchStartTime = 0;
m_matchStarted = false;
#ifdef ROBOTHW
#ifdef ROBOTHW
*((uint32_t *)(STK_CTRL_ADDR)) = 0x03; // CLKSOURCE:0 ; TICKINT: 1 ; ENABLE:1
*((uint32_t *)(STK_LOAD_ADDR)) = (0.001*HW_CLOCK_SPEED*Clock::MS_PER_TICK)/8; // (doit etre inférieur à 0x00FFFFFF=16 777 215)
/* (voir p190 de la doc) */
NVIC_InitTypeDef SysTick_IRQ;
SysTick_IRQ.NVIC_IRQChannel = SysTick_IRQn;
SysTick_IRQ.NVIC_IRQChannelCmd = ENABLE;
SysTick_IRQ.NVIC_IRQChannelPreemptionPriority = 0;
SysTick_IRQ.NVIC_IRQChannelSubPriority = 1;
*((uint32_t *)(STK_LOAD_ADDR)) = (0.001*HW_CLOCK_SPEED*Clock::MS_PER_TICK)/8; // (doit etre inférieur à 0x00FFFFFF=16 777 215)
/* (voir p190 de la doc) */
NVIC_InitTypeDef SysTick_IRQ;
SysTick_IRQ.NVIC_IRQChannel = SysTick_IRQn;
SysTick_IRQ.NVIC_IRQChannelCmd = ENABLE;
SysTick_IRQ.NVIC_IRQChannelPreemptionPriority = 0;
SysTick_IRQ.NVIC_IRQChannelSubPriority = 1;
NVIC_Init(&SysTick_IRQ);
#else
/* Some trick with QTimer here */
......
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