Browse Source

AP_ICEngine: add and use AP_ICENGINE_ENABLE

apm_2208
Peter Barker 3 years ago committed by Peter Barker
parent
commit
8af84cf236
  1. 7
      libraries/AP_ICEngine/AP_ICEngine.cpp
  2. 7
      libraries/AP_ICEngine/AP_ICEngine.h
  3. 7
      libraries/AP_ICEngine/AP_ICEngine_config.h

7
libraries/AP_ICEngine/AP_ICEngine.cpp

@ -13,6 +13,9 @@ @@ -13,6 +13,9 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AP_ICEngine.h"
#if AP_ICENGINE_ENABLED
#include <SRV_Channel/SRV_Channel.h>
#include <GCS_MAVLink/GCS.h>
@ -20,8 +23,6 @@ @@ -20,8 +23,6 @@
#include <AP_Scheduler/AP_Scheduler.h>
#include <AP_Notify/AP_Notify.h>
#include <RC_Channel/RC_Channel.h>
#include <Filter/LowPassFilter.h>
#include "AP_ICEngine.h"
#include <AP_RPM/AP_RPM.h>
extern const AP_HAL::HAL& hal;
@ -533,3 +534,5 @@ AP_ICEngine *ice() { @@ -533,3 +534,5 @@ AP_ICEngine *ice() {
return AP_ICEngine::get_singleton();
}
}
#endif // AP_ICENGINE_ENABLED

7
libraries/AP_ICEngine/AP_ICEngine.h

@ -18,7 +18,12 @@ @@ -18,7 +18,12 @@
*/
#pragma once
#include "AP_ICEngine_config.h"
#if AP_ICENGINE_ENABLED
#include <AP_Param/AP_Param.h>
#include <Filter/LowPassFilter.h>
class AP_ICEngine {
public:
@ -151,3 +156,5 @@ private: @@ -151,3 +156,5 @@ private:
namespace AP {
AP_ICEngine *ice();
};
#endif // AP_ICENGINE_ENABLED

7
libraries/AP_ICEngine/AP_ICEngine_config.h

@ -0,0 +1,7 @@ @@ -0,0 +1,7 @@
#pragma once
#include <AP_HAL/AP_HAL_Boards.h>
#ifndef AP_ICENGINE_ENABLED
#define AP_ICENGINE_ENABLED 1
#endif
Loading…
Cancel
Save