mirror of
https://gitlab.dit.htwk-leipzig.de/phillip.kuehne/dezibot.git
synced 2025-09-15 18:08:03 +02:00
refactored code
This commit is contained in:
@@ -1,9 +1,7 @@
|
||||
#include "InfraredLight.h"
|
||||
|
||||
#define pwmSpeedMode LEDC_LOW_SPEED_MODE
|
||||
#define fooPin 13
|
||||
#define footimer LEDC_TIMER_0
|
||||
#define foochannel LEDC_CHANNEL_0
|
||||
|
||||
InfraredLED::InfraredLED(uint8_t pin,ledc_timer_t timer, ledc_channel_t channel){
|
||||
this->ledPin = pin;
|
||||
this->timer = timer;
|
||||
@@ -53,7 +51,7 @@ void InfraredLED::setState(bool state){
|
||||
};
|
||||
|
||||
void InfraredLED::sendFrequency(uint16_t frequency){
|
||||
// ledc_set_freq(pwmSpeedMode,timer,frequency);
|
||||
ledc_set_freq(pwmSpeedMode,timer,frequency);
|
||||
ledc_set_duty(pwmSpeedMode,channel,512);
|
||||
ledc_update_duty(pwmSpeedMode,channel);
|
||||
};
|
Reference in New Issue
Block a user