removing old code
diff --git a/frc971/atom_code/atom_code.gyp b/frc971/atom_code/atom_code.gyp
index 0aceec0..461ba7e 100644
--- a/frc971/atom_code/atom_code.gyp
+++ b/frc971/atom_code/atom_code.gyp
@@ -18,7 +18,6 @@
'../control_loops/shooter/shooter.gyp:shooter',
'../autonomous/autonomous.gyp:auto',
'../input/input.gyp:JoystickReader',
- '../input/input.gyp:GyroReader',
'../../vision/vision.gyp:OpenCVWorkTask',
'../../vision/vision.gyp:GoalMaster',
'../output/output.gyp:MotorWriter',
diff --git a/frc971/input/GyroReader.cc b/frc971/input/GyroReader.cc
deleted file mode 100644
index bdcd07e..0000000
--- a/frc971/input/GyroReader.cc
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <unistd.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#include "aos/common/logging/logging.h"
-#include "aos/atom_code/init.h"
-
-#include "frc971/queues/GyroAngle.q.h"
-
-#define M_PI 3.14159265358979323846264338327
-
-using frc971::sensors::gyro;
-
-int main(){
- aos::Init();
- int fd = open("/dev/aschuh0", O_RDONLY);
- int rate_limit = 0;
- if (fd < 0) {
- LOG(ERROR, "No Gyro found.\n");
- } else {
- LOG(INFO, "Gyro now connected\n");
- }
-
- while (true) {
- int64_t gyro_value;
- if (read(fd, (void *)&gyro_value, sizeof(gyro_value)) != sizeof(gyro_value)) {
- LOG(ERROR, "Could not read gyro errno: %d\n", errno);
- if (errno == ENODEV || errno == EBADF) {
- close(fd);
- while (1) {
- usleep(1000);
- fd = open("/dev/aschuh0", O_RDONLY);
- if (fd > 0) {
- LOG(INFO, "Found gyro again\n");
- break;
- }
- }
- }
- continue;
- }
- rate_limit ++;
- if (rate_limit > 10) {
- LOG(DEBUG, "Gyro is %d\n", (int)(gyro_value / 16));
- rate_limit = 0;
- }
- gyro.MakeWithBuilder().angle(gyro_value / 16.0 / 1000.0 / 180.0 * M_PI).Send();
- }
-
- aos::Cleanup();
-}
diff --git a/frc971/input/input.gyp b/frc971/input/input.gyp
index a0e6559..bcf1e16 100644
--- a/frc971/input/input.gyp
+++ b/frc971/input/input.gyp
@@ -63,17 +63,5 @@
'<(AOS)/common/common.gyp:timing',
],
},
- {
- 'target_name': 'GyroReader',
- 'type': 'executable',
- 'sources': [
- 'GyroReader.cc',
- ],
- 'dependencies': [
- '<(DEPTH)/frc971/queues/queues.gyp:queues',
- '<(AOS)/atom_code/atom_code.gyp:init',
- '<(AOS)/build/aos.gyp:logging',
- ],
- },
],
}