Upravy, doporucene clang-tidy
This commit is contained in:
		@@ -43,13 +43,13 @@ static void ledTrampoline(wsLED *ptr)
 | 
			
		||||
    ptr->rtLed();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
inline bool wsLED::canShow(void)
 | 
			
		||||
inline bool wsLED::canShow() const
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    return (micros() - _endtime) >= 70L;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wsLED::show(void)
 | 
			
		||||
void wsLED::show()
 | 
			
		||||
{
 | 
			
		||||
    uint8_t color[3];
 | 
			
		||||
 | 
			
		||||
@@ -86,7 +86,7 @@ wsLED::wsLED(int pin, int order)
 | 
			
		||||
    , _ledState(LED_STOP)
 | 
			
		||||
{}
 | 
			
		||||
 | 
			
		||||
wsLED::wsLED(void)
 | 
			
		||||
wsLED::wsLED()
 | 
			
		||||
    : _pin(NOT_A_PIN)
 | 
			
		||||
    , _order(RGB)
 | 
			
		||||
    , _scale(0xff)
 | 
			
		||||
@@ -100,7 +100,7 @@ void wsLED::begin(int pin)
 | 
			
		||||
    begin();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wsLED::begin(void)
 | 
			
		||||
void wsLED::begin()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    if (NOT_A_PIN != _pin) {
 | 
			
		||||
@@ -137,7 +137,7 @@ void wsLED::setColor(LEDRGB color)
 | 
			
		||||
    _color[_order & 7] = color.b;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wsLED::rtLed(void)
 | 
			
		||||
void wsLED::rtLed()
 | 
			
		||||
{
 | 
			
		||||
    uint32_t timing;
 | 
			
		||||
 | 
			
		||||
@@ -213,7 +213,7 @@ void wsLED::blink(uint32_t speed)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void wsLED::breath(void)
 | 
			
		||||
void wsLED::breath()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    if (NOT_A_PIN != _pin) {
 | 
			
		||||
@@ -251,7 +251,7 @@ void wsLED::pulse(LEDRGB color, uint32_t duration)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
ledstate_t wsLED::getState(void)
 | 
			
		||||
ledstate_t wsLED::getState()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
    return _ledState;
 | 
			
		||||
 
 | 
			
		||||
@@ -148,21 +148,21 @@ protected:
 | 
			
		||||
#endif
 | 
			
		||||
    uint32_t _endtime;
 | 
			
		||||
 | 
			
		||||
    void show(void);
 | 
			
		||||
    void show();
 | 
			
		||||
    void setColor(LEDRGB color);
 | 
			
		||||
    bool canShow(void);
 | 
			
		||||
    bool canShow() const;
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
    wsLED(int pin, int order = RGB);
 | 
			
		||||
    wsLED(void);
 | 
			
		||||
    void begin(void);
 | 
			
		||||
    wsLED();
 | 
			
		||||
    void begin();
 | 
			
		||||
    void begin(int pin);
 | 
			
		||||
    void rtLed(void); // vykonna metoda
 | 
			
		||||
    void rtLed(); // vykonna metoda
 | 
			
		||||
    void setColors(LEDRGB color1, LEDRGB color2 = LEDRGB(0, 0, 0));
 | 
			
		||||
    void blink(uint32_t speed = 300);
 | 
			
		||||
    void breath(void);
 | 
			
		||||
    void breath();
 | 
			
		||||
    void setOrder(int neworder);
 | 
			
		||||
    ledstate_t getState(void);
 | 
			
		||||
    ledstate_t getState();
 | 
			
		||||
    void pulse(LEDRGB color, uint32_t duration);
 | 
			
		||||
    void stop(LEDRGB color = LEDRGB(0, 0, 0));
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user