Skip to content

Commit

Permalink
fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
matth-x committed Nov 2, 2024
1 parent e3d40cf commit 6841810
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/MicroOcpp/Model/Transactions/TransactionService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,6 +1011,12 @@ TransactionService::TransactionService(Context& context, std::shared_ptr<Filesys
}
}

TransactionService::~TransactionService() {
for (unsigned int evseId = 0; evseId < MO_NUM_EVSEID && evses[evseId]; evseId++) {
delete evses[evseId];
}
}

void TransactionService::loop() {
for (unsigned int evseId = 0; evseId < MO_NUM_EVSEID && evses[evseId]; evseId++) {
evses[evseId]->loop();
Expand Down
1 change: 1 addition & 0 deletions src/MicroOcpp/Model/Transactions/TransactionService.h
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ class TransactionService : public MemoryManaged {
bool isTxStopPoint(TxStartStopPoint check);
public:
TransactionService(Context& context, std::shared_ptr<FilesystemAdapter> filesystem, unsigned int numEvseIds);
~TransactionService();

void loop();

Expand Down

0 comments on commit 6841810

Please sign in to comment.