mode auto
This commit is contained in:
		@@ -30,6 +30,10 @@
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "parallel",
 | 
			
		||||
          "data": {
 | 
			
		||||
            "commands": [
 | 
			
		||||
              {
 | 
			
		||||
                "type": "path",
 | 
			
		||||
                "data": {
 | 
			
		||||
@@ -54,6 +58,9 @@
 | 
			
		||||
                    }
 | 
			
		||||
                  ]
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "path",
 | 
			
		||||
@@ -30,6 +30,10 @@
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "sequential",
 | 
			
		||||
          "data": {
 | 
			
		||||
            "commands": [
 | 
			
		||||
              {
 | 
			
		||||
                "type": "path",
 | 
			
		||||
                "data": {
 | 
			
		||||
@@ -58,6 +62,15 @@
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "path",
 | 
			
		||||
          "data": {
 | 
			
		||||
            "pathName": "1.2"
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "folder": "1",
 | 
			
		||||
  "choreoAuto": false
 | 
			
		||||
}
 | 
			
		||||
@@ -30,6 +30,10 @@
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "parallel",
 | 
			
		||||
          "data": {
 | 
			
		||||
            "commands": [
 | 
			
		||||
              {
 | 
			
		||||
                "type": "path",
 | 
			
		||||
                "data": {
 | 
			
		||||
@@ -54,6 +58,9 @@
 | 
			
		||||
                    }
 | 
			
		||||
                  ]
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "path",
 | 
			
		||||
@@ -30,6 +30,10 @@
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "parallel",
 | 
			
		||||
          "data": {
 | 
			
		||||
            "commands": [
 | 
			
		||||
              {
 | 
			
		||||
                "type": "path",
 | 
			
		||||
                "data": {
 | 
			
		||||
@@ -57,6 +61,9 @@
 | 
			
		||||
              }
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      ]
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  "folder": "2",
 | 
			
		||||
  "choreoAuto": false
 | 
			
		||||
@@ -30,6 +30,10 @@
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "parallel",
 | 
			
		||||
          "data": {
 | 
			
		||||
            "commands": [
 | 
			
		||||
              {
 | 
			
		||||
                "type": "path",
 | 
			
		||||
                "data": {
 | 
			
		||||
@@ -54,6 +58,9 @@
 | 
			
		||||
                    }
 | 
			
		||||
                  ]
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "path",
 | 
			
		||||
@@ -30,6 +30,10 @@
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "parallel",
 | 
			
		||||
          "data": {
 | 
			
		||||
            "commands": [
 | 
			
		||||
              {
 | 
			
		||||
                "type": "path",
 | 
			
		||||
                "data": {
 | 
			
		||||
@@ -54,6 +58,9 @@
 | 
			
		||||
                    }
 | 
			
		||||
                  ]
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "path",
 | 
			
		||||
@@ -30,12 +30,38 @@
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "sequential",
 | 
			
		||||
          "data": {
 | 
			
		||||
            "commands": [
 | 
			
		||||
              {
 | 
			
		||||
                "type": "path",
 | 
			
		||||
                "data": {
 | 
			
		||||
                  "pathName": "3.1"
 | 
			
		||||
                }
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                "type": "deadline",
 | 
			
		||||
                "data": {
 | 
			
		||||
                  "commands": [
 | 
			
		||||
                    {
 | 
			
		||||
                      "type": "wait",
 | 
			
		||||
                      "data": {
 | 
			
		||||
                        "waitTime": 3.0
 | 
			
		||||
                      }
 | 
			
		||||
                    },
 | 
			
		||||
                    {
 | 
			
		||||
                      "type": "named",
 | 
			
		||||
                      "data": {
 | 
			
		||||
                        "name": "balyer"
 | 
			
		||||
                      }
 | 
			
		||||
                    }
 | 
			
		||||
                  ]
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "deadline",
 | 
			
		||||
          "data": {
 | 
			
		||||
@@ -30,6 +30,10 @@
 | 
			
		||||
            ]
 | 
			
		||||
          }
 | 
			
		||||
        },
 | 
			
		||||
        {
 | 
			
		||||
          "type": "parallel",
 | 
			
		||||
          "data": {
 | 
			
		||||
            "commands": [
 | 
			
		||||
              {
 | 
			
		||||
                "type": "path",
 | 
			
		||||
                "data": {
 | 
			
		||||
@@ -49,7 +53,10 @@
 | 
			
		||||
                    {
 | 
			
		||||
                      "type": "named",
 | 
			
		||||
                      "data": {
 | 
			
		||||
                  "name": "lancer"
 | 
			
		||||
                        "name": "balyer"
 | 
			
		||||
                      }
 | 
			
		||||
                    }
 | 
			
		||||
                  ]
 | 
			
		||||
                }
 | 
			
		||||
              }
 | 
			
		||||
            ]
 | 
			
		||||
@@ -39,7 +39,7 @@
 | 
			
		||||
  },
 | 
			
		||||
  "goalEndState": {
 | 
			
		||||
    "velocity": 0,
 | 
			
		||||
    "rotation": 0.3044999237387323,
 | 
			
		||||
    "rotation": -179.69010821508004,
 | 
			
		||||
    "rotateFast": false
 | 
			
		||||
  },
 | 
			
		||||
  "reversed": false,
 | 
			
		||||
 
 | 
			
		||||
@@ -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);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user