I thought about the efficiency of enabling/disabling the limit switch each time set[Something] was called.
I realized that rather than spamming talon APIs, it's slightly more efficient to keep track of the limit switch's
state using a boolean field instead.
Summary of Changes
Keep track of limit switch state and only change it when necessary.
Testing Performed
Environment: Practice bot.
Ran the lift, made sure that everything was zeroed when it should be.
I thought about the efficiency of enabling/disabling the limit switch each time
set[Something]
was called. I realized that rather than spamming talon APIs, it's slightly more efficient to keep track of the limit switch's state using a boolean field instead.Summary of Changes
Testing Performed
Environment: Practice bot. Ran the lift, made sure that everything was zeroed when it should be.