I was trying to print the motor rotations and Battery capacity to the cortex. However, there is a small problem that is annoying me a bit. here is the code:
// shows battery left, chassis motor rotation
// used for auton mainly / debug
Brain.Screen.print(“Battery: %d%”, Brain.Battery.capacity());
Brain.Screen.print(“Rightfront: %d”, rotate(rightfront));
Brain.Screen.print(“RightBack: %d”, rotate(rightback));
Brain.Screen.print(“LeftFront: %d”, rotate(leftfront));
Brain.Screen.print(“LeftBack: %d”, rotate(leftback));
The basic idea is to print
Right front: value
Right back: value
Left front: value
Left back: value
However, when there is a digit change in the value it does not remove the last digit.
For example, if the previous rotation value for the right front was 1245 and it changes to 800, it somehow prints 8005 which is very confusing.