Skip to content

Commit c68fc47

Browse files
committed
Small refactoring.
1 parent 3992f5e commit c68fc47

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

LiveObjects/Connection.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ def __init__(self, value, type_, cb=None):
2929

3030

3131
class Connection:
32-
def __init__(self, board, deviceID, port, apiKey, debug = True):
32+
def __init__(self, board, deviceID, port, apiKey, debug=True):
3333
try:
34-
if sys.platform == "linux" or sys.platform=="win32":
34+
if sys.platform == "linux" or sys.platform == "win32":
3535
import paho.mqtt.client as paho
3636
import os
3737
self.mode = 1

LiveObjects/hal.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ def lte_connect(pin):
187187

188188
from network import LTE
189189

190-
def is_waiting_for_pin():
190+
def is_sim_waiting_for_pin():
191191
if lte.send_at_cmd('AT+CPIN?').strip() == '+CPIN: SIM PIN\r\n\r\nOK':
192192
return True
193193
else:
@@ -196,10 +196,10 @@ def is_waiting_for_pin():
196196
lte = LTE()
197197
time.sleep(2)
198198

199-
if is_waiting_for_pin():
199+
if is_sim_waiting_for_pin():
200200
print("PIN", (lte.send_at_cmd('AT+CPIN="%s"' % pin)).strip())
201201
else:
202-
print("PIN PRESENT OK")
202+
print("PIN PRESENT: OK")
203203

204204
lte.attach()
205205
print("Attaching... ", end='')

0 commit comments

Comments
 (0)