Skip to content

Commit ea46715

Browse files
author
brentru
committed
lintn
1 parent a37e806 commit ea46715

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

adafruit_fona/adafruit_fona.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@
6969

7070
FONA_MAX_SOCKETS = const(6)
7171

72+
# Connection modes
73+
TCP_MODE = const(0)
74+
UDP_MODE = const(1)
75+
7276
# pylint: enable=bad-whitespace
7377

7478
# pylint: disable=too-many-instance-attributes
@@ -80,10 +84,6 @@ class FONA:
8084
8185
"""
8286

83-
# Connection modes
84-
TCP_MODE = const(0)
85-
UDP_MODE = const(1)
86-
8787
# pylint: disable=too-many-arguments
8888
def __init__(self, uart, rst, debug=False):
8989
self._buf = b"" # shared buffer
@@ -695,7 +695,7 @@ def socket_close(self, sock_num, quick_close=1):
695695
self._read_line()
696696

697697
self._uart.write(b"AT+CIPCLOSE=" + str(sock_num).encode() + b",")
698-
self._uart.write(str(sock_num).encode() + b"\r\n")
698+
self._uart.write(str(quick_close).encode() + b"\r\n")
699699
self._read_line()
700700
if not self._parse_reply(b"CLOSE OK", idx=0):
701701
return False

examples/fona_simpletest.py

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import time
21
import board
32
import busio
43
import digitalio

0 commit comments

Comments
 (0)