src/eric7/MicroPython/WifiDialogs/WifiController.py

branch
eric7
changeset 11236
75c26fe1d1c7
parent 11166
fd914f897dcf
equal deleted inserted replaced
11235:b984f0085bed 11236:75c26fe1d1c7
300 @param withIP flag indicating to start the access point with an IP configuration 300 @param withIP flag indicating to start the access point with an IP configuration
301 @type bool 301 @type bool
302 """ 302 """
303 from .WifiApConfigDialog import WifiApConfigDialog 303 from .WifiApConfigDialog import WifiApConfigDialog
304 304
305 dlg = WifiApConfigDialog(withIP=withIP, parent=self.__mpy) 305 securityModes = self.__mpy.getDevice().getSecurityModes()
306 dlg = WifiApConfigDialog(
307 withIP=withIP, securityModes=securityModes, parent=self.__mpy
308 )
306 if dlg.exec() == QDialog.DialogCode.Accepted: 309 if dlg.exec() == QDialog.DialogCode.Accepted:
307 ssid, password, security, hostname, ifconfig = dlg.getApConfig() 310 ssid, password, securityMode, hostname, ifconfig = dlg.getApConfig()
308 311
309 ok, err = self.__mpy.getDevice().startAccessPoint( 312 ok, err = self.__mpy.getDevice().startAccessPoint(
310 ssid, 313 ssid,
311 security=security, 314 security=securityMode,
312 password=password, 315 password=password,
313 hostname=hostname, 316 hostname=hostname,
314 ifconfig=ifconfig if withIP else None, 317 ifconfig=ifconfig if withIP else None,
315 ) 318 )
316 if ok: 319 if ok:

eric ide

mercurial