Skip to content
This repository has been archived by the owner on May 27, 2020. It is now read-only.

Commit

Permalink
Add frequency range support 100MHz - 500MHz
Browse files Browse the repository at this point in the history
  • Loading branch information
vthoang committed Dec 27, 2016
1 parent a5848a2 commit 702b370
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions cgminer.c
Original file line number Diff line number Diff line change
Expand Up @@ -1113,6 +1113,19 @@ static void load_temp_cutoffs()
}
}

static char *set_float_100_to_500(const char *arg, float *i)
{
char *err = opt_set_floatval(arg, i);

if (err)
return err;

if (*i < 100 || *i > 500)
return "Value out of range";

return NULL;
}

static char *set_float_125_to_500(const char *arg, float *i)
{
char *err = opt_set_floatval(arg, i);
Expand Down Expand Up @@ -1195,8 +1208,8 @@ static struct opt_table opt_config_table[] = {
set_int_0_to_9999, &opt_show_intval, &opt_au3_volt,
"Set AntminerU3 voltage in mv, range 725-850, 0 to not set"),
OPT_WITH_ARG("--compac-freq",
set_float_125_to_500, &opt_show_floatval, &opt_compac_freq,
"Set GekkoScience Compac frequency in MHz, range 125-500"),
set_float_100_to_500, &opt_show_floatval, &opt_compac_freq,
"Set GekkoScience Compac frequency in MHz, range 100-500"),
#endif
#ifdef USE_AVALON
OPT_WITHOUT_ARG("--avalon-auto",
Expand Down

0 comments on commit 702b370

Please sign in to comment.