mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-11 17:13:56 -03:00
AP_Generator: add AP_GENERATOR_RICHENPOWER_ENABLED
This commit is contained in:
parent
0d508750bc
commit
9acf4c88c8
@ -74,7 +74,9 @@ void AP_Generator::init()
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case Type::RICHENPOWER:
|
case Type::RICHENPOWER:
|
||||||
|
#if AP_GENERATOR_RICHENPOWER_ENABLED
|
||||||
_driver_ptr = new AP_Generator_RichenPower(*this);
|
_driver_ptr = new AP_Generator_RichenPower(*this);
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
#include "AP_Generator_RichenPower.h"
|
#include "AP_Generator_RichenPower.h"
|
||||||
|
|
||||||
#if HAL_GENERATOR_ENABLED
|
#if AP_GENERATOR_RICHENPOWER_ENABLED
|
||||||
|
|
||||||
#include <AP_Logger/AP_Logger.h>
|
#include <AP_Logger/AP_Logger.h>
|
||||||
#include <AP_SerialManager/AP_SerialManager.h>
|
#include <AP_SerialManager/AP_SerialManager.h>
|
||||||
@ -512,4 +512,4 @@ bool AP_Generator_RichenPower::run()
|
|||||||
set_pilot_desired_runstate(RunState::RUN);
|
set_pilot_desired_runstate(RunState::RUN);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif // AP_GENERATOR_RICHENPOWER_ENABLED
|
||||||
|
@ -3,7 +3,11 @@
|
|||||||
|
|
||||||
#include "AP_Generator_Backend.h"
|
#include "AP_Generator_Backend.h"
|
||||||
|
|
||||||
#if HAL_GENERATOR_ENABLED
|
#ifndef AP_GENERATOR_RICHENPOWER_ENABLED
|
||||||
|
#define AP_GENERATOR_RICHENPOWER_ENABLED 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if AP_GENERATOR_RICHENPOWER_ENABLED
|
||||||
|
|
||||||
#include <AP_Common/AP_Common.h>
|
#include <AP_Common/AP_Common.h>
|
||||||
#include <SRV_Channel/SRV_Channel.h>
|
#include <SRV_Channel/SRV_Channel.h>
|
||||||
|
Loading…
Reference in New Issue
Block a user