Fix cppcheck warning in testrig.c

pull/155/head
Michael Black 2019-12-23 23:36:14 -06:00
rodzic bd2149bd8a
commit 9b9a6c55f5
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 6599353EC683404D
1 zmienionych plików z 59 dodań i 5 usunięć

Wyświetl plik

@ -131,12 +131,18 @@ int main(int argc, char *argv[])
printf("\nSetting 10m FM Narrow...\n");
retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 29620000); /* 10m */
if (retcode != RIG_OK)
{
printf("rig_set_freq: error = %s \n", rigerror(retcode));
}
retcode = rig_set_mode(my_rig, RIG_VFO_CURR, RIG_MODE_FM,
rig_passband_narrow(my_rig, RIG_MODE_FM));
if (retcode != RIG_OK)
{
printf("rig_set_freq: error = %s \n", rigerror(retcode));
printf("rig_set_mode: error = %s \n", rigerror(retcode));
}
rig_get_freq(my_rig, RIG_VFO_CURR, &freq);
@ -154,6 +160,12 @@ int main(int argc, char *argv[])
printf("Setting 15m USB...\n");
retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 21235175); /* 15m */
if (retcode != RIG_OK)
{
printf("rig_set_freq: error = %s \n", rigerror(retcode));
}
retcode = rig_set_mode(my_rig,
RIG_VFO_CURR,
RIG_MODE_USB,
@ -161,7 +173,7 @@ int main(int argc, char *argv[])
if (retcode != RIG_OK)
{
printf("rig_set_freq: error = %s \n", rigerror(retcode));
printf("rig_set_mode: error = %s \n", rigerror(retcode));
}
rig_get_freq(my_rig, RIG_VFO_CURR, &freq);
@ -176,6 +188,12 @@ int main(int argc, char *argv[])
printf("Setting 40m LSB...\n");
retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 7250100); /* 40m */
if (retcode != RIG_OK)
{
printf("rig_set_freq: error = %s \n", rigerror(retcode));
}
retcode = rig_set_mode(my_rig,
RIG_VFO_CURR,
RIG_MODE_LSB,
@ -183,7 +201,7 @@ int main(int argc, char *argv[])
if (retcode != RIG_OK)
{
printf("rig_set_freq: error = %s \n", rigerror(retcode));
printf("rig_set_mode: error = %s \n", rigerror(retcode));
}
rig_get_freq(my_rig, RIG_VFO_CURR, &freq);
@ -200,6 +218,12 @@ int main(int argc, char *argv[])
printf("Setting 80m AM Narrow...\n");
retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 3885000); /* 80m */
if (retcode != RIG_OK)
{
printf("rig_set_freq: error = %s \n", rigerror(retcode));
}
retcode = rig_set_mode(my_rig,
RIG_VFO_CURR,
RIG_MODE_AM,
@ -207,7 +231,7 @@ int main(int argc, char *argv[])
if (retcode != RIG_OK)
{
printf("rig_set_freq: error = %s \n", rigerror(retcode));
printf("rig_set_mode: error = %s \n", rigerror(retcode));
}
rig_get_freq(my_rig, RIG_VFO_CURR, &freq);
@ -225,6 +249,12 @@ int main(int argc, char *argv[])
printf("Setting 160m CW...\n");
retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 1875000); /* 160m */
if (retcode != RIG_OK)
{
printf("rig_set_freq: error = %s \n", rigerror(retcode));
}
retcode = rig_set_mode(my_rig,
RIG_VFO_CURR,
RIG_MODE_CW,
@ -232,7 +262,7 @@ int main(int argc, char *argv[])
if (retcode != RIG_OK)
{
printf("rig_set_freq: error = %s \n", rigerror(retcode));
printf("rig_set_mode: error = %s \n", rigerror(retcode));
}
rig_get_freq(my_rig, RIG_VFO_CURR, &freq);
@ -274,6 +304,12 @@ int main(int argc, char *argv[])
printf("Setting Medium Wave AM...\n");
retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 770000); /* KAAM */
if (retcode != RIG_OK)
{
printf("rig_set_freq: error = %s \n", rigerror(retcode));
}
retcode = rig_set_mode(my_rig,
RIG_VFO_CURR,
RIG_MODE_AM,
@ -299,6 +335,12 @@ int main(int argc, char *argv[])
printf("Setting 20m on VFO A with two functions...\n");
retcode = rig_set_vfo(my_rig, RIG_VFO_A);
if (retcode != RIG_OK)
{
printf("rig_set_vfo: error = %s \n", rigerror(retcode));
}
retcode = rig_set_freq(my_rig, RIG_VFO_CURR, 14250375); /* cq de vk3fcs */
if (retcode != RIG_OK)
@ -424,24 +466,36 @@ int main(int argc, char *argv[])
if (rig_has_set_func(my_rig, RIG_FUNC_RIT))
{
retcode = rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_RIT, 1);
if (retcode != RIG_OK) { printf("rig_set_func RIT error: %s\n", rigerror(retcode)); }
printf("rig_set_func: Setting RIT ON\n");
}
if (rig_has_get_func(my_rig, RIG_FUNC_RIT))
{
retcode = rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_RIT, &rit);
if (retcode != RIG_OK) { printf("rig_get_func RIT error: %s\n", rigerror(retcode)); }
printf("rig_get_func: RIT: %d\n", rit);
}
if (rig_has_set_func(my_rig, RIG_FUNC_XIT))
{
retcode = rig_set_func(my_rig, RIG_VFO_CURR, RIG_FUNC_XIT, 1);
if (retcode != RIG_OK) { printf("rig_set_func XIT error: %s\n", rigerror(retcode)); }
printf("rig_set_func: Setting XIT ON\n");
}
if (rig_has_get_func(my_rig, RIG_FUNC_XIT))
{
retcode = rig_get_func(my_rig, RIG_VFO_CURR, RIG_FUNC_XIT, &xit);
if (retcode != RIG_OK) { printf("rig_get_func XIT error: %s\n", rigerror(retcode)); }
printf("rig_get_func: XIT: %d\n", xit);
}