Fix CONFIG_USE_ILLUMNATIOR_PIN

This commit is contained in:
Lorow
2024-09-25 21:35:00 +02:00
parent 43b7386ac9
commit 039f5279c6
2 changed files with 4 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ std::vector<LEDStates_e> LEDManager::keepAliveStates = {
LEDManager::LEDManager(gpio_num_t pin) : blink_led_pin(pin), state(false) {}
#ifdef USE_ILLUMNATIOR_PIN
#ifdef CONFIG_USE_ILLUMNATIOR_PIN
LEDManager::LEDManager(gpio_num_t pin, gpio_num_t illumninator_led_pin) : blink_led_pin(pin), illumninator_led_pin(illumninator_led_pin) state(false) {}
#endif
@@ -65,7 +65,7 @@ void LEDManager::setup()
this->toggleLED(pattern.state);
this->nextStateChangeMillis = pattern.delayTime;
#ifdef USE_ILLUMNATIOR_PIN
#ifdef CONFIG_USE_ILLUMNATIOR_PIN
ESP_LOGD(LED_MANAGER_TAG, "Setting up illuminator led.");
const int ledPin = 1; // Replace this with a command endpoint eventually.
const int freq = 5000;

View File

@@ -4,7 +4,7 @@
#include "driver/gpio.h"
#ifdef USE_ILLUMNATIOR_PIN
#ifdef CONFIG_USE_ILLUMNATIOR_PIN
#include "driver/ledc.h"
#endif
@@ -21,7 +21,7 @@ class LEDManager
public:
LEDManager(gpio_num_t blink_led_pin);
#ifdef USE_ILLUMNATIOR_PIN
#ifdef CONFIG_USE_ILLUMNATIOR_PIN
gpio_num_t illumninator_led_pin;
LEDManager(gpio_num_t blink_led_pin, gpio_num_t illumninator_led_pin);
#endif