From 96b0d1e3bcd769c8df62d0145c2ad58b299bdf91 Mon Sep 17 00:00:00 2001 From: Ollo Date: Fri, 29 Nov 2024 20:09:08 +0100 Subject: [PATCH] Status is printed only in one line --- src/main.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 32a329f..282f91d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -82,10 +82,9 @@ float readTemperature(void) * (is called as fast as possible) */ void loop() { - float temp = readTemperature(); - Serial.print("Temperature is "); + float temp = readTemperature(); Serial.print(temp); - Serial.println(" deg C"); + Serial.print(";"); int fanSpeedPercent, actualFanSpeedRpm; @@ -97,16 +96,12 @@ void loop() { fanSpeedPercent = (100 - MIN_FAN_SPEED_PERCENT) * (temp - MIN_TEMP) / (MAX_TEMP - MIN_TEMP) + MIN_FAN_SPEED_PERCENT; } - Serial.print("Setting fan speed to "); Serial.print(fanSpeedPercent); - Serial.println(" %"); + Serial.print("%;"); setFanSpeedPercent(fanSpeedPercent); actualFanSpeedRpm = getFanSpeedRpm(); - Serial.print("Fan speed is "); Serial.print(actualFanSpeedRpm); - Serial.println(" RPM"); - - Serial.println(); + Serial.println("RPM"); delay(DELAY_TIME); }