AP_Button: add and use HAL_BUTTON_ENABLE

This commit is contained in:
Peter Barker 2021-08-12 13:38:18 +10:00 committed by Andrew Tridgell
parent 4ae3ad555d
commit c9fd7ee00d
2 changed files with 15 additions and 0 deletions

View File

@ -15,6 +15,9 @@
#include "AP_Button.h"
#if HAL_BUTTON_ENABLED
#include <GCS_MAVLink/GCS_MAVLink.h>
#include <GCS_MAVLink/GCS.h>
@ -400,3 +403,5 @@ AP_Button &button()
}
}
#endif

View File

@ -14,6 +14,14 @@
*/
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef HAL_BUTTON_ENABLED
#define HAL_BUTTON_ENABLED 1
#endif
#if HAL_BUTTON_ENABLED
#include <AP_HAL/AP_HAL.h>
#include <AP_Param/AP_Param.h>
@ -127,3 +135,5 @@ private:
namespace AP {
AP_Button &button();
};
#endif