AP_Generator: rename generator define to fix feature extraction
pattern-matching requires a regular pattern. Renaming the class would be bad, so just rename the define
This commit is contained in:
parent
08a7fa8d1f
commit
2ce61cce58
@ -97,8 +97,8 @@ BUILD_OPTIONS = [
|
||||
|
||||
Feature('Generator', 'GENERATOR', 'HAL_GENERATOR_ENABLED', 'Enable Generator', 0, None),
|
||||
Feature('Generator', 'GENERATOR_RICHENPOWER', 'AP_GENERATOR_RICHENPOWER_ENABLED', 'Enable Richenpower Generator', 0, "GENERATOR"), # noqa
|
||||
Feature('Generator', 'GENERATOR_IE2400', 'AP_GENERATOR_IE2400_ENABLED', 'Enable IntelligentEnergy 2400', 0, "GENERATOR"), # noqa
|
||||
Feature('Generator', 'GENERATOR_IE650', 'AP_GENERATOR_IE650_800_ENABLED', 'Enable IntelligentEnergy 650 and 800 support', 0, "GENERATOR"), # noqa
|
||||
Feature('Generator', 'GENERATOR_IE2400', 'AP_GENERATOR_IE_2400_ENABLED', 'Enable IntelligentEnergy 2400', 0, "GENERATOR"), # noqa
|
||||
Feature('Generator', 'GENERATOR_IE650', 'AP_GENERATOR_IE_650_800_ENABLED', 'Enable IntelligentEnergy 650 and 800 support', 0, "GENERATOR"), # noqa
|
||||
|
||||
Feature('OSD', 'OSD', 'OSD_ENABLED', 'Enable OSD', 0, None),
|
||||
Feature('OSD', 'PLUSCODE', 'HAL_PLUSCODE_ENABLE', 'Enable PlusCode', 0, 'OSD'),
|
||||
|
@ -65,13 +65,13 @@ void AP_Generator::init()
|
||||
// Not using a generator
|
||||
return;
|
||||
|
||||
#if AP_GENERATOR_IE650_800_ENABLED
|
||||
#if AP_GENERATOR_IE_650_800_ENABLED
|
||||
case Type::IE_650_800:
|
||||
_driver_ptr = new AP_Generator_IE_650_800(*this);
|
||||
break;
|
||||
#endif
|
||||
|
||||
#if AP_GENERATOR_IE2400_ENABLED
|
||||
#if AP_GENERATOR_IE_2400_ENABLED
|
||||
case Type::IE_2400:
|
||||
_driver_ptr = new AP_Generator_IE_2400(*this);
|
||||
break;
|
||||
|
@ -82,10 +82,10 @@ private:
|
||||
|
||||
enum class Type {
|
||||
GEN_DISABLED = 0,
|
||||
#if AP_GENERATOR_IE650_800_ENABLED
|
||||
#if AP_GENERATOR_IE_650_800_ENABLED
|
||||
IE_650_800 = 1,
|
||||
#endif
|
||||
#if AP_GENERATOR_IE2400_ENABLED
|
||||
#if AP_GENERATOR_IE_2400_ENABLED
|
||||
IE_2400 = 2,
|
||||
#endif
|
||||
#if AP_GENERATOR_RICHENPOWER_ENABLED
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "AP_Generator_IE_2400.h"
|
||||
|
||||
#if AP_GENERATOR_IE2400_ENABLED
|
||||
#if AP_GENERATOR_IE_2400_ENABLED
|
||||
|
||||
#include <AP_Logger/AP_Logger.h>
|
||||
|
||||
@ -203,4 +203,4 @@ void AP_Generator_IE_2400::log_write()
|
||||
_err_code
|
||||
);
|
||||
}
|
||||
#endif // AP_GENERATOR_IE2400_ENABLED
|
||||
#endif // AP_GENERATOR_IE_2400_ENABLED
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "AP_Generator_IE_FuelCell.h"
|
||||
|
||||
#if AP_GENERATOR_IE2400_ENABLED
|
||||
#if AP_GENERATOR_IE_2400_ENABLED
|
||||
|
||||
class AP_Generator_IE_2400 : public AP_Generator_IE_FuelCell
|
||||
{
|
||||
@ -53,5 +53,5 @@ private:
|
||||
uint16_t _spm_pwr; // Stack Power Module (SPM) power draw (Watts)
|
||||
|
||||
};
|
||||
#endif // AP_GENERATOR_IE2400_ENABLED
|
||||
#endif // AP_GENERATOR_IE_2400_ENABLED
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
#include "AP_Generator_IE_650_800.h"
|
||||
|
||||
#if AP_GENERATOR_IE650_800_ENABLED
|
||||
#if AP_GENERATOR_IE_650_800_ENABLED
|
||||
|
||||
extern const AP_HAL::HAL& hal;
|
||||
|
||||
@ -122,5 +122,5 @@ AP_BattMonitor::Failsafe AP_Generator_IE_650_800::update_failsafes() const
|
||||
return AP_BattMonitor::Failsafe::None;
|
||||
}
|
||||
|
||||
#endif // AP_GENERATOR_IE650_800_ENABLED
|
||||
#endif // AP_GENERATOR_IE_650_800_ENABLED
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#include "AP_Generator_IE_FuelCell.h"
|
||||
|
||||
#if AP_GENERATOR_IE650_800_ENABLED
|
||||
#if AP_GENERATOR_IE_650_800_ENABLED
|
||||
|
||||
class AP_Generator_IE_650_800 : public AP_Generator_IE_FuelCell
|
||||
{
|
||||
@ -95,4 +95,4 @@ private:
|
||||
| ERROR_BAT_UT; // (0x8), Battery undertemperature (<-15 degC)
|
||||
|
||||
};
|
||||
#endif // AP_GENERATOR_IE650_800_ENABLED
|
||||
#endif // AP_GENERATOR_IE_650_800_ENABLED
|
||||
|
@ -14,12 +14,12 @@
|
||||
#define AP_GENERATOR_IE_ENABLED AP_GENERATOR_BACKEND_DEFAULT_ENABLED
|
||||
#endif
|
||||
|
||||
#ifndef AP_GENERATOR_IE2400_ENABLED
|
||||
#define AP_GENERATOR_IE2400_ENABLED AP_GENERATOR_IE_ENABLED
|
||||
#ifndef AP_GENERATOR_IE_2400_ENABLED
|
||||
#define AP_GENERATOR_IE_2400_ENABLED AP_GENERATOR_IE_ENABLED
|
||||
#endif
|
||||
|
||||
#ifndef AP_GENERATOR_IE650_800_ENABLED
|
||||
#define AP_GENERATOR_IE650_800_ENABLED AP_GENERATOR_IE_ENABLED
|
||||
#ifndef AP_GENERATOR_IE_650_800_ENABLED
|
||||
#define AP_GENERATOR_IE_650_800_ENABLED AP_GENERATOR_IE_ENABLED
|
||||
#endif
|
||||
|
||||
#ifndef AP_GENERATOR_RICHENPOWER_ENABLED
|
||||
|
Loading…
Reference in New Issue
Block a user