pid default values
This commit is contained in:
parent
a829a63c94
commit
d4cf6a3333
2 changed files with 8 additions and 8 deletions
|
@ -162,8 +162,9 @@ public static class PullRequest {
|
|||
public float p, i;
|
||||
float integral = 0f;
|
||||
float value = 0f;
|
||||
// float scalar = 1f;
|
||||
|
||||
public PID(float p, float i) {
|
||||
public PID(float p = 1, float i = 0.1f) {
|
||||
this.p = p;
|
||||
this.i = i;
|
||||
}
|
||||
|
|
|
@ -14,6 +14,10 @@ public class Mono {
|
|||
List<Vec3> enemies = new List<Vec3>();
|
||||
float spawnTime;
|
||||
|
||||
Oriels.PullRequest.PID pidX = new Oriels.PullRequest.PID();
|
||||
Oriels.PullRequest.PID pidY = new Oriels.PullRequest.PID();
|
||||
Oriels.PullRequest.PID pidZ = new Oriels.PullRequest.PID();
|
||||
|
||||
Mesh meshCube;
|
||||
|
||||
public Mono() {
|
||||
|
@ -143,11 +147,6 @@ public class Mono {
|
|||
}
|
||||
|
||||
// design variables
|
||||
|
||||
// move back up and put 2 variables instead down here
|
||||
// instantiate with default values
|
||||
// scalar functionality for PID
|
||||
Oriels.PullRequest.PID pidX = new Oriels.PullRequest.PID(8, 0.3f);
|
||||
Oriels.PullRequest.PID pidY = new Oriels.PullRequest.PID(8, 0.3f);
|
||||
Oriels.PullRequest.PID pidZ = new Oriels.PullRequest.PID(8, 0.3f);
|
||||
float moveP = 8f;
|
||||
float moveI = 0.2f;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue