-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I would like to use a large number of callback calls (more than 300) #350
Comments
Can you provide code causing problem and information on Arduino board you are using? for (uint16_t i = 0; i < 400; i++) {
mb.addCoil(i); // Add Coil. The same as mb.addCoil(COIL_BASE, false, LEN)
mb.onSetCoil(i, cbLed); // Add callback on Coil LED_COIL value set
if (i % 10 == 0) {
Serial.print(i);
Serial.print(": ");
Serial.println(esp_get_free_heap_size());
}
} |
Hello, thanks for your quick feedback... I am using an ESP32-Wroom-32E with the Arduino IDE and a memory table for 3MB code, 3MB OTA and 6MB SPIFFS. I am not sure at the moment if I have done everything right or am doing it right. Here is an excerpt from the program code as an example: I am not a professional, so please excuse me if I am not using the best syntax or have expressed myself incorrectly Translated with DeepL.com (free version) |
Unable to reproduce error even generating code of 400 separate onGet calls. |
Hello please excuse me that I am only now addressing the problem again. I tried again to derive the problem and at the moment I'm not sure where the problem really is. I haven't given you any important information yet. This error message comes when the number of callbacks is around 300. My CallBack calls are in the setup area and the routines that are then executed are in an extra .h file. thanks!! |
It may be related to specific code that facing resource limit of the board. |
The library is really great and I get on very well with it.
I have a lot of registers in my project and therefore also a lot of callback calls.
At the moment it seems that a limit has been reached at 300 callback calls (onGetCoil and onGetHreg combined). I get an error in the Arduino IDE but without it showing exactly where the problem is. Can you maybe help me to extend the maximum calls? At the moment I need 333, but a limit of 500 would be better.
I would appreciate your feedback
Translated with DeepL.com (free version)
The text was updated successfully, but these errors were encountered: