Browse Source
Only define and call functions if the appropriate #define in APM_Config.h has been addedmaster
Randy Mackay
12 years ago
3 changed files with 42 additions and 5 deletions
@ -1,13 +1,44 @@
@@ -1,13 +1,44 @@
|
||||
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- |
||||
|
||||
#ifdef USERHOOK_INIT |
||||
void userhook_init() |
||||
{ |
||||
// put your initialisation code here |
||||
// this will be called once at start-up |
||||
} |
||||
#endif |
||||
|
||||
|
||||
#ifdef USERHOOK_FASTLOOP |
||||
void userhook_FastLoop() |
||||
{ |
||||
// put your 100Hz code here |
||||
} |
||||
#endif |
||||
|
||||
#ifdef USERHOOK_50HZLOOP |
||||
void userhook_50Hz() |
||||
{ |
||||
// put your 50Hz code here |
||||
} |
||||
#endif |
||||
|
||||
#ifdef USERHOOK_MEDIUMLOOP |
||||
void userhook_MediumLoop() |
||||
{ |
||||
// put your 10Hz code here |
||||
} |
||||
#endif |
||||
|
||||
#ifdef USERHOOK_SLOWLOOP |
||||
void userhook_SlowLoop() |
||||
{ |
||||
// put your 3.3Hz code here |
||||
} |
||||
#endif |
||||
|
||||
#ifdef USERHOOK_SUPERSLOWLOOP |
||||
void userhook_SuperSlowLoop() |
||||
{ |
||||
// put your 1Hz code here |
||||
} |
||||
#endif |
@ -1,13 +1,19 @@
@@ -1,13 +1,19 @@
|
||||
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
||||
|
||||
// user defined variables
|
||||
|
||||
// example variables used in Wii camera testing - replace with your own
|
||||
// variables
|
||||
#ifdef USERHOOK_VARIABLES |
||||
|
||||
#if WII_CAMERA == 1 |
||||
WiiCamera ircam; |
||||
int WiiRange=0; |
||||
int WiiRotation=0; |
||||
int WiiDisplacementX=0; |
||||
int WiiDisplacementY=0; |
||||
#endif |
||||
#endif // WII_CAMERA
|
||||
|
||||
#endif // USERHOOK_VARIABLES
|
||||
|
||||
|
||||
|
Loading…
Reference in new issue