diff --git a/src/main.cpp b/src/main.cpp index 9ab4ddb..b1c10d0 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -25,7 +25,6 @@ /****************************************************************************** * DEFINES ******************************************************************************/ -#define FAN_ENABLED #define DELAY_TIME 1000 /**< time between measurements [ms] */ #define MIN_FAN_SPEED_PERCENT 24 /**< minimum fan speed [%] */ @@ -57,7 +56,6 @@ static int mAutomaticTargetRPM = RPM_CONTROL_DEACTIVATED; * LOCAL FUNCTIONS ******************************************************************************/ -#ifdef FAN_ENABLED /** * @brief Get the Fan Speed in round per minutes * @@ -83,9 +81,6 @@ void setFanSpeedPercent(int p) { int value = (p / 100.0) * 255; analogWrite(FAN_PIN, value); } -#else - uint8_t mRainbowIndex; -#endif float readTemperature(void) { @@ -125,14 +120,9 @@ void setup() SerialCmd_clearCmdArray(); -#ifdef FAN_ENABLED /* Setup FAN Control */ pinMode(FAN_PIN, OUTPUT); pinMode(SIGNAL_PIN, INPUT); -#else - Serial.println(F("\nFAN NOT enabled")); - mRainbowIndex = 0; -#endif pixels->begin(); pixels->clear(); @@ -185,7 +175,6 @@ void loop() fanSpeedPercent = (100 - MIN_FAN_SPEED_PERCENT) * (temp - MIN_TEMP) / (MAX_TEMP - MIN_TEMP) + MIN_FAN_SPEED_PERCENT; } -#ifdef FAN_ENABLED if ((actualFanSpeedRpm >= 0) && (actualFanSpeedRpm < LOW_FAN_SPEED)) { if (i > FAN_RPM_READLEVEL) @@ -231,22 +220,12 @@ void loop() } pixels->show(); -#else - RainbowCycle(pixels, &mRainbowIndex); - Serial.print(mRainbowIndex); -#endif - - -#ifdef FAN_ENABLED Serial.print(fanSpeedPercent); Serial.print("%;"); setFanSpeedPercent(fanSpeedPercent); Serial.print(actualFanSpeedRpm); Serial.println("RPM"); -#else - Serial.println(""); -#endif singleLed->fill(Color(0,128,128)); singleLed->setBrightness(fanSpeedPercent);