Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ad6ab5a

Browse files
projectgusdpgeorge
authored andcommitted
lora-sync: Fix race with fast or failed send().
If send completes before the first call to poll_send(), the driver could get stuck in _sync_wait(). This had much less impact before rp2 port went tickless, as _sync_wait(will_irq=True) calls machine.idle() which may not wake very frequently on a tickless port. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
1 parent b712103 commit ad6ab5a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

‎micropython/lora/lora-sync/lora/sync_modem.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ def send(self, packet, tx_at_ms=None):
4242

4343
tx = True
4444
while tx is True:
45-
tx = self.poll_send()
4645
self._sync_wait(will_irq)
46+
tx = self.poll_send()
4747
return tx
4848

4949
def recv(self, timeout_ms=None, rx_length=0xFF, rx_packet=None):
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
metadata(version="0.1.0")
1+
metadata(version="0.1.1")
22
require("lora")
33
package("lora")

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /