src/eric7/MicroPython/Devices/DeviceBase.py

branch
mpy_network
changeset 9798
4402d76c5fa9
parent 9797
3be7b2326e2c
child 9799
a79430a8811d
equal deleted inserted replaced
9797:3be7b2326e2c 9798:4402d76c5fa9
1011 res['flash_used_pc'] = res['flash_used_kb'] / res['flash_total_kb'] * 100.0 1011 res['flash_used_pc'] = res['flash_used_kb'] / res['flash_total_kb'] * 100.0
1012 del stat_ 1012 del stat_
1013 except AttributeError: 1013 except AttributeError:
1014 res['flash_info_available'] = False 1014 res['flash_info_available'] = False
1015 1015
1016 import ubinascii as __ba_ 1016 import binascii as __ba_
1017 try: 1017 try:
1018 import machine as __mc_ 1018 import machine as __mc_
1019 if isinstance(__mc_.freq(), tuple): 1019 if isinstance(__mc_.freq(), tuple):
1020 res['mc_frequency_mhz'] = __mc_.freq()[0] / 1000000.0 1020 res['mc_frequency_mhz'] = __mc_.freq()[0] / 1000000.0
1021 else: 1021 else:
1201 1201
1202 def getWifiData(self): 1202 def getWifiData(self):
1203 """ 1203 """
1204 Public method to get data related to the current WiFi status. 1204 Public method to get data related to the current WiFi status.
1205 1205
1206 @return tuple of two dictionaries containing the WiFi status data 1206 @return tuple of three dictionaries containing the WiFi status data
1207 for the WiFi client and access point 1207 for the WiFi client, access point and overall data
1208 @rtype tuple of (dict, dict) 1208 @rtype tuple of (dict, dict, dict)
1209 """ 1209 """
1210 return {}, {} 1210 return {}, {}, {}
1211 1211
1212 def connectWifi(self, ssid, password): 1212 def connectWifi(self, ssid, password):
1213 """ 1213 """
1214 Public method to connect a device to a WiFi network. 1214 Public method to connect a device to a WiFi network.
1215 1215

eric ide

mercurial