I was playing around with the code a little bit, and can’t seem to find out how to display the motor temperatures on the controller. If anyone could help that would be great!
Print to controller:
Motor temperature:
https://api.vexcode.cloud/v5/html/classvex_1_1motor.html#a9cc3d4cd0d339f73c4824e6df0e601b1
Loop for updates
both work. It appears the first displays the temperature as a percentage from maximum overheat while the second just gives you the temperature in whatever temp units you call. (Celsius or Fahrenheit judging from the docs on temp units)
Thank you. I will try this
I still couldn’t get it. It didn’t make sense. @jpearman or @Deicer , I would like some help. so far I have: Controller1.Screen.print(“Temp %f”, LeftSlurp.temperature(percentUnits::pct));
what were the issues with your program?
It
It just has the zeros and doesn’t change
ah, you are printing the new values at the end of the previous print. I have my own problems with text positioning so I can’t give you a solution straight up, but you’ll need to clear the screen of your previous print before re-printing.
So if running the temperature code within the user control section of the competition template, is it enough to have it refresh through the while(true) loop of the joystick control functions?
yup. as long as it is being refreshed however often you need you can do it wherever you please.