Nikolai Sohmers | 3cc1fc2 | 2024-05-04 12:27:58 -0700 | [diff] [blame] | 1 | #ifndef Y2024_SWERVE_SWERVE_PUBLISHER_H_ |
| 2 | #define Y2024_SWERVE_SWERVE_PUBLISHER_H_ |
Maxwell Henderson | f63a0d9 | 2023-06-24 14:49:51 -0700 | [diff] [blame] | 3 | |
Austin Schuh | 99f7c6a | 2024-06-25 22:07:44 -0700 | [diff] [blame] | 4 | #include "absl/flags/flag.h" |
| 5 | #include "absl/log/check.h" |
| 6 | #include "absl/log/log.h" |
Maxwell Henderson | f63a0d9 | 2023-06-24 14:49:51 -0700 | [diff] [blame] | 7 | |
| 8 | #include "aos/events/event_loop.h" |
| 9 | #include "aos/flatbuffer_merge.h" |
| 10 | #include "aos/init.h" |
| 11 | #include "aos/json_to_flatbuffer.h" |
James Kuszmaul | eaba6d9 | 2024-07-31 20:42:20 -0700 | [diff] [blame] | 12 | #include "frc971/control_loops/swerve/swerve_drivetrain_goal_static.h" |
Maxwell Henderson | f63a0d9 | 2023-06-24 14:49:51 -0700 | [diff] [blame] | 13 | |
Nikolai Sohmers | 3cc1fc2 | 2024-05-04 12:27:58 -0700 | [diff] [blame] | 14 | namespace y2024_swerve { |
Maxwell Henderson | f63a0d9 | 2023-06-24 14:49:51 -0700 | [diff] [blame] | 15 | |
Maxwell Henderson | f63a0d9 | 2023-06-24 14:49:51 -0700 | [diff] [blame] | 16 | class SwervePublisher { |
| 17 | public: |
| 18 | SwervePublisher(aos::EventLoop *event_loop, aos::ExitHandle *exit_handle, |
| 19 | const std::string &filename, double duration); |
| 20 | |
James Kuszmaul | eaba6d9 | 2024-07-31 20:42:20 -0700 | [diff] [blame] | 21 | ~SwervePublisher(); |
| 22 | |
Maxwell Henderson | f63a0d9 | 2023-06-24 14:49:51 -0700 | [diff] [blame] | 23 | private: |
James Kuszmaul | eaba6d9 | 2024-07-31 20:42:20 -0700 | [diff] [blame] | 24 | aos::Sender<frc971::control_loops::swerve::GoalStatic> |
| 25 | drivetrain_goal_sender_; |
Maxwell Henderson | f63a0d9 | 2023-06-24 14:49:51 -0700 | [diff] [blame] | 26 | }; |
| 27 | |
Nikolai Sohmers | 3cc1fc2 | 2024-05-04 12:27:58 -0700 | [diff] [blame] | 28 | } // namespace y2024_swerve |
Maxwell Henderson | f63a0d9 | 2023-06-24 14:49:51 -0700 | [diff] [blame] | 29 | |
Nikolai Sohmers | 3cc1fc2 | 2024-05-04 12:27:58 -0700 | [diff] [blame] | 30 | #endif // Y2024_SWERVE_SWERVE_PUBLISHER_H_ |