Skip to content

Commit

Permalink
Merge pull request #761 from pavel-demin/develop
Browse files Browse the repository at this point in the history
add possibility to work with less than eight bands in sdr_transceiver_ft8
  • Loading branch information
pavel-demin authored Oct 20, 2018
2 parents 59960f4 + 6a49ac9 commit cca4a00
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions projects/sdr_transceiver_ft8/app/write-c2-files.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ int main(int argc, char *argv[])
char name[32];
double dialfreq;
double corr;
double freq[8];
double freq[8] = {0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0};
int number;
uint8_t chan = 0;

Expand Down Expand Up @@ -71,13 +71,13 @@ int main(int argc, char *argv[])
return EXIT_FAILURE;
}

if(length < 8)
if(length < 1)
{
fprintf(stderr, "Less than 8 bands in configuration file.\n");
fprintf(stderr, "Less than 1 band in configuration file.\n");
return EXIT_FAILURE;
}

for(i = 0; i < 8; ++i)
for(i = 0; i < length; ++i)
{
element = config_setting_get_elem(setting, i);

Expand Down Expand Up @@ -152,7 +152,7 @@ int main(int argc, char *argv[])
offset += 250;
}

for(i = 0; i < 8; ++i)
for(i = 0; i < length; ++i)
{
dialfreq = freq[i] * 1.0e6;
strftime(date, 14, "%y%m%d_%H%M%S", gmt);
Expand Down

0 comments on commit cca4a00

Please sign in to comment.