File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -22,8 +22,8 @@ def get_apikey(self):
2222 def get_client_id (self ):
2323 return self ._lang + 'MQTT'
2424
25- def mqtt_lib_import_str ( self , lang ):
26- # https://stackoverflow.com/questions/8718885/import-module-from-string-variable
25+ @ staticmethod
26+ def mqtt_lib_import_str ( lang ):
2727 import_strings = {
2828 'microPython' : 'from umqttrobust import MQTTClient' ,
2929 'Python' : 'import paho.mqtt.client as paho'
@@ -145,14 +145,14 @@ def pycom_wifi_connect(ssid, password):
145145 break
146146
147147
148- def mobile_connect (pin ):
149- # noinspection PyUnresolvedReferences
148+ def lte_connect (pin ):
149+
150150 from network import LTE
151151 import socket
152152
153153 lte = LTE ()
154154 time .sleep (2 )
155- print ("PIN" , (lte .send_at_cmd (f 'AT+CPIN="{ pin } "' )).strip ())
155+ print ("PIN" , (lte .send_at_cmd ('AT+CPIN="%s"' % pin )).strip ())
156156
157157 lte .attach ()
158158 print ("attaching... " , end = '' )
You can’t perform that action at this time.
0 commit comments