You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Sep 30, 2021. It is now read-only.
It would be cool to have an async way to work with the bridge library to be able to use it in time sensitive application.
=> Ask for data, do something else, check if data arrived, get data.
=> or send command, return immediately.
My troubles solving the issue
I tried to implement something useful that could be pulled, but stumbled over too many problems. The major one was, that there seems to be a hard-coded 100ms latency in line 175 of Bridge.cpp if I get that right:
for ( ; retries < max_retries; retries++, delay(100), dropAll() /* Delay for retransmission */)
If I avoided that delay, the Bridge.begin() method seemed to have problems (because the 100ms after the execution of transfer() is missing?) and crashed. I might be completely wrong. All pretty unclear to me. Anyway, I run out of time and as transfer() is kind of the core method, had to write a Bridge independent solution (custom .py script sending data over serial).
Adding parameters for retry and delay
Adding more parameters wasn't an issue, but didn't really help, as the transfer() method is called from too many places that would have needed the extra parameters.
Maybe better like that?
It might need adjustable vars in specific libraries (for example the FileIO lib) that would speed up all transfer() calls through that library, while calls (for example through Bridge directly) would use the retry and delay features. Not sure if that's the best way to handle the issue...
The text was updated successfully, but these errors were encountered:
It would be cool to have an async way to work with the bridge library to be able to use it in time sensitive application.
=> Ask for data, do something else, check if data arrived, get data.
=> or send command, return immediately.
My troubles solving the issue
I tried to implement something useful that could be pulled, but stumbled over too many problems. The major one was, that there seems to be a hard-coded 100ms latency in line 175 of Bridge.cpp if I get that right:
for ( ; retries < max_retries; retries++, delay(100), dropAll() /* Delay for retransmission */)
If I avoided that delay, the Bridge.begin() method seemed to have problems (because the 100ms after the execution of transfer() is missing?) and crashed. I might be completely wrong. All pretty unclear to me. Anyway, I run out of time and as transfer() is kind of the core method, had to write a Bridge independent solution (custom .py script sending data over serial).
Adding parameters for retry and delay
Adding more parameters wasn't an issue, but didn't really help, as the transfer() method is called from too many places that would have needed the extra parameters.
Maybe better like that?
It might need adjustable vars in specific libraries (for example the FileIO lib) that would speed up all transfer() calls through that library, while calls (for example through Bridge directly) would use the retry and delay features. Not sure if that's the best way to handle the issue...
The text was updated successfully, but these errors were encountered: