Maxwell Henderson | ad31234 | 2023-01-10 12:07:47 -0800 | [diff] [blame^] | 1 | #include "y2023/autonomous/autonomous_actor.h" |
| 2 | |
| 3 | #include <chrono> |
| 4 | #include <cinttypes> |
| 5 | #include <cmath> |
| 6 | |
| 7 | #include "aos/logging/logging.h" |
| 8 | #include "frc971/control_loops/drivetrain/localizer_generated.h" |
| 9 | #include "y2023/control_loops/drivetrain/drivetrain_base.h" |
| 10 | |
| 11 | namespace y2023 { |
| 12 | namespace actors { |
| 13 | |
| 14 | using ::aos::monotonic_clock; |
| 15 | using ::frc971::ProfileParametersT; |
| 16 | using frc971::control_loops::drivetrain::LocalizerControl; |
| 17 | namespace chrono = ::std::chrono; |
| 18 | |
| 19 | AutonomousActor::AutonomousActor(::aos::EventLoop *event_loop) |
| 20 | : frc971::autonomous::BaseAutonomousActor( |
| 21 | event_loop, control_loops::drivetrain::GetDrivetrainConfig()) {} |
| 22 | |
| 23 | void AutonomousActor::Reset() { |
| 24 | InitializeEncoders(); |
| 25 | ResetDrivetrain(); |
| 26 | } |
| 27 | |
| 28 | bool AutonomousActor::RunAction( |
| 29 | const ::frc971::autonomous::AutonomousActionParams *params) { |
| 30 | Reset(); |
| 31 | |
| 32 | AOS_LOG(INFO, "Params are %d\n", params->mode()); |
| 33 | return true; |
| 34 | } |
| 35 | |
| 36 | } // namespace actors |
| 37 | } // namespace y2023 |