diff --git a/src/main/cpp/ui/UserInterface.cpp b/src/main/cpp/ui/UserInterface.cpp index c9d0bd9..5f406bc 100644 --- a/src/main/cpp/ui/UserInterface.cpp +++ b/src/main/cpp/ui/UserInterface.cpp @@ -73,4 +73,37 @@ namespace ShooterUI { nt::GenericEntry &nt_low_goal = nt_tab.Add("Low Goal Preset", 0).GetEntry(); nt::GenericEntry &nt_far_shot = nt_tab.Add("Far Shot Preset", 0).GetEntry(); -} // namespace ShooterUI \ No newline at end of file +} // namespace ShooterUI + +namespace SwerveDriveUI { + // Get the tab + frc::ShuffleboardTab &nt_tab = frc::Shuffleboard::GetTab("SwerveDrive"); + + // Add all the defaults + // Write mode + nt::GenericEntry &nt_write_mode = + nt_tab.Add("Write Mode", false).GetEntry(); + + // Encoder + nt::GenericEntry &nt_left_ticks = nt_tab.Add("left avg dist", 0).GetEntry(); + nt::GenericEntry &nt_right_ticks = nt_tab.Add("right avg dist", 0).GetEntry(); + nt::GenericEntry &nt_total_ticks = nt_tab.Add("avg dist", 0).GetEntry(); + + // Distance PID + nt::GenericEntry &nt_dist_kp = nt_tab.Add("Distance kP", 0).GetEntry(); + nt::GenericEntry &nt_dist_ki = nt_tab.Add("Distance kI", 0).GetEntry(); + nt::GenericEntry &nt_dist_kd = nt_tab.Add("Distance kD", 0).GetEntry(); + + // Steer PID + nt::GenericEntry &nt_steer_kp = nt_tab.Add("Steer kP", 0).GetEntry(); + nt::GenericEntry &nt_steer_ki = nt_tab.Add("Steer kI", 0).GetEntry(); + nt::GenericEntry &nt_steer_kd = nt_tab.Add("Steer kD", 0).GetEntry(); + + // Gyro + nt::GenericEntry &nt_heading = nt_tab.Add("Heading", 0).GetEntry(); + nt::GenericEntry &nt_reset_gyro = + nt_tab.Add("Reset Gyro", false).GetEntry(); + + // Save parameters button + nt::GenericEntry &nt_save = nt_tab.Add("Save", false).GetEntry(); +} // namespace SwerveDriveUI \ No newline at end of file diff --git a/src/main/include/ui/UserInterface.h b/src/main/include/ui/UserInterface.h index 64ddd33..5c9fcd7 100644 --- a/src/main/include/ui/UserInterface.h +++ b/src/main/include/ui/UserInterface.h @@ -72,3 +72,34 @@ namespace ShooterUI { extern nt::GenericEntry &nt_low_goal; extern nt::GenericEntry &nt_far_shot; } // namespace ShooterUI + +namespace SwerveDriveUI { + // Get the tab + extern frc::ShuffleboardTab &nt_tab; + + // Add all the defaults + // Write mode + extern nt::GenericEntry &nt_write_mode; + + // Encoder + extern nt::GenericEntry &nt_left_avg; + extern nt::GenericEntry &nt_right_avg; + extern nt::GenericEntry &nt_avg_dist; + + // Distance PID + extern nt::GenericEntry &nt_dist_kp; + extern nt::GenericEntry &nt_dist_ki; + extern nt::GenericEntry &nt_dist_kd; + + // Steer PID + extern nt::GenericEntry &nt_steer_kp; + extern nt::GenericEntry &nt_steer_ki; + extern nt::GenericEntry &nt_steer_kd; + + // Gyro + extern nt::GenericEntry &nt_heading; + extern nt::GenericEntry &nt_reset_gyro; + + // Save drivetrain parameters + extern nt::GenericEntry &nt_save; +} // namespace SwerveDriveUI \ No newline at end of file