Parker Schuh | 18dbbb4 | 2017-10-18 21:45:33 -0700 | [diff] [blame] | 1 | #ifndef FRC971_CODELAB_BASIC_H_ |
| 2 | #define FRC971_CODELAB_BASIC_H_ |
| 3 | |
John Park | 33858a3 | 2018-09-28 23:05:48 -0700 | [diff] [blame] | 4 | #include "aos/time/time.h" |
James Kuszmaul | 78e29ac | 2020-07-28 21:07:03 -0700 | [diff] [blame] | 5 | #include "frc971/codelab/basic_goal_generated.h" |
Nikolai Sohmers | c933f51 | 2024-06-08 13:57:05 -0700 | [diff] [blame^] | 6 | #include "frc971/codelab/basic_output_static.h" |
James Kuszmaul | 78e29ac | 2020-07-28 21:07:03 -0700 | [diff] [blame] | 7 | #include "frc971/codelab/basic_position_generated.h" |
Nikolai Sohmers | c933f51 | 2024-06-08 13:57:05 -0700 | [diff] [blame^] | 8 | #include "frc971/codelab/basic_status_static.h" |
Philipp Schrader | 790cb54 | 2023-07-05 21:06:52 -0700 | [diff] [blame] | 9 | #include "frc971/control_loops/control_loop.h" |
Parker Schuh | 18dbbb4 | 2017-10-18 21:45:33 -0700 | [diff] [blame] | 10 | |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 11 | namespace frc971::codelab { |
Parker Schuh | 18dbbb4 | 2017-10-18 21:45:33 -0700 | [diff] [blame] | 12 | |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 13 | class Basic |
Nikolai Sohmers | c933f51 | 2024-06-08 13:57:05 -0700 | [diff] [blame^] | 14 | : public ::frc971::controls::ControlLoop<Goal, Position, StatusStatic, |
| 15 | OutputStatic> { |
Parker Schuh | 18dbbb4 | 2017-10-18 21:45:33 -0700 | [diff] [blame] | 16 | public: |
Austin Schuh | 55a13dc | 2019-01-27 22:39:03 -0800 | [diff] [blame] | 17 | explicit Basic(::aos::EventLoop *event_loop, |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 18 | const ::std::string &name = "/codelab"); |
Parker Schuh | 18dbbb4 | 2017-10-18 21:45:33 -0700 | [diff] [blame] | 19 | |
| 20 | protected: |
Alex Perry | cb7da4b | 2019-08-28 19:35:56 -0700 | [diff] [blame] | 21 | void RunIteration(const Goal *goal, const Position *position, |
Nikolai Sohmers | c933f51 | 2024-06-08 13:57:05 -0700 | [diff] [blame^] | 22 | aos::Sender<OutputStatic>::StaticBuilder *output, |
| 23 | aos::Sender<StatusStatic>::StaticBuilder *status) override; |
Parker Schuh | 18dbbb4 | 2017-10-18 21:45:33 -0700 | [diff] [blame] | 24 | }; |
| 25 | |
Stephan Pleines | d99b1ee | 2024-02-02 20:56:44 -0800 | [diff] [blame] | 26 | } // namespace frc971::codelab |
Parker Schuh | 18dbbb4 | 2017-10-18 21:45:33 -0700 | [diff] [blame] | 27 | |
| 28 | #endif // FRC971_CODELAB_BASIC_H_ |