Update
This commit is contained in:
parent
1578ee9c3e
commit
4d56bd4dfa
1 changed files with 34 additions and 25 deletions
|
@ -40,7 +40,6 @@ public class FTC2024WeRobotControl {
|
|||
private final double ground_tiles_width = 61.0e-2; // metres
|
||||
//
|
||||
private final double defaultspeed = 0.6;
|
||||
private final double defaultanglespeed = 0.4;
|
||||
|
||||
private ElapsedTime timer;
|
||||
|
||||
|
@ -65,6 +64,16 @@ public class FTC2024WeRobotControl {
|
|||
* @param motor_speed = (optional) double between 0 and 1; motor power; default
|
||||
* to 1
|
||||
*/
|
||||
|
||||
public void boxElv(){
|
||||
Parent.lmelevator.setVelocity(600);
|
||||
Parent.rmelevator.setVelocity(600);
|
||||
Parent.lmelevator.setTargetPosition(90);
|
||||
Parent.rmelevator.setTargetPosition(90);
|
||||
Parent.lmelevator.setMode(DcMotor.RunMode.RUN_TO_POSITION);
|
||||
Parent.rmelevator.setMode(DcMotor.RunMode.RUN_TO_POSITION);
|
||||
}
|
||||
|
||||
public double getSpeedFromMotorSpeed(double motor_speed) {
|
||||
double speed_tour_par_minutes = this.tour_par_minutes * motor_speed;
|
||||
double speed = (speed_tour_par_minutes / 60) * this.wheel_perimeter;
|
||||
|
@ -170,7 +179,7 @@ public class FTC2024WeRobotControl {
|
|||
Parent.rm.setPower(0);
|
||||
}
|
||||
public void rotate(double angle){
|
||||
this.rotate(angle,this.defaultanglespeed);
|
||||
this.rotate(angle,this.defaultspeed);
|
||||
}
|
||||
|
||||
public void test_forward_10_and_rotate_20deg(){
|
||||
|
|
Loading…
Reference in a new issue