The question of your pretrial detention is unrelated to your chances of winning the underlying criminal charges. In all cases, the prosecutor has the right to make you a plea bargain offer, and you have the right to accept it or reject it or make a counteroffer. If you do not enter a plea of guilty or no contest, the case might be dismissed before trial on an appropriate legal motion, such as a motion to suppress evidence for illegal search. If it goes forward to trial, the prosecutor must prove you guilty beyond a reasonable doubt. You will have the option of testifying or not, as you choose.
Contact me at 248-399-6930 for a free consultation. You and I do not have an attorney-client relationship formed by our communications on this website. Advice given by me on this website is general advice based on partial information. You should not rely on any advice given without first hiring a lawyer in the area where the case is pending, and providing that lawyer with full information.
I agree with James that winning you case for the pending criminal charges is unrelated to the fact that you may have been improperly detained.
You definitely need to seek a Michigan defense attorney to assist you with your situation who will guide you as to if you should accept any plea offers given to you by the prosecutor and to how strong he feels your case is and if you should proceed to a trial or hope for a favorable plea offering. Remember, you don't have to accept any plea offered to you by the prosecutor, your freedom is just that, yours. An experienced Michigan defense attorney will be the most helpful asset going forward.