diff --git a/simgui-ds.json b/simgui-ds.json index 1fa3b25..00ed9e6 100644 --- a/simgui-ds.json +++ b/simgui-ds.json @@ -1,4 +1,14 @@ { + "FMS": { + "window": { + "visible": false + } + }, + "System Joysticks": { + "window": { + "visible": false + } + }, "keyboardJoysticks": [ { "axisConfig": [ diff --git a/simgui.json b/simgui.json index 5febc02..070af3e 100644 --- a/simgui.json +++ b/simgui.json @@ -4,6 +4,21 @@ "window": { "visible": true } + }, + "Solenoids": { + "0": { + "header": { + "open": true + } + }, + "window": { + "visible": true + } + }, + "Timing": { + "window": { + "visible": false + } } }, "NTProvider": { @@ -14,6 +29,11 @@ "/SmartDashboard/Pigeon IMU [0]": "Gyro" }, "windows": { + "/Shuffleboard/dashboard/autochooser": { + "window": { + "visible": true + } + }, "/SmartDashboard/Field": { "bottom": 1476, "height": 8.210550308227539, @@ -37,6 +57,9 @@ } } }, + "NetworkTables Info": { + "visible": true + }, "NetworkTables View": { "visible": false }, diff --git a/src/main/deploy/pathplanner/autos/1.2.auto b/src/main/deploy/pathplanner/autos/1.2.auto index a557e76..b2db2b5 100644 --- a/src/main/deploy/pathplanner/autos/1.2.auto +++ b/src/main/deploy/pathplanner/autos/1.2.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/1.3.auto b/src/main/deploy/pathplanner/autos/1.3.auto index f749089..e03567d 100644 --- a/src/main/deploy/pathplanner/autos/1.3.auto +++ b/src/main/deploy/pathplanner/autos/1.3.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/1.4.auto b/src/main/deploy/pathplanner/autos/1.4.auto index fa1607d..6e06e00 100644 --- a/src/main/deploy/pathplanner/autos/1.4.auto +++ b/src/main/deploy/pathplanner/autos/1.4.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/1.5.auto b/src/main/deploy/pathplanner/autos/1.5.auto index 8eb44dc..23f05cf 100644 --- a/src/main/deploy/pathplanner/autos/1.5.auto +++ b/src/main/deploy/pathplanner/autos/1.5.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } @@ -65,17 +65,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/2.2.auto b/src/main/deploy/pathplanner/autos/2.2.auto index 8cc5cf1..d225767 100644 --- a/src/main/deploy/pathplanner/autos/2.2.auto +++ b/src/main/deploy/pathplanner/autos/2.2.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/2.3.auto b/src/main/deploy/pathplanner/autos/2.3.auto index 9664be9..3cd5557 100644 --- a/src/main/deploy/pathplanner/autos/2.3.auto +++ b/src/main/deploy/pathplanner/autos/2.3.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/2.4.auto b/src/main/deploy/pathplanner/autos/2.4.auto index 4bd326d..b2a1901 100644 --- a/src/main/deploy/pathplanner/autos/2.4.auto +++ b/src/main/deploy/pathplanner/autos/2.4.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/2.5.auto b/src/main/deploy/pathplanner/autos/2.5.auto index 4db4968..9a1589f 100644 --- a/src/main/deploy/pathplanner/autos/2.5.auto +++ b/src/main/deploy/pathplanner/autos/2.5.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } @@ -65,17 +65,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/3.1.auto b/src/main/deploy/pathplanner/autos/3.1.auto index 60135e2..f52296d 100644 --- a/src/main/deploy/pathplanner/autos/3.1.auto +++ b/src/main/deploy/pathplanner/autos/3.1.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/3.2.auto b/src/main/deploy/pathplanner/autos/3.2.auto index fab233e..4719e02 100644 --- a/src/main/deploy/pathplanner/autos/3.2.auto +++ b/src/main/deploy/pathplanner/autos/3.2.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/3.3.auto b/src/main/deploy/pathplanner/autos/3.3.auto index e899dae..ce4eab5 100644 --- a/src/main/deploy/pathplanner/autos/3.3.auto +++ b/src/main/deploy/pathplanner/autos/3.3.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/3.4.auto b/src/main/deploy/pathplanner/autos/3.4.auto index ee52ad4..2485fff 100644 --- a/src/main/deploy/pathplanner/autos/3.4.auto +++ b/src/main/deploy/pathplanner/autos/3.4.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/3.5.auto b/src/main/deploy/pathplanner/autos/3.5.auto index a22e873..7a0dc5f 100644 --- a/src/main/deploy/pathplanner/autos/3.5.auto +++ b/src/main/deploy/pathplanner/autos/3.5.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -65,17 +65,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/4.1.auto b/src/main/deploy/pathplanner/autos/4.1.auto index c55e797..1d526a8 100644 --- a/src/main/deploy/pathplanner/autos/4.1.auto +++ b/src/main/deploy/pathplanner/autos/4.1.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/4.2.auto b/src/main/deploy/pathplanner/autos/4.2.auto index 873f45d..3e5df99 100644 --- a/src/main/deploy/pathplanner/autos/4.2.auto +++ b/src/main/deploy/pathplanner/autos/4.2.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/4.3.auto b/src/main/deploy/pathplanner/autos/4.3.auto index 309d666..fcca443 100644 --- a/src/main/deploy/pathplanner/autos/4.3.auto +++ b/src/main/deploy/pathplanner/autos/4.3.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/4.4.auto b/src/main/deploy/pathplanner/autos/4.4.auto index 1921381..3b8f377 100644 --- a/src/main/deploy/pathplanner/autos/4.4.auto +++ b/src/main/deploy/pathplanner/autos/4.4.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/4.5.auto b/src/main/deploy/pathplanner/autos/4.5.auto index 3e57efa..4e19546 100644 --- a/src/main/deploy/pathplanner/autos/4.5.auto +++ b/src/main/deploy/pathplanner/autos/4.5.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/5.1.auto b/src/main/deploy/pathplanner/autos/5.1.auto index bc613d0..ccf4f92 100644 --- a/src/main/deploy/pathplanner/autos/5.1.auto +++ b/src/main/deploy/pathplanner/autos/5.1.auto @@ -15,24 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "deadline", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - } - ] - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/5.2.auto b/src/main/deploy/pathplanner/autos/5.2.auto index 209d455..fbbd903 100644 --- a/src/main/deploy/pathplanner/autos/5.2.auto +++ b/src/main/deploy/pathplanner/autos/5.2.auto @@ -15,24 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "deadline", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - } - ] - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/5.3.auto b/src/main/deploy/pathplanner/autos/5.3.auto index 9cd6456..902d99a 100644 --- a/src/main/deploy/pathplanner/autos/5.3.auto +++ b/src/main/deploy/pathplanner/autos/5.3.auto @@ -15,24 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "deadline", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - } - ] - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -47,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/5.5.auto b/src/main/deploy/pathplanner/autos/5.5.auto index a1412af..e7c6626 100644 --- a/src/main/deploy/pathplanner/autos/5.5.auto +++ b/src/main/deploy/pathplanner/autos/5.5.auto @@ -15,24 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "deadline", - "data": { - "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - } - ] - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -47,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } @@ -72,17 +65,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/6.1.auto b/src/main/deploy/pathplanner/autos/6.1.auto index 1733bae..88b4194 100644 --- a/src/main/deploy/pathplanner/autos/6.1.auto +++ b/src/main/deploy/pathplanner/autos/6.1.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/6.2.auto b/src/main/deploy/pathplanner/autos/6.2.auto index adc3a77..b354106 100644 --- a/src/main/deploy/pathplanner/autos/6.2.auto +++ b/src/main/deploy/pathplanner/autos/6.2.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/6.3.auto b/src/main/deploy/pathplanner/autos/6.3.auto index ca3fe4a..ce14187 100644 --- a/src/main/deploy/pathplanner/autos/6.3.auto +++ b/src/main/deploy/pathplanner/autos/6.3.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/6.4.auto b/src/main/deploy/pathplanner/autos/6.4.auto index 8716b08..1cd567a 100644 --- a/src/main/deploy/pathplanner/autos/6.4.auto +++ b/src/main/deploy/pathplanner/autos/6.4.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } diff --git a/src/main/deploy/pathplanner/autos/6.5.auto b/src/main/deploy/pathplanner/autos/6.5.auto index 52cf9b4..2751b1b 100644 --- a/src/main/deploy/pathplanner/autos/6.5.auto +++ b/src/main/deploy/pathplanner/autos/6.5.auto @@ -15,17 +15,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } @@ -40,17 +40,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "balyer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "balyer" + } } ] } @@ -65,17 +65,17 @@ "type": "deadline", "data": { "commands": [ - { - "type": "named", - "data": { - "name": "lancer" - } - }, { "type": "wait", "data": { "waitTime": 3.0 } + }, + { + "type": "named", + "data": { + "name": "lancer" + } } ] } diff --git a/src/main/java/frc/robot/RobotContainer.java b/src/main/java/frc/robot/RobotContainer.java index 5a715bb..1e54a52 100644 --- a/src/main/java/frc/robot/RobotContainer.java +++ b/src/main/java/frc/robot/RobotContainer.java @@ -23,8 +23,9 @@ import edu.wpi.first.wpilibj2.command.WaitCommand; // Manettes import edu.wpi.first.wpilibj2.command.button.CommandJoystick; import edu.wpi.first.wpilibj2.command.button.CommandXboxController; -import frc.robot.command.AllumeLED; + // Commands +import frc.robot.command.AllumeLED; import frc.robot.command.Balayer; import frc.robot.command.GrimpeurDroit; import frc.robot.command.GrimpeurGauche; @@ -70,8 +71,13 @@ public class RobotContainer { LancerNote lancernote = new LancerNote(lanceur, accumulateur); Lancerampli lancerampli = new Lancerampli(lanceur,limelight); GrimpeurDroit grimpeurDroit = new GrimpeurDroit(grimpeur, manette::getLeftX); +<<<<<<< HEAD GrimpeurGauche grimpeurGauche = new GrimpeurGauche(grimpeur, manette::getLeftY); AllumeLED allumeLED = new AllumeLED(LED,accumulateur); +======= + GrimpeurGauche grimpeurGauche = new GrimpeurGauche(grimpeur, manette::getRightX); + AllumeLED allumeLED = new AllumeLED(LED, accumulateur); +>>>>>>> 7a37782ca19fb71cb842174cd8fcd536eda825a9 Pistongrimpeur pistongrimpeur = new Pistongrimpeur(grimpeur, LED); public RobotContainer() { dashboard.addCamera("limelight", "limelight","limelight.local:5800"); @@ -92,8 +98,10 @@ public class RobotContainer { drive.drive(-MathUtil.applyDeadband(joystick.getY(),0.2), MathUtil.applyDeadband(-joystick.getX(),0.2), MathUtil.applyDeadband(-joystick.getZ(), 0.2)); },drive)); grimpeur.setDefaultCommand(new RunCommand(()->{ - grimpeur.droit(manette.getLeftX());} + grimpeur.droit(manette.getLeftX()); + grimpeur.gauche(manette.getRightX());} ,grimpeur)); + LED.setDefaultCommand(allumeLED); dashboard.add("autochooser",autoChooser) .withSize(2,1) diff --git a/src/main/java/frc/robot/command/AllumeLED.java b/src/main/java/frc/robot/command/AllumeLED.java index 484ecb3..f070ff3 100644 --- a/src/main/java/frc/robot/command/AllumeLED.java +++ b/src/main/java/frc/robot/command/AllumeLED.java @@ -12,7 +12,7 @@ public class AllumeLED extends Command { private LED led; private Accumulateur accumulateur; /** Creates a new AllumeLED. */ - public AllumeLED(LED led,Accumulateur accumulateur) { + public AllumeLED(LED led,Accumulateur accumulateur){ this.accumulateur = accumulateur; this.led = led; addRequirements(led); diff --git a/src/main/java/frc/robot/command/GrimpeurDroit.java b/src/main/java/frc/robot/command/GrimpeurDroit.java index 20ff35e..718c3ce 100644 --- a/src/main/java/frc/robot/command/GrimpeurDroit.java +++ b/src/main/java/frc/robot/command/GrimpeurDroit.java @@ -45,7 +45,7 @@ public class GrimpeurDroit extends Command { else{ grimpeur.droit(0); } - if(grimpeur.encoderd()>0){ + if(grimpeur.encoderd()>1){ grimpeur.resetencodeurd(); grimpeur.droit(0); diff --git a/src/main/java/frc/robot/command/GrimpeurGauche.java b/src/main/java/frc/robot/command/GrimpeurGauche.java index 11a5685..3e7e46e 100644 --- a/src/main/java/frc/robot/command/GrimpeurGauche.java +++ b/src/main/java/frc/robot/command/GrimpeurGauche.java @@ -44,7 +44,7 @@ public class GrimpeurGauche extends Command { else{ grimpeur.gauche(0); } - if(grimpeur.encoderd()>0){ + if(grimpeur.encoderd()>1){ grimpeur.resetencodeurg(); grimpeur.gauche(0); diff --git a/src/main/java/frc/robot/subsystem/Grimpeur.java b/src/main/java/frc/robot/subsystem/Grimpeur.java index 293bdec..6589c72 100644 --- a/src/main/java/frc/robot/subsystem/Grimpeur.java +++ b/src/main/java/frc/robot/subsystem/Grimpeur.java @@ -10,14 +10,12 @@ import com.revrobotics.CANSparkLowLevel.MotorType; import edu.wpi.first.networktables.GenericEntry; import edu.wpi.first.wpilibj.DigitalInput; -import edu.wpi.first.wpilibj.DoubleSolenoid; import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj.Solenoid; import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout; import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts; -import edu.wpi.first.wpilibj.DoubleSolenoid.Value; import edu.wpi.first.wpilibj2.command.SubsystemBase; import frc.robot.Constants; @@ -33,14 +31,11 @@ public class Grimpeur extends SubsystemBase { final CANSparkMax grimpeurd = new CANSparkMax(Constants.grimpeurd,MotorType.kBrushless); final CANSparkMax grimpeurg = new CANSparkMax(Constants.grimpeurg,MotorType.kBrushless); // limit switch - final DigitalInput limitdroite = new DigitalInput(Constants.limithaut); - final DigitalInput limitgauche = new DigitalInput(Constants.limitbas); final Solenoid pistondroite= new Solenoid(PneumaticsModuleType.CTREPCM, Constants.pistondroiteouvre); final Solenoid pistondgauche = new Solenoid(PneumaticsModuleType.CTREPCM, Constants.pistondgaucheouvre); //fonction public Grimpeur() { - layout.addBoolean("limitgrimpeurd", limitdroite::get); - layout.addBoolean("limitgrimpeurg", limitdroite::get); + pistonouvre(); layout.add("grimpeurencodeurd", encoderd()); layout.add("grimpeurencodeurg", encoderg()); layout.add("pitchgyrogrimpeur", getpitch()); @@ -51,12 +46,6 @@ public void droit(double vitesse){ public void gauche(double vitesse){ grimpeurg.set(vitesse); } -public boolean droite(){ - return limitdroite.get(); -} -public boolean gauche(){ - return limitgauche.get(); -} public void resetencodeurd(){ grimpeurd.getEncoder().setPosition(0); } @@ -84,14 +73,10 @@ public AHRS gyroscope = new AHRS(); public boolean piston(){ return pistondgauche.get(); } - @Override + + @Override public void periodic() { // This method will be called once per scheduler run - if(droite()) { - resetencodeurd(); - } - if(gauche()) { - resetencodeurg(); - } } } + diff --git a/src/main/java/frc/robot/subsystem/Limelight.java b/src/main/java/frc/robot/subsystem/Limelight.java index ab2358f..944b8c0 100644 --- a/src/main/java/frc/robot/subsystem/Limelight.java +++ b/src/main/java/frc/robot/subsystem/Limelight.java @@ -16,7 +16,6 @@ public class Limelight extends SubsystemBase { NetworkTableEntry tx = table.getEntry("tx"); NetworkTableEntry ty = table.getEntry("ty"); - NetworkTableEntry ta = table.getEntry("ta"); NetworkTableEntry pipeline = table.getEntry("pipeline"); NetworkTableEntry tv = table.getEntry("tv"); NetworkTableEntry camMode = table.getEntry("camMode"); @@ -33,9 +32,6 @@ public class Limelight extends SubsystemBase { public double gety(){ return ty.getDouble(0); } - /* public double geta() { - return ta.getDouble(0); - }*/ public boolean getv(){ return tv.getBoolean(false); }