This commit is contained in:
Olivier Dubois 2024-02-12 19:14:27 -05:00
commit 69afbb068a
35 changed files with 344 additions and 350 deletions

View File

@ -1,4 +1,14 @@
{ {
"FMS": {
"window": {
"visible": false
}
},
"System Joysticks": {
"window": {
"visible": false
}
},
"keyboardJoysticks": [ "keyboardJoysticks": [
{ {
"axisConfig": [ "axisConfig": [

View File

@ -4,6 +4,21 @@
"window": { "window": {
"visible": true "visible": true
} }
},
"Solenoids": {
"0": {
"header": {
"open": true
}
},
"window": {
"visible": true
}
},
"Timing": {
"window": {
"visible": false
}
} }
}, },
"NTProvider": { "NTProvider": {
@ -14,6 +29,11 @@
"/SmartDashboard/Pigeon IMU [0]": "Gyro" "/SmartDashboard/Pigeon IMU [0]": "Gyro"
}, },
"windows": { "windows": {
"/Shuffleboard/dashboard/autochooser": {
"window": {
"visible": true
}
},
"/SmartDashboard/Field": { "/SmartDashboard/Field": {
"bottom": 1476, "bottom": 1476,
"height": 8.210550308227539, "height": 8.210550308227539,
@ -37,6 +57,9 @@
} }
} }
}, },
"NetworkTables Info": {
"visible": true
},
"NetworkTables View": { "NetworkTables View": {
"visible": false "visible": false
}, },

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }
@ -65,17 +65,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }
@ -65,17 +65,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -65,17 +65,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }

View File

@ -16,9 +16,11 @@
"data": { "data": {
"commands": [ "commands": [
{ {
"type": "deadline", "type": "wait",
"data": { "data": {
"commands": [ "waitTime": 3.0
}
},
{ {
"type": "named", "type": "named",
"data": { "data": {
@ -27,15 +29,6 @@
} }
] ]
} }
},
{
"type": "wait",
"data": {
"waitTime": 3.0
}
}
]
}
} }
] ]
} }

View File

