kopia lustrzana https://github.com/Hamlib/Hamlib
FREQFMT fixes
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@1865 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.3
rodzic
6354385023
commit
215494cb63
|
@ -23,7 +23,7 @@ int main (int argc, char *argv[])
|
|||
exit(1);
|
||||
}
|
||||
|
||||
f = atoll(argv[1]);
|
||||
f = (freq_t)atoll(argv[1]);
|
||||
if (argc > 2) {
|
||||
digits = atoi(argv[2]);
|
||||
if (digits > MAXDIGITS)
|
||||
|
@ -31,20 +31,20 @@ int main (int argc, char *argv[])
|
|||
}
|
||||
|
||||
printf("Little Endian mode\n");
|
||||
printf("Frequency: %lld\n",f);
|
||||
printf("Frequency: %"FREQFMT"\n",f);
|
||||
to_bcd(b, f, digits);
|
||||
printf("BCD: %2.2x",b[0]);
|
||||
for (i = 1; i < (digits+1)/2; i++)
|
||||
printf(",%2.2x",b[i]);
|
||||
printf("\nResult after recoding: %lld\n", from_bcd(b, digits));
|
||||
printf("\nResult after recoding: %llu\n", from_bcd(b, digits));
|
||||
|
||||
printf("\nBig Endian mode\n");
|
||||
printf("Frequency: %lld\n",f);
|
||||
printf("Frequency: %"FREQFMT"\n",f);
|
||||
to_bcd_be(b, f, digits);
|
||||
printf("BCD: %2.2x",b[0]);
|
||||
for (i = 1; i < (digits+1)/2; i++)
|
||||
printf(",%2.2x",b[i]);
|
||||
printf("\nResult after recoding: %lld\n", from_bcd_be(b, digits));
|
||||
printf("\nResult after recoding: %llu\n", from_bcd_be(b, digits));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ int main (int argc, char *argv[])
|
|||
retcode = rig_get_freq(my_rig, RIG_VFO_CURR, &freq);
|
||||
|
||||
if (retcode == RIG_OK ) {
|
||||
printf("rig_get_freq: freq = %lli \n", freq);
|
||||
printf("rig_get_freq: freq = %"FREQFMT"\n", freq);
|
||||
} else {
|
||||
printf("rig_get_freq: error = %s \n", rigerror(retcode));
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ int myfreq_event(RIG *rig, vfo_t vfo, freq_t freq, rig_ptr_t arg)
|
|||
{
|
||||
int *count_ptr = (int *) arg;
|
||||
|
||||
printf("Rig changed freq to %lliHz\n", freq);
|
||||
printf("Rig changed freq to %"FREQFMT"Hz\n", freq);
|
||||
*count_ptr += 1;
|
||||
|
||||
return 0;
|
||||
|
|
Ładowanie…
Reference in New Issue