Skip to content

Commit d6dc68c

Browse files
committed
demos: Minor fixes.
1 parent 80e5729 commit d6dc68c

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

v3/as_demos/apoll.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def timed_out(self): # Time since last change or last timeout rep
3737
return True
3838
return False
3939

40-
async def accel_coro(timeout = 2000):
40+
async def accel_coro(timeout=2000):
4141
accelhw = pyb.Accel() # Instantiate accelerometer hardware
4242
await asyncio.sleep_ms(30) # Allow it to settle
4343
accel = Accelerometer(accelhw, timeout)
@@ -53,7 +53,7 @@ async def accel_coro(timeout = 2000):
5353

5454
async def main(delay):
5555
print('Testing accelerometer for {} secs. Move the Pyboard!'.format(delay))
56-
print('Test runs for 20s.')
56+
print('Test runs for {}s.'.format(delay))
5757
asyncio.create_task(accel_coro())
5858
await asyncio.sleep(delay)
5959
print('Test complete!')

v3/as_demos/auart.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async def receiver():
1818
sreader = asyncio.StreamReader(uart)
1919
while True:
2020
res = await sreader.readline()
21-
print('Recieved', res)
21+
print('Received', res)
2222

2323
async def main():
2424
asyncio.create_task(sender())

v3/docs/TUTORIAL.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ async def task(i, lock):
591591
lock.release()
592592

593593
async def main():
594-
lock = asyncio.Lock() # The Lock instance
594+
lock = Lock() # The Lock instance
595595
for n in range(1, 4):
596596
asyncio.create_task(task(n, lock))
597597
await asyncio.sleep(10)
@@ -620,7 +620,7 @@ async def task(i, lock):
620620
await asyncio.sleep(0.5)
621621

622622
async def main():
623-
lock = asyncio.Lock() # The Lock instance
623+
lock = Lock() # The Lock instance
624624
for n in range(1, 4):
625625
asyncio.create_task(task(n, lock))
626626
await asyncio.sleep(10)

0 commit comments

Comments
 (0)