File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change 3333class GSM :
3434 """Interface for interacting with FONA 2G GSM modems.
3535 """
36- def __init__ (self , fona , apn , debug = True ):
36+ def __init__ (self , fona , apn ):
3737 """Initializes interface with 2G GSM modem.
38- :param adafruit_fona fona: Adafruit FONA module.
38+ :param adafruit_fona fona: The Adafruit FONA module we are using .
3939 :param tuple apn: Tuple containing APN name, (optional) APN username,
4040 and APN password.
41- :param bool debug: Enable verbose debug output.
4241
4342 """
4443 self ._iface = fona
45- self ._debug = debug
4644 self ._apn = apn
4745 self ._gsm_connected = False
4846
@@ -69,9 +67,8 @@ def iccid(self):
6967 def is_attached (self ):
7068 """Returns if the modem is attached to the network
7169 and the GPS has a fix."""
72- if self ._iface .gps == 3 :
73- if self ._iface .network_status == 1 :
74- return True
70+ if self ._iface .gps == 3 and self ._iface .network_status == 1 :
71+ return True
7572 return False
7673
7774
You can’t perform that action at this time.
0 commit comments