1212
1313class BoardsInterface :
1414
15+ EXISTING = 1
16+ WIFI = 2
17+ LTE = 3
18+
1519 @staticmethod
1620 def create_credentials (mode ):
1721 return LiveObjects .Credentials (mode )
@@ -50,7 +54,7 @@ def __init__(self):
5054 self ._wifi_tls_capability = True
5155 self ._lte_tls_capability = True
5256 self ._mqtt_lib = super ().mqtt_lib_import_str (self ._lang )
53- self ._credentials = super ().create_credentials (LiveObjects . Credentials .WIFI )
57+ self ._credentials = super ().create_credentials (BoardsInterface .WIFI )
5458
5559 def network_connect (self ):
5660 pycom_wifi_connect (self ._credentials .get_wifi_creds ()['ssid' ], self ._credentials .get_wifi_creds ()['password' ])
@@ -62,7 +66,7 @@ def __init__(self):
6266 self ._wifi_tls_capability = False
6367 self ._wifi_lte_capability = False
6468 self ._mqtt_lib = super ().mqtt_lib_import_str (self ._lang )
65- self ._credentials = super ().create_credentials (LiveObjects . Credentials .WIFI )
69+ self ._credentials = super ().create_credentials (BoardsInterface .WIFI )
6670
6771 def network_connect (self ):
6872 wifi_connect (self ._credentials .get_wifi_creds ()['ssid' ], self ._credentials .get_wifi_creds ()['password' ])
@@ -78,7 +82,7 @@ def __init__(self):
7882 self ._wifi_tls_capability = True
7983 self ._wifi_lte_capability = False
8084 self ._mqtt_lib = super ().mqtt_lib_import_str (self ._lang )
81- self ._credentials = super ().create_credentials (LiveObjects . Credentials .WIFI )
85+ self ._credentials = super ().create_credentials (BoardsInterface .WIFI )
8286
8387 def network_connect (self ):
8488 wifi_connect (self ._credentials .get_wifi_creds ()['ssid' ], self ._credentials .get_wifi_creds ()['password' ])
@@ -90,7 +94,7 @@ def __init__(self):
9094 self ._wifi_tls_capability = True
9195 self ._wifi_lte_capability = False
9296 self ._mqtt_lib = super ().mqtt_lib_import_str (self ._lang )
93- self ._credentials = super ().create_credentials (LiveObjects . Credentials . NONE )
97+ self ._credentials = super ().create_credentials (BoardsInterface . EXISTING )
9498
9599 def network_connect (self ):
96100 use_existing_network_connection ()
0 commit comments