Quote:
Originally Posted by nighterfighter
The fact that the EXACT same code is causing a problem is...weird.
Are you sure there aren't any minute changes? It could be an issue of the button press is being read inside a loop or something, making the value change/stay changed, whereas in the other version of your code it isn't.
|
Barring this problem, there is the remote possibility that the WPI libraries on the first computer may be corrupted or out of date (the latter of which is highly unlikely, as I've never seen an unstable WPI library), which means that when code is deployed to the robot, the commands you wrote using the WPI libraries produce different electric signals, resulting in this disparity.
Here's my reasoning (in the case of the former laptop): A solid red light on the Victor implies that the Victor is interpreting the command it's receiving as a -1. No light on the Victor implies that it is receiving a command very, very close to 0, but not close enough or far away enough to trigger a color in the LED. Rounding this signal, the Victor is seeing here a 0 command. Your code is supposed to be sending, respectively, a 0 and 1 command.
Therefore, your Victor is responding to a signal 1 below what the code you've written is intended to send. The libraries that translate the command in the code you write, however, have to do convert that command into a PWM duty cycle to command the Victor, and this conversion is the only point of error that comes to mind.
I can't imagine how anything would change electrically when you just change laptops, and if your code really does stay the same, then the WPI libraries are the only variable you have to deal with.