Skip to content

Commit

Permalink
added the complete implementation of the nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
alienboy13 committed Feb 12, 2022
1 parent 2418e7b commit 0bf5ee6
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions src/v5_hal/firmware/src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ void initialize() {

// Initialize all robot nodes here:

// Initialize Controller Node
controller = new ControllerNode(node_manager, "controller");

// TODO Initialize TankDriveNode
left_1_motor = new MotorNode(node_manager, 5,"left_1_motor", false);
left_2_motor = new MotorNode(node_manager, 17,"left_2_motor", true);
Expand Down Expand Up @@ -90,15 +93,26 @@ void initialize() {
top_limit_switch_lift = new ADIDigitalInNode(node_manager, 6, "top_limit_switch_lift");
potentiometer_lift = new ADIAnalogInNode(node_manager, 8, "potentiometer_lift", false);

lift_node = LiftNode(node_manager, "lift_node",
controller, left_motor_lift,
right_motor_lift, bottom_limit_switch_lift,
top_limit_switch_lift, potentiometer_lift);

// TODO Initialize PrimaryClawNode
primary_claw_piston = new ADIDigitalOutNode(node_manager, "primary_claw_piston", 1, false);

primary_claw = new PrimaryClawNode(node_manager, "primary_claw", controller, primary_claw_piston);

// TODO Initialize BackClawNode
back_claw_piston = new ADIDigitalOutNode(node_manager, "back_claw_piston", 2, false);

back_claw = new SecondaryClawNode(node_manager, "secondary_claw", controller, back_claw_piston);

// Initialize the autonomous manager
auton_manager_node = new AutonManagerNode(node_manager);



// Call the node manager to initialize all of the nodes above
node_manager->initialize();
}
Expand Down

0 comments on commit 0bf5ee6

Please sign in to comment.