From: Ramakrishnan Muthukrishnan <ram@rkrishnan.org>
Date: Sat, 22 Jan 2022 13:22:14 +0000 (+0530)
Subject: debug: s meter gain/attn toggle button
X-Git-Url: https://git.rkrishnan.org/components/vdrive/frontends/flags/(%5B%5E?a=commitdiff_plain;h=0f1346b8aed999133702b4ed1114c09307dd45bc;p=pihpsdr.git

debug: s meter gain/attn toggle button
---

diff --git a/meter.c b/meter.c
index c9e54de..4bad5d7 100644
--- 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;
           }