54 Preferences.getMicroPython("WifiApAuthMode") |
54 Preferences.getMicroPython("WifiApAuthMode") |
55 ) |
55 ) |
56 if index == -1: |
56 if index == -1: |
57 index = 5 # default it to WPA/WPA2 in case of an issue |
57 index = 5 # default it to WPA/WPA2 in case of an issue |
58 self.apSecurityComboBox.setCurrentIndex(index) |
58 self.apSecurityComboBox.setCurrentIndex(index) |
|
59 self.hostnameEdit.setText(Preferences.getMicroPython("WifiApHostname")) |
59 |
60 |
60 self.__withIP = withIP |
61 self.__withIP = withIP |
61 |
62 |
62 self.ipv4GroupBox.setVisible(withIP) |
63 self.ipv4GroupBox.setVisible(withIP) |
63 if withIP: |
64 if withIP: |
128 Preferences.setMicroPython("WifiApName", self.apSsidEdit.text()) |
129 Preferences.setMicroPython("WifiApName", self.apSsidEdit.text()) |
129 Preferences.setMicroPython("WifiApPassword", self.apPasswordEdit.text()) |
130 Preferences.setMicroPython("WifiApPassword", self.apPasswordEdit.text()) |
130 Preferences.setMicroPython( |
131 Preferences.setMicroPython( |
131 "WifiApAuthMode", self.apSecurityComboBox.currentData() |
132 "WifiApAuthMode", self.apSecurityComboBox.currentData() |
132 ) |
133 ) |
|
134 Preferences.setMicroPython("WifiApHostname", self.hostnameEdit.text()) |
133 if self.__withIP: |
135 if self.__withIP: |
134 Preferences.setMicroPython("WifiApAddress", self.addressEdit.text()) |
136 Preferences.setMicroPython("WifiApAddress", self.addressEdit.text()) |
135 Preferences.setMicroPython("WifiApNetmask", self.netmaskEdit.text()) |
137 Preferences.setMicroPython("WifiApNetmask", self.netmaskEdit.text()) |
136 Preferences.setMicroPython("WifiApGateway", self.gatewayEdit.text()) |
138 Preferences.setMicroPython("WifiApGateway", self.gatewayEdit.text()) |
137 Preferences.setMicroPython("WifiApDNS", self.dnsEdit.text()) |
139 Preferences.setMicroPython("WifiApDNS", self.dnsEdit.text()) |