From a655b6d2dea62190e436a0fd082b7890af0a6ce5 Mon Sep 17 00:00:00 2001 From: Torsten Sommer Date: Mon, 26 Feb 2024 15:36:52 +0100 Subject: [PATCH] Allow set Float32_discrete_input after instantiation fixes #469 --- Feedthrough/model.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Feedthrough/model.c b/Feedthrough/model.c index e794b198..99dec117 100644 --- a/Feedthrough/model.c +++ b/Feedthrough/model.c @@ -390,9 +390,10 @@ Status setFloat32(ModelInstance* comp, ValueReference vr, const float values[], case vr_Float32_discrete_input: #if FMI_VERSION > 1 if (comp->type == ModelExchange && + comp->state != Instantiated && comp->state != InitializationMode && comp->state != EventMode) { - logError(comp, "Variable Float32_discrete_input can only be set in initialization mode or event mode."); + logError(comp, "Variable Float32_discrete_input can only be set in after instantiation, in Initialization Mode, and in Event Mode."); return Error; } #endif