From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Thu, 13 Jul 2023 16:34:20 +0000 (+0530)
Subject: Revert "CW level scaling: put them inside the sw_level_ctrl macro"
X-Git-Url: https://git.rkrishnan.org/pf/components/$rel_link?a=commitdiff_plain;h=57e2098b007113fc3baf214895fc8be93cb2c899;p=pihpsdr.git

Revert "CW level scaling: put them inside the sw_level_ctrl macro"

This reverts commit 999d5a1d5eb22aef8727da02ea6e18148729da52.
---

diff --git a/transmitter.c b/transmitter.c
index 894617d..37d89c4 100644
--- a/transmitter.c
+++ b/transmitter.c
@@ -1091,10 +1091,9 @@ static void full_tx_buffer(TRANSMITTER *tx) {
 	      qsample=floor(gain*ramp+0.5);         // always non-negative, isample is just the pulse envelope
 	      sidetone=sidevol * ramp * getNextInternalSideToneSample();
 
-#ifdef SW_LEVEL_CTRL
-              isample = isample >= 0.0 ? (long)floor(isample * gain + 0.5) : (long)ceil(isample * gain - 0.5);
-              qsample = qsample >= 0.0 ? (long)floor(qsample * gain + 0.5) : (long)ceil(qsample * gain - 0.5);
-#endif
+              // isample = isample >= 0.0 ? (long)floor(isample * gain + 0.5) : (long)ceil(isample * gain - 0.5);
+              // qsample = qsample >= 0.0 ? (long)floor(qsample * gain + 0.5) : (long)ceil(qsample * gain - 0.5);
+
 	      old_protocol_iq_samples_with_sidetone(isample,qsample,sidetone);
 	    }
 	    break;
@@ -1108,10 +1107,9 @@ static void full_tx_buffer(TRANSMITTER *tx) {
 	      ramp=cw_shape_buffer192[j];	    		// between 0.0 and 1.0
 	      qsample=floor(gain*ramp+0.5);         	    	// always non-negative, isample is just the pulse envelope
 
-#ifdef SW_LEVEL_CTRL
-              isample = isample >= 0.0 ? (long)floor(isample * gain + 0.5) : (long)ceil(isample * gain - 0.5);
-              qsample = qsample >= 0.0 ? (long)floor(qsample * gain + 0.5) : (long)ceil(qsample * gain - 0.5);
-#endif
+              // isample = isample >= 0.0 ? (long)floor(isample * gain + 0.5) : (long)ceil(isample * gain - 0.5);
+              // qsample = qsample >= 0.0 ? (long)floor(qsample * gain + 0.5) : (long)ceil(qsample * gain - 0.5);
+
 	      new_protocol_iq_samples(isample,qsample);
 	    }
 	    break;