Auto mode actually works now. Tested, and it should work when the hardware works.
diff --git a/frc971/input/JoystickReader.cc b/frc971/input/JoystickReader.cc
index b160ae8..b40643e 100644
--- a/frc971/input/JoystickReader.cc
+++ b/frc971/input/JoystickReader.cc
@@ -7,11 +7,11 @@
#include "aos/atom_code/input/FRCComm.h"
#include "aos/atom_code/input/JoystickInput.h"
-#include "frc971/input/AutoMode.q.h"
#include "frc971/control_loops/drivetrain/drivetrain.q.h"
#include "frc971/queues/GyroAngle.q.h"
#include "frc971/queues/Piston.q.h"
#include "frc971/control_loops/wrist/wrist_motor.q.h"
+#include "frc971/autonomous/auto.q.h"
#include "frc971/control_loops/index/index_motor.q.h"
#include "frc971/control_loops/shooter/shooter_motor.q.h"
#include "frc971/control_loops/angle_adjust/angle_adjust_motor.q.h"
@@ -40,11 +40,11 @@
if (Pressed(0, AUTONOMOUS)) {
if (PosEdge(0, ENABLED)){
LOG(INFO, "Starting auto mode\n");
- AutoMode.Start();
+ ::frc971::autonomous::autonomous.MakeWithBuilder().run_auto(true).Send();
}
if (NegEdge(0, ENABLED)) {
LOG(INFO, "Stopping auto mode\n");
- AutoMode.Stop();
+ ::frc971::autonomous::autonomous.MakeWithBuilder().run_auto(false).Send();
}
} else { // teleop
bool is_control_loop_driving = false;
@@ -104,6 +104,7 @@
}
// Where the wrist should be to pick up a frisbee.
+ // TODO(brians): Make these globally accessible and clean up auto.
static const double kWristPickup = -0.633;
static const double kWristNearGround = -0.4;
// Where the wrist gets stored when up.
diff --git a/frc971/input/input.gyp b/frc971/input/input.gyp
index 47400d1..5ac253a 100644
--- a/frc971/input/input.gyp
+++ b/frc971/input/input.gyp
@@ -28,7 +28,8 @@
'<(DEPTH)/frc971/control_loops/wrist/wrist.gyp:wrist_loop',
'<(DEPTH)/frc971/control_loops/index/index.gyp:index_loop',
'<(DEPTH)/frc971/control_loops/shooter/shooter.gyp:shooter_loop',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:control_loops',
+ '<(DEPTH)/frc971/control_loops/drivetrain/drivetrain.gyp:drivetrain_loop',
+ '<(DEPTH)/frc971/autonomous/autonomous.gyp:auto_queue',
],
},
{
@@ -47,7 +48,6 @@
'<(DEPTH)/frc971/control_loops/wrist/wrist.gyp:wrist_loop',
'<(DEPTH)/frc971/control_loops/index/index.gyp:index_loop',
'<(DEPTH)/frc971/control_loops/shooter/shooter.gyp:shooter_loop',
- '<(DEPTH)/frc971/control_loops/control_loops.gyp:control_loops',
],
},
{
@@ -99,19 +99,5 @@
'<(AOS)/build/aos.gyp:logging',
],
},
- {
- 'target_name': 'AutoMode',
- 'type': 'executable',
- 'sources': [
- 'AutoMode.cc',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:libaos',
- '<(DEPTH)/frc971/queues/queues.gyp:queues',
- 'actions',
-# TODO(brians) this shouldn't need to be here
- '<(AOS)/atom_code/atom_code.gyp:init',
- ],
- },
],
}