mirror of
https://github.com/skot/ESP-Miner.git
synced 2025-07-02 21:00:41 +02:00
WIP: Fix job interval timing (#249)
* add extended nonce debugging * switch to semaphore for job timing * clean up nonce debugging. hardcode 1366 job interval to 2s and show when new jobs are sent * set nonce range to 0x0F0000 set job interval to 20s. better stratum debugging, * testing out longer intervals on 1368 * looking at exact serial commands sent * fix log value digit count * add core from nonce debug * set BM1366 initial chip difficulty to 32 * add version rolling debug * improve debug printing again * fix diff * fix core_id extraction * printf fix * debug cleanup * setup BM1368 for testing. reg10 to S21 default, job interval @ 0.5s * set init diff on 1366 and 1368 back to 256 --------- Co-authored-by: Georges Palauqui <g.palauqui@gptechinno.com>
This commit is contained in:
@ -356,7 +356,7 @@ void STRATUM_V1_configure_version_rolling(int socket, uint32_t * version_mask)
|
||||
"{\"id\": %d, \"method\": \"mining.configure\", \"params\": [[\"version-rolling\"], {\"version-rolling.mask\": "
|
||||
"\"ffffffff\"}]}\n",
|
||||
send_uid++);
|
||||
ESP_LOGI(TAG, "tx: %s", configure_msg);
|
||||
debug_stratum_tx(configure_msg);
|
||||
write(socket, configure_msg, strlen(configure_msg));
|
||||
|
||||
return;
|
||||
@ -364,5 +364,15 @@ void STRATUM_V1_configure_version_rolling(int socket, uint32_t * version_mask)
|
||||
|
||||
static void debug_stratum_tx(const char * msg)
|
||||
{
|
||||
//remove the trailing newline
|
||||
char * newline = strchr(msg, '\n');
|
||||
if (newline != NULL) {
|
||||
*newline = '\0';
|
||||
}
|
||||
ESP_LOGI(TAG, "tx: %s", msg);
|
||||
|
||||
//put it back!
|
||||
if (newline != NULL) {
|
||||
*newline = '\n';
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user