// These are FIXED numbers and depend on the device and whether the code
// is compiled with or without PURESIGNAL
// Furthermore, we provide a function that determines the frequency for
-// a given (HPSDR) receiver. This makes the code below much more transparent.
+// a given (HPSDR) receiver and for the transmitter.
+//
//
static int rx_feedback_receiver() {
static int tx_feedback_receiver() {
//
- // Depending on the device, return channel number of RX feedback receiver
+ // Depending on the device, return channel number of TX feedback receiver
//
int ret;
switch (device) {
static int first_receiver() {
//
// Depending on the device and whether we compiled for PURESIGNAL,
- // return the number of the first receiver
+ // return the channel number of the first receiver
//
return 0;
}
static int second_receiver() {
//
// Depending on the device and whether we compiled for PURESIGNAL,
- // return the number of the second receiver
+ // return the channel number of the second receiver
//
#ifdef PURESIGNAL
return 2;
//
// This function returns the TX frequency if chan is
// outside the allowed range, and thus can be used
- // to determine the TX frequency.
+ // to set the TX frequency.
+ //
+ // If transmitting with PURESIGNAL, the frequency of
+ // the "antenna" feedback channel is set to the TX freq.
+ //
+ // This subroutine is the ONLY place here where the VFO
+ // frequencies are looked at.
//
int v;
long long freq;
break;
#endif
}
+ //
+ // When transmitting with PURESIGNAL, set frequency of PS feedback channel to tx freq
+ //
+ if (isTransmitting() && transmitter->puresignal && chan == rx_feedback_receiver()) {
+ v = -1;
+ }
if (v < 0) {
//
- // v=-1 indicates that there is no VFO associated,
- // in this case we take the TX frequency. So we can use this
- // function also to determine the TX frequency
+ // v=-1 indicates that we should use the TX frequency.
//
if(active_receiver->id==VFO_A) {
if(split) {
// If both spectra have the same number of pixels, this code
// just copies all of them
//
+#ifdef PURESIGNAL
if(tx->puresignal && tx->feedback) {
RECEIVER *rx_feedback=receiver[PS_RX_FEEDBACK];
GetPixels(rx_feedback->id,0,rx_feedback->pixel_samples,&rc);
// if full == width, then we just copy all samples
memcpy(tfp, rfp, width*sizeof(float));
} else {
+#endif
GetPixels(tx->id,0,tx->pixel_samples,&rc);
+#ifdef PURESIGNAL
}
+#endif
if(rc) {
tx_panadapter_update(tx);
}