AP_Menu: use APM_BUILD_DELEGATES

This commit is contained in:
Andrew Tridgell 2015-05-13 18:32:46 +10:00
parent 98d2b9b3aa
commit 3a300575bc
1 changed files with 3 additions and 3 deletions

View File

@ -56,7 +56,7 @@ public:
/// command, so that the same function can be used /// command, so that the same function can be used
/// to handle more than one command. /// to handle more than one command.
/// ///
#if APM_BUILD_TYPE(APM_BUILD_APMrover2) #if APM_BUILD_DELEGATES
typedef DELEGATE_FUNCTION2(int8_t, uint8_t, const struct arg *) func; typedef DELEGATE_FUNCTION2(int8_t, uint8_t, const struct arg *) func;
#else #else
typedef int8_t (*func)(uint8_t argc, const struct arg *argv); typedef int8_t (*func)(uint8_t argc, const struct arg *argv);
@ -73,7 +73,7 @@ public:
/// ///
/// If this function returns false, the menu exits. /// If this function returns false, the menu exits.
/// ///
#if APM_BUILD_TYPE(APM_BUILD_APMrover2) #if APM_BUILD_DELEGATES
typedef DELEGATE_FUNCTION0(bool) preprompt; typedef DELEGATE_FUNCTION0(bool) preprompt;
#else #else
typedef bool (*preprompt)(void); typedef bool (*preprompt)(void);
@ -98,7 +98,7 @@ public:
/// The "?", "help" and "exit" commands are always defined, but /// The "?", "help" and "exit" commands are always defined, but
/// can be overridden by explicit entries in the command array. /// can be overridden by explicit entries in the command array.
/// ///
#if APM_BUILD_TYPE(APM_BUILD_APMrover2) #if APM_BUILD_DELEGATES
DELEGATE_FUNCTION2(int8_t, uint8_t, const struct arg *) func; DELEGATE_FUNCTION2(int8_t, uint8_t, const struct arg *) func;
#else #else
int8_t (*func)(uint8_t argc, const struct arg *argv); int8_t (*func)(uint8_t argc, const struct arg *argv);