Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes ESP issues after SERIAL_PRINTING merge #1769

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions ESP_Code/ESP_Code.ino
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,7 @@ namespace {
Serial.println("Local IP address: " + ETH.localIP().toString());
Serial.println("Rig name: " + String(RIG_IDENTIFIER));
Serial.println();
#endif

#else
#if defined(SERIAL_PRINTING)
Expand Down Expand Up @@ -271,14 +272,15 @@ namespace {
});
ArduinoOTA.onError([](ota_error_t error)
{
Serial.printf("Error[%u]: ", error);
#if defined(SERIAL_PRINTING)
if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
else if (error == OTA_END_ERROR) Serial.println("End Failed"); });
#endif
Serial.printf("Error[%u]: ", error);
#if defined(SERIAL_PRINTING)
if (error == OTA_AUTH_ERROR) Serial.println("Auth Failed");
else if (error == OTA_BEGIN_ERROR) Serial.println("Begin Failed");
else if (error == OTA_CONNECT_ERROR) Serial.println("Connect Failed");
else if (error == OTA_RECEIVE_ERROR) Serial.println("Receive Failed");
else if (error == OTA_END_ERROR) Serial.println("End Failed");
#endif
});

ArduinoOTA.setHostname(RIG_IDENTIFIER); // Give port a name
ArduinoOTA.begin();
Expand Down
2 changes: 1 addition & 1 deletion ESP_Code/MiningJob.h
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ class MiningJob {
" (" + String(counter) + ")" +
" hashrate: " + String(hashrate / 1000, 2) + " kH/s (" +
String(elapsed_time_s) + "s)\n");
#endf
#endif
}

bool parse() {
Expand Down