The last time I played around with one of the limit switches in our room, I found out that the switch will continuously output 1 if its NOT pressed. As soon as it is pressed, it will output 0. (I use C/C++)
So what I did was,
DigitalInput switch; // A variable that will get a value of 1 or 0 depending on the limit switch...
then
swich(13), // The port id it uses
then in the Tele op continuous,
if button 2 is pressed then
turn the motor in the + direction
and
check if switch is equal to 0if switch is 0 then
stop the motor
or else,
just stop the motor
I am pretty sure that if you use a code like that, you wont need the second limit switch. (if I am correct as to why you have it)
Now, you can convert this pseudo code into any programming language!!
Good Luck, I hope this helped!