You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In the Java version of SysIdRoutine.Mechanism, you can pass in null for the log parameter in the constructor. However, the C++ version is not a std::optional, and passing in nullptr or {} causes a crash.
To Reproduce
Steps to reproduce the behavior:
Create a C++ SysIdRoutine where the log parameter for Mechanism is nullptr or {}
Try running any SysIdRoutine command
Expected behavior
To match the behavior in Java, and following the convention of the Config class, the C++ Mechanism log parameter should be a std::optional, and passing in std::nullopt should not cause a crash. Alternatively, the Config class should be modified not to take a std::optional<std::function> recordState, and both should just accept a (potentially null) std::function.
The temporary workaround is to pass in an empty single-parameter lambda: [](auto) {}.
The text was updated successfully, but these errors were encountered:
Describe the bug
In the Java version of
SysIdRoutine.Mechanism
, you can pass innull
for thelog
parameter in the constructor. However, the C++ version is not astd::optional
, and passing innullptr
or{}
causes a crash.To Reproduce
Steps to reproduce the behavior:
SysIdRoutine
where thelog
parameter forMechanism
isnullptr
or{}
SysIdRoutine
commandExpected behavior
To match the behavior in Java, and following the convention of the Config class, the C++ Mechanism
log
parameter should be astd::optional
, and passing instd::nullopt
should not cause a crash. Alternatively, the Config class should be modified not to take astd::optional<std::function> recordState
, and both should just accept a (potentially null)std::function
.The temporary workaround is to pass in an empty single-parameter lambda:
[](auto) {}
.The text was updated successfully, but these errors were encountered: