2015-05-29 23:12:49 -03:00
|
|
|
#include "Copter.h"
|
|
|
|
|
2013-05-17 00:19:07 -03:00
|
|
|
#ifdef USERHOOK_INIT
|
2015-05-29 23:12:49 -03:00
|
|
|
void Copter::userhook_init()
|
2011-10-15 19:29:33 -03:00
|
|
|
{
|
2012-08-16 21:50:03 -03:00
|
|
|
// put your initialisation code here
|
2013-05-17 00:19:07 -03:00
|
|
|
// this will be called once at start-up
|
|
|
|
}
|
|
|
|
#endif
|
2011-10-15 19:29:33 -03:00
|
|
|
|
2013-05-17 00:19:07 -03:00
|
|
|
#ifdef USERHOOK_FASTLOOP
|
2015-05-29 23:12:49 -03:00
|
|
|
void Copter::userhook_FastLoop()
|
2013-05-17 00:19:07 -03:00
|
|
|
{
|
|
|
|
// put your 100Hz code here
|
2011-10-15 19:29:33 -03:00
|
|
|
}
|
2013-05-17 00:19:07 -03:00
|
|
|
#endif
|
2011-10-15 19:29:33 -03:00
|
|
|
|
2013-05-17 00:19:07 -03:00
|
|
|
#ifdef USERHOOK_50HZLOOP
|
2015-05-29 23:12:49 -03:00
|
|
|
void Copter::userhook_50Hz()
|
2011-10-15 19:29:33 -03:00
|
|
|
{
|
2012-08-16 21:50:03 -03:00
|
|
|
// put your 50Hz code here
|
2013-05-17 00:19:07 -03:00
|
|
|
}
|
|
|
|
#endif
|
2011-10-15 19:29:33 -03:00
|
|
|
|
2013-05-17 00:19:07 -03:00
|
|
|
#ifdef USERHOOK_MEDIUMLOOP
|
2015-05-29 23:12:49 -03:00
|
|
|
void Copter::userhook_MediumLoop()
|
2013-05-17 00:19:07 -03:00
|
|
|
{
|
|
|
|
// put your 10Hz code here
|
|
|
|
}
|
|
|
|
#endif
|
2011-10-15 19:29:33 -03:00
|
|
|
|
2013-05-17 00:19:07 -03:00
|
|
|
#ifdef USERHOOK_SLOWLOOP
|
2015-05-29 23:12:49 -03:00
|
|
|
void Copter::userhook_SlowLoop()
|
2013-05-17 00:19:07 -03:00
|
|
|
{
|
|
|
|
// put your 3.3Hz code here
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef USERHOOK_SUPERSLOWLOOP
|
2015-05-29 23:12:49 -03:00
|
|
|
void Copter::userhook_SuperSlowLoop()
|
2013-05-17 00:19:07 -03:00
|
|
|
{
|
|
|
|
// put your 1Hz code here
|
2011-10-15 19:29:33 -03:00
|
|
|
}
|
2015-05-29 23:12:49 -03:00
|
|
|
#endif
|
2018-05-25 09:10:53 -03:00
|
|
|
|
|
|
|
#ifdef USERHOOK_AUXSWITCH
|
|
|
|
void Copter::userhook_auxSwitch1(uint8_t ch_flag)
|
|
|
|
{
|
|
|
|
// put your aux switch #1 handler here (CHx_OPT = 47)
|
|
|
|
}
|
|
|
|
|
|
|
|
void Copter::userhook_auxSwitch2(uint8_t ch_flag)
|
|
|
|
{
|
|
|
|
// put your aux switch #2 handler here (CHx_OPT = 48)
|
|
|
|
}
|
|
|
|
|
|
|
|
void Copter::userhook_auxSwitch3(uint8_t ch_flag)
|
|
|
|
{
|
|
|
|
// put your aux switch #3 handler here (CHx_OPT = 49)
|
|
|
|
}
|
|
|
|
#endif
|