File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
Templates/CSharp/Project-Templates/SampleRobot Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change 1
1
using System ;
2
2
using System . Collections . Generic ;
3
3
$if $ ( $targetframeworkversion $ >= 3.5 ) using System . Linq ;
4
- $endif $
5
- using WPILib;
4
+ $endif $using WPILib;
6
5
7
6
namespace $safeprojectname $
8
7
{
@@ -35,7 +34,7 @@ public class $safeprojectname$ : SampleRobot
35
34
*/
36
35
public override void Autonomous ( )
37
36
{
38
- myRobot . SetSafetyEnabled ( false ) ;
37
+ myRobot . SafetyEnabled = false ;
39
38
myRobot . Drive ( - 0.5 , 0.0 ) ; // drive forwards half speed
40
39
Timer . Delay ( 2.0 ) ; // for 2 seconds
41
40
myRobot . Drive ( 0.0 , 0.0 ) ; // stop robot
@@ -45,8 +44,8 @@ public override void Autonomous()
45
44
* Runs the motors with arcade steering.
46
45
*/
47
46
public override void OperatorControl ( ) {
48
- myRobot . SetSafetyEnabled ( true ) ;
49
- while ( IsOperatorControl ( ) && IsEnabled ( ) ) {
47
+ myRobot . SafetyEnabled = true ;
48
+ while ( IsOperatorControl && IsEnabled ) {
50
49
myRobot . ArcadeDrive ( stick ) ; // drive with arcade style (use right stick)
51
50
Timer . Delay ( 0.005 ) ; // wait for a motor update time
52
51
}
You can’t perform that action at this time.
0 commit comments