As many others I am writing a application for my esp32.
My environment is Vscode with Esp-idf.
My application is based on a number of classes that encapsulates the Esp-idf api.
For example.
I have a led class that have 4 methods, on, off, slowBlink, and fastBlink.
Another class is Button. It have two callbacks, shortPress and longPress.
More advanced class is the Wifi class. It have two methods, login and a callback connectionStatus.
To test my classes I create small test beds, also in C++
Code: Select all
Class TestButton : public Button {
public: TestButton() : Button("GPIO") {}
void shortPress () override {
ESP_LOGI(TAG, "short press detected") ;
}
}
Using the two classes together causes problem.
Code: Select all
class WiFiAndButtonTest: public WiFi, public Button {
public:
WiFiAndButtonTest() : WiFi(), Button(GPIO) {
Wifi::login(ssid, passed) ;
}
void shortPress () override {
ESP_LOGI(TAG, "short press detected") ;
}
}
In this case the a press on the button is not detected.
If I remove the wifi::login line from the code,, button press is detected.
This makes me believe that FreeRtoos somehow is involved.
I have the same problem for my Ble class.
Anyone who knows what's going on here?