@ -16,9 +16,11 @@
"data": { "data": {
"commands": [ "commands": [
{ {
"type": "deadline", "type": "wait",
"data": { "data": {
"commands": [ "waitTime": 3.0
}
},
{ {
"type": "named", "type": "named",
"data": { "data": {
@ -28,15 +30,6 @@
] ]
} }
}, },
{
"type": "wait",
"data": {
"waitTime": 3.0
}
}
]
}
},
{ {
"type": "path", "type": "path",
"data": { "data": {

View File

@ -16,9 +16,11 @@
"data": { "data": {
"commands": [ "commands": [
{ {
"type": "deadline", "type": "wait",
"data": { "data": {
"commands": [ "waitTime": 3.0
}
},
{ {
"type": "named", "type": "named",
"data": { "data": {
@ -28,15 +30,6 @@
] ]
} }
}, },
{
"type": "wait",
"data": {
"waitTime": 3.0
}
}
]
}
},
{ {
"type": "path", "type": "path",
"data": { "data": {
@ -47,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }

View File

@ -16,9 +16,11 @@
"data": { "data": {
"commands": [ "commands": [
{ {
"type": "deadline", "type": "wait",
"data": { "data": {
"commands": [ "waitTime": 3.0
}
},
{ {
"type": "named", "type": "named",
"data": { "data": {
@ -28,15 +30,6 @@
] ]
} }
}, },
{
"type": "wait",
"data": {
"waitTime": 3.0
}
}
]
}
},
{ {
"type": "path", "type": "path",
"data": { "data": {
@ -47,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }
@ -72,17 +65,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }

View File

@ -15,17 +15,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }
@ -40,17 +40,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "balyer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "balyer"
}
} }
] ]
} }
@ -65,17 +65,17 @@
"type": "deadline", "type": "deadline",
"data": { "data": {
"commands": [ "commands": [
{
"type": "named",
"data": {
"name": "lancer"
}
},
{ {
"type": "wait", "type": "wait",
"data": { "data": {
"waitTime": 3.0 "waitTime": 3.0
} }
},
{
"type": "named",
"data": {
"name": "lancer"
}
} }
] ]
} }

View File

@ -23,8 +23,9 @@ import edu.wpi.first.wpilibj2.command.WaitCommand;
// Manettes // Manettes
import edu.wpi.first.wpilibj2.command.button.CommandJoystick; import edu.wpi.first.wpilibj2.command.button.CommandJoystick;
import edu.wpi.first.wpilibj2.command.button.CommandXboxController; import edu.wpi.first.wpilibj2.command.button.CommandXboxController;
import frc.robot.command.AllumeLED;
// Commands // Commands
import frc.robot.command.AllumeLED;
import frc.robot.command.Balayer; import frc.robot.command.Balayer;
import frc.robot.command.GrimpeurDroit; import frc.robot.command.GrimpeurDroit;
import frc.robot.command.GrimpeurGauche; import frc.robot.command.GrimpeurGauche;
@ -70,8 +71,13 @@ public class RobotContainer {
LancerNote lancernote = new LancerNote(lanceur, accumulateur); LancerNote lancernote = new LancerNote(lanceur, accumulateur);
Lancerampli lancerampli = new Lancerampli(lanceur,limelight); Lancerampli lancerampli = new Lancerampli(lanceur,limelight);
GrimpeurDroit grimpeurDroit = new GrimpeurDroit(grimpeur, manette::getLeftX); GrimpeurDroit grimpeurDroit = new GrimpeurDroit(grimpeur, manette::getLeftX);
<<<<<<< HEAD
GrimpeurGauche grimpeurGauche = new GrimpeurGauche(grimpeur, manette::getLeftY); GrimpeurGauche grimpeurGauche = new GrimpeurGauche(grimpeur, manette::getLeftY);
AllumeLED allumeLED = new AllumeLED(LED,accumulateur); 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); Pistongrimpeur pistongrimpeur = new Pistongrimpeur(grimpeur, LED);
public RobotContainer() { public RobotContainer() {
dashboard.addCamera("limelight", "limelight","limelight.local:5800"); 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.drive(-MathUtil.applyDeadband(joystick.getY(),0.2), MathUtil.applyDeadband(-joystick.getX(),0.2), MathUtil.applyDeadband(-joystick.getZ(), 0.2));
},drive)); },drive));
grimpeur.setDefaultCommand(new RunCommand(()->{ grimpeur.setDefaultCommand(new RunCommand(()->{
grimpeur.droit(manette.getLeftX());} grimpeur.droit(manette.getLeftX());
grimpeur.gauche(manette.getRightX());}
,grimpeur)); ,grimpeur));
LED.setDefaultCommand(allumeLED); LED.setDefaultCommand(allumeLED);
dashboard.add("autochooser",autoChooser) dashboard.add("autochooser",autoChooser)
.withSize(2,1) .withSize(2,1)

View File

@ -12,7 +12,7 @@ public class AllumeLED extends Command {
private LED led; private LED led;
private Accumulateur accumulateur; private Accumulateur accumulateur;
/** Creates a new AllumeLED. */ /** Creates a new AllumeLED. */
public AllumeLED(LED led,Accumulateur accumulateur) { public AllumeLED(LED led,Accumulateur accumulateur){
this.accumulateur = accumulateur; this.accumulateur = accumulateur;
this.led = led; this.led = led;
addRequirements(led); addRequirements(led);

View File

@ -45,7 +45,7 @@ public class GrimpeurDroit extends Command {
else{ else{
grimpeur.droit(0); grimpeur.droit(0);
} }
if(grimpeur.encoderd()>0){ if(grimpeur.encoderd()>1){
grimpeur.resetencodeurd(); grimpeur.resetencodeurd();
grimpeur.droit(0); grimpeur.droit(0);

View File

@ -44,7 +44,7 @@ public class GrimpeurGauche extends Command {
else{ else{
grimpeur.gauche(0); grimpeur.gauche(0);
} }
if(grimpeur.encoderd()>0){ if(grimpeur.encoderd()>1){
grimpeur.resetencodeurg(); grimpeur.resetencodeurg();
grimpeur.gauche(0); grimpeur.gauche(0);

View File

@ -10,14 +10,12 @@ import com.revrobotics.CANSparkLowLevel.MotorType;
import edu.wpi.first.networktables.GenericEntry; import edu.wpi.first.networktables.GenericEntry;
import edu.wpi.first.wpilibj.DigitalInput; import edu.wpi.first.wpilibj.DigitalInput;
import edu.wpi.first.wpilibj.DoubleSolenoid;
import edu.wpi.first.wpilibj.PneumaticsModuleType; import edu.wpi.first.wpilibj.PneumaticsModuleType;
import edu.wpi.first.wpilibj.Solenoid; import edu.wpi.first.wpilibj.Solenoid;
import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard; import edu.wpi.first.wpilibj.shuffleboard.Shuffleboard;
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout; import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardLayout;
import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab; import edu.wpi.first.wpilibj.shuffleboard.ShuffleboardTab;
import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts; import edu.wpi.first.wpilibj.shuffleboard.BuiltInLayouts;
import edu.wpi.first.wpilibj.DoubleSolenoid.Value;
import edu.wpi.first.wpilibj2.command.SubsystemBase; import edu.wpi.first.wpilibj2.command.SubsystemBase;
import frc.robot.Constants; import frc.robot.Constants;
@ -33,14 +31,11 @@ public class Grimpeur extends SubsystemBase {
final CANSparkMax grimpeurd = new CANSparkMax(Constants.grimpeurd,MotorType.kBrushless); final CANSparkMax grimpeurd = new CANSparkMax(Constants.grimpeurd,MotorType.kBrushless);
final CANSparkMax grimpeurg = new CANSparkMax(Constants.grimpeurg,MotorType.kBrushless); final CANSparkMax grimpeurg = new CANSparkMax(Constants.grimpeurg,MotorType.kBrushless);
// limit switch // 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 pistondroite= new Solenoid(PneumaticsModuleType.CTREPCM, Constants.pistondroiteouvre);
final Solenoid pistondgauche = new Solenoid(PneumaticsModuleType.CTREPCM, Constants.pistondgaucheouvre); final Solenoid pistondgauche = new Solenoid(PneumaticsModuleType.CTREPCM, Constants.pistondgaucheouvre);
//fonction //fonction
public Grimpeur() { public Grimpeur() {
layout.addBoolean("limitgrimpeurd", limitdroite::get); pistonouvre();
layout.addBoolean("limitgrimpeurg", limitdroite::get);
layout.add("grimpeurencodeurd", encoderd()); layout.add("grimpeurencodeurd", encoderd());
layout.add("grimpeurencodeurg", encoderg()); layout.add("grimpeurencodeurg", encoderg());
layout.add("pitchgyrogrimpeur", getpitch()); layout.add("pitchgyrogrimpeur", getpitch());
@ -51,12 +46,6 @@ public void droit(double vitesse){
public void gauche(double vitesse){ public void gauche(double vitesse){
grimpeurg.set(vitesse); grimpeurg.set(vitesse);
} }
public boolean droite(){
return limitdroite.get();
}
public boolean gauche(){
return limitgauche.get();
}
public void resetencodeurd(){ public void resetencodeurd(){
grimpeurd.getEncoder().setPosition(0); grimpeurd.getEncoder().setPosition(0);
} }
@ -84,14 +73,10 @@ public AHRS gyroscope = new AHRS();
public boolean piston(){ public boolean piston(){
return pistondgauche.get(); return pistondgauche.get();
} }
@Override @Override
public void periodic() { public void periodic() {
// This method will be called once per scheduler run // This method will be called once per scheduler run
if(droite()) {
resetencodeurd();
}
if(gauche()) {
resetencodeurg();
}
} }
} }

View File

@ -16,7 +16,6 @@ public class Limelight extends SubsystemBase {
NetworkTableEntry tx = table.getEntry("tx"); NetworkTableEntry tx = table.getEntry("tx");
NetworkTableEntry ty = table.getEntry("ty"); NetworkTableEntry ty = table.getEntry("ty");
NetworkTableEntry ta = table.getEntry("ta");
NetworkTableEntry pipeline = table.getEntry("pipeline"); NetworkTableEntry pipeline = table.getEntry("pipeline");
NetworkTableEntry tv = table.getEntry("tv"); NetworkTableEntry tv = table.getEntry("tv");
NetworkTableEntry camMode = table.getEntry("camMode"); NetworkTableEntry camMode = table.getEntry("camMode");
@ -33,9 +32,6 @@ public class Limelight extends SubsystemBase {
public double gety(){ public double gety(){
return ty.getDouble(0); return ty.getDouble(0);
} }
/* public double geta() {
return ta.getDouble(0);
}*/
public boolean getv(){ public boolean getv(){
return tv.getBoolean(false); return tv.getBoolean(false);
} }