Hi there,
i am learning the Arducopter’s code, i get a problem with one kind callback funtion.
In file Copter.h, code as follow:
// Mission library
#if MODE_AUTO_ENABLED == ENABLED
AP_Mission mission{ahrs,
FUNCTOR_BIND_MEMBER(&Copter::start_command, bool, const AP_Mission::Mission_Command &),
FUNCTOR_BIND_MEMBER(&Copter::verify_command_callback, bool, const AP_Mission::Mission_Command &),
FUNCTOR_BIND_MEMBER(&Copter::exit_mission, void)};
bool start_command(const AP_Mission::Mission_Command& cmd) {
return mode_auto.start_command(cmd);
}
bool verify_command_callback(const AP_Mission::Mission_Command& cmd) {
return mode_auto.verify_command_callback(cmd);
}
void exit_mission() {
mode_auto.exit_mission();
}
#endif
In the code, the funtions: start_command, verify_command_callback, exit_mission, seems like are callback funtions, and are called from some where.
Here is my problem: where these three functions be called? i seek for a long time, but get no answer so far.
Any one can give me some clue? thanks.