Skip to content

Commit

Permalink
add a simple scheduling example
Browse files Browse the repository at this point in the history
  • Loading branch information
spacey-sooty committed Mar 2, 2024
1 parent aeb0416 commit 5a388c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/main/cpp/Robot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -152,19 +152,8 @@ void Robot::TeleopInit() {
wom::BehaviourScheduler* sched = wom::BehaviourScheduler::GetInstance();
sched->InterruptAll();

// frontLeft->SetVoltage(4_V);
// frontRight->SetVoltage(4_V);
// backLeft->SetVoltage(4_V);
// backRight->SetVoltage(4_V);

// FMAP("fmap.fmap");

// _swerveDrive->OnStart();
// sched->InterruptAll();

// reimplement when vision is reimplemented

// _swerveDrive->SetPose(_vision->GetAngleToObject(VisionTargetObjects::kNote).first);
robotmap.controllers.triggerDriver->XButton()->SetTrueBehaviour(
wom::make<wom::DrivebasePoseBehaviour>(_swerveDrive, frc::Pose2d(1_m, 0_m, frc::Rotation2d(0_rad))));
}

void Robot::TeleopPeriodic() {}
Expand Down
4 changes: 4 additions & 0 deletions src/main/include/RobotMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,16 @@
#include "Intake.h"
#include "Shooter.h"
#include "Wombat.h"
#include "behaviour/TriggerXboxController.h"
#include "utils/Encoder.h"
#include "utils/PID.h"

struct RobotMap {
struct Controllers {
frc::XboxController driver = frc::XboxController(0);
frc::XboxController codriver = frc::XboxController(1);
frc::XboxController testController = frc::XboxController(2);
wom::TriggerXboxController* triggerDriver = new wom::TriggerXboxController(0);
};
Controllers controllers;

Expand Down

0 comments on commit 5a388c0

Please sign in to comment.