Update QP controller

does supportDetectmex have a non-mex version ?  (if so, maybe a unit test to keep them in sync would be useful)