madhephaestus / ESP32Servo

Arduino-compatible servo library for the ESP32
139 stars 55 forks source link

doesnt compile #54

Closed Jalopy-Jones closed 5 months ago

Jalopy-Jones commented 5 months ago

/home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp: In destructor 'virtual ESP32PWM::~ESP32PWM()': /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp:53:17: error: 'ledcDetachPin' was not declared in this scope; did you mean 'ledcDetach'? 53 | ledcDetachPin(pin); | ^~~~~ | ledcDetach /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp: In static member function 'static double ESP32PWM::_ledcSetupTimerFreq(uint8_t, double, uint8_t)': /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp:60:16: error: 'ledcSetup' was not declared in this scope 60 | return ledcSetup(chan, freq, bit_num); | ^~~~~ /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'double ESP32PWM::setup(double, uint8_t)': /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp:150:17: error: 'ledcDetachPin' was not declared in this scope; did you mean 'ledcDetach'? 150 | ledcDetachPin(pin); | ^~~~~ | ledcDetach /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp:151:30: error: 'ledcSetup' was not declared in this scope 151 | double val = ledcSetup(getChannel(), freq, resolution_bits); | ^~~~~ /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp:155:16: error: 'ledcSetup' was not declared in this scope 155 | return ledcSetup(getChannel(), freq, resolution_bits); | ^~~~~ /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'void ESP32PWM::adjustFrequencyLocal(double, double)': /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp:172:17: error: 'ledcDetachPin' was not declared in this scope; did you mean 'ledcDetach'? 172 | ledcDetachPin(pin); | ^~~~~ | ledcDetach /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp:176:17: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'? 176 | ledcAttachPin(pin, getChannel()); // re-attach the pin after frequency adjust | ^~~~~ | ledcAttach /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'void ESP32PWM::attachPin(uint8_t)': /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp:237:17: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'? 237 | ledcAttachPin(pin, getChannel()); | ^~~~~ | ledcAttach /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp: In member function 'void ESP32PWM::detachPin(int)': /home/jalopyjones/Arduino/libraries/ESP32Servo/src/ESP32PWM.cpp:264:9: error: 'ledcDetachPin' was not declared in this scope; did you mean 'ledcDetach'? 264 | ledcDetachPin(pin); | ^~~~~ | ledcDetach

exit status 1

Compilation error: exit status 1

==================================================== long story short, 5 hours of my life i wont get back... dig around long enough and youll find a solution. https://github.com/madhephaestus/ESP32Servo/pull/45 modifying the .cpp and .h files solves the problem that should be a non-issue when versioning is implemented. Thank you Goober56 for your contributions that have resolved the (doesnt-compile) issue.