Skip to content

Commit

Permalink
Merge pull request #1769 from GerardoNevarez/fixes_pr_1763_issues
Browse files Browse the repository at this point in the history
Fixes ESP issues after SERIAL_PRINTING merge
  • Loading branch information
revoxhere authored Mar 27, 2024
2 parents 018a17d + c2cbd1a commit cf8a6e7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
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

0 comments on commit cf8a6e7

Please sign in to comment.