GridFree SUN-2000G (#926)
* Support for GridFree Sun-2000G inverter * Bump version of GFSunInverter Co-authored-by: Martin Korbel <korbel@blackserver.cz>
This commit is contained in:
1 parent
e7b964ef5b
commit
23cd2a3104
5 files changed
+168
No files matched your search
@@ -56,6 +56,13 @@ unsigned long timer_sys_measures = 0;
|
||||
StaticJsonBuffer<JSON_MSG_BUFFER> modulesBuffer;
|
||||
JsonArray& modules = modulesBuffer.createArray();
|
||||
|
||||
#ifndef ZgatewayGFSunInverter
|
||||
// Arduino IDE compiles, it automatically creates all the header declarations for all the functions you have in your *.ino file.
|
||||
// Unfortunately it ignores #if directives.
|
||||
// This is a simple workaround for this problem.
|
||||
struct GfSun2000Data {};
|
||||
#endif
|
||||
|
||||
// Modules config inclusion
|
||||
#if defined(ZgatewayRF) || defined(ZgatewayRF2) || defined(ZgatewayPilight) || defined(ZactuatorSomfy) || defined(ZgatewayRTL_433)
|
||||
# include "config_RF.h"
|
||||
@@ -63,6 +70,9 @@ JsonArray& modules = modulesBuffer.createArray();
|
||||
#ifdef ZgatewayWeatherStation
|
||||
# include "config_WeatherStation.h"
|
||||
#endif
|
||||
#ifdef ZgatewayGFSunInverter
|
||||
# include "config_GFSunInverter.h"
|
||||
#endif
|
||||
#ifdef ZgatewayLORA
|
||||
# include "config_LORA.h"
|
||||
#endif
|
||||
@@ -653,6 +663,10 @@ void setup() {
|
||||
setupWeatherStation();
|
||||
modules.add(ZgatewayWeatherStation);
|
||||
#endif
|
||||
#ifdef ZgatewayGFSunInverter
|
||||
setupGFSunInverter();
|
||||
modules.add(ZgatewayGFSunInverter);
|
||||
#endif
|
||||
#ifdef ZgatewaySRFB
|
||||
setupSRFB();
|
||||
modules.add(ZgatewaySRFB);
|
||||
@@ -1253,6 +1267,9 @@ void loop() {
|
||||
#ifdef ZgatewayWeatherStation
|
||||
ZgatewayWeatherStationtoMQTT();
|
||||
#endif
|
||||
#ifdef ZgatewayGFSunInverter
|
||||
ZgatewayGFSunInverterMQTT();
|
||||
#endif
|
||||
#ifdef ZgatewayPilight
|
||||
PilighttoMQTT();
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user