Skip to content

Commit

Permalink
fix tracking MO_VERSION
Browse files Browse the repository at this point in the history
  • Loading branch information
matth-x committed Oct 22, 2023
1 parent 540d20f commit d57a048
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/MicroOcpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,8 +232,6 @@ void mocpp_initialize(Connection& connection, const char *bootNotificationCreden

configuration_init(filesystem); //call before each other library call

declareConfiguration<const char*>("MicroOcppVersion", MO_VERSION, MO_KEYVALUE_FN, false, false, false);

context = new Context(connection, filesystem, bootstats.bootNr);
auto& model = context->getModel();

Expand Down Expand Up @@ -286,8 +284,11 @@ void mocpp_initialize(Connection& connection, const char *bootNotificationCreden
}
credsJson.reset();

auto mocppVersion = declareConfiguration<const char*>("MicroOcppVersion", MO_VERSION, MO_KEYVALUE_FN, false, false, false);

configuration_load();

mocppVersion->setString(MO_VERSION);
MO_DBG_INFO("initialized MicroOcpp v" MO_VERSION);
}

Expand Down

0 comments on commit d57a048

Please sign in to comment.