Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/Train' into Train
Browse files Browse the repository at this point in the history
  • Loading branch information
ieatred40 committed Nov 4, 2024
2 parents 285b12d + 5249744 commit 360a1ff
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
import com.qualcomm.robotcore.hardware.DcMotor;
import com.qualcomm.robotcore.hardware.DcMotorSimple;

import kotlin.reflect.KDeclarationContainer;

@Config
@TeleOp
public class nickpidloop extends LinearOpMode {
Expand All @@ -30,6 +32,11 @@ public void runOpMode() throws InterruptedException {
double power = 0;
double difference = 0;
double preverror = 0;
double kp = 0;
double Ki = 0;
double kg = 0;
double k = 0;



refrence = 300;
Expand All @@ -40,10 +47,10 @@ public void runOpMode() throws InterruptedException {

while (gamepad1.b);

error = preverror + error;
error = preverror + error;
difference = error -preverror;
preverror = error;
// power = error + what?? ask brennan on monday
power = k*(error) + Ki*(error)+ kg;

}

Expand Down

0 comments on commit 360a1ff

Please sign in to comment.