mode auto

This commit is contained in:
samuel desharnais 2024-02-19 19:01:52 -05:00
parent 1476b1eae3
commit 55ad4f60ce
34 changed files with 188 additions and 93 deletions

View File

@ -31,25 +31,32 @@
}
},
{
"type": "path",
"data": {
"pathName": "1.1"
}
},
{
"type": "deadline",
"type": "parallel",
"data": {
"commands": [
{
"type": "wait",
"type": "path",
"data": {
"waitTime": 3.0
"pathName": "1.1"
}
},
{
"type": "named",
"type": "deadline",
"data": {
"name": "balyer"
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "balyer"
}
}
]
}
}
]

View File

@ -31,29 +31,42 @@
}
},
{
"type": "path",
"data": {
"pathName": "1.1"
}
},
{
"type": "deadline",
"type": "sequential",
"data": {
"commands": [
{
"type": "wait",
"type": "path",
"data": {
"waitTime": 3.0
"pathName": "1.1"
}
},
{
"type": "named",
"type": "deadline",
"data": {
"name": "balyer"
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "balyer"
}
}
]
}
}
]
}
},
{
"type": "path",
"data": {
"pathName": "1.2"
}
}
]
}

View File

@ -31,25 +31,32 @@
}
},
{
"type": "path",
"data": {
"pathName": "1.1"
}
},
{
"type": "deadline",
"type": "parallel",
"data": {
"commands": [
{
"type": "wait",
"type": "path",
"data": {
"waitTime": 3.0
"pathName": "1.1"
}
},
{
"type": "named",
"type": "deadline",
"data": {
"name": "balyer"
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "balyer"
}
}
]
}
}
]

View File

@ -31,25 +31,32 @@
}
},
{
"type": "path",
"data": {
"pathName": "2.1"
}
},
{
"type": "deadline",
"type": "parallel",
"data": {
"commands": [
{
"type": "wait",
"type": "path",
"data": {
"waitTime": 3.0
"pathName": "2.1"
}
},
{
"type": "named",
"type": "deadline",
"data": {
"name": "balyer"
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "balyer"
}
}
]
}
}
]

View File

@ -31,25 +31,32 @@
}
},
{
"type": "path",
"data": {
"pathName": "2.1"
}
},
{
"type": "deadline",
"type": "parallel",
"data": {
"commands": [
{
"type": "wait",
"type": "path",
"data": {
"waitTime": 3.0
"pathName": "2.1"
}
},
{
"type": "named",
"type": "deadline",
"data": {
"name": "balyer"
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "balyer"
}
}
]
}
}
]

View File

@ -31,25 +31,32 @@
}
},
{
"type": "path",
"data": {
"pathName": "2.1"
}
},
{
"type": "deadline",
"type": "parallel",
"data": {
"commands": [
{
"type": "wait",
"type": "path",
"data": {
"waitTime": 3.0
"pathName": "2.1"
}
},
{
"type": "named",
"type": "deadline",
"data": {
"name": "balyer"
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "balyer"
}
}
]
}
}
]

View File

@ -31,9 +31,35 @@
}
},
{
"type": "path",
"type": "sequential",
"data": {
"pathName": "3.1"
"commands": [
{
"type": "path",
"data": {
"pathName": "3.1"
}
},
{
"type": "deadline",
"data": {
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "balyer"
}
}
]
}
}
]
}
},
{

View File

@ -31,25 +31,32 @@
}
},
{
"type": "path",
"data": {
"pathName": "3.1"
}
},
{
"type": "deadline",
"type": "parallel",
"data": {
"commands": [
{
"type": "wait",
"type": "path",
"data": {
"waitTime": 3.0
"pathName": "3.1"
}
},
{
"type": "named",
"type": "deadline",
"data": {
"name": "lancer"
"commands": [
{
"type": "wait",
"data": {
"waitTime": 3.0
}
},
{
"type": "named",
"data": {
"name": "balyer"
}
}
]
}
}
]

View File

@ -39,7 +39,7 @@
},
"goalEndState": {
"velocity": 0,
"rotation": 0.3044999237387323,
"rotation": -179.69010821508004,
"rotateFast": false
},
"reversed": false,

View File

@ -32,19 +32,33 @@ public class Lanceur extends SubsystemBase {
final CANSparkMax lanceur2 = new CANSparkMax(Constants.lancer2, MotorType.kBrushless);
final CANSparkMax lanceur3 = new CANSparkMax(Constants.lancer3, MotorType.kBrushless);
final CANSparkMax lanceur4 = new CANSparkMax(Constants.lancer4, MotorType.kBrushless);
public void pid(){
lanceur1.getPIDController().setP(0.2);
lanceur1.getPIDController().setI(0.2);
lanceur1.getPIDController().setD(0.2);
lanceur2.getPIDController().setP(0.2);
lanceur1.getPIDController().setI(0.2);
lanceur2.getPIDController().setD(0.2);
lanceur3.getPIDController().setP(0.2);
lanceur3.getPIDController().setI(0.2);
lanceur3.getPIDController().setD(0.2);
lanceur4.getPIDController().setP(0.2);
lanceur4.getPIDController().setI(0.2);
lanceur4.getPIDController().setD(0.2);
public void pidspeaker(){
lanceur1.getPIDController().setP(0.5);
lanceur1.getPIDController().setI(0.5);
lanceur1.getPIDController().setD(0.5);
lanceur2.getPIDController().setP(0.5);
lanceur1.getPIDController().setI(0.5);
lanceur2.getPIDController().setD(0.5);
lanceur3.getPIDController().setP(0.5);
lanceur3.getPIDController().setI(0.5);
lanceur3.getPIDController().setD(0.5);
lanceur4.getPIDController().setP(0.5);
lanceur4.getPIDController().setI(0.5);
lanceur4.getPIDController().setD(0.5);
}
public void pidampli(){
lanceur1.getPIDController().setP(0.1);
lanceur1.getPIDController().setI(0.1);
lanceur1.getPIDController().setD(0.1);
lanceur2.getPIDController().setP(0.1);
lanceur1.getPIDController().setI(0.1);
lanceur2.getPIDController().setD(0.1);
lanceur3.getPIDController().setP(0.1);
lanceur3.getPIDController().setI(0.1);
lanceur3.getPIDController().setD(0.1);
lanceur4.getPIDController().setP(0.1);
lanceur4.getPIDController().setI(0.1);
lanceur4.getPIDController().setD(0.1);
}
public void lancer(double vitesse){
lanceur1.set(-vitesse);