diff --git a/lib/Embedded_Template_Library.h b/lib/Embedded_Template_Library.h deleted file mode 100644 index 6e0991d..0000000 --- a/lib/Embedded_Template_Library.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// Compatibility wrapper for PlatformIO builds -// This header satisfies the `#include ` directive -// used in Arduino IDE. The actual ETL functionality comes from -// and related headers already included separately. -// -// This file can be empty because the real ETL headers are included via diff --git a/library.json b/library.json index f510540..d1acd8b 100644 --- a/library.json +++ b/library.json @@ -27,9 +27,6 @@ "license": "GPL-2.0-or-later", "frameworks": "arduino", "platforms": "espressif32", - "dependencies": { - "etlcpp/Embedded Template Library - Arduino": "^20.38.2" - }, "build": { "srcFilter" : [ "-<.git/>", diff --git a/library.properties b/library.properties index 130ca5c..0163d98 100644 --- a/library.properties +++ b/library.properties @@ -6,6 +6,5 @@ sentence=Enables Digitrax LocoNet Communication paragraph=This library allows you to interface to a LocoNet network and send/receive LocoNet commands. The library currently supports the ESP32 category=Communication url=http://mrrwa.org/loconet-interface/ -depends=Embedded Template Library ETL (>=20.22.0) architectures=esp32,rp2040,stm32 dot_a_linkage=true diff --git a/platformio.ini b/platformio.ini index ae06e6c..218efa7 100644 --- a/platformio.ini +++ b/platformio.ini @@ -14,7 +14,6 @@ board = esp32dev framework = arduino lib_deps= EEPROM - ETLCPP/Embedded Template Library build_flags = -DDEBUG_OUTPUT=true [env:test] @@ -23,5 +22,4 @@ board = esp32dev framework = arduino lib_deps = ThrowTheSwitch/Unity - ETLCPP/Embedded Template Library build_flags = -DDEBUG_OUTPUT=true -DUNITY_INCLUDE_CONFIG_H diff --git a/src/Bus.h b/src/Bus.h index 128bdb4..674a886 100644 --- a/src/Bus.h +++ b/src/Bus.h @@ -6,25 +6,7 @@ #pragma once -#if defined(ARDUINO) && !defined(PLATFORMIO) - // The try to redefine ARDUINO_BOARD - // so the preprocessor code below should suppress the warning - // - // Save the compiler-injected board name to restore later - #ifdef ARDUINO_BOARD - #define ORIGINAL_ARDUINO_BOARD ARDUINO_BOARD - #undef ARDUINO_BOARD - #endif - - #include // Mandatory for Arduino IDE only - - // Restore the original board definition - #ifdef ORIGINAL_ARDUINO_BOARD - #undef ARDUINO_BOARD - #define ARDUINO_BOARD ORIGINAL_ARDUINO_BOARD - #endif -#endif -#include +#include #include "ln_opc.h" @@ -72,12 +54,12 @@ class Bus consumers.push_back (c); } - void removeConsumer (MsgConsumer * c) - { - consumers.erase (etl::remove (consumers.begin(), consumers.end(), c), consumers.end()); + void removeConsumer(MsgConsumer * c) { + consumers.erase( std::remove(consumers.begin(), consumers.end(), c), consumers.end() ); } private: - etl::vector consumers; + //std::vector consumers; + std::vector consumers; }; diff --git a/src/LocoNet2.h b/src/LocoNet2.h index 0c07aff..9a0efc3 100644 --- a/src/LocoNet2.h +++ b/src/LocoNet2.h @@ -66,30 +66,8 @@ #pragma once #include -#if defined(ARDUINO) && !defined(PLATFORMIO) - // The try to redefine ARDUINO_BOARD - // so the preprocessor code below should suppress the warning - // - // Save the compiler-injected board name to restore later - #ifdef ARDUINO_BOARD - #define ORIGINAL_ARDUINO_BOARD ARDUINO_BOARD - #undef ARDUINO_BOARD - #endif - - #include - - // Restore the original board definition - #ifdef ORIGINAL_ARDUINO_BOARD - #undef ARDUINO_BOARD - #define ARDUINO_BOARD ORIGINAL_ARDUINO_BOARD - #endif - -#endif - -#include - +#include #include -#include // This is needed for PlatformIO to build #include "ln_opc.h" #include "LocoNetMessageBuffer.h"