Skip to content

Commit 054fca0

Browse files
committed
compatibility changes for microdot 2.x
1 parent e890afb commit 054fca0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

micropython/examples/cosmic_unicorn/cosmic_paint/cosmic_paint.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
2-
from microdot_asyncio import Microdot, send_file
3-
from microdot_asyncio_websocket import with_websocket
2+
from microdot import Microdot, send_file, websocket
43
from phew import connect_to_wifi
54
from cosmic import CosmicUnicorn
65
from picographics import PicoGraphics, DISPLAY_COSMIC_UNICORN as DISPLAY
@@ -75,7 +74,7 @@ def fill(x, y, c):
7574

7675

7776
@server.route('/paint')
78-
@with_websocket
77+
@websocket.with_websocket
7978
async def echo(request, ws):
8079
while True:
8180
data = await ws.receive()

micropython/examples/galactic_unicorn/galactic_paint/galactic_paint.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import os
2-
from microdot_asyncio import Microdot, send_file
3-
from microdot_asyncio_websocket import with_websocket
2+
from microdot import Microdot, send_file, websocket
43
from phew import connect_to_wifi
54
from galactic import GalacticUnicorn
65
from picographics import PicoGraphics, DISPLAY_GALACTIC_UNICORN as DISPLAY
@@ -75,7 +74,7 @@ def fill(x, y, c):
7574

7675

7776
@server.route('/paint')
78-
@with_websocket
77+
@websocket.with_websocket
7978
async def echo(request, ws):
8079
while True:
8180
data = await ws.receive()

0 commit comments

Comments
 (0)