common for both devices
This commit is contained in:
parent
ef791654b4
commit
f395491f45
@ -92,7 +92,7 @@ bool inSelectionMode = true;
|
||||
// #include "GyverPID.h"
|
||||
#include "pid.h"
|
||||
double Setpoint, Input, Output;
|
||||
GyverPID regulator(50, 1, 20, 1000);
|
||||
GyverPID regulator(10, 2, 10, 1000);
|
||||
|
||||
bool temperatureSensorError = false;
|
||||
|
||||
|
||||
@ -20,12 +20,12 @@ void HandlePwmHeaterDisplay() {
|
||||
currentGraphItemNumber = 0;
|
||||
}
|
||||
|
||||
byte graphHeight = 10;
|
||||
byte graphHeight = 8;
|
||||
byte currentAmount = Output==0 ? 0 : (Output-1)/99.0 * (graphHeight) + 1;
|
||||
|
||||
graphStates[currentGraphItemNumber] = currentAmount;
|
||||
|
||||
byte rightMargin = 127;
|
||||
byte rightMargin = 128;
|
||||
byte topMargin = 63-graphHeight;
|
||||
byte itemsDisplayed = 0;
|
||||
|
||||
|
||||
@ -8,10 +8,12 @@ void HandleExecution() {
|
||||
|
||||
getPhaseAndTemperature();
|
||||
|
||||
if (Input > 20 && Input < 95) {
|
||||
regulator.input = (float)Input;
|
||||
regulator.setpoint = Setpoint;
|
||||
regulator.getResultNow();
|
||||
Output = regulator.output;
|
||||
}
|
||||
|
||||
if (isComplete && currentPhase >= activeProfile.numPhases && !finishTime) {
|
||||
finishTime = currentTime;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user