Skip to content

Commit

Permalink
Allow set Float32_discrete_input after instantiation (#472)
Browse files Browse the repository at this point in the history
fixes #469
  • Loading branch information
t-sommer authored Feb 26, 2024
1 parent 223d398 commit 34dc533
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Feedthrough/model.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 34dc533

Please sign in to comment.