blob: 1280693ce936c8163ba760e636cd3e93eb6591d4 [file] [log] [blame]
Maxwell Hendersonad312342023-01-10 12:07:47 -08001#ifndef Y2023_ACTORS_AUTO_SPLINES_H_
2#define Y2023_ACTORS_AUTO_SPLINES_H_
3
4#include "aos/events/event_loop.h"
5#include "frc971/control_loops/control_loops_generated.h"
James Kuszmaul713c5ce2023-03-04 18:23:24 -08006#include "frc971/input/joystick_state_generated.h"
Maxwell Hendersonad312342023-01-10 12:07:47 -08007#include "frc971/control_loops/drivetrain/drivetrain_goal_generated.h"
8/*
9
10 The cooridinate system for the autonomous splines is the same as the spline
11 python generator and drivetrain spline systems.
12
13*/
14
15namespace y2023 {
16namespace actors {
17
18class AutonomousSplines {
19 public:
James Kuszmaul713c5ce2023-03-04 18:23:24 -080020 AutonomousSplines()
21 : test_spline_(aos::JsonFileToFlatbuffer<frc971::MultiSpline>(
22 "splines/test_spline.json")) {}
Maxwell Hendersonad312342023-01-10 12:07:47 -080023 static flatbuffers::Offset<frc971::MultiSpline> BasicSSpline(
James Kuszmaul713c5ce2023-03-04 18:23:24 -080024 aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder
25 *builder,
26 aos::Alliance alliance);
Maxwell Hendersonad312342023-01-10 12:07:47 -080027 static flatbuffers::Offset<frc971::MultiSpline> StraightLine(
James Kuszmaul713c5ce2023-03-04 18:23:24 -080028 aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder
29 *builder,
30 aos::Alliance alliance);
31
32 flatbuffers::Offset<frc971::MultiSpline> TestSpline(
33 aos::Sender<frc971::control_loops::drivetrain::SplineGoal>::Builder
34 *builder,
35 aos::Alliance alliance);
36 private:
37 aos::FlatbufferDetachedBuffer<frc971::MultiSpline> test_spline_;
Maxwell Hendersonad312342023-01-10 12:07:47 -080038};
39
40} // namespace actors
41} // namespace y2023
42
43#endif // Y2023_ACTORS_AUTO_SPLINES_H_