|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Re: Limit switches in autonomous
Have you tried running JUST that else statement, (running the motor) in autonomous?
That will help you rule out if you just initialized things improperly. |
|
#2
|
||||
|
||||
|
Re: Limit switches in autonomous
Quote:
I know we tried running just the if-statement, with no line-following code or anything like that. There may have been a print-to-driver-station or something like that as well, but nothing that should affect it, I believe. |
|
#3
|
|||
|
|||
|
Re: Limit switches in autonomous
We normally test
if (topLimit.Get()) { do something } or if (!topLimit.get()) { do something else } The code that works is testing == true while the code that does not work is testing == false. I can't see anything wrong with the code; I just have the observation that your test is different between the code that is working and the code that is not working. You might want to rewrite the auto code to use a == true test. |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|