From f1ffaede0b80486652a397c82566146300c44ef6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anton=C3=ADn=20Skala?= Date: Mon, 22 Aug 2022 12:50:37 +0200 Subject: [PATCH] Fix Typo --- .../esp8266/WebSocketClientOTA/WebSocketClientOTA.ino | 2 +- .../esp8266/WebSocketClientOTA/python_ota_server/main.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/examples/esp8266/WebSocketClientOTA/WebSocketClientOTA.ino b/examples/esp8266/WebSocketClientOTA/WebSocketClientOTA.ino index 6a809c0..6b902d8 100644 --- a/examples/esp8266/WebSocketClientOTA/WebSocketClientOTA.ino +++ b/examples/esp8266/WebSocketClientOTA/WebSocketClientOTA.ino @@ -127,7 +127,7 @@ RESPONSES_STRUCT responses[] = { }; void text(uint8_t * payload, size_t length){ - // Convert mesage to something usable + // Convert message to something usable char msgch[length]; for (unsigned int i = 0; i < length; i++) { diff --git a/examples/esp8266/WebSocketClientOTA/python_ota_server/main.py b/examples/esp8266/WebSocketClientOTA/python_ota_server/main.py index 5d2750c..92acc95 100644 --- a/examples/esp8266/WebSocketClientOTA/python_ota_server/main.py +++ b/examples/esp8266/WebSocketClientOTA/python_ota_server/main.py @@ -79,7 +79,7 @@ def version_checker(name, vdev, vapp): class WsOtaHandler (threading.Thread): """Thread handling ota update - Runing ota directly from message would kill WS + Running ota directly from message would kill WS as message bus would timeout. """ def __init__(self, name, message, websocket): @@ -177,7 +177,7 @@ async def _state(websocket, message): await websocket.send(json.dumps(response)) -async def _unhandleld(websocket, msg): +async def _unhandled(websocket, msg): Logger.info("Unhandled message from device: %s", str(msg)) response = {'type': 'response', 'state': 'nok'} await websocket.send(json.dumps(response)) @@ -206,7 +206,7 @@ async def message_received(websocket, message) -> None: type_ = msg_json.get('type') name = msg_json.get('name') - func = switcher.get(type_, _unhandleld) + func = switcher.get(type_, _unhandled) Logger.debug("Client(%s)said: %s", name, type_) try: @@ -225,7 +225,7 @@ async def ws_server(websocket, path) -> None: async def main(): """Server starter - Normal user can bind only port nubers greater than 1024 + Normal user can bind only port numbers greater than 1024 """ async with websockets.serve(ws_server, "10.0.1.5", 8081): await asyncio.Future() # run forever