output power fixed

This commit is contained in:
Alexander Belov 2024-09-02 00:39:39 +07:00
parent 955ed4f727
commit d3ab0202fa

View File

@ -85,11 +85,13 @@ char timeBuffer[10];
void setup() { void setup() {
pinMode(ssrPin, OUTPUT); pinMode(ssrPin, OUTPUT);
Serial.begin(9600); Serial.begin(9600);
oled.init(); // Initialize the OLED oled.init(); // Initialize the OLED
oled.clear(); // Clear the display oled.clear(); // Clear the display
readEEPROM(); readEEPROM();
myPID.SetMode(AUTOMATIC); myPID.SetMode(AUTOMATIC);
myPID.SetOutputLimits(0, 1); myPID.SetOutputLimits(0, 1);
} }
void loop() { void loop() {
@ -274,7 +276,7 @@ void printPhases() {
formatTime((currentTime - finishTime) / 1000, timeBuffer); // Time since completion formatTime((currentTime - finishTime) / 1000, timeBuffer); // Time since completion
oled.print(timeBuffer); oled.print(timeBuffer);
oled.print(" "); oled.print(" ");
oled.print(Input,1); oled.print(Input,0);
oled.print("c"); oled.print("c");
oled.print("->"); oled.print("->");
oled.print((int)Setpoint); oled.print((int)Setpoint);
@ -295,7 +297,6 @@ void printPhases() {
formatTime(totalProcessTime, timeBuffer); formatTime(totalProcessTime, timeBuffer);
oled.print(timeBuffer); oled.print(timeBuffer);
oled.print(" "); oled.print(" ");
for (int i = 0; i < activeProfile.numPhases; i++) { for (int i = 0; i < activeProfile.numPhases; i++) {
if (i == currentPhase) { if (i == currentPhase) {
@ -335,8 +336,8 @@ void printPhases() {
oled.invertText(false); // Ensure text inversion is off after the loop oled.invertText(false); // Ensure text inversion is off after the loop
oled.setCursor(110,7); oled.setCursor(110,7);
oled.print(Output*100,0); sprintf(timeBuffer, "%3d", (int)(Output*100));
oled.print(" "); oled.print(timeBuffer);
oled.update(); oled.update();
} }