Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Commit

Permalink
Set SEP_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
ricaun committed Feb 1, 2022
1 parent a80d779 commit 92a5fb9
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions DuinoCoin_Esp_Async_Master/DuinoCoin_Clients.ino
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ void clients_requestJob(byte i)
{
Serial.print("[" + String(i) + "]");
Serial.println("Job Request: " + String(ducouser));
clients[i].print("JOB" + SEP_TOKEN + String(ducouser) + SEP_TOKEN + JOB);
clients[i].print("JOB," + String(ducouser) + "," + JOB);
clients_state(i, DUINO_STATE_JOB_WAIT);
}

Expand All @@ -234,7 +234,7 @@ void clients_waitRequestJob(byte i)
Serial.println(clientBuffer);

// Not a Valid Job -> Request Again
if (clientBuffer.indexOf(',') == -1)
if (clientBuffer.indexOf(SEP_TOKEN) == -1)
{
clients_stop(i);
return;
Expand Down Expand Up @@ -262,9 +262,9 @@ void clients_sendJobDone(byte i)
StreamString response;
response.print(responseJob);

int job = response.readStringUntil(',').toInt();
int time = response.readStringUntil(',').toInt();
String id = response.readStringUntil('\n');
int job = response.readStringUntil(SEP_TOKEN).toInt();
int time = response.readStringUntil(SEP_TOKEN).toInt();
String id = response.readStringUntil(END_TOKEN);
float HashRate = job / (time * .000001f);

if (HASHRATE_FORCE) // Force HashRate
Expand Down

0 comments on commit 92a5fb9

Please sign in to comment.