Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions lib/Embedded_Template_Library.h

This file was deleted.

3 changes: 0 additions & 3 deletions library.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/>",
Expand Down
1 change: 0 additions & 1 deletion library.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 0 additions & 2 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ board = esp32dev
framework = arduino
lib_deps=
EEPROM
ETLCPP/Embedded Template Library
build_flags = -DDEBUG_OUTPUT=true

[env:test]
Expand All @@ -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
28 changes: 5 additions & 23 deletions src/Bus.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,7 @@

#pragma once

#if defined(ARDUINO) && !defined(PLATFORMIO)
// The <Embedded_Template_Library.h> 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 <Embedded_Template_Library.h> // 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 <etl/vector.h>
#include <vector>

#include "ln_opc.h"

Expand Down Expand Up @@ -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<MsgConsumer*, MAX_CONSUMERS> consumers;
//std::vector<MsgConsumer*, MAX_CONSUMERS> consumers;
std::vector<MsgConsumer*> consumers;
};

24 changes: 1 addition & 23 deletions src/LocoNet2.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,30 +66,8 @@
#pragma once

#include <map>
#if defined(ARDUINO) && !defined(PLATFORMIO)
// The <Embedded_Template_Library.h> 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 <Embedded_Template_Library.h>

// Restore the original board definition
#ifdef ORIGINAL_ARDUINO_BOARD
#undef ARDUINO_BOARD
#define ARDUINO_BOARD ORIGINAL_ARDUINO_BOARD
#endif

#endif

#include <etl/vector.h>

#include <vector>
#include <functional>
#include <vector> // This is needed for PlatformIO to build

#include "ln_opc.h"
#include "LocoNetMessageBuffer.h"
Expand Down