Skip to content

Commit 8477cd1

Browse files
Post-competition commit
1 parent c9fab71 commit 8477cd1

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

AI-ROCKS/AI-ROCKS.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,13 @@ static void Main(string[] args)
189189
executeTimer.Elapsed += autonomousService.Execute;
190190
executeTimer.Enabled = true;
191191

192+
/*
192193
// Create timer for ObstacleEvent, tied in to autonomousService.DetectObstacleEvent()
193194
Timer obstacleTimer = new Timer(OBSTACLE_INTERVAL_MILLIS);
194195
obstacleTimer.AutoReset = true;
195196
obstacleTimer.Elapsed += autonomousService.DetectObstacleEvent;
196197
obstacleTimer.Enabled = true;
198+
*/
197199

198200
// Execute while not receive an ACK from base station and DriveContext is not complete
199201
while (!autonomousService.IsComplete())

AI-ROCKS/Drive/DriveStates/GPSDriveState.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ public StateType GetNextStateType()
156156
return StateType.VisionState;
157157
}
158158

159-
160159
return StateType.GPSState;
161160
}
162161

AI-ROCKS/Drive/DriveStates/VisionDriveState.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ private DriveCommand DriveNoBallDetected(TennisBall ball)
354354

355355
break;
356356
}
357+
/*
357358
case 2:
358359
{
359360
// Broaden HSV values, scan
@@ -366,7 +367,8 @@ private DriveCommand DriveNoBallDetected(TennisBall ball)
366367
367368
break;
368369
}
369-
case 3:
370+
*/
371+
case 2:
370372
{
371373
// Align toward heading (again), drive for 5ish seconds,
372374
StatusHandler.SendDebugAIPacket(Status.AIS_BEGIN_SCAN, "Scan: 2nd 5m scan toward heading. Distance: " + Math.Round(distanceToGate, 2));
@@ -376,7 +378,7 @@ private DriveCommand DriveNoBallDetected(TennisBall ball)
376378

377379
break;
378380
}
379-
case 4:
381+
case 3:
380382
{
381383
// We've already run 1 scan, 1 5m scan, 1 broaden HSV, 1 more 5m scan, so drive straight to kick back to GPS and do it over again
382384
return DriveCommand.Straight(Speed.VISION);

AI-ROCKS/Drive/Models/Camera.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Camera
1818
const int FRAME_RATE = 15;
1919

2020
// Circle detection
21-
const int MIN_RADIUS = 5;
21+
const int MIN_RADIUS = 2;
2222

2323
// Gaussian blur
2424
const int GAUSSIAN_KERNELSIZE = 15;

AI-ROCKS/Drive/Utils/Speed.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ namespace AI_ROCKS.Drive.Utils
99
public static class Speed
1010
{
1111
public const byte NORMAL_OPERATION = 50;
12-
public const byte SLOW_OPERATION = 33;
12+
public const byte SLOW_OPERATION = 53;
1313
public const byte CLEAR_OBSTACLE = 40;
1414
public const byte AVOID_OBSTACLE = 30;
15-
public const byte SLOW_TURN = 35;
16-
public const byte VISION = 33;
15+
public const byte SLOW_TURN = 45;
16+
public const byte VISION = 43;
1717
public const byte VISION_SCAN = 30;
1818
public const byte HALT = 0;
1919
}

0 commit comments

Comments
 (0)