Skip to content

Commit

Permalink
Update toolchain and library
Browse files Browse the repository at this point in the history
  • Loading branch information
zhiquanyeo committed Dec 29, 2023
1 parent 950b83f commit 5ffcbbb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion platformio.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[env]
platform = https://github.com/zhiquanyeo/platform-raspberrypi.git
platform = https://github.com/maxgerhardt/platform-raspberrypi.git
framework = arduino
board_build.core = earlephilhower
board_build.filesystem_size = 0.5m
Expand Down
14 changes: 11 additions & 3 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,18 @@ NetworkMode configureNetwork(XRPConfiguration config) {

if (shouldUseAP) {
Serial.println("[NET] Attempting to start in AP mode");

// We apparently need to set up the IP address via softAPConfig now
// This might change again in future, but doing the explicit addressing
// here is probably safest.
IPAddress defaultIP {192, 168, 42, 1};
IPAddress subnetMask {255, 255, 255, 0};
WiFi.softAPConfig(defaultIP, defaultIP, subnetMask);

bool result = WiFi.softAP(
config.networkConfig.defaultAPName.c_str(),
config.networkConfig.defaultAPPassword.c_str());

if (result) {
Serial.println("[NET] AP Ready");
}
Expand Down Expand Up @@ -100,7 +108,7 @@ XRPConfiguration loadConfiguration(std::string defaultAPName) {
File f = LittleFS.open("/config.json", "r");
if (!f) {
Serial.println("[CONFIG] No config file found. Creating default");

config = generateDefaultConfig(defaultAPName);
writeConfigToDisk(config);
return config;
Expand Down Expand Up @@ -206,4 +214,4 @@ XRPConfiguration loadConfiguration(std::string defaultAPName) {
}

return config;
}
}

0 comments on commit 5ffcbbb

Please sign in to comment.