Skip to content

Commit

Permalink
mavutil: WebSockets: fix wsproto import for newer python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
IamPete1 committed Sep 5, 2024
1 parent 50a291a commit 828fab3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions mavutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -1737,15 +1737,15 @@ def write(self, buf):

class mavwebsocket(mavfile):
'''Mavlink WebSocket server, single client only'''
def __init__(self, device, source_system=255, source_component=0, use_native=default_native):
from wsproto import ConnectionType, WSConnection, utilities
from wsproto.events import (
AcceptConnection,
CloseConnection,
Request,
BytesMessage,
)
from wsproto import ConnectionType, WSConnection, utilities
from wsproto.events import (
AcceptConnection,
CloseConnection,
Request,
BytesMessage,
)

def __init__(self, device, source_system=255, source_component=0, use_native=default_native):
self.ws = None

# This is a duplicate of mavtcpin
Expand Down

0 comments on commit 828fab3

Please sign in to comment.