diff --git a/elastic_layouts/elastic-4048-2026-dev-v1.1.json b/elastic_layouts/elastic-4048-2026-dev-v1.1.json new file mode 100644 index 00000000..341f93e4 --- /dev/null +++ b/elastic_layouts/elastic-4048-2026-dev-v1.1.json @@ -0,0 +1,1203 @@ +{ + "version": 1.0, + "grid_size": 128, + "tabs": [ + { + "name": "Dashboard", + "grid_layout": { + "layouts": [ + { + "title": "Shooting State", + "x": 512.0, + "y": 384.0, + "width": 256.0, + "height": 256.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "", + "x": 1024.0, + "y": 256.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/AdvantageKit/RealOutputs/shootingState/", + "period": 0.06, + "data_type": "string", + "show_submit_button": false + } + } + ] + }, + { + "title": "Intake Deployed", + "x": 256.0, + "y": 384.0, + "width": 256.0, + "height": 256.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Deployment Switch Pressed", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/AdvantageKit/LoggableInputs/IntakeSubsystem/DeploymentSwitch/pressed", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + } + ] + } + ], + "containers": [ + { + "title": "Alliance Color", + "x": 0.0, + "y": 384.0, + "width": 256.0, + "height": 256.0, + "type": "Boolean Box", + "properties": { + "topic": "/FMSInfo/IsRedAlliance", + "period": 0.06, + "data_type": "boolean", + "true_color": 4294901760, + "false_color": 4278190591, + "true_icon": "None", + "false_icon": "None" + } + }, + { + "title": "Field", + "x": 0.0, + "y": 0.0, + "width": 768.0, + "height": 384.0, + "type": "Field", + "properties": { + "topic": "/SmartDashboard/Field", + "period": 0.06, + "field_game": "Reefscape", + "robot_width": 0.85, + "robot_length": 0.85, + "show_other_objects": true, + "show_trajectories": true, + "field_rotation": 0.0, + "robot_color": 4294198070, + "trajectory_color": 4294967295, + "show_robot_outside_widget": true + } + }, + { + "title": "Auto Chooser", + "x": 768.0, + "y": 384.0, + "width": 512.0, + "height": 256.0, + "type": "ComboBox Chooser", + "properties": { + "topic": "/SmartDashboard/Action Chooser", + "period": 0.06, + "sort_options": false + } + } + ] + } + }, + { + "name": "Diags", + "grid_layout": { + "layouts": [ + { + "title": "Angler", + "x": 512.0, + "y": 256.0, + "width": 256.0, + "height": 384.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "ForwardLimit", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Angler/ForwardLimit", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + }, + { + "title": "ReverseLimit", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Angler/ReverseLimit", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + } + ] + }, + { + "title": "Climber", + "x": 512.0, + "y": 0.0, + "width": 256.0, + "height": 256.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Encoder", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Climber/Encoder", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + } + ] + }, + { + "title": "Feeder", + "x": 768.0, + "y": 0.0, + "width": 256.0, + "height": 256.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Encoder", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Feeder/Encoder", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + } + ] + }, + { + "title": "Gyro", + "x": 1024.0, + "y": 0.0, + "width": 128.0, + "height": 256.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Gyro Angle", + "x": 896.0, + "y": 256.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Gyro/Gyro Angle", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + } + ] + }, + { + "title": "Hopper", + "x": 256.0, + "y": 0.0, + "width": 256.0, + "height": 256.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Encoder", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Hopper/Encoder", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + } + ] + }, + { + "title": "Intake Deployer", + "x": 256.0, + "y": 256.0, + "width": 256.0, + "height": 384.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "ForwardLimit", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Intake Deployer/ForwardLimit", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + }, + { + "title": "ReverseLimit", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Intake Deployer/ReverseLimit", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + } + ] + }, + { + "title": "Intake Roller", + "x": 0.0, + "y": 256.0, + "width": 256.0, + "height": 256.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Encoder", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Intake Roller/Encoder", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + } + ] + }, + { + "title": "Shooter", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 256.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Encoder", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Shooter/Encoder", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + } + ] + }, + { + "title": "Turret", + "x": 768.0, + "y": 256.0, + "width": 256.0, + "height": 384.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "ForwardLimit", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Turret/ForwardLimit", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + }, + { + "title": "ReverseLimit", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Boolean Box", + "properties": { + "topic": "/Shuffleboard/Diagnostics/Turret/ReverseLimit", + "period": 0.06, + "data_type": "boolean", + "true_color": 4283215696, + "false_color": 4294198070, + "true_icon": "None", + "false_icon": "None" + } + } + ] + } + ], + "containers": [] + } + }, + { + "name": "Debug", + "grid_layout": { + "layouts": [ + { + "title": "Climber", + "x": 0.0, + "y": 384.0, + "width": 256.0, + "height": 256.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Climber Up", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Climber Up", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Climber Down", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Climber Down", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + } + ] + }, + { + "title": "Intake", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 384.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Spin Backward", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Intake/Spin Backward", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Spin Forward", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Intake/Spin Forward", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Stop", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Intake/Stop", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + } + ] + }, + { + "title": "Shooter", + "x": 1024.0, + "y": 0.0, + "width": 256.0, + "height": 640.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Spin Shooter", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Spin Shooter", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Shooting State: Fixed", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Shooting State: Fixed", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Shooting State: Fixed 2", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Shooting State: Fixed 2", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Shooting State: Into Hub", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Shooting State: Into Hub", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Shooting State: Shuttling", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Shooting State: Shuttling", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Shooting State: Stopped", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Shooting State: Stopped", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + } + ] + }, + { + "title": "Intake Deployment", + "x": 256.0, + "y": 0.0, + "width": 256.0, + "height": 384.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Deployment State: UP", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Deployment State: UP", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Deployment State: DOWN", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Deployment State: DOWN", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Deployment State: STOPPED", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Deployment State: STOPPED", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + } + ] + }, + { + "title": "turret", + "x": 512.0, + "y": 0.0, + "width": 256.0, + "height": 512.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Run Turret to Fwd Limit", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/turret/Run Turret to Fwd Limit", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + }, + { + "title": "Run Turret to Rev Limit", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/turret/Run Turret to Rev Limit", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + }, + { + "title": "Turret Go 0", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/turret/Turret Go 0", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + }, + { + "title": "Turret Go 45", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/turret/Turret Go 45", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + }, + { + "title": "Turret Go 75", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/turret/Turret Go 75", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + } + ] + }, + { + "title": "angler", + "x": 768.0, + "y": 0.0, + "width": 256.0, + "height": 640.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "Go High", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/angler/Go High", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + }, + { + "title": "Go Home", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/angler/Go Home", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + }, + { + "title": "Go Low", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/angler/Go Low", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + }, + { + "title": "Home Rev (Reset)", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/angler/Home Rev (Reset)", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + }, + { + "title": "Reset Encoder", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/angler/Reset Encoder", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + }, + { + "title": "Run To Fwd Limit", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/angler/Run To Fwd Limit", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + }, + { + "title": "Run To Rev Limit", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/angler/Run To Rev Limit", + "period": 0.06, + "show_type": true, + "maximize_button_space": false + } + } + ] + } + ], + "containers": [ + { + "title": "Feeder", + "x": 256.0, + "y": 384.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Spin Feeder", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Drive Command", + "x": 512.0, + "y": 512.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Drive Command", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + }, + { + "title": "Hopper", + "x": 256.0, + "y": 512.0, + "width": 256.0, + "height": 128.0, + "type": "Command", + "properties": { + "topic": "/SmartDashboard/Start Hopper", + "period": 0.06, + "show_type": false, + "maximize_button_space": true + } + } + ] + } + }, + { + "name": "PID Tuning", + "grid_layout": { + "layouts": [ + { + "title": "TurretSubsystem", + "x": 256.0, + "y": 0.0, + "width": 256.0, + "height": 640.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "PID_ALLOWED_ERROR", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/TurretSubsystem/PID_ALLOWED_ERROR", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_D", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/TurretSubsystem/PID_D", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_FF", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/TurretSubsystem/PID_FF", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_I", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/TurretSubsystem/PID_I", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_I_ZONE", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/TurretSubsystem/PID_I_ZONE", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_MAX_ACCEL", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/TurretSubsystem/PID_MAX_ACCEL", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_MAX_VEL", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/TurretSubsystem/PID_MAX_VEL", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_P", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/TurretSubsystem/PID_P", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + } + ] + }, + { + "title": "AnglerSubsystem", + "x": 0.0, + "y": 0.0, + "width": 256.0, + "height": 640.0, + "type": "List Layout", + "properties": { + "label_position": "TOP" + }, + "children": [ + { + "title": "PID_ALLOWED_ERROR", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/AnglerSubsystem/PID_ALLOWED_ERROR", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_D", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/AnglerSubsystem/PID_D", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_FF", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/AnglerSubsystem/PID_FF", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_I", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/AnglerSubsystem/PID_I", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_I_ZONE", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/AnglerSubsystem/PID_I_ZONE", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_MAX_ACCEL", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/AnglerSubsystem/PID_MAX_ACCEL", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_MAX_VEL", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/AnglerSubsystem/PID_MAX_VEL", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + }, + { + "title": "PID_P", + "x": 0.0, + "y": 0.0, + "width": 128.0, + "height": 128.0, + "type": "Text Display", + "properties": { + "topic": "/Tuning/AnglerSubsystem/PID_P", + "period": 0.06, + "data_type": "double", + "show_submit_button": false + } + } + ] + } + ], + "containers": [] + } + } + ] +} \ No newline at end of file diff --git a/src/main/java/frc/robot/constants/Constants2026.java b/src/main/java/frc/robot/constants/Constants2026.java index f82155cb..70d5e7e0 100644 --- a/src/main/java/frc/robot/constants/Constants2026.java +++ b/src/main/java/frc/robot/constants/Constants2026.java @@ -15,7 +15,7 @@ public class Constants2026 extends GameConstants { public static final int SHOOTER_MOTOR_ID = 54; public static final int SHOOTER_FOLLOWER_MOTOR_ID = 53; public static final int INTAKE_DEPLOYMENT_ID = 9; - public static final int TURRET_MOTOR_ID = 9; + public static final int TURRET_MOTOR_ID = 11; public static final double DRIVE_BASE_WIDTH = 0.635; public static final double DRIVE_BASE_LENGTH = 0.635; diff --git a/src/main/java/frc/robot/constants/GameConstants.java b/src/main/java/frc/robot/constants/GameConstants.java index a350e28c..abb5c322 100644 --- a/src/main/java/frc/robot/constants/GameConstants.java +++ b/src/main/java/frc/robot/constants/GameConstants.java @@ -58,6 +58,14 @@ public enum Mode { public static final double INITIAL_INTAKE_RETRACTION_SPEED = -10; + //Diags + public static final double HOPPER_DIAGS_ENCODER = 1; + public static final double INTAKE_ROLLER_DIAGS_ENCODER = 1; + public static final double FEEDER_DIAGS_ENCODER = 1; + public static final double CLIMBER_DIAGS_ENCODER = 1; + public static final double SHOOTER_DIAGS_ENCODER = 1; + public static final double GYRO_DIAGS_ANGLE = 30; + //Timeouts public static final double SPIN_TIMEOUT = 5; public static final double TILT_TIMEOUT = 5; diff --git a/src/main/java/frc/robot/subsystems/AnglerSubsystem.java b/src/main/java/frc/robot/subsystems/AnglerSubsystem.java index 47f14bf1..ae357ebb 100644 --- a/src/main/java/frc/robot/subsystems/AnglerSubsystem.java +++ b/src/main/java/frc/robot/subsystems/AnglerSubsystem.java @@ -9,7 +9,11 @@ import edu.wpi.first.math.MathUtil; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Robot; import frc.robot.constants.Constants; +import frc.robot.constants.Constants2026; +import frc.robot.constants.GameConstants; +import frc.robot.utils.diag.DiagSparkMaxSwitch; import frc.robot.utils.logging.input.MotorLoggableInputs; import frc.robot.utils.logging.io.pidmotor.MockSparkMaxPidMotorIo; import frc.robot.utils.logging.io.pidmotor.RealSparkMaxPidMotorIo; @@ -32,6 +36,7 @@ public class AnglerSubsystem extends SubsystemBase { public AnglerSubsystem(SparkMaxPidMotorIo io) { this.io = io; this.pidManager = new TunablePIDManager(LOGGING_NAME, io, createPidConfig()); + } @Override @@ -113,7 +118,20 @@ public static SparkMaxPidMotorIo createMockIo() { } public static SparkMaxPidMotorIo createRealIo() { - return new RealSparkMaxPidMotorIo(LOGGING_NAME, createMotor(), MotorLoggableInputs.allMetrics()); + + SparkMaxPidMotor motor = createMotor(); + + Robot.getDiagnostics() + .addDiagnosable( + new DiagSparkMaxSwitch( + "Angler", "ForwardLimit", motor.getNeoMotor(), DiagSparkMaxSwitch.Direction.FORWARD)); + + Robot.getDiagnostics() + .addDiagnosable( + new DiagSparkMaxSwitch( + "Angler", "ReverseLimit", motor.getNeoMotor(), DiagSparkMaxSwitch.Direction.REVERSE)); + + return new RealSparkMaxPidMotorIo(LOGGING_NAME, motor, MotorLoggableInputs.allMetrics()); } public static SparkMaxPidMotorIo createSimIo(RobotVisualizer visualizer) { diff --git a/src/main/java/frc/robot/subsystems/ClimberSubsystem.java b/src/main/java/frc/robot/subsystems/ClimberSubsystem.java index cd8829b2..51daef09 100644 --- a/src/main/java/frc/robot/subsystems/ClimberSubsystem.java +++ b/src/main/java/frc/robot/subsystems/ClimberSubsystem.java @@ -9,7 +9,10 @@ import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Robot; import frc.robot.constants.Constants; +import frc.robot.constants.GameConstants; +import frc.robot.utils.diag.DiagSparkMaxEncoder; import frc.robot.utils.logging.input.DigitalInputLoggableInputs; import frc.robot.utils.logging.input.MotorLoggableInputs; import frc.robot.utils.logging.io.motor.DigitalInputIo; @@ -50,7 +53,14 @@ public static SparkMaxIo createMockIo() { } public static SparkMaxIo createRealIo() { - return new RealSparkMaxIo(LOGGING_NAME, createMotor(), MotorLoggableInputs.allMetrics()); + SparkMax motor = createMotor(); + + Robot.getDiagnostics() + .addDiagnosable( + new DiagSparkMaxEncoder( + "Climber", "Encoder", GameConstants.CLIMBER_DIAGS_ENCODER, motor)); + + return new RealSparkMaxIo(LOGGING_NAME, motor, MotorLoggableInputs.allMetrics()); } public static SparkMaxIo createSimIo(RobotVisualizer visualizer) { diff --git a/src/main/java/frc/robot/subsystems/FeederSubsystem.java b/src/main/java/frc/robot/subsystems/FeederSubsystem.java index c9c0cd32..ca8535e9 100644 --- a/src/main/java/frc/robot/subsystems/FeederSubsystem.java +++ b/src/main/java/frc/robot/subsystems/FeederSubsystem.java @@ -9,8 +9,11 @@ import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Robot; import frc.robot.commands.intake.SpinIntake; import frc.robot.constants.Constants; +import frc.robot.constants.GameConstants; +import frc.robot.utils.diag.DiagSparkMaxEncoder; import frc.robot.utils.logging.input.DigitalInputLoggableInputs; import frc.robot.utils.logging.input.MotorLoggableInputs; import frc.robot.utils.logging.io.motor.DigitalInputIo; @@ -51,7 +54,14 @@ public static SparkMaxIo createMockIo() { } public static SparkMaxIo createRealIo() { - return new RealSparkMaxIo(LOGGING_NAME, createMotor(), MotorLoggableInputs.allMetrics()); + SparkMax motor = createMotor(); + + Robot.getDiagnostics() + .addDiagnosable( + new DiagSparkMaxEncoder( + "Feeder", "Encoder", GameConstants.FEEDER_DIAGS_ENCODER, motor)); + + return new RealSparkMaxIo(LOGGING_NAME, motor, MotorLoggableInputs.allMetrics()); } public static SparkMaxIo createSimIo(RobotVisualizer visualizer) { diff --git a/src/main/java/frc/robot/subsystems/GyroSubsystem.java b/src/main/java/frc/robot/subsystems/GyroSubsystem.java index 42dc97e1..25b99e26 100644 --- a/src/main/java/frc/robot/subsystems/GyroSubsystem.java +++ b/src/main/java/frc/robot/subsystems/GyroSubsystem.java @@ -1,10 +1,14 @@ package frc.robot.subsystems; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Robot; +import frc.robot.constants.GameConstants; +import frc.robot.utils.diag.DiagGyro; import frc.robot.utils.logging.input.GyroValues; import frc.robot.utils.logging.io.gyro.GyroIo; import frc.robot.utils.logging.io.gyro.MockGyroIo; import frc.robot.utils.logging.io.gyro.RealGyroIo; +import frc.robot.utils.logging.io.gyro.ThreadedGyro; import frc.robot.utils.simulation.RobotVisualizer; public class GyroSubsystem extends SubsystemBase { @@ -37,7 +41,11 @@ public static GyroIo createMockIo() { public static GyroIo createRealIo() { RealGyroIo realGyroIo = new RealGyroIo(); + ThreadedGyro gyro = realGyroIo.getThreadedGyro(); realGyroIo.start(); + Robot.getDiagnostics() + .addDiagnosable(new DiagGyro("Gyro", "Gyro Angle", GameConstants.GYRO_DIAGS_ANGLE, gyro)); + return realGyroIo; } diff --git a/src/main/java/frc/robot/subsystems/HopperSubsystem.java b/src/main/java/frc/robot/subsystems/HopperSubsystem.java index adb1bbad..5eb537a8 100644 --- a/src/main/java/frc/robot/subsystems/HopperSubsystem.java +++ b/src/main/java/frc/robot/subsystems/HopperSubsystem.java @@ -8,7 +8,10 @@ import com.revrobotics.spark.config.SparkMaxConfig; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Robot; import frc.robot.constants.Constants; +import frc.robot.constants.GameConstants; +import frc.robot.utils.diag.DiagSparkMaxEncoder; import frc.robot.utils.logging.input.MotorLoggableInputs; import frc.robot.utils.logging.io.motor.MockSparkMaxIo; import frc.robot.utils.logging.io.motor.RealSparkMaxIo; @@ -50,7 +53,15 @@ public static SparkMaxIo createMockIo() { } public static SparkMaxIo createRealIo() { - return new RealSparkMaxIo(LOGGING_NAME, createMotor(), MotorLoggableInputs.allMetrics()); + + SparkMax motor = createMotor(); + + Robot.getDiagnostics() + .addDiagnosable( + new DiagSparkMaxEncoder( + "Hopper", "Encoder", GameConstants.HOPPER_DIAGS_ENCODER, motor)); + + return new RealSparkMaxIo(LOGGING_NAME, motor, MotorLoggableInputs.allMetrics()); } public static SparkMaxIo createSimIo(RobotVisualizer visualizer) { diff --git a/src/main/java/frc/robot/subsystems/IntakeDeployerSubsystem.java b/src/main/java/frc/robot/subsystems/IntakeDeployerSubsystem.java index 5e6db2b3..c2b60ad2 100644 --- a/src/main/java/frc/robot/subsystems/IntakeDeployerSubsystem.java +++ b/src/main/java/frc/robot/subsystems/IntakeDeployerSubsystem.java @@ -12,9 +12,12 @@ import com.revrobotics.spark.config.SparkMaxConfig; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Robot; import frc.robot.commands.intakeDeployment.RunDeployer; import frc.robot.constants.Constants; import frc.robot.constants.enums.DeploymentState; +import frc.robot.utils.diag.DiagSparkMaxSwitch; +import frc.robot.utils.diag.DiagSparkMaxSwitch.Direction; import frc.robot.utils.logging.input.MotorLoggableInputs; import frc.robot.utils.logging.io.motor.MockSparkMaxIo; import frc.robot.utils.logging.io.motor.RealSparkMaxIo; @@ -51,7 +54,20 @@ public static SparkMaxIo createMockIo() { } public static SparkMaxIo createRealIo() { - return new RealSparkMaxIo(LOGGING_NAME, createMotor(), MotorLoggableInputs.allMetrics()); + + SparkMax motor = createMotor(); + + Robot.getDiagnostics() + .addDiagnosable( + new DiagSparkMaxSwitch( + "Intake Deployer", "ForwardLimit", motor, DiagSparkMaxSwitch.Direction.FORWARD)); + + Robot.getDiagnostics() + .addDiagnosable( + new DiagSparkMaxSwitch( + "Intake Deployer", "ReverseLimit", motor, DiagSparkMaxSwitch.Direction.REVERSE)); + + return new RealSparkMaxIo(LOGGING_NAME, motor, MotorLoggableInputs.allMetrics()); } public static SparkMaxIo createSimIo(RobotVisualizer visualizer) { diff --git a/src/main/java/frc/robot/subsystems/IntakeSubsystem.java b/src/main/java/frc/robot/subsystems/IntakeSubsystem.java index 5e009a65..8a90170f 100644 --- a/src/main/java/frc/robot/subsystems/IntakeSubsystem.java +++ b/src/main/java/frc/robot/subsystems/IntakeSubsystem.java @@ -9,8 +9,11 @@ import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Robot; import frc.robot.commands.intake.SpinIntake; import frc.robot.constants.Constants; +import frc.robot.constants.GameConstants; +import frc.robot.utils.diag.DiagSparkMaxEncoder; import frc.robot.utils.logging.input.DigitalInputLoggableInputs; import frc.robot.utils.logging.input.MotorLoggableInputs; import frc.robot.utils.logging.io.motor.DigitalInputIo; @@ -58,7 +61,15 @@ public static SparkMaxIo createMockIo() { return new MockSparkMaxIo(LOGGING_NAME, MotorLoggableInputs.allMetrics()); } public static SparkMaxIo createRealIo() { - return new RealSparkMaxIo(LOGGING_NAME, createMotor(), MotorLoggableInputs.allMetrics()); + + SparkMax motor = createMotor(); + + Robot.getDiagnostics() + .addDiagnosable( + new DiagSparkMaxEncoder( + "Intake Roller", "Encoder", GameConstants.INTAKE_ROLLER_DIAGS_ENCODER, motor)); + + return new RealSparkMaxIo(LOGGING_NAME, motor, MotorLoggableInputs.allMetrics()); } public static SparkMaxIo createSimIo(RobotVisualizer visualizer) { SparkMax motor = createMotor(); diff --git a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java index 09d8d678..a27de559 100644 --- a/src/main/java/frc/robot/subsystems/ShooterSubsystem.java +++ b/src/main/java/frc/robot/subsystems/ShooterSubsystem.java @@ -11,7 +11,11 @@ import com.revrobotics.spark.config.SparkMaxConfig; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Robot; import frc.robot.constants.Constants; +import frc.robot.constants.Constants2026; +import frc.robot.constants.GameConstants; +import frc.robot.utils.diag.DiagSparkMaxEncoder; import frc.robot.utils.logging.input.MotorLoggableInputs; import frc.robot.utils.logging.io.motor.SparkMaxIo; import frc.robot.utils.logging.io.pidmotor.MockSparkMaxPidMotorIo; @@ -38,7 +42,6 @@ public ShooterSubsystem(SparkMaxPidMotorIo io) { followerConfig = new SparkMaxConfig(); followerConfig.follow(Constants.SHOOTER_MOTOR_ID, true); followerMotor.configure(followerConfig, ResetMode.kNoResetSafeParameters, PersistMode.kNoPersistParameters); - } // setSpeed expects a power value from -1 to 1 @@ -65,7 +68,14 @@ public static SparkMaxPidMotorIo createMockIo() { } public static SparkMaxPidMotorIo createRealIo() { - return new RealSparkMaxPidMotorIo(LOGGING_NAME, createMotor(), MotorLoggableInputs.allMetrics()); + SparkMaxPidMotor motor = createMotor(); + + Robot.getDiagnostics() + .addDiagnosable( + new DiagSparkMaxEncoder( + "Shooter", "Encoder", GameConstants.SHOOTER_DIAGS_ENCODER, motor.getNeoMotor())); + + return new RealSparkMaxPidMotorIo(LOGGING_NAME, motor, MotorLoggableInputs.allMetrics()); } public static SparkMaxPidMotorIo createSimIo(RobotVisualizer visualizer) { diff --git a/src/main/java/frc/robot/subsystems/TurretSubsystem.java b/src/main/java/frc/robot/subsystems/TurretSubsystem.java index e9786af4..3edb0925 100644 --- a/src/main/java/frc/robot/subsystems/TurretSubsystem.java +++ b/src/main/java/frc/robot/subsystems/TurretSubsystem.java @@ -9,8 +9,10 @@ import edu.wpi.first.math.MathUtil; import edu.wpi.first.wpilibj2.command.SubsystemBase; +import frc.robot.Robot; import frc.robot.constants.Constants; import frc.robot.constants.GameConstants; +import frc.robot.utils.diag.DiagSparkMaxSwitch; import frc.robot.utils.logging.input.MotorLoggableInputs; import frc.robot.utils.logging.io.pidmotor.MockSparkMaxPidMotorIo; import frc.robot.utils.logging.io.pidmotor.RealSparkMaxPidMotorIo; @@ -113,7 +115,20 @@ public static SparkMaxPidMotorIo createMockIo() { } public static SparkMaxPidMotorIo createRealIo() { - return new RealSparkMaxPidMotorIo(LOGGING_NAME, createMotor(), MotorLoggableInputs.allMetrics()); + + SparkMaxPidMotor motor = createMotor(); + + Robot.getDiagnostics() + .addDiagnosable( + new DiagSparkMaxSwitch( + "Turret", "ForwardLimit", motor.getNeoMotor(), DiagSparkMaxSwitch.Direction.FORWARD)); + + Robot.getDiagnostics() + .addDiagnosable( + new DiagSparkMaxSwitch( + "Turret", "ReverseLimit", motor.getNeoMotor(), DiagSparkMaxSwitch.Direction.REVERSE)); + + return new RealSparkMaxPidMotorIo(LOGGING_NAME, motor, MotorLoggableInputs.allMetrics()); } public static SparkMaxPidMotorIo createSimIo(RobotVisualizer visualizer) {