Skip to content

Commit e2aae43

Browse files
authored
Merge pull request peterhinch#132 from n1kdo/fix-alcd-race-condition
alcd.py: Fix race condition
2 parents 88a0446 + 6c59025 commit e2aae43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

v3/as_drivers/hd44780/alcd.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,9 +100,9 @@ async def runlcd(self): # Periodically check for changed text and update LCD if
100100
for row in range(self.rows):
101101
if self.dirty[row]:
102102
msg = self[row]
103+
self.dirty[row] = False
103104
self.lcd_byte(LCD.LCD_LINES[row], LCD.CMD)
104105
for thisbyte in msg:
105106
self.lcd_byte(ord(thisbyte), LCD.CHR)
106107
await asyncio.sleep_ms(0) # Reshedule ASAP
107-
self.dirty[row] = False
108108
await asyncio.sleep_ms(20) # Give other coros a look-in

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy