clean up example.c and it now does a reopen test at the end

pull/236/head
mdblack98 2020-05-03 16:55:04 -05:00
rodzic ef1d42d2e1
commit 67f7bd91e0
1 zmienionych plików z 17 dodań i 16 usunięć

Wyświetl plik

@ -80,7 +80,8 @@ int main()
if (status != RIG_OK) { printf("Get mode failed?? Err=%s\n", rigerror(status)); }
printf("Current mode = 0x%lX = %s, width = %ld\n", mode, rig_strrmode(mode), width);
printf("Current mode = 0x%lX = %s, width = %ld\n", mode, rig_strrmode(mode),
width);
/* rig power output */
status = rig_get_level(my_rig, RIG_VFO_CURR, RIG_LEVEL_RFPOWER, &power);
@ -134,9 +135,8 @@ int main()
printf("Closing and reopening rig\n");
rig_close(my_rig);
while (1) {
//my_rig = rig_init(MODEL); // your rig model.
while (1)
{
retcode = rig_open(my_rig);
if (retcode != RIG_OK)
@ -145,6 +145,7 @@ int main()
rigerror(retcode));
return 1;
}
#if 0
status = rig_get_freq(my_rig, RIG_VFO_CURR, &freq);