Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions SilKit/source/services/lin/LinController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,11 +515,9 @@ void LinController::GoToSleep()
return;
}

// Detailed: Send LinSendFrameRequest with GoToSleep-Frame and set LinControllerStatus::SleepPending. BusSim will trigger LinTransmission.
// Detailed: Send LinSendFrameRequest with GoToSleep-Frame and set LinControllerStatus::SleepPending. BusSim will trigger LinTransmission. Sleep after frame is received.
// Trivial: Directly send LinTransmission with GoToSleep-Frame and call GoToSleepInternal() on this controller.
_simulationBehavior.GoToSleep();

_controllerStatus = LinControllerStatus::Sleep;
}

void LinController::GoToSleepInternal()
Expand Down Expand Up @@ -784,11 +782,19 @@ void LinController::ReceiveMsg(const IServiceEndpoint* from, const LinTransmissi
// Dispatch GoToSleep frames to dedicated handlers
if (isGoToSleepFrame)
{
// only call GoToSleepHandlers for slaves, i.e., not for the master that issued the GoToSleep command.
if (_controllerMode == LinControllerMode::Slave)
{
// Only call GoToSleepHandlers for slaves, i.e., not for the master that issued the GoToSleep command.
CallHandlers(LinGoToSleepEvent{msg.timestamp});
}
// Detailed: Go to sleep after go-to-sleep frame was received by master
else if (_controllerMode == LinControllerMode::Master)
{
if (_controllerStatus == LinControllerStatus::SleepPending)
{
_controllerStatus = LinControllerStatus::Sleep;
}
}
}
}

Expand Down
5 changes: 5 additions & 0 deletions docs/changelog/versions/latest.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# [5.0.5] - UNRELEASED

## Fixed

- `lin`: fixed missing reception of the Go-To-Sleep frame by the master after `GoToSleep()` in detailed simulation


## Changed

- `cmake`: merged almost all internal CMake `INTERFACE` libraries into `I_SilKit`
Expand Down
Loading