Skip to content

Commit 5b464d2

Browse files
authored
Merge pull request #244 from DavideBarbone/barbone-patch
Ensure that the OSQP report as status output not the return value of solveProblem(), but the output of solveProblem()
2 parents 19b7408 + 04d6bb9 commit 5b464d2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

toolbox/library/src/OSQP.cpp

+2-1
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)