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)