]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
comment out debug prints
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Mon, 7 Nov 2022 04:11:59 +0000 (09:41 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Mon, 7 Nov 2022 04:11:59 +0000 (09:41 +0530)
old_protocol.c
radio.c

index 2658e41479451fb652bad52780d342ec1936b886..c986de66c82ac27c15beb84f404d1925ad5a8b90 100644 (file)
@@ -1720,10 +1720,11 @@ void ozy_send_buffer() {
 #endif
         }
 
-//if(last_power!=power) {
-//  g_print("power=%d\n",power);
-//  last_power=power;
-//}
+       /* if(last_power!=power) { */
+       /*     int computed_gain = (power >> 5) + ((power + 4) >> 3); */
+       /*     g_print("power=%d, computed gain = %d\n",power, computed_gain); */
+       /*     last_power=power; */
+       /* } */
 
         output_buffer[C0]=0x12; /* addr[6:1] = 001001b */
         output_buffer[C1]=power & 0xFF;
diff --git a/radio.c b/radio.c
index 528554f3597cddef636cfb528a83954b45d23107..49412b0ddc310260c606d63ccda9ef2cfe785cb9 100644 (file)
--- a/radio.c
+++ b/radio.c
@@ -1615,18 +1615,22 @@ double getDrive(void) {
 }
 
 static int calcLevel(double d) {
-    fprintf(stderr, "calcLevel: input d = %f..", d);
   int level = 0;
   int v = get_tx_vfo();
 
   BAND *band = band_get_band(vfo[v].band);
-  double target_dbm = 10.0 * log10(d * 1000.0);
+  double target_dbm_orig = 10.0 * log10(d * 1000.0);
   double gbb = band->pa_calibration;
-  target_dbm -= gbb;
+  double target_dbm = target_dbm_orig - gbb;
   double target_volts = sqrt(pow(10, target_dbm * 0.1) * 0.05);
   double volts = min((target_volts / 0.8), 1.0);
   double actual_volts = volts * (1.0 / 0.98);
 
+  /* printf("calcLevel: d = %f\n", d); */
+  /* printf("calcLevel: target_dbm_orig = %f\n", target_dbm_orig); */
+  /* printf("calcLevel: gbb = %f\n", gbb); */
+  /* printf("calcLevel: target_dbm = %f\n", target_dbm); */
+
   if (actual_volts < 0.0) {
     actual_volts = 0.0;
   } else if (actual_volts > 1.0) {