From 60a2d43c3c356dd1b152d598745aec308e201600 Mon Sep 17 00:00:00 2001 From: danielbrownmsm Date: Mon, 26 Dec 2022 22:01:54 -0600 Subject: [PATCH] add swerve drive to RobotContainer per #11 --- src/main/cpp/RobotContainer.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/main/cpp/RobotContainer.cpp b/src/main/cpp/RobotContainer.cpp index cd76d90..7a31187 100644 --- a/src/main/cpp/RobotContainer.cpp +++ b/src/main/cpp/RobotContainer.cpp @@ -29,6 +29,21 @@ RobotContainer::RobotContainer() { drivetrain_ = std::make_shared(drivetrain_sw_.get()); VOKC_CALL(drivetrain_->Init()); + + // == swerve drive == + std::shared_ptr swerve_drive_hw; + VOKC_CALL(SetupSwerveDriveInterface(hardware_, &swerve_drive_hw)); + + // Initialize the software interface + swerve_drive_sw_ = std::make_shared(); + + // Link SwerveDriveIO to hardware / software + swerve_drive_io_ = std::make_shared(swerve_drive_hw.get(), swerve_drive_sw_.get()); + + // Link intake software to the I/O + swerve_drive_ = std::make_shared(swerve_drive_sw_.get()); + + // == intake == std::shared_ptr intake_hw; VOKC_CALL(SetupIntakeInterface(hardware_, &intake_hw));