From afa3d3eff1d40a7a524bd2e44b0a9415bb9122aa Mon Sep 17 00:00:00 2001
From: John Melton G0ORX <john.d.melton@googlemail.com>
Date: Fri, 28 Feb 2020 22:12:34 +0000
Subject: [PATCH] save rx_gain_calibration

---
 radio.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/radio.c b/radio.c
index 8c08ee6..59282f8 100644
--- a/radio.c
+++ b/radio.c
@@ -1864,6 +1864,10 @@ g_print("radioRestoreState: %s\n",property_path);
     value=getProperty("iqswap");
     if(value) iqswap=atoi(value);
 
+    value=getProperty("rx_gain_calibration");
+    if(value) rx_gain_calibration=atoi(value);
+
+
     filterRestoreState();
     bandRestoreState();
     memRestoreState();
@@ -2106,6 +2110,9 @@ g_print("radioSaveState: %s\n",property_path);
     sprintf(value,"%d",adc_attenuation[1]);
     setProperty("adc_1_attenuation",value);
 	
+    sprintf(value,"%d",rx_gain_calibration);
+    setProperty("rx_gain_calibration",value);
+
 #ifdef SOAPYSDR
     if(device==SOAPYSDR_USB_DEVICE) {
       char name[128];
-- 
2.45.2