|
Re: Motors run one way but not the other
Wee had a similar issue earlier this week. We use a Global variable in Periodic tacks to control two motors. We then right to that variable in Auton or Tele.
What we found that regardless of the value sent to the variable, it always read back positive.
It turns out the data type for the Global was a U32. Unsigned variables can't be negative. So we changed the data type to I32 and everything started working normally.
__________________
CalGames 2009 Autonomous Champion Award winner
Sacramento 2010 Creativity in Design winner, Sacramento 2010 Quarter finalist
2011 Sacramento Finalist, 2011 Madtown Engineering Inspiration Award.
2012 Sacramento Semi-Finals, 2012 Sacramento Innovation in Control Award, 2012 SVR Judges Award.
2012 CalGames Autonomous Challenge Award winner ($$$).
2014 2X Rockwell Automation: Innovation in Control Award (CVR and SAC). Curie Division Gracious Professionalism Award.
2014 Capital City Classic Winner AND Runner Up. Madtown Throwdown: Runner up.
2015 Innovation in Control Award, Sacramento.
2016 Chezy Champs Finalist, 2016 MTTD Finalist
|