aos/common/control_loop/Timing=>aos/common/util/phased_loop
diff --git a/aos/common/common.gyp b/aos/common/common.gyp
index 41e0de8..4b3376b 100644
--- a/aos/common/common.gyp
+++ b/aos/common/common.gyp
@@ -167,36 +167,6 @@
'includes': ['../build/queues.gypi'],
},
{
- 'target_name': 'timing_so',
- 'type': 'shared_library',
- 'sources': [
- 'control_loop/Timing.cpp'
- ],
- 'variables': {'no_rsync': 1},
- 'dependencies': [
- ],
- 'direct_dependent_settings': {
- 'variables': {
- 'jni_libs': [
- 'timing_so',
- ],
- },
- },
- 'export_dependent_settings': [
- ],
- },
- {
- 'target_name': 'timing',
- 'type': 'static_library',
- 'sources': [
- 'control_loop/Timing.cpp'
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- 'time',
- ],
- },
- {
'target_name': 'controls',
'type': 'static_library',
'sources': [
@@ -205,7 +175,7 @@
'dependencies': [
'<(AOS)/common/messages/messages.gyp:robot_state',
'<(AOS)/build/aos.gyp:logging',
- 'timing',
+ '<(AOS)/common/util/util.gyp:phased_loop',
'time',
'control_loop_queues',
'<(AOS)/common/logging/logging.gyp:queue_logging',
@@ -215,7 +185,7 @@
'export_dependent_settings': [
'<(AOS)/common/messages/messages.gyp:robot_state',
'<(AOS)/build/aos.gyp:logging',
- 'timing',
+ '<(AOS)/common/util/util.gyp:phased_loop',
'time',
'control_loop_queues',
'<(AOS)/common/logging/logging.gyp:queue_logging',
diff --git a/aos/common/control_loop/ControlLoop-tmpl.h b/aos/common/control_loop/ControlLoop-tmpl.h
index 6323df5..dde33c0 100644
--- a/aos/common/control_loop/ControlLoop-tmpl.h
+++ b/aos/common/control_loop/ControlLoop-tmpl.h
@@ -1,9 +1,9 @@
#include <stddef.h>
#include "aos/common/logging/logging.h"
-#include "aos/common/control_loop/Timing.h"
#include "aos/common/messages/robot_state.q.h"
#include "aos/common/logging/queue_logging.h"
+#include "aos/common/util/phased_loop.h"
#include "bbb/sensor_generation.q.h"
diff --git a/aos/common/control_loop/ControlLoop.h b/aos/common/control_loop/ControlLoop.h
index 0e5c144..8c0ab59 100644
--- a/aos/common/control_loop/ControlLoop.h
+++ b/aos/common/control_loop/ControlLoop.h
@@ -3,7 +3,6 @@
#include <cstring>
-#include "aos/common/control_loop/Timing.h"
#include "aos/common/type_traits.h"
#include "aos/common/queue.h"
#include "aos/common/time.h"
diff --git a/aos/common/control_loop/Timing.cpp b/aos/common/util/phased_loop.cc
similarity index 90%
rename from aos/common/control_loop/Timing.cpp
rename to aos/common/util/phased_loop.cc
index 8f42623..4b9dcdb 100644
--- a/aos/common/control_loop/Timing.cpp
+++ b/aos/common/util/phased_loop.cc
@@ -1,4 +1,4 @@
-#include "aos/common/control_loop/Timing.h"
+#include "aos/common/util/phased_loop.h"
#include <string.h>
diff --git a/aos/common/control_loop/Timing.h b/aos/common/util/phased_loop.h
similarity index 72%
rename from aos/common/control_loop/Timing.h
rename to aos/common/util/phased_loop.h
index 139376d..d231449 100644
--- a/aos/common/control_loop/Timing.h
+++ b/aos/common/util/phased_loop.h
@@ -1,5 +1,5 @@
-#ifndef __AOS_TIMEOUT_H_
-#define __AOS_TIMEOUT_H_
+#ifndef AOS_COMMON_UTIL_PHASED_LOOP_H_
+#define AOS_COMMON_UTIL_PHASED_LOOP_H_
#include <time.h>
#include <string>
@@ -16,4 +16,4 @@
} // namespace time
} // namespace aos
-#endif
+#endif // AOS_COMMON_UTIL_PHASED_LOOP_H_
diff --git a/aos/common/util/util.gyp b/aos/common/util/util.gyp
index 6dd2aa2..682db82 100644
--- a/aos/common/util/util.gyp
+++ b/aos/common/util/util.gyp
@@ -8,6 +8,17 @@
],
},
{
+ 'target_name': 'phased_loop',
+ 'type': 'static_library',
+ 'sources': [
+ 'phased_loop.cc',
+ ],
+ 'dependencies': [
+ '<(AOS)/build/aos.gyp:logging',
+ '<(AOS)/common/common.gyp:time',
+ ],
+ },
+ {
'target_name': 'log_interval',
'type': 'static_library',
'sources': [
diff --git a/aos/prime/output/motor_output.cc b/aos/prime/output/motor_output.cc
index c3901b9..95428b1 100644
--- a/aos/prime/output/motor_output.cc
+++ b/aos/prime/output/motor_output.cc
@@ -2,7 +2,7 @@
#include <math.h>
-#include "aos/common/control_loop/Timing.h"
+#include "aos/common/util/phased_loop.h"
#include "aos/common/logging/logging.h"
#include "aos/common/network_port.h"
#include "aos/common/messages/robot_state.q.h"
diff --git a/aos/prime/output/output.gyp b/aos/prime/output/output.gyp
index 67ad7af..20fe699 100644
--- a/aos/prime/output/output.gyp
+++ b/aos/prime/output/output.gyp
@@ -8,7 +8,7 @@
],
'dependencies': [
'<(AOS)/common/network/network.gyp:socket',
- '<(AOS)/common/common.gyp:timing',
+ '<(AOS)/common/util/util.gyp:phased_loop',
'<(EXTERNALS):WPILib-NetworkRobotValues',
'<(AOS)/build/aos.gyp:logging',
'<(AOS)/common/messages/messages.gyp:robot_state',
diff --git a/frc971/actions/action.h b/frc971/actions/action.h
index b9aaba6..6fe29bb 100644
--- a/frc971/actions/action.h
+++ b/frc971/actions/action.h
@@ -5,7 +5,6 @@
#include <functional>
-#include "aos/common/control_loop/Timing.h"
#include "aos/common/logging/logging.h"
#include "aos/common/network/team_number.h"
#include "aos/common/time.h"
diff --git a/frc971/actions/actions.gyp b/frc971/actions/actions.gyp
index 2a840f1..d2350c1 100644
--- a/frc971/actions/actions.gyp
+++ b/frc971/actions/actions.gyp
@@ -85,7 +85,6 @@
'shoot_action_queue',
'<(DEPTH)/frc971/frc971.gyp:constants',
'<(AOS)/common/common.gyp:time',
- '<(AOS)/common/common.gyp:timing',
'<(AOS)/build/aos.gyp:logging',
'<(DEPTH)/frc971/control_loops/shooter/shooter.gyp:shooter_loop',
'<(DEPTH)/frc971/control_loops/claw/claw.gyp:claw_loop',
@@ -110,7 +109,7 @@
'drivetrain_action_queue',
'<(DEPTH)/frc971/frc971.gyp:constants',
'<(AOS)/common/common.gyp:time',
- '<(AOS)/common/common.gyp:timing',
+ '<(AOS)/common/util/util.gyp:phased_loop',
'<(AOS)/build/aos.gyp:logging',
'action_client',
'action',
@@ -131,14 +130,12 @@
#'action.h',
],
'dependencies': [
- '<(AOS)/common/common.gyp:timing',
'<(AOS)/build/aos.gyp:logging',
'<(AOS)/common/network/network.gyp:team_number',
'<(DEPTH)/frc971/frc971.gyp:constants',
'<(AOS)/common/common.gyp:time',
],
'export_dependent_settings': [
- '<(AOS)/common/common.gyp:timing',
'<(AOS)/build/aos.gyp:logging',
'<(AOS)/common/network/network.gyp:team_number',
'<(DEPTH)/frc971/frc971.gyp:constants',
@@ -156,7 +153,6 @@
'<(DEPTH)/frc971/frc971.gyp:constants',
'<(DEPTH)/frc971/queues/queues.gyp:queues',
'<(AOS)/common/common.gyp:time',
- '<(AOS)/common/common.gyp:timing',
'<(AOS)/build/aos.gyp:logging',
'<(DEPTH)/frc971/control_loops/shooter/shooter.gyp:shooter_loop',
'<(DEPTH)/frc971/control_loops/claw/claw.gyp:claw_loop',
@@ -174,7 +170,6 @@
'action',
'<(DEPTH)/frc971/queues/queues.gyp:queues',
'<(AOS)/common/common.gyp:time',
- '<(AOS)/common/common.gyp:timing',
'<(AOS)/build/aos.gyp:logging',
'<(DEPTH)/frc971/control_loops/claw/claw.gyp:claw_loop',
],
diff --git a/frc971/actions/catch_action.cc b/frc971/actions/catch_action.cc
index 1fddd30..350b6f6 100644
--- a/frc971/actions/catch_action.cc
+++ b/frc971/actions/catch_action.cc
@@ -1,6 +1,5 @@
#include <functional>
-#include "aos/common/control_loop/Timing.h"
#include "aos/common/logging/logging.h"
#include "frc971/actions/catch_action.h"
diff --git a/frc971/actions/catch_action_main.cc b/frc971/actions/catch_action_main.cc
index 88fa48b..e37ae57 100644
--- a/frc971/actions/catch_action_main.cc
+++ b/frc971/actions/catch_action_main.cc
@@ -1,4 +1,3 @@
-#include "aos/common/control_loop/Timing.h"
#include "aos/common/time.h"
#include "aos/linux_code/init.h"
#include "aos/common/logging/logging.h"
diff --git a/frc971/actions/drivetrain_action.cc b/frc971/actions/drivetrain_action.cc
index 1ca6219..50baa1f 100644
--- a/frc971/actions/drivetrain_action.cc
+++ b/frc971/actions/drivetrain_action.cc
@@ -3,7 +3,7 @@
#include <Eigen/Dense>
-#include "aos/common/control_loop/Timing.h"
+#include "aos/common/util/phased_loop.h"
#include "aos/common/logging/logging.h"
#include "aos/common/util/trapezoid_profile.h"
diff --git a/frc971/actions/selfcatch_action.cc b/frc971/actions/selfcatch_action.cc
index eef0a05..bdb88cc 100644
--- a/frc971/actions/selfcatch_action.cc
+++ b/frc971/actions/selfcatch_action.cc
@@ -1,6 +1,5 @@
#include <functional>
-#include "aos/common/control_loop/Timing.h"
#include "aos/common/logging/logging.h"
#include "frc971/constants.h"
diff --git a/frc971/actions/selfcatch_action_main.cc b/frc971/actions/selfcatch_action_main.cc
index 53600ac..dd48365 100644
--- a/frc971/actions/selfcatch_action_main.cc
+++ b/frc971/actions/selfcatch_action_main.cc
@@ -1,6 +1,5 @@
#include "stdio.h"
-#include "aos/common/control_loop/Timing.h"
#include "aos/common/time.h"
#include "aos/linux_code/init.h"
#include "aos/common/logging/logging.h"
diff --git a/frc971/actions/shoot_action.cc b/frc971/actions/shoot_action.cc
index fa0e791..e302912 100644
--- a/frc971/actions/shoot_action.cc
+++ b/frc971/actions/shoot_action.cc
@@ -1,6 +1,5 @@
#include <functional>
-#include "aos/common/control_loop/Timing.h"
#include "aos/common/logging/logging.h"
#include "frc971/actions/shoot_action.h"
diff --git a/frc971/autonomous/auto.cc b/frc971/autonomous/auto.cc
index 107b380..46f4fc3 100644
--- a/frc971/autonomous/auto.cc
+++ b/frc971/autonomous/auto.cc
@@ -2,7 +2,7 @@
#include <memory>
-#include "aos/common/control_loop/Timing.h"
+#include "aos/common/util/phased_loop.h"
#include "aos/common/time.h"
#include "aos/common/util/trapezoid_profile.h"
#include "aos/common/logging/logging.h"
diff --git a/frc971/autonomous/auto_main.cc b/frc971/autonomous/auto_main.cc
index 36494bc..3126a22 100644
--- a/frc971/autonomous/auto_main.cc
+++ b/frc971/autonomous/auto_main.cc
@@ -1,6 +1,5 @@
#include "stdio.h"
-#include "aos/common/control_loop/Timing.h"
#include "aos/common/time.h"
#include "aos/linux_code/init.h"
#include "aos/common/logging/logging.h"
diff --git a/frc971/autonomous/autonomous.gyp b/frc971/autonomous/autonomous.gyp
index 980425f..0d11f89 100644
--- a/frc971/autonomous/autonomous.gyp
+++ b/frc971/autonomous/autonomous.gyp
@@ -29,7 +29,7 @@
'<(DEPTH)/frc971/control_loops/claw/claw.gyp:claw_loop',
'<(DEPTH)/frc971/frc971.gyp:constants',
'<(AOS)/common/common.gyp:time',
- '<(AOS)/common/common.gyp:timing',
+ '<(AOS)/common/util/util.gyp:phased_loop',
'<(AOS)/common/util/util.gyp:trapezoid_profile',
'<(AOS)/build/aos.gyp:logging',
'<(DEPTH)/frc971/actions/actions.gyp:action_client',