Skip to content

Commit

Permalink
any acquired loco is now retained in the roster
Browse files Browse the repository at this point in the history
  • Loading branch information
flash62au committed May 25, 2024
1 parent 1ba099c commit bad5fec
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=DCCEXProtocol
version=0.0.14
version=0.0.15
author=Peter Cole, Peter Akers <akersp62@gmail.com>
maintainer=Peter Cole, Peter Akers <akersp62@gmail.com>
sentence=DCC-EX Native Protocol implementation
Expand Down
8 changes: 4 additions & 4 deletions src/DCCEXLoco.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,14 +209,14 @@ void Consist::removeLoco(Loco *loco) {
while (current) {
if (current->getLoco() == loco) {
if (loco->getSource() == LocoSourceEntry) {
delete loco;
// delete loco;
}
if (previous) {
previous->setNext(current->getNext());
} else {
_first = current->getNext();
}
delete current;
// delete current;
_locoCount--;
break;
}
Expand All @@ -235,9 +235,9 @@ void Consist::removeAllLocos() {
ConsistLoco *next = current->getNext();
Loco *loco = current->getLoco();
if (loco->getSource() == LocoSourceEntry) {
delete loco;
// delete loco;
}
delete current;
// delete current;
current = next;
}
_first = nullptr;
Expand Down
1 change: 1 addition & 0 deletions src/DCCEXProtocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
/*
Version information:
0.0.15 - any acquired loco is now retained in the roster
0.0.14 - add getNumberSupportedLocos() used for the fake heartbeat
0.0.13 - Fix bug to allow compilation on AVR platforms, change ssize_t to int
- Add serial connectivity example
Expand Down

0 comments on commit bad5fec

Please sign in to comment.