Commit 096c7259 authored by Olivier Lantsoght's avatar Olivier Lantsoght 🏁
Browse files

[Invdynared][NewErr] uses of errors and returns.

parent fba013fb
......@@ -21,6 +21,7 @@
#include "mbs_message.h"
#include "useful_functions.h"
#include "mbs_project_interface.h"
#include "mbs_errors_names.h"
int invdynared(MbsAux *mbs_aux, MbsData *s)
{
......@@ -119,19 +120,23 @@ int invdynared(MbsAux *mbs_aux, MbsData *s)
pick_and_place_dvec_1(mbs_aux->b, s->qa, s->nqa, mbs_aux->Qact);
}
else {
err = _MBS_ERR_MOD_SPEC_12;
mbs_msg(">>INVDYN>> Underactuated system are not allowed.\n");
mbs_msg(" >> Not enough actuated joints, choose more actuated joints.\n");
mbs_msg(" >> This error should have been detected at initialization.\n");
mbs_error_msg("[%d] in mbs_invdynared !! \n", -600);
exit(1);
return err;
}
}
}
else if (s->nqu==0 && s->nqv >0) { /// case 4 : constrained fully driven : actionnement sur c ou v
err = _MBS_ERR_MOD_SPEC_12;
mbs_msg(">>INVDYN>> Fully driven constrained system with actuated driven or dependant joints.\n");
mbs_msg(" >> This case is not implemented in MBsysC ! \n");
mbs_error_msg("[%d] in mbs_invdynared !! \n", -600);
exit(1);
return err;
}
return err;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment