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