add some stuff

This commit is contained in:
GZod01 2024-03-08 15:57:46 +01:00
parent be6237fb94
commit 13a84719ce
3 changed files with 52 additions and 8 deletions

View file

@ -1,2 +1,5 @@
# ftc2024-robotcode
# The 2024 [FIRST®](https://firstinspires.org) Tech Challenge robot competition WeRobot code
## Requirements
Work only with Rev Robotics Control Hub designed for [FIRST®](https://firstinspires.org) Tech Challenge competitions

View file

@ -22,6 +22,7 @@ import com.qualcomm.robotcore.util.ElapsedTime;
@Autonomous
public class ftc2024_autonome_api extends LinearOpMode {
public String autonomous_mode;
public DcMotor lm;
public DcMotor rm;
public DcMotor harvestmotor;
@ -51,12 +52,53 @@ public class ftc2024_autonome_api extends LinearOpMode {
robotOrientation = imu.getYawPitchRollAngles();
if(opModeIsRunning()){
robot.forward(0.5);
robot.rotate(-90.0);
robot.forward(1.5);
robot.harvest(-1);
robot.backward(1);
robot.harvest(0);
/*
* autonomous_mode differents possibles values respect the next scheme:
* team_color_shortcode + start_line_index + direct_or_no
*
* team_color_shortcode = "b" for blue & "r" for red
* start_line_index = 4 or 2 see competition manual appendix B Tile location plan
* direct_or_no = "d" to direct go to pixel deliver zone or "n" to harvest pixels before to go in deliver zone
*
* default is "b4d"
*/
switch (autonomous_mode){
default:
robot.forward(0.5);
robot.rotate(-90.0);
robot.forward(1.5);
robot.harvest(-1);
robot.backward(1);
robot.harvest(0);
break;
case ("b2d"):
robot.forward(0.5);
robot.rotate(-90.0);
robot.forward(2.5);
robot.harvest(-1);
robot.backward(1);
robot.harvest(0);
break;
case ("r4d"):
break;
case ("r2d"):
break;
case ("b4n"):
break;
case ("b2n"):
break;
case ("r4n"):
break;
case ("r2n"):
break;
}
}
}
}

1
hello
View file

@ -1 +0,0 @@
helloworld