Skip to content

Commit

Permalink
sorta works i guess
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansen4857 committed Oct 6, 2024
1 parent 0dfa9b5 commit eff40ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 5 additions & 6 deletions examples/cpp/simgui.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@
"length": 0.8999999761581421,
"width": 0.8999999761581421
},
"bottom": 544,
"builtin": "2024 Crescendo",
"height": 8.013679504394531,
"left": 46,
"bottom": 1476,
"height": 8.210550308227539,
"left": 150,
"path": {
"arrows": false,
"style": "Line"
},
"right": 1088,
"top": 36,
"right": 2961,
"top": 79,
"width": 16.541748046875,
"window": {
"visible": true
Expand Down
4 changes: 4 additions & 0 deletions examples/cpp/src/main/cpp/RobotContainer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <pathplanner/lib/path/PathPlannerPath.h>
#include <pathplanner/lib/commands/PathPlannerAuto.h>
#include <pathplanner/lib/auto/NamedCommands.h>
#include <pathplanner/lib/events/EventTrigger.h>
#include <frc/smartdashboard/SmartDashboard.h>
#include <frc2/command/Commands.h>

Expand All @@ -18,6 +19,9 @@ RobotContainer::RobotContainer() {
NamedCommands::registerCommand("marker2", frc2::cmd::Print("Passed marker 2"));
NamedCommands::registerCommand("print hello", frc2::cmd::Print("hello"));

// Use an event marker as a trigger
EventTrigger("Example Marker").OnTrue(frc2::cmd::Print("passed an event marker"));

// Configure the button bindings
ConfigureBindings();
}
Expand Down

0 comments on commit eff40ed

Please sign in to comment.