My team is trying to use the pros terminal to output our PID values to debug what our PID does. It logs the time and speed output of the PID along with the P, I, and D values. Occasionally, the program just stops logging and continues logging a few seconds later with the data that it is supposed to log. It has been fine for a while, but this recently started happening. It is supposed to log every 50 milliseconds. Also, it sometimes says that it has trouble decoding bytes. Here is an example of this: WARNING - pros.serial.devices.vex.v5_user_device:read - Could not decode bytes: 6f757431353838342c20362e35333630392c2031312e3736352c202d302e3030303536343537352c202d302c2031312e373634340a.
We have tried increasing the delay between logs and it did the same thing. We have also searched for topics about this on the forum but we were not able to find anything. Does anyone know a way to fix this?
Sounds like you don’t actually have a 50ms delay between logs. Can you send the relevant logging code so that we can see where the issue may lie?
Also, if you plug directly into the brain you won’t have this problem. It is only an issue when plugged into the controller.
I have run into this problem before and I fixed it by plugging directly into the robot. However, it seems you are unable to do this so an alternative would be to log the information onto a microSD card and then look at the logged info afterward.