Browse Source

AP_Menu: use APM_BUILD_DELEGATES

master
Andrew Tridgell 10 years ago
parent
commit
3a300575bc
  1. 6
      libraries/AP_Menu/AP_Menu.h

6
libraries/AP_Menu/AP_Menu.h

@ -56,7 +56,7 @@ public: @@ -56,7 +56,7 @@ public:
/// command, so that the same function can be used
/// 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;
#else
typedef int8_t (*func)(uint8_t argc, const struct arg *argv);
@ -73,7 +73,7 @@ public: @@ -73,7 +73,7 @@ public:
///
/// If this function returns false, the menu exits.
///
#if APM_BUILD_TYPE(APM_BUILD_APMrover2)
#if APM_BUILD_DELEGATES
typedef DELEGATE_FUNCTION0(bool) preprompt;
#else
typedef bool (*preprompt)(void);
@ -98,7 +98,7 @@ public: @@ -98,7 +98,7 @@ public:
/// The "?", "help" and "exit" commands are always defined, but
/// 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;
#else
int8_t (*func)(uint8_t argc, const struct arg *argv);

Loading…
Cancel
Save