]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
debug: s meter gain/attn toggle button
authorRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Sat, 22 Jan 2022 13:22:14 +0000 (18:52 +0530)
committerRamakrishnan Muthukrishnan <ram@rkrishnan.org>
Sat, 22 Jan 2022 13:22:14 +0000 (18:52 +0530)
meter.c

diff --git a/meter.c b/meter.c
index c9e54de7fe693489d13a74d6fedffbd25b73ab15..4bad5d789177318799dcc5ba0dceabfefb591a83 100644 (file)
--- a/meter.c
+++ b/meter.c
@@ -192,9 +192,9 @@ if(analog_meter) {
   switch(meter_type) {
     case SMETER:
       {
-          double offset = with_gain ? 0 : adc[rx->adc].gain;
+          double offset = with_gain ? 0 : adc[rx->adc].attenuation;
           if(have_rx_gain) {
-              level = value + rx_gain_calibration - adc[rx->adc].attenuation - offset;
+              level = value + rx_gain_calibration - offset;
           } else {
               level=value + (double)adc[rx->adc].attenuation;
           }