mirror of
https://github.com/lora-aprs/LoRa_APRS_iGate.git
synced 2025-12-06 07:42:00 +01:00
requested changes
This commit is contained in:
parent
c06efb910a
commit
3485426843
|
|
@ -100,8 +100,9 @@ bool EthTask::setup(System &system) {
|
|||
delay(200);
|
||||
digitalWrite(ETH_NRST, 1);
|
||||
|
||||
if (system.getUserConfig()->network.DHCP == false)
|
||||
if (!system.getUserConfig()->network.DHCP) {
|
||||
ETH.config(system.getUserConfig()->network.staticIP, system.getUserConfig()->network.gateway, system.getUserConfig()->network.subnet, system.getUserConfig()->network.dns1, system.getUserConfig()->network.dns2);
|
||||
}
|
||||
|
||||
ETH.begin(ETH_ADDR, ETH_POWER_PIN, ETH_MDC_PIN, ETH_MDIO_PIN, ETH_TYPE, ETH_CLK);
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -22,8 +22,9 @@ bool WifiTask::setup(System &system) {
|
|||
WiFi.onEvent(WiFiEvent);
|
||||
WiFi.setHostname(system.getUserConfig()->callsign.c_str());
|
||||
|
||||
if (system.getUserConfig()->network.DHCP == false)
|
||||
if (!system.getUserConfig()->network.DHCP) {
|
||||
WiFi.config(system.getUserConfig()->network.staticIP, system.getUserConfig()->network.gateway, system.getUserConfig()->network.subnet, system.getUserConfig()->network.dns1, system.getUserConfig()->network.dns2);
|
||||
}
|
||||
|
||||
for (Configuration::Wifi::AP ap : system.getUserConfig()->wifi.APs) {
|
||||
logPrintD("Looking for AP: ");
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ void ProjectConfigurationManagement::readProjectConfiguration(DynamicJsonDocumen
|
|||
void ProjectConfigurationManagement::writeProjectConfiguration(Configuration &conf, DynamicJsonDocument &data) {
|
||||
data["callsign"] = conf.callsign;
|
||||
|
||||
if (conf.network.DHCP == false) {
|
||||
if (!conf.network.DHCP) {
|
||||
data["network"]["DHCP"] = conf.network.DHCP;
|
||||
data["network"]["staticIP"] = conf.network.staticIP.toString();
|
||||
data["network"]["subnet"] = conf.network.subnet.toString();
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@
|
|||
|
||||
class Configuration {
|
||||
public:
|
||||
class NETWORK {
|
||||
class Network {
|
||||
public:
|
||||
NETWORK() : DHCP(true) {
|
||||
Network() : DHCP(true) {
|
||||
}
|
||||
|
||||
bool DHCP;
|
||||
|
|
@ -106,7 +106,7 @@ public:
|
|||
Configuration() : callsign("NOCALL-10"), board(""), ntpServer("pool.ntp.org"){};
|
||||
|
||||
String callsign;
|
||||
NETWORK network;
|
||||
Network network;
|
||||
Wifi wifi;
|
||||
Beacon beacon;
|
||||
APRS_IS aprs_is;
|
||||
|
|
|
|||
Loading…
Reference in a new issue