started cleanup up the socket mess
removed unused #include + dependency
more formatting fixes + fixed users of ReceiveSocket
cleaned more stuff up (converted from references to pointers is one)
wip. started rewriting everything, not quite finished
got everything except SensorOutput done (I think...)
got everything compiling except for missing SensorReceiver
worked on implementing the logic. didn't finish
made everything compile and finished implementing SensorReceiver
pulling over Austin's mock time stuff
added IncrementMockTime
finished up and started on tests
remembered something else
diff --git a/aos/crio/controls/ControlsManager.h b/aos/crio/controls/ControlsManager.h
index 986fe02..aa78587 100644
--- a/aos/crio/controls/ControlsManager.h
+++ b/aos/crio/controls/ControlsManager.h
@@ -4,17 +4,24 @@
namespace aos {
namespace crio {
+// Designed for a subclass (that implements all of the pure virtual methods...)
+// to be passed to START_ROBOT_CLASS (a WPILib macro) to start all of the code.
class ControlsManager : public RobotBase {
public:
- // Gets called when it is time to register all the control loops.
- virtual void RegisterControlLoops() = 0;
virtual void StartCompetition();
- static inline ControlsManager &GetInstance() {
+
+ static ControlsManager &GetInstance() {
return *static_cast<ControlsManager *>(&RobotBase::getInstance());
}
- inline DriverStation *GetDS() {
+ DriverStation *GetDS() {
return m_ds;
}
+
+ private:
+ // Hooks that subclasses have to implement to do the correct things at the
+ // correct times.
+ virtual void RegisterControlLoops() = 0;
+ virtual void StartSensorBroadcasters() = 0;
};
} // namespace crio