Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Em6
robotique
Commits
924be2f8
Commit
924be2f8
authored
Mar 24, 2016
by
root
Browse files
Merge branch 'master' of /srv/git/hook_robotique/../repositories/gitRobotique
parents
506606e2
8a1dd2e5
Changes
1
Hide whitespace changes
Inline
Side-by-side
stm32/src/clock.cpp
View file @
924be2f8
...
...
@@ -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 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment