diff --git a/CruiseControlMX5.pde b/CruiseControlMX5.pde index 5aaf739..d5195c4 100644 --- a/CruiseControlMX5.pde +++ b/CruiseControlMX5.pde @@ -10,9 +10,9 @@ import java.util.regex.Pattern; static final Pattern FLOAT_REGEX = Pattern.compile("^-?(?:0|[1-9]\\d*)(?:\\.\\d+)?$"); -static final String COM_PORT = "COM5"; +static final String COM_PORT = "COM4"; static final int speedStart = 0, speedEnd = 240; -static final int minSampleSize = 50, maxSampleSize = 600; +static final int minSampleSize = 50, maxSampleSize = 1000; static final float minTimeSpan = 5F, maxTimeSpan = 60F; static final float[] graphPos = new float[2]; @@ -44,15 +44,14 @@ float timeSpan; boolean showError = true, showIntegral = true, showDerivative = true, showSpeed, showAcceleration, showServo; boolean autoScaleError, autoScaleIntegral = true, autoScaleDerivative = true, autoScaleSpeed, autoScaleAcceleration = true, autoScaleServo = true; -float errorRangeMin = -3F, errorRangeMax = 3F, integralRangeMin = Float.NaN, integralRangeMax = Float.NaN, derivativeRangeMin = Float.NaN, derivativeRangeMax = Float.NaN, speedRangeMin = 0F, speedRangeMax = 150F, accelerationRangeMin = Float.NaN, accelerationRangeMax = Float.NaN; -int servoRangeMin = 1170, servoRangeMax = 1970; +float errorRangeMin = -5F, errorRangeMax = 5F, integralRangeMin = -200, integralRangeMax = 200, derivativeRangeMin = Float.NaN, derivativeRangeMax = Float.NaN, speedRangeMin = 0F, speedRangeMax = 150F, accelerationRangeMin = Float.NaN, accelerationRangeMax = Float.NaN; +int servoRangeMin = Integer.MIN_VALUE, servoRangeMax = Integer.MIN_VALUE; boolean sampleOrTimeGraph = false; boolean drawSmoothCurves; void setup() { size(1600, 512); - pixelDensity(displayDensity()); windowTitle("Cruise Controller MX5");