From: c vw <dl1ycf@darc.de>
Date: Fri, 28 May 2021 09:36:42 +0000 (+0200)
Subject: Corrected RITCLEAR and suppress compiler warnings
X-Git-Url: https://git.rkrishnan.org/pf/content/frontends//%22?a=commitdiff_plain;h=a03f628bfdca9a4946d4bf619e2b25d08691b060;p=pihpsdr.git

Corrected RITCLEAR and suppress compiler warnings
---

diff --git a/midi3.c b/midi3.c
index eedf934..5abf73f 100644
--- a/midi3.c
+++ b/midi3.c
@@ -444,6 +444,7 @@ int DoTheRestOfTheMIDI(void *data) {
         case MIDI_ACTION_DIV_COARSEPHASE:   // knob or wheel supported
         case MIDI_ACTION_DIV_FINEPHASE:     // knob or wheel supported
 	case MIDI_ACTION_DIV_PHASE:		// knob or wheel supported
+            dnew=0.0;
             switch (type) {
               case MIDI_TYPE_KNOB:
 		// coarse: change phase from -180 to 180
@@ -467,9 +468,7 @@ int DoTheRestOfTheMIDI(void *data) {
 		}
                 break;
               default:
-                // do not change
-                // we should not come here anyway
-                dnew = 0.0;
+                // do nothing
                 break;
             }
             // dnew is the delta
@@ -834,7 +833,8 @@ int DoTheRestOfTheMIDI(void *data) {
 	/////////////////////////////////////////////////////////// "RITCLEAR"
 	case MIDI_ACTION_RIT_CLEAR:	  // only key supported
 	    // clear RIT value
-	    vfo[active_receiver->id].rit = new;
+	    vfo[active_receiver->id].rit = 0;
+	    vfo[active_receiver->id].rit_enabled = 0;
             vfo_update();
 	    break;
 	/////////////////////////////////////////////////////////// "RITSTEP"