kopia lustrzana https://github.com/Guenael/rtlsdr-wsprd
commit
f0896f7c95
|
@ -445,12 +445,14 @@ int32_t readfile(float *iSamples, float *qSamples, char *filename) {
|
|||
int32_t res = fseek(fd, 26, SEEK_SET);
|
||||
if (res) {
|
||||
fprintf(stderr, "Cannot set file offset...\n");
|
||||
fclose(fd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
int32_t nread = fread(filebuffer, sizeof(float), 2*SIGNAL_LENGHT*SIGNAL_SAMPLE_RATE, fd);
|
||||
if (nread != 2*SIGNAL_LENGHT*SIGNAL_SAMPLE_RATE) {
|
||||
fprintf(stderr, "Cannot read all the data!\n");
|
||||
fclose(fd);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -479,17 +479,15 @@ int32_t wspr_decode(float *idat, float *qdat, uint32_t npoints,
|
|||
w[i]=sinf(0.006147931*i);
|
||||
}
|
||||
|
||||
if( options.usehashtable ) {
|
||||
if ( options.usehashtable ) {
|
||||
char line[80], hcall[12];
|
||||
if( (fhash=fopen("hashtable.txt","r+")) ) {
|
||||
if ( (fhash=fopen("hashtable.txt","r+")) ) {
|
||||
while (fgets(line, sizeof(line), fhash) != NULL) {
|
||||
sscanf(line,"%d %s",&nh,hcall);
|
||||
strcpy(hashtab+nh*13,hcall);
|
||||
}
|
||||
} else {
|
||||
fhash=fopen("hashtable.txt","w+");
|
||||
}
|
||||
fclose(fhash);
|
||||
}
|
||||
}
|
||||
|
||||
// Main loop starts here
|
||||
|
|
|
@ -120,7 +120,7 @@ void pack_prefix(char *callsign, int32_t *n, int32_t *m, int32_t *nadd ) {
|
|||
*m=60000 + 26 + *m;
|
||||
} else {
|
||||
char* pfx=strtok(callsign,"/");
|
||||
call6=strtok(NULL," ");
|
||||
call6=strtok(pfx," "); // FIXME-CHECK
|
||||
*n=pack_call(call6);
|
||||
int plen=strlen(pfx);
|
||||
if( plen ==1 ) {
|
||||
|
|
Ładowanie…
Reference in New Issue