qqqlab / madflight

Flight Controller for Arduino ESP32 / RP2350 / RP2040 / STM32
https://madflight.com
MIT License
114 stars 22 forks source link

Issue compiling library version 1.1.2 for esp32 #17

Closed Stillalive222 closed 5 months ago

Stillalive222 commented 5 months ago
libraries\madflight\src\madflight/hw_ESP32/ESP32_PWM.h:65:20: error: 'ledcSetup' was not declared in this scope; did you mean 'ledc_stop'?
   65 |         act_freq = ledcSetup(ch, freq, bits);
      |                    ^~~~~~~~~
      |                    ledc_stop
libraries\madflight\src\madflight/hw_ESP32/ESP32_PWM.h:72:7: error: 'ledcAttachPin' was not declared in this scope; did you mean 'ledcAttach'?
   72 |       ledcAttachPin(pin, ch);
      |       ^~~~~~~~~~~~~
      |       ledcAttach

How do I fix it? I tried changing both of them to the suggested but error worsens. Thank you

qqqlab commented 5 months ago

Please try the current development version madflight v1.1.3-DEV (download directly from Github, not via Arduino IDE).

Or downgrade Arduino-ESP32 from v3.x.x to v2.x.x

Background: Arduino-ESP32 v3.0.0 was recently released, and has some breaking changes as you noticed. I was not able to fully test madflight v1.1.3 yet, it will be released later this week.

qqqlab commented 5 months ago

madflight release 1.1.3 is compatible with Arduino-ESP32 v3.x.x