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

@ -30,6 +30,10 @@
] ]
} }
}, },
{
"type": "parallel",
"data": {
"commands": [
{ {
"type": "path", "type": "path",
"data": { "data": {
@ -54,6 +58,9 @@
} }
] ]
} }
}
]
}
}, },
{ {
"type": "path", "type": "path",

View File

@ -30,6 +30,10 @@
] ]
} }
}, },
{
"type": "sequential",
"data": {
"commands": [
{ {
"type": "path", "type": "path",
"data": { "data": {
@ -58,6 +62,15 @@
] ]
} }
}, },
{
"type": "path",
"data": {
"pathName": "1.2"
}
}
]
}
},
"folder": "1", "folder": "1",
"choreoAuto": false "choreoAuto": false
} }

View File

@ -30,6 +30,10 @@
] ]
} }
}, },
{
"type": "parallel",
"data": {
"commands": [
{ {
"type": "path", "type": "path",
"data": { "data": {
@ -54,6 +58,9 @@
} }
] ]
} }
}
]
}
}, },
{ {
"type": "path", "type": "path",

View File

@ -30,6 +30,10 @@
] ]
} }
}, },
{
"type": "parallel",
"data": {
"commands": [
{ {
"type": "path", "type": "path",
"data": { "data": {
@ -57,6 +61,9 @@
} }
] ]
} }
}
]
}
}, },
"folder": "2", "folder": "2",
"choreoAuto": false "choreoAuto": false

View File

@ -30,6 +30,10 @@
] ]
} }
}, },
{
"type": "parallel",
"data": {
"commands": [
{ {
"type": "path", "type": "path",
"data": { "data": {
@ -54,6 +58,9 @@
} }
] ]
} }
}
]
}
}, },
{ {
"type": "path", "type": "path",

View File

@ -30,6 +30,10 @@
] ]
} }
}, },
{
"type": "parallel",
"data": {
"commands": [
{ {
"type": "path", "type": "path",
"data": { "data": {
@ -54,6 +58,9 @@
} }
] ]
} }
}
]
}
}, },
{ {
"type": "path", "type": "path",

View File

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

View File

@ -30,6 +30,10 @@
] ]
} }
}, },
{
"type": "parallel",
"data": {
"commands": [
{ {
"type": "path", "type": "path",
"data": { "data": {
@ -49,7 +53,10 @@
{ {
"type": "named", "type": "named",
"data": { "data": {
"name": "lancer" "name": "balyer"
}
}
]
} }
} }
] ]

View File

@ -39,7 +39,7 @@
}, },
"goalEndState": { "goalEndState": {
"velocity": 0, "velocity": 0,
"rotation": 0.3044999237387323, "rotation": -179.69010821508004,
"rotateFast": false "rotateFast": false
}, },
"reversed": 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 lanceur2 = new CANSparkMax(Constants.lancer2, MotorType.kBrushless);
final CANSparkMax lanceur3 = new CANSparkMax(Constants.lancer3, MotorType.kBrushless); final CANSparkMax lanceur3 = new CANSparkMax(Constants.lancer3, MotorType.kBrushless);
final CANSparkMax lanceur4 = new CANSparkMax(Constants.lancer4, MotorType.kBrushless); final CANSparkMax lanceur4 = new CANSparkMax(Constants.lancer4, MotorType.kBrushless);
public void pid(){ public void pidspeaker(){
lanceur1.getPIDController().setP(0.2); lanceur1.getPIDController().setP(0.5);
lanceur1.getPIDController().setI(0.2); lanceur1.getPIDController().setI(0.5);
lanceur1.getPIDController().setD(0.2); lanceur1.getPIDController().setD(0.5);
lanceur2.getPIDController().setP(0.2); lanceur2.getPIDController().setP(0.5);
lanceur1.getPIDController().setI(0.2); lanceur1.getPIDController().setI(0.5);
lanceur2.getPIDController().setD(0.2); lanceur2.getPIDController().setD(0.5);
lanceur3.getPIDController().setP(0.2); lanceur3.getPIDController().setP(0.5);
lanceur3.getPIDController().setI(0.2); lanceur3.getPIDController().setI(0.5);
lanceur3.getPIDController().setD(0.2); lanceur3.getPIDController().setD(0.5);
lanceur4.getPIDController().setP(0.2); lanceur4.getPIDController().setP(0.5);
lanceur4.getPIDController().setI(0.2); lanceur4.getPIDController().setI(0.5);
lanceur4.getPIDController().setD(0.2); 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){ public void lancer(double vitesse){
lanceur1.set(-vitesse); lanceur1.set(-vitesse);