memset(qsample, 0, OLDRTXLEN*sizeof(double));
enable_thread = 1;
active_thread = 1;
- CommonMercuryFreq = 0;
if (pthread_create(&thread, NULL, handler_ep6, NULL) < 0)
{
perror("create old protocol thread");
break;
case PRE: // only key supported
if (filter_board == CHARLY25) {
+ //
+ // For hardware other than CHARLY25, we do not
+ // switch preamps
+ //
new = active_receiver->preamp + active_receiver->dither;
new++;
if (new >2) new=0;
break;
}
g_idle_add(ext_update_att_preamp, NULL);
- } else {
- // Note that these preamps are not present in most
- // SDR hardware.
- new=active_receiver->preamp+1;
- if (new > 1) new=0;
- active_receiver->preamp= (new == 1);
}
break;
case ATT: // Key for ALEX attenuator, wheel or knob for slider
output_buffer[C3]|=LT2208_DITHER_ON;
}
#endif
- if(active_receiver->preamp) {
+ if (filter_board == CHARLY25) {
+ if(active_receiver->preamp) {
+ output_buffer[C3]|=LT2208_GAIN_ON;
+ }
+ } else {
+ // preamp always "on" for non-CHARLY25 hardware
+ // (on modern boards the preamp is hard-wired "on")
output_buffer[C3]|=LT2208_GAIN_ON;
}
case 4:
output_buffer[C0]=0x14;
output_buffer[C1]=0x00;
- for(i=0;i<receivers;i++) {
- output_buffer[C1]|=(receiver[i]->preamp<<i);
- }
+ //for(i=0;i<receivers;i++) {
+ // output_buffer[C1]|=(receiver[i]->preamp<<i);
+ //}
+ // preamps always "on".
+ // (on modern boards the preamp is hard-wired "on")
+ output_buffer[C1]=0x0f;
if(mic_ptt_enabled==0) {
output_buffer[C1]|=0x40;
}
if(device==DEVICE_HERMES || device==DEVICE_ANGELIA || device==DEVICE_ORION
|| device==DEVICE_ORION2 || device == DEVICE_STEMLAB) {
- // bit 5 on somee platforms activates a preamp that is hard-wired "on" on
- // other platforms, therefore always set it.
+ // setting bit 5 ("Att enable") disables preamp choice
+ // (on modern boards the preamp is hard-wired "on")
output_buffer[C4]=0x20 | (adc_attenuation[receiver[0]->adc] & 0x1F);
} else {
#ifdef RADIOBERRY
if(receivers==2) {
if(device==DEVICE_HERMES || device==DEVICE_ANGELIA || device==DEVICE_ORION
|| device==DEVICE_ORION2 || device==DEVICE_STEMLAB) {
- // bit 5 on somee platforms activates a preamp that is hard-wired "on" on
+ // setting bit 5 ("Att enable") disables preamp choice
+ // (on modern boards the preamp is hard-wired "on")
// other platforms, therefore always set it.
output_buffer[C1]=0x20 | (adc_attenuation[receiver[1]->adc] & 0x1F);
}
else if(strcmp(cmd_str,"PA")==0) {
// TS-2000 - PA - Set/Read Preamp function status
// PiHPSDR - ZZPA - Set/Read Preamp function status
+ // Note that currently, preamp switching is only done for CHARLY25
if(len <=2) {
if(zzid_flag == 0) {
sprintf(msg,"PA%1d%1d;",active_receiver->preamp,active_receiver->preamp);