Skip to content

Commit

Permalink
Fix Typo
Browse files Browse the repository at this point in the history
  • Loading branch information
Tony763 authored and Links2004 committed Aug 22, 2022
1 parent 94a531c commit f1ffaed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/esp8266/WebSocketClientOTA/WebSocketClientOTA.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand Down
8 changes: 4 additions & 4 deletions examples/esp8266/WebSocketClientOTA/python_ota_server/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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))
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit f1ffaed

Please sign in to comment.