mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
A simple improvement was to only perform the disable-before-next-set strategy if the caller's request mode is not equal to the current mode. To keep things simple, SetControlMode was renamed to private method ApplyControlMode so we can still invoke it from c'tor. Then, the new impl'n of SetControlMode() just calls ApplyControlMode() when caller's request mode is different. That takes care of direct-calls from team source, and indirect calls through enableControl(). Applied to both c++ and java. Tested in java so far... Change-Id: I934c06c5339d933918470659acd635e12eb4d113