main/setup.c

changeset 49
4ec04c6f1551
parent 32
c3c2fd13cf3b
child 54
7b134c27fadb
equal deleted inserted replaced
48:edbd87949204 49:4ec04c6f1551
53 ShowText(2, 108, "Hostnaam", config.hostname); 53 ShowText(2, 108, "Hostnaam", config.hostname);
54 ShowText(2, 124, "AP SSID", config.ap_ssid); 54 ShowText(2, 124, "AP SSID", config.ap_ssid);
55 ShowText(2, 140, "AP pwd", config.ap_pwd); 55 ShowText(2, 140, "AP pwd", config.ap_pwd);
56 ShowInteger(2, 156, "AP kanaal", NULL, config.ap_channel); 56 ShowInteger(2, 156, "AP kanaal", NULL, config.ap_channel);
57 ShowBool(2, 172, "AP SSID verborgen", config.ap_ssid_hidden); 57 ShowBool(2, 172, "AP SSID verborgen", config.ap_ssid_hidden);
58 ShowText(2, 188, "NTP server", config.ntp_server);
58 Buttons_Clear(); 59 Buttons_Clear();
59 Buttons_Add( 0, 210, 45, 30, "Ok" , 0); 60 Buttons_Add( 0, 210, 45, 30, "Ok" , 0);
60 Buttons_Add(276, 210, 45, 30, "Ed" , 1); 61 Buttons_Add(276, 210, 45, 30, "Ed" , 1);
61 Buttons[0].dark = true; 62 Buttons[0].dark = true;
62 Buttons_Show(); 63 Buttons_Show();
151 EditTextMin("AP password", config.ap_pwd, 40, 8); 152 EditTextMin("AP password", config.ap_pwd, 40, 8);
152 EditUint8("AP kanaal", &config.ap_channel, 1, 14); 153 EditUint8("AP kanaal", &config.ap_channel, 1, 14);
153 bool hidden = config.ap_ssid_hidden; 154 bool hidden = config.ap_ssid_hidden;
154 EditBool("AP SSID verborgen", &hidden); 155 EditBool("AP SSID verborgen", &hidden);
155 config.ap_ssid_hidden = (uint8_t)hidden; 156 config.ap_ssid_hidden = (uint8_t)hidden;
157 EditText("Voorkeur NTP server", config.ntp_server, 31);
156 158
157 crc2 = crc32_le(0, dst, sizeof(config)); 159 crc2 = crc32_le(0, dst, sizeof(config));
158 if ((crc1 != crc2) && Confirm("Gewijzigd, opslaan?", "Ja", "Nee")) { 160 if ((crc1 != crc2) && Confirm("Gewijzigd, opslaan?", "Ja", "Nee")) {
159 write_config(); 161 write_config();
160 } else { 162 } else {

mercurial