Convert aos over to flatbuffers
Everything builds, and all the tests pass. I suspect that some entries
are missing from the config files, but those will be found pretty
quickly on startup.
There is no logging or live introspection of queue messages.
Change-Id: I496ee01ed68f202c7851bed7e8786cee30df29f5
diff --git a/frc971/codelab/basic.h b/frc971/codelab/basic.h
index 6f33718..acaec0c 100644
--- a/frc971/codelab/basic.h
+++ b/frc971/codelab/basic.h
@@ -4,7 +4,7 @@
#include "aos/controls/control_loop.h"
#include "aos/time/time.h"
-#include "frc971/codelab/basic.q.h"
+#include "frc971/codelab/basic_generated.h"
namespace frc971 {
namespace codelab {
@@ -41,16 +41,16 @@
// Order of approaching this should be:
// - Read the BUILD file and learn about what code is being generated.
// - Read basic.q, and familiarize yourself on the inputs and types involved.
-class Basic : public ::aos::controls::ControlLoop<BasicQueue> {
+class Basic
+ : public ::aos::controls::ControlLoop<Goal, Position, Status, Output> {
public:
explicit Basic(::aos::EventLoop *event_loop,
- const ::std::string &name = ".frc971.codelab.basic_queue");
+ const ::std::string &name = "/codelab");
protected:
- void RunIteration(const BasicQueue::Goal *goal,
- const BasicQueue::Position *position,
- BasicQueue::Output *output,
- BasicQueue::Status *status) override;
+ void RunIteration(const Goal *goal, const Position *position,
+ aos::Sender<Output>::Builder *output,
+ aos::Sender<Status>::Builder *status) override;
};
} // namespace codelab