Skip to content

Commit

Permalink
Update CAN demo FMUs for updated headers
Browse files Browse the repository at this point in the history
  • Loading branch information
ClemensB committed Nov 27, 2023
1 parent 1a19ee4 commit 3dca381
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ls-bus-guide/demos/can-bus-simulation/src/App.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ void App_EvaluateDiscreteStates(FmuInstance* instance)
}
else if (operation->type == FMI3_LS_BUS_CAN_OP_CONFIGURATION)
{
const fmi3LsBusOperationCanConfiguration* configOp = (fmi3LsBusOperationCanConfiguration*)operation;
const fmi3LsBusCanOperationConfiguration* configOp = (fmi3LsBusCanOperationConfiguration*)operation;
if (configOp->parameterType == FMI3_LS_BUS_CAN_CONFIG_PARAM_TYPE_CAN_BAUDRATE)
{
LogFmuMessage(instance, fmi3OK, "Info",
Expand Down
4 changes: 2 additions & 2 deletions ls-bus-guide/demos/can-node-triggered-output/src/App.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ bool App_DoStep(FmuInstance* instance, fmi3Float64 currentTime, fmi3Float64 targ
instance->App->NextTransmitTime);

// Create a CAN transmit operation
FMI3_LS_BUS_CAN_CREATE_OP_CAN_TRANSMIT(&instance->App->TxBufferInfo, id, 0, 0, sizeof data, data);
FMI3_LS_BUS_CAN_CREATE_OP_CAN_TRANSMIT(&instance->App->TxBufferInfo, id, FMI3_LS_BUS_FALSE, FMI3_LS_BUS_FALSE, sizeof data, data);

// Check that operation was created successfully
if (!instance->App->TxBufferInfo.status)
Expand Down Expand Up @@ -134,7 +134,7 @@ void App_UpdateDiscreteStates(FmuInstance* instance)
else if (operation->type == FMI3_LS_BUS_CAN_OP_CONFIGURATION ||
operation->type == FMI3_LS_BUS_CAN_OP_STATUS ||
operation->type == FMI3_LS_BUS_CAN_OP_CONFIRM ||
operation->type == FMI3_LS_BUS_CAN_OP_CAN_BUS_ERROR ||
operation->type == FMI3_LS_BUS_CAN_OP_BUS_ERROR ||
operation->type == FMI3_LS_BUS_CAN_OP_ARBITRATION_LOST)
{
// Ignore
Expand Down

0 comments on commit 3dca381

Please sign in to comment.