#pragma once

#include <wiringPi.h>

using namespace std;

/**
 * @brief LEDs strips controlled by AL8861Y
 *          Dimmable by PWM on channel PWM0 and PWM1
 */
class LEDs{
    /**
     * @brief WiringPi GPIO number of pin which controls left channel
     */
    int GPIO_LED_left = 23;

    /**
     * @brief WiringPi GPIO number of pin which controls left channel
     */
    int GPIO_LED_right = 26;

public:
    /**
     * @brief   Construct a new LEDs object
     *          Configure GPIo and sets up frequency of PWM
     *          Closes possible frequency reachable by Rpi is around 7 kHz
     */
    LEDs();

    /**
     * @brief Set power for right LED strip
     *        Right channel is connected to pin 33 on header, GPIO13 (wiring pin 26)
     *
     * @param power Power of LED strip in range from 0.0 to 1.0
     */
    void Right(float power = 0);

    /**
     * @brief Set power for left LED strip
     *        Left channel is connected to pin 32 on header, GPIO12 (wiring pin 23)
     *
     * @param power Power of LED strip in range from 0.0 to 1.0
     */
    void Left(float power = 0);
};
