mirror of
https://github.com/dalathegreat/Battery-Emulator.git
synced 2025-10-03 09:49:32 +02:00
Remove unused ifdefs
This commit is contained in:
parent
f03324585b
commit
bb21b5d8e1
22 changed files with 5 additions and 89 deletions
|
@ -30,7 +30,7 @@
|
||||||
#include "src/inverter/INVERTERS.h"
|
#include "src/inverter/INVERTERS.h"
|
||||||
|
|
||||||
#if !defined(HW_LILYGO) && !defined(HW_LILYGO2CAN) && !defined(HW_STARK) && !defined(HW_3LB) && !defined(HW_DEVKIT)
|
#if !defined(HW_LILYGO) && !defined(HW_LILYGO2CAN) && !defined(HW_STARK) && !defined(HW_3LB) && !defined(HW_DEVKIT)
|
||||||
#error You must select a target hardware in the USER_SETTINGS.h file!
|
#error You must select a target hardware!
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// The current software version, shown on webserver
|
// The current software version, shown on webserver
|
||||||
|
@ -396,9 +396,10 @@ void core_loop(void*) {
|
||||||
}
|
}
|
||||||
led_exe();
|
led_exe();
|
||||||
handle_contactors(); // Take care of startup precharge/contactor closing
|
handle_contactors(); // Take care of startup precharge/contactor closing
|
||||||
#ifdef PRECHARGE_CONTROL
|
if (precharge_control_enabled) {
|
||||||
handle_precharge_control(currentMillis);
|
handle_precharge_control(currentMillis); //Drive the hia4v1 via PWM
|
||||||
#endif // PRECHARGE_CONTROL
|
}
|
||||||
|
|
||||||
if (datalayer.system.info.performance_measurement_active) {
|
if (datalayer.system.info.performance_measurement_active) {
|
||||||
END_TIME_MEASUREMENT_MAX(10ms, datalayer.system.status.time_10ms_us);
|
END_TIME_MEASUREMENT_MAX(10ms, datalayer.system.status.time_10ms_us);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
#ifndef AFORE_CAN_H
|
#ifndef AFORE_CAN_H
|
||||||
#define AFORE_CAN_H
|
#define AFORE_CAN_H
|
||||||
|
|
||||||
#ifdef AFORE_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS AforeCanInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
class AforeCanInverter : public CanInverterProtocol {
|
class AforeCanInverter : public CanInverterProtocol {
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
#ifndef BYD_CAN_H
|
#ifndef BYD_CAN_H
|
||||||
#define BYD_CAN_H
|
#define BYD_CAN_H
|
||||||
|
|
||||||
#ifdef BYD_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS BydCanInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "../../USER_SETTINGS.h"
|
#include "../../USER_SETTINGS.h"
|
||||||
#include "../datalayer/datalayer.h"
|
#include "../datalayer/datalayer.h"
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
#ifndef BYD_MODBUS_H
|
#ifndef BYD_MODBUS_H
|
||||||
#define BYD_MODBUS_H
|
#define BYD_MODBUS_H
|
||||||
|
|
||||||
#ifdef BYD_MODBUS
|
|
||||||
#define SELECTED_INVERTER_CLASS BydModbusInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "../devboard/utils/types.h"
|
#include "../devboard/utils/types.h"
|
||||||
#include "ModbusInverterProtocol.h"
|
#include "ModbusInverterProtocol.h"
|
||||||
|
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef FERROAMP_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS FerroampCanInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class FerroampCanInverter : public CanInverterProtocol {
|
class FerroampCanInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef FOXESS_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS FoxessCanInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class FoxessCanInverter : public CanInverterProtocol {
|
class FoxessCanInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef GROWATT_HV_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS GrowattHvInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class GrowattHvInverter : public CanInverterProtocol {
|
class GrowattHvInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef GROWATT_LV_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS GrowattLvInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class GrowattLvInverter : public CanInverterProtocol {
|
class GrowattLvInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef GROWATT_WIT_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS GrowattWitInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class GrowattWitInverter : public CanInverterProtocol {
|
class GrowattWitInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,11 +3,6 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "Rs485InverterProtocol.h"
|
#include "Rs485InverterProtocol.h"
|
||||||
|
|
||||||
#ifdef BYD_KOSTAL_RS485
|
|
||||||
#define RS485_INVERTER_SELECTED
|
|
||||||
#define SELECTED_INVERTER_CLASS KostalInverterProtocol
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class KostalInverterProtocol : public Rs485InverterProtocol {
|
class KostalInverterProtocol : public Rs485InverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef PYLON_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS PylonInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class PylonInverter : public CanInverterProtocol {
|
class PylonInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef PYLON_LV_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS PylonLvInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class PylonLvInverter : public CanInverterProtocol {
|
class PylonLvInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef SCHNEIDER_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS SchneiderInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class SchneiderInverter : public CanInverterProtocol {
|
class SchneiderInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
#include "../devboard/hal/hal.h"
|
#include "../devboard/hal/hal.h"
|
||||||
#include "SmaInverterBase.h"
|
#include "SmaInverterBase.h"
|
||||||
|
|
||||||
#ifdef SMA_BYD_H_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS SmaBydHInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class SmaBydHInverter : public SmaInverterBase {
|
class SmaBydHInverter : public SmaInverterBase {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
#include "../devboard/hal/hal.h"
|
#include "../devboard/hal/hal.h"
|
||||||
#include "SmaInverterBase.h"
|
#include "SmaInverterBase.h"
|
||||||
|
|
||||||
#ifdef SMA_BYD_HVS_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS SmaBydHvsInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class SmaBydHvsInverter : public SmaInverterBase {
|
class SmaBydHvsInverter : public SmaInverterBase {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef SMA_LV_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS SmaLvInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class SmaLvInverter : public CanInverterProtocol {
|
class SmaLvInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
#include "../devboard/hal/hal.h"
|
#include "../devboard/hal/hal.h"
|
||||||
#include "SmaInverterBase.h"
|
#include "SmaInverterBase.h"
|
||||||
|
|
||||||
#ifdef SMA_TRIPOWER_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS SmaTripowerInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class SmaTripowerInverter : public SmaInverterBase {
|
class SmaTripowerInverter : public SmaInverterBase {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -2,10 +2,6 @@
|
||||||
#define SOFAR_CAN_H
|
#define SOFAR_CAN_H
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef SOFAR_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS SofarInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class SofarInverter : public CanInverterProtocol {
|
class SofarInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
bool setup() override;
|
bool setup() override;
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef SOL_ARK_LV_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS SolArkLvInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class SolArkLvInverter : public CanInverterProtocol {
|
class SolArkLvInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef SOLAX_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS SolaxInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class SolaxInverter : public CanInverterProtocol {
|
class SolaxInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef SOLXPOW_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS SolxpowInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class SolxpowInverter : public CanInverterProtocol {
|
class SolxpowInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
|
@ -3,10 +3,6 @@
|
||||||
|
|
||||||
#include "CanInverterProtocol.h"
|
#include "CanInverterProtocol.h"
|
||||||
|
|
||||||
#ifdef SUNGROW_CAN
|
|
||||||
#define SELECTED_INVERTER_CLASS SungrowInverter
|
|
||||||
#endif
|
|
||||||
|
|
||||||
class SungrowInverter : public CanInverterProtocol {
|
class SungrowInverter : public CanInverterProtocol {
|
||||||
public:
|
public:
|
||||||
const char* name() override { return Name; }
|
const char* name() override { return Name; }
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue