From 996e6e72e24ca518bb3f4dff8195dda637eb7e36 Mon Sep 17 00:00:00 2001
From: c vw <dl1ycf@darc.de>
Date: Sun, 16 Jan 2022 11:48:42 +0100
Subject: [PATCH] In nearly all cases where there was a check on DEVICE_METIS,
 this case also applies (if compiled for USBOZY) to DEVICE_OZY. This has been
 added.

---
 old_protocol.c | 9 +++++++++
 radio.c        | 6 ++++++
 receiver.c     | 4 ++++
 transmitter.c  | 3 +++
 tx_menu.c      | 4 ++++
 5 files changed, 26 insertions(+)

diff --git a/old_protocol.c b/old_protocol.c
index 1fcb9ca..2e7d22c 100644
--- a/old_protocol.c
+++ b/old_protocol.c
@@ -659,6 +659,9 @@ static int rx_feedback_channel() {
   switch (device) {
     case DEVICE_METIS:
     case DEVICE_HERMES_LITE:
+#ifdef USBOZY
+    case DEVICE_OZY:
+#endif
       ret=0;
       break;
     case DEVICE_HERMES:
@@ -690,6 +693,9 @@ static int tx_feedback_channel() {
   switch (device) {
     case DEVICE_METIS:
     case DEVICE_HERMES_LITE:
+#ifdef USBOZY
+    case DEVICE_OZY:
+#endif
       ret=1;
       break;
     case DEVICE_HERMES:
@@ -813,6 +819,9 @@ static int how_many_receivers() {
     switch (device) {
       case DEVICE_METIS:
       case DEVICE_HERMES_LITE:
+#ifdef USBOZY
+      case DEVICE_OZY:
+#endif
 	ret=2;  // TX feedback hard-wired to RX2
 	break;
       case DEVICE_HERMES:
diff --git a/radio.c b/radio.c
index 6b202a5..3f88e03 100644
--- a/radio.c
+++ b/radio.c
@@ -710,6 +710,9 @@ void start_radio() {
     case ORIGINAL_PROTOCOL:
       switch(device) {
         case DEVICE_METIS:
+#ifdef USBOZY
+	case DEVICE_OZY:
+#endif
           pa_power=PA_1W;
           break;
         case DEVICE_HERMES:
@@ -1072,6 +1075,9 @@ void start_radio() {
     case ORIGINAL_PROTOCOL:
       switch(device) {
         case DEVICE_METIS: // No support for multiple MERCURY cards on a single ATLAS bus.
+#ifdef USBOZY
+       case DEVICE_OZY:    // No support for multiple MERCURY cards on a single ATLAS bus.
+#endif
         case DEVICE_HERMES:
         case DEVICE_HERMES_LITE:
         case DEVICE_HERMES_LITE2:
diff --git a/receiver.c b/receiver.c
index 37e652b..26b703b 100644
--- a/receiver.c
+++ b/receiver.c
@@ -1011,6 +1011,10 @@ g_print("%s: id=%d buffer_size=%d fft_size=%d pixels=%d fps=%d\n",__FUNCTION__,i
         case ORIGINAL_PROTOCOL:
           switch(device) {
             case DEVICE_METIS:
+#ifdef USBOZY
+	    case DEVICE_OZY:
+#endif
+
             case DEVICE_HERMES:
             case DEVICE_HERMES_LITE:			
             case DEVICE_HERMES_LITE2:			
diff --git a/transmitter.c b/transmitter.c
index bbc2713..719439c 100644
--- a/transmitter.c
+++ b/transmitter.c
@@ -505,6 +505,9 @@ static gboolean update_display(gpointer data) {
       case ORIGINAL_PROTOCOL:
         switch(device) {
           case DEVICE_METIS:
+#ifdef USBOZY
+	  case DEVICE_OZY:
+#endif
             constant1=3.3;
             constant2=0.09;
             break;
diff --git a/tx_menu.c b/tx_menu.c
index 040643e..0d7d36e 100644
--- a/tx_menu.c
+++ b/tx_menu.c
@@ -308,6 +308,10 @@ void tx_menu(GtkWidget *parent) {
     case ORIGINAL_PROTOCOL:
       switch(device) {
         case DEVICE_METIS:
+#ifdef USBOZY
+	case DEVICE_OZY:
+#endif
+
         case DEVICE_HERMES:
         case DEVICE_GRIFFIN:
         case DEVICE_ANGELIA:
-- 
2.45.2