AP_Relay: add option to disable relay and servorelay libraries
This commit is contained in:
parent
2adb4fef5a
commit
72a2962367
@ -7,6 +7,9 @@
|
||||
|
||||
#include <AP_HAL/AP_HAL.h>
|
||||
#include "AP_Relay.h"
|
||||
|
||||
#if AP_RELAY_ENABLED
|
||||
|
||||
#include <AP_Logger/AP_Logger.h>
|
||||
|
||||
#if CONFIG_HAL_BOARD == HAL_BOARD_SITL
|
||||
@ -195,3 +198,5 @@ AP_Relay *relay()
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif // AP_RELAY_ENABLED
|
||||
|
@ -9,6 +9,10 @@
|
||||
/// @brief APM relay control class
|
||||
#pragma once
|
||||
|
||||
#include "AP_Relay_config.h"
|
||||
|
||||
#if AP_RELAY_ENABLED
|
||||
|
||||
#include <AP_Param/AP_Param.h>
|
||||
|
||||
#define AP_RELAY_NUM_RELAYS 6
|
||||
@ -64,3 +68,5 @@ private:
|
||||
namespace AP {
|
||||
AP_Relay *relay();
|
||||
};
|
||||
|
||||
#endif // AP_RELAY_ENABLED
|
||||
|
7
libraries/AP_Relay/AP_Relay_config.h
Normal file
7
libraries/AP_Relay/AP_Relay_config.h
Normal file
@ -0,0 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <AP_HAL/AP_HAL_Boards.h>
|
||||
|
||||
#ifndef AP_RELAY_ENABLED
|
||||
#define AP_RELAY_ENABLED 1
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user