Implement explicit SHA256 mode switching for Gridseed

This commit is contained in:
Gemini Bot
2026-01-21 12:57:08 +00:00
parent 7df9460026
commit 275a123f42

View File

@@ -78,6 +78,12 @@ static const char *str_ltc_reset[] = {
NULL
};
static const char *str_btc_reset[] = {
"55AA1F2800000000",
"55AA1F2800000000",
NULL
};
#ifdef WIN32
static void set_text_color(WORD color)
@@ -287,7 +293,10 @@ static void gc3355_init(struct cgpu_info *gridseed, GRIDSEED_INFO *info)
usb_buffer_clear(gridseed);
usb_read_timeout(gridseed, buf, sizeof(buf), &amount, 10, C_GETRESULTS);
gc3355_send_cmds(gridseed, str_init);
if (opt_scrypt) gc3355_send_cmds(gridseed, str_ltc_reset);
if (opt_scrypt)
gc3355_send_cmds(gridseed, str_ltc_reset);
else
gc3355_send_cmds(gridseed, str_btc_reset);
gc3355_set_core_freq(gridseed);
if (info->voltage)
gc3355_switch_voltage(gridseed);
@@ -669,7 +678,10 @@ static bool gridseed_prepare_work(struct thr_info __maybe_unused *thr, struct wo
GRIDSEED_INFO *info = gridseed->device_data;
cgtime(&info->scanhash_time);
if (opt_scrypt) gc3355_send_cmds(gridseed, str_ltc_reset);
if (opt_scrypt)
gc3355_send_cmds(gridseed, str_ltc_reset);
else
gc3355_send_cmds(gridseed, str_btc_reset);
usb_buffer_clear(gridseed);
return gridseed_send_task(gridseed, work);
}