Skip to content

Commit 04d6bb9

Browse files
author
Davide Barbone
committed
fix solver status from Simulink OSQP block
1 parent 19b7408 commit 04d6bb9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

toolbox/library/src/OSQP.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -599,7 +599,8 @@ bool wbt::block::OSQP::output(const BlockInformation* blockInfo)
599599
}
600600

601601
// Set status
602-
if (!statusSignal->set(0, double(solveReturnVal))) {
602+
OsqpEigen::Status status = pImpl->sqSolver->getStatus();
603+
if (!statusSignal->set(0, double(status))) {
603604
bfError << "Failed to set status signal.";
604605
return false;
605606
}

0 commit comments

Comments
 (0)