Skip to content

Commit fce69e5

Browse files
committed
fix (node-fmu): Fix pre-commit and SPDX error
Signed-off-by: Ritesh.K <riteshkarki6@gmail.com>
1 parent 81f32f4 commit fce69e5

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

cmake/FindFMI.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
1+
# CMakeLists.txt.
2+
#
3+
# Author: Ritesh Karki
4+
# SPDX-FileCopyrightText: 2014-2026 Institute for Automation of Complex Power Systems, RWTH Aachen University
5+
# SPDX-License-Identifier: Apache-2.0
26

37
find_path(FMI_INCLUDE_DIR
48
NAMES fmilib.h

lib/nodes/fmu.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
using namespace villas;
2929
using namespace villas::node;
3030

31-
3231
FmuNode::FmuNode(const uuid_t &id, const std::string &name)
3332
: Node(id, name), writingTurn(false), path(""), unpack_path(""), fmu(),
3433
context() {
@@ -109,14 +108,14 @@ int FmuNode::_read(struct Sample *smps[], unsigned cnt) {
109108

110109
while (remainingStep > 0.0) {
111110
bool eventHandlingNeeded = false;
112-
bool terminateSimulation = false;
111+
bool terminateSimulation = false;
113112
bool earlyReturn = false;
114113
double lastSuccessfulTime = currentTime;
115114

116115
// Perform step
117116
fmi3_status_t status = fmi3_import_do_step(
118-
fmu, currentTime, stepSize, fmi3_true, &eventHandlingNeeded,
119-
&terminateSimulation, &earlyReturn, &lastSuccessfulTime);
117+
fmu, currentTime, stepSize, fmi3_true, &eventHandlingNeeded,
118+
&terminateSimulation, &earlyReturn, &lastSuccessfulTime);
120119

121120
if (status == fmi3_status_error)
122121
throw RuntimeError("Error during step");
@@ -129,7 +128,8 @@ int FmuNode::_read(struct Sample *smps[], unsigned cnt) {
129128
}
130129

131130
if (earlyReturn) {
132-
logger->info("FMU returned early at {}, target time {}", lastSuccessfulTime, targetTime);
131+
logger->info("FMU returned early at {}, target time {}",
132+
lastSuccessfulTime, targetTime);
133133
currentTime = lastSuccessfulTime;
134134
remainingStep = targetTime - currentTime;
135135

0 commit comments

Comments
 (0)