Skip to content

Commit

Permalink
Merge pull request #969 from frogonwheels/fix-defines-compile
Browse files Browse the repository at this point in the history
Fix compile with reduced feature set
  • Loading branch information
dexterbg committed Feb 24, 2024
2 parents 8798fbe + a0e605f commit c8da884
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion vehicle/OVMS.V3/components/ovms_plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(include_dirs)

if (CONFIG_OVMS_COMP_PLUGINS)
list(APPEND include_dirs "src")
if (CONFIG_OVMS_SC_JAVASCRIPT_DUKTAPE)
if (CONFIG_OVMS_COMP_PLUGINS)
list(APPEND srcs "src/ovms_plugins.cpp")
endif ()
endif ()
Expand Down
4 changes: 4 additions & 0 deletions vehicle/OVMS.V3/components/ovms_plugins/src/ovms_plugins.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ static const char *TAG = "pluginstore";
#include "ovms_http.h"
#include "ovms_buffer.h"
#include "ovms_netmanager.h"
#ifdef CONFIG_OVMS_SC_JAVASCRIPT_DUKTAPE
#include "ovms_duktape.h"
#endif

#ifdef CONFIG_OVMS_COMP_WEBSERVER
#include "ovms_webserver.h"
Expand Down Expand Up @@ -503,6 +505,7 @@ void OvmsPluginStore::LoadEnabledModules(plugin_element_type_t type)
{
if ((type==EL_MODULE) && (e->m_type == EL_MODULE))
{
#ifdef CONFIG_OVMS_SC_JAVASCRIPT_DUKTAPE
// Load an enabled script module
const char* filename = "LoadEnabledModules";
duk_context* ctx = MyDuktape.DukTapeContext();
Expand All @@ -526,6 +529,7 @@ void OvmsPluginStore::LoadEnabledModules(plugin_element_type_t type)
}
duk_pop(ctx);
ESP_LOGI(TAG," Load %s script %s", p.m_name.c_str(), e->m_path.c_str());
#endif
}
#ifdef CONFIG_OVMS_COMP_WEBSERVER
else if ((type==EL_WEB_PAGE) && (e->m_type == EL_WEB_PAGE))
Expand Down
1 change: 1 addition & 0 deletions vehicle/OVMS.V3/main/ovms_metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ static const char *TAG = "metrics";
#include <iomanip>
#include <locale>
#include <time.h>
#include <math.h>

using namespace std;

Expand Down
5 changes: 5 additions & 0 deletions vehicle/OVMS.V3/main/ovms_netmanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ static const char *TAG = "netmanager";
#include <lwip/ip_addr.h>
#include <lwip/netif.h>
#include <lwip/dns.h>
#include <lwip/opt.h>
#include <lwip/sockets.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <netinet/in.h>
#include "metrics_standard.h"
#include "ovms_peripherals.h"
Expand Down

0 comments on commit c8da884

Please sign in to comment.