gtk_widget_show_all(discovery_dialog);
fprintf(stderr,"showing device dialog\n");
- // autostart if one device and autostart enabled
+ //
+ // Autostart and RedPitaya radios:
+ //
+ // Autostart means that if there only one device detected, start the
+ // radio without the need to click the "Start" button.
+ //
+ // If this is the first round of a RedPitaya (STEMlab) discovery,
+ // there may be more than one SDR app on the RedPitya available
+ // from which one can choose one.
+ // With autostart, there is no choice in this case, the SDR app
+ // with highest priority is automatically chosen (and started),
+ // and then the discovery process is re-initiated for RedPitya
+ // devices only.
+ //
g_print("%s: devices=%d autostart=%d\n",__FUNCTION__,devices,autostart);
if(devices==1 && autostart) {
if(vfo[id].ctun) {
- long long frequency=vfo[id].frequency;
- long long half=(long long)rx->sample_rate/2LL;
- long long rx_low=vfo[id].ctun_frequency+rx->filter_low;
- long long rx_high=vfo[id].ctun_frequency+rx->filter_high;
-
if(rx->zoom>1) {
+ //
+ // Adjust PAN if new filter width has moved out of
+ // current display range
+ //
+ long long frequency=vfo[id].frequency;
+ long long half=(long long)rx->sample_rate/2LL;
+ long long rx_low=vfo[id].ctun_frequency+rx->filter_low;
+ long long rx_high=vfo[id].ctun_frequency+rx->filter_high;
long long min_display=frequency-half+(long long)((double)rx->pan*rx->hz_per_pixel);
long long max_display=min_display+(long long)((double)rx->width*rx->hz_per_pixel);
if(rx_low<=min_display) {
}
}
+ //
+ // The (HPSDR) frequency does not change in CTUN,
+ // so simply compute new offset and tell WDSP about it
+ //
vfo[id].offset=vfo[id].ctun_frequency-vfo[id].frequency;
if(vfo[id].rit_enabled) {
vfo[id].offset+=vfo[id].rit;
set_offset(rx,vfo[id].offset);
} else {
switch(protocol) {
+ case ORIGINAL_PROTOCOL:
+ // P1 does this automatically
+ break;
case NEW_PROTOCOL:
schedule_high_priority(); // send new frequency
break